fix some more inconsistencies with "StartProgramWorkDir"

This commit is contained in:
tecxx
2021-12-14 21:45:39 +01:00
parent a854b04293
commit 00bc45fba1
8 changed files with 24 additions and 3 deletions

View File

@@ -184,7 +184,7 @@ namespace mRemoteNG.Config.Serializers.MiscSerializers
if (bool.TryParse(connectionSettingsNode.SelectSingleNode("./connectToConsole")?.InnerText, out var useConsole))
connectionInfo.UseConsoleSession = useConsole;
connectionInfo.StartProgram = connectionSettingsNode.SelectSingleNode("./startProgram")?.InnerText;
// ./workingDir
connectionInfo.StartProgramWorkDir = connectionSettingsNode.SelectSingleNode("./startProgramWorkDir")?.InnerText;
if (int.TryParse(connectionSettingsNode.SelectSingleNode("./port")?.InnerText, out var port))
connectionInfo.Port = port;
}

View File

@@ -27,7 +27,6 @@ namespace mRemoteNG.Connection
private string _domain = "";
private string _vmId = "";
private bool _useEnhancedMode;
private string _startProgramWorkDir = "";
private string _sshTunnelConnectionName = "";
private ProtocolType _protocol;
@@ -81,6 +80,7 @@ namespace mRemoteNG.Connection
private string _openingCommand;
private string _userField;
private string _startProgram;
private string _startProgramWorkDir;
private bool _favorite;
private ProtocolVNC.Compression _vncCompression;

View File

@@ -368,6 +368,7 @@ namespace mRemoteNG.Connection
UserField = Settings.Default.ConDefaultUserField;
Favorite = Settings.Default.ConDefaultFavorite;
StartProgram = Settings.Default.ConDefaultStartProgram;
StartProgramWorkDir = Settings.Default.ConDefaultStartProgram;
OpeningCommand = Settings.Default.OpeningCommand;
}

View File

@@ -3107,6 +3107,18 @@ namespace mRemoteNG.Properties {
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string ConDefaultStartProgramWorkDir {
get {
return ((string)(this["ConDefaultStartProgramWorkDir"]));
}
set {
this["ConDefaultStartProgramWorkDir"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("EncrBasic")]

View File

@@ -773,6 +773,9 @@
<Setting Name="ConDefaultStartProgram" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="ConDefaultStartProgramWorkDir" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="ConDefaultICAEncryptionStrength" Type="System.String" Scope="User">
<Value Profile="(Default)">EncrBasic</Value>
</Setting>

View File

@@ -789,6 +789,9 @@
<setting name="ConDefaultStartProgram" serializeAs="String">
<value />
</setting>
<setting name="ConDefaultStartProgramWorkDir" serializeAs="String">
<value />
</setting>
<setting name="ConDefaultICAEncryptionStrength" serializeAs="String">
<value>EncrBasic</value>
</setting>

View File

@@ -73,6 +73,7 @@
public TType SSHOptions { get; set; }
public TType SSHTunnelConnectionName { get; set; }
public TType StartProgram { get; set; }
public TType StartProgramWorkDir { get; set; }
public TType OpeningCommand { get; set; }
}
}

View File

@@ -261,7 +261,8 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
nameof(ConnectionInfo.RedirectAudioCapture),
nameof(ConnectionInfo.RdpVersion),
nameof(ConnectionInfo.OpeningCommand),
nameof(ConnectionInfo.StartProgram)
nameof(ConnectionInfo.StartProgram),
nameof(ConnectionInfo.StartProgramWorkDir)
});
break;
case ProtocolType.VNC: