Add Remote Desktop Services group

Add StartProgram & StartProgramWorkDir properties to Remote Desktop Services group
Corrected Redirect Drives & Smart Cards display names
This commit is contained in:
John Carew
2020-08-29 17:26:46 -05:00
parent fbcf9ccbd6
commit 6b7f6dcb19
5 changed files with 8876 additions and 8746 deletions

View File

@@ -13,9 +13,14 @@ using mRemoteNG.Tools.Attributes;
namespace mRemoteNG.Connection
{
public abstract class AbstractConnectionRecord : INotifyPropertyChanged
{
{
#region Property Names
public const string Prop_StartProgram = "StartProgram";
public const string Prop_StartProgramWorkDir = "StartProgramWorkDir";
#endregion
#region Fields
private string _name;
private string _description;
private string _icon;
@@ -27,7 +32,9 @@ namespace mRemoteNG.Connection
private string _domain = "";
private string _vmId = "";
private bool _useEnhancedMode;
private string _startProgram = "";
private string _startProgramWorkDir = "";
private string _sshTunnelConnectionName = "";
private ProtocolType _protocol;
private RdpVersion _rdpProtocolVersion;
@@ -371,9 +378,32 @@ namespace mRemoteNG.Connection
set => SetField(ref _useEnhancedMode, value, "UseEnhancedMode");
}
#endregion
#region Remote Desktop Services
[LocalizedAttributes.LocalizedCategory(nameof(Language.RemoteDesktopServices), 3),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.RDPStartProgram)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRDPStartProgram)),
AttributeUsedInProtocol(ProtocolType.RDP)]
public string StartProgram
{
get => GetPropertyValue(Prop_StartProgram, _startProgram);
set => SetField(ref _startProgram, value, Prop_StartProgram);
}
[LocalizedAttributes.LocalizedCategory(nameof(Language.RemoteDesktopServices), 3),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.RDPStartProgramWorkDir)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRDPStartProgramWorkDir)),
AttributeUsedInProtocol(ProtocolType.RDP)]
public string StartProgramWorkDir
{
get => GetPropertyValue(Prop_StartProgramWorkDir, _startProgramWorkDir);
set => SetField(ref _startProgramWorkDir, value, Prop_StartProgramWorkDir);
}
#endregion
#region RD Gateway
[LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 4),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.RdpGatewayUsageMethod)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRdpGatewayUsageMethod)),
@@ -588,7 +618,7 @@ namespace mRemoteNG.Connection
}
[LocalizedAttributes.LocalizedCategory(nameof(Language.Redirect), 6),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.Redirect)),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.RedirectDrives)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRedirectDrives)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
AttributeUsedInProtocol(ProtocolType.RDP)]
@@ -633,7 +663,7 @@ namespace mRemoteNG.Connection
}
[LocalizedAttributes.LocalizedCategory(nameof(Language.Redirect), 6),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.Redirect)),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.RedirectSmartCards)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRedirectSmartCards)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
AttributeUsedInProtocol(ProtocolType.RDP)]

View File

@@ -65,7 +65,8 @@ namespace mRemoteNG.Connection
{
SetTreeDisplayDefaults();
SetConnectionDefaults();
SetProtocolDefaults();
SetProtocolDefaults();
SetRemoteDesktopServicesDefaults();
SetRdGatewayDefaults();
SetAppearanceDefaults();
SetRedirectDefaults();
@@ -308,6 +309,12 @@ namespace mRemoteNG.Connection
UseCredSsp = Settings.Default.ConDefaultUseCredSsp;
UseVmId = Settings.Default.ConDefaultUseVmId;
UseEnhancedMode = Settings.Default.ConDefaultUseEnhancedMode;
}
private void SetRemoteDesktopServicesDefaults()
{
StartProgram = string.Empty;
StartProgramWorkDir = string.Empty;
}
private void SetRdGatewayDefaults()

View File

@@ -291,9 +291,14 @@ namespace mRemoteNG.Connection.Protocol.RDP
_rdpClient.FullScreenTitle = connectionInfo.Name;
_alertOnIdleDisconnect = connectionInfo.RDPAlertIdleTimeout;
_rdpClient.AdvancedSettings2.MinutesToIdleTimeout = connectionInfo.RDPMinutesToIdleTimeout;
//not user changeable
_rdpClient.AdvancedSettings2.MinutesToIdleTimeout = connectionInfo.RDPMinutesToIdleTimeout;
#region Remote Desktop Services
_rdpClient.SecuredSettings2.StartProgram = connectionInfo.StartProgram;
_rdpClient.SecuredSettings2.WorkDir = connectionInfo.StartProgramWorkDir;
#endregion
//not user changeable
_rdpClient.AdvancedSettings2.GrabFocusOnConnect = true;
_rdpClient.AdvancedSettings3.EnableAutoReconnect = true;
_rdpClient.AdvancedSettings3.MaxReconnectAttempts = Settings.Default.RdpReconnectionCount;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff