using System; using System.Configuration; namespace ScreenConnect; [SettingsProvider(typeof(ApplicationSettingsProvider))] [ConfigurationSection(AlternativeSectionNames = new string[] { "ScreenConnect.UserInterfaceSettings", "ScreenConnect.SystemSettings" })] public class ApplicationSettings : ApplicationSettingsBaseEx { public static readonly ApplicationSettings Instance = (ApplicationSettings)(object)SettingsBase.Synchronized((SettingsBase)(object)new ApplicationSettings()); public const string ToolboxDirectoryKey = "ToolboxDirectory"; public const string FilesDirectoryKey = "FilesDirectory"; public const string CapturesDirectoryKey = "CapturesDirectory"; public const string SendFilesDirectoryKey = "SendFilesDirectory"; public const string SupportAccessDockControlPanelIDsKey = "SupportAccessDockControlPanelIDs"; public const string MeetingDockControlPanelIDsKey = "MeetingDockControlPanelIDs"; [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("true")] public bool ShowBalloonOnConnect => (bool)((SettingsBase)this)["ShowBalloonOnConnect"]; [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("true")] public bool SupportShowBalloonOnConnect => (bool)((SettingsBase)this)["SupportShowBalloonOnConnect"]; [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("true")] public bool AccessShowBalloonOnConnect => (bool)((SettingsBase)this)["AccessShowBalloonOnConnect"]; [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("true")] public bool HideWallpaperOnConnect => (bool)((SettingsBase)this)["HideWallpaperOnConnect"]; [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("true")] public bool SupportHideWallpaperOnConnect => (bool)((SettingsBase)this)["SupportHideWallpaperOnConnect"]; [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("true")] public bool AccessHideWallpaperOnConnect => (bool)((SettingsBase)this)["AccessHideWallpaperOnConnect"]; [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("true")] public bool SupportShowBalloonOnHide => (bool)((SettingsBase)this)["SupportShowBalloonOnHide"]; [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("true")] public bool AccessShowBalloonOnHide => (bool)((SettingsBase)this)["AccessShowBalloonOnHide"]; [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("true")] public bool SupportShowUnderControlBanner => (bool)((SettingsBase)this)["SupportShowUnderControlBanner"]; [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("true")] public bool AccessShowUnderControlBanner => (bool)((SettingsBase)this)["AccessShowUnderControlBanner"]; [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("true")] public bool ShowSystemTrayIcon => (bool)((SettingsBase)this)["ShowSystemTrayIcon"]; [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("true")] public bool SupportShowSystemTrayIcon => (bool)((SettingsBase)this)["SupportShowSystemTrayIcon"]; [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("true")] public bool AccessShowSystemTrayIcon => (bool)((SettingsBase)this)["AccessShowSystemTrayIcon"]; [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("false")] public bool ShowTrayIconContextMenuStoreLoginCredentialsItem { get { return (bool)((SettingsBase)this)["ShowTrayIconContextMenuStoreLoginCredentialsItem"]; } set { ((SettingsBase)this)["ShowTrayIconContextMenuStoreLoginCredentialsItem"] = value; } } [Setting] [DefaultSettingValue("true")] public bool ShowFeedbackSurveyForm { get { return (bool)((SettingsBase)this)["ShowFeedbackSurveyForm"]; } set { ((SettingsBase)this)["ShowFeedbackSurveyForm"] = value; } } [Setting] [RestrictToTrustworthySources] public string DisabledCommandNames => (string)((SettingsBase)this)["DisabledCommandNames"]; [Setting] [DefaultSettingValue("false")] public bool AlwaysOnTop { get { return (bool)((SettingsBase)this)["AlwaysOnTop"]; } set { ((SettingsBase)this)["AlwaysOnTop"] = value; } } [Setting] [DefaultSettingValue("false")] public bool HostAlwaysOnTop { get { return (bool)((SettingsBase)this)["HostAlwaysOnTop"]; } set { ((SettingsBase)this)["HostAlwaysOnTop"] = value; } } [Setting] [DefaultSettingValue("false")] public bool GuestAlwaysOnTop { get { return (bool)((SettingsBase)this)["GuestAlwaysOnTop"]; } set { ((SettingsBase)this)["GuestAlwaysOnTop"] = value; } } [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("true")] public bool AllowGuestInitiatedFileTransfer => (bool)((SettingsBase)this)["AllowGuestInitiatedFileTransfer"]; [Setting] [DefaultSettingValue("false")] public bool BeepOnConnect { get { return (bool)((SettingsBase)this)["BeepOnConnect"]; } set { ((SettingsBase)this)["BeepOnConnect"] = value; } } [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("false")] public bool SuspendControlAtStartup => (bool)((SettingsBase)this)["SuspendControlAtStartup"]; [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("false")] public bool SupportSuspendControlAtStartup => (bool)((SettingsBase)this)["SupportSuspendControlAtStartup"]; [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("false")] public bool MeetingSuspendControlAtStartup => (bool)((SettingsBase)this)["MeetingSuspendControlAtStartup"]; [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("false")] public bool AccessSuspendControlAtStartup => (bool)((SettingsBase)this)["AccessSuspendControlAtStartup"]; [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("true")] public bool ShowCloseDialogOnExit => (bool)((SettingsBase)this)["ShowCloseDialogOnExit"]; [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("false")] public bool AlwaysDeleteSessionOnExit => (bool)((SettingsBase)this)["AlwaysDeleteSessionOnExit"]; [Setting] [DefaultSettingValue("true")] public bool SupportAccessHostFullScreenWhenMaximized { get { return (bool)((SettingsBase)this)["SupportAccessHostFullScreenWhenMaximized"]; } set { ((SettingsBase)this)["SupportAccessHostFullScreenWhenMaximized"] = value; } } [Setting] [DefaultSettingValue("false")] public bool FullScreenWhenMaximized { get { return (bool)((SettingsBase)this)["FullScreenWhenMaximized"]; } set { ((SettingsBase)this)["FullScreenWhenMaximized"] = value; } } [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("false")] public bool DisableClipboardCapture => (bool)((SettingsBase)this)["DisableClipboardCapture"]; [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("true")] public bool ShowMacGrantAccessibilityPermissionsInstructionalDialog => (bool)((SettingsBase)this)["ShowMacGrantAccessibilityPermissionsInstructionalDialog"]; [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("0")] public int AutoConsentAfterSeconds => (int)((SettingsBase)this)["AutoConsentAfterSeconds"]; [Setting] public string SpeakersDeviceID { get { return (string)((SettingsBase)this)["SpeakersDeviceID"]; } set { ((SettingsBase)this)["SpeakersDeviceID"] = value; } } [Setting] public string MicrophoneDeviceID { get { return (string)((SettingsBase)this)["MicrophoneDeviceID"]; } set { ((SettingsBase)this)["MicrophoneDeviceID"] = value; } } [Setting] public int AnnotationTool { get { return (int)((SettingsBase)this)["AnnotationTool"]; } set { ((SettingsBase)this)["AnnotationTool"] = value; } } [Setting] [DefaultSettingValue("12")] public int AnnotationStrokeThickness { get { return (int)((SettingsBase)this)["AnnotationStrokeThickness"]; } set { ((SettingsBase)this)["AnnotationStrokeThickness"] = value; } } [Setting] public bool IsMicrophoneMuted { get { return (bool)((SettingsBase)this)["IsMicrophoneMuted"]; } set { ((SettingsBase)this)["IsMicrophoneMuted"] = value; } } [Setting] public bool AreSpeakersMuted { get { return (bool)((SettingsBase)this)["AreSpeakersMuted"]; } set { ((SettingsBase)this)["AreSpeakersMuted"] = value; } } [Setting] [DefaultSettingValue("DarkTheme")] public string ColorTheme { get { return (string)((SettingsBase)this)["ColorTheme"]; } set { ((SettingsBase)this)["ColorTheme"] = value; } } [Setting] public bool EnableClipboardHelp { get { return (bool)((SettingsBase)this)["EnableClipboardHelp"]; } set { ((SettingsBase)this)["EnableClipboardHelp"] = value; } } [Setting] [DefaultSettingValue("Google")] public string HelpProviderName { get { return (string)((SettingsBase)this)["HelpProviderName"]; } set { ((SettingsBase)this)["HelpProviderName"] = value; } } [Setting] public byte[] HelpSettings { get { return (byte[])((SettingsBase)this)["HelpSettings"]; } set { ((SettingsBase)this)["HelpSettings"] = value; } } [Setting] public string LastClientVersionNotUpgradedTo { get { return (string)((SettingsBase)this)["LastClientVersionNotUpgradedTo"]; } set { ((SettingsBase)this)["LastClientVersionNotUpgradedTo"] = value; } } [Setting] [DefaultSettingValue("Toolbox")] public string ToolboxDirectory { get { return (string)((SettingsBase)this)["ToolboxDirectory"]; } set { ((SettingsBase)this)["ToolboxDirectory"] = value; } } [Setting] [DefaultSettingValue("Files")] public string FilesDirectory { get { return (string)((SettingsBase)this)["FilesDirectory"]; } set { ((SettingsBase)this)["FilesDirectory"] = value; } } [Setting] [DefaultSettingValue("Captures")] public string CapturesDirectory { get { return (string)((SettingsBase)this)["CapturesDirectory"]; } set { ((SettingsBase)this)["CapturesDirectory"] = value; } } [Setting] [DefaultSettingValue("Files")] public string SendFilesDirectory { get { return (string)((SettingsBase)this)["SendFilesDirectory"]; } set { ((SettingsBase)this)["SendFilesDirectory"] = value; } } [Setting] [DefaultSettingValue("0x0000001555111110")] public long ControlPanelIDs { get { return (long)((SettingsBase)this)["ControlPanelIDs"]; } set { ((SettingsBase)this)["ControlPanelIDs"] = value; } } [Setting] [DefaultSettingValue("0x0000001104000000")] public long SupportAccessGuestControlPanelIDs { get { return (long)((SettingsBase)this)["SupportAccessGuestControlPanelIDs"]; } set { ((SettingsBase)this)["SupportAccessGuestControlPanelIDs"] = value; } } [Setting] [DefaultSettingValue("0x0000001115000000")] public long SupportAccessGuestRenderControlPanelIDs { get { return (long)((SettingsBase)this)["SupportAccessGuestRenderControlPanelIDs"]; } set { ((SettingsBase)this)["SupportAccessGuestRenderControlPanelIDs"] = value; } } [Setting] [DefaultSettingValue("0x0000000110000000")] public long SupportAccessGuestRenderDockControlPanelIDs { get { return (long)((SettingsBase)this)["SupportAccessGuestRenderDockControlPanelIDs"]; } set { ((SettingsBase)this)["SupportAccessGuestRenderDockControlPanelIDs"] = value; } } [Setting] [DefaultSettingValue("0x0000001555111100")] public long SupportAccessHostControlPanelIDs { get { return (long)((SettingsBase)this)["SupportAccessHostControlPanelIDs"]; } set { ((SettingsBase)this)["SupportAccessHostControlPanelIDs"] = value; } } [Setting] [DefaultSettingValue("0x0000001154000010")] public long CaptureControlPanelIDs { get { return (long)((SettingsBase)this)["CaptureControlPanelIDs"]; } set { ((SettingsBase)this)["CaptureControlPanelIDs"] = value; } } [Setting] [DefaultSettingValue("0x0000001155000100")] public long MeetingControlPanelIDs { get { return (long)((SettingsBase)this)["MeetingControlPanelIDs"]; } set { ((SettingsBase)this)["MeetingControlPanelIDs"] = value; } } [Setting] [DefaultSettingValue("0x0000000000000000")] public long SupportAccessDockControlPanelIDs { get { return (long)((SettingsBase)this)["SupportAccessDockControlPanelIDs"]; } set { ((SettingsBase)this)["SupportAccessDockControlPanelIDs"] = value; } } [Setting] [DefaultSettingValue("0x0000000110000000")] public long MeetingDockControlPanelIDs { get { return (long)((SettingsBase)this)["MeetingDockControlPanelIDs"]; } set { ((SettingsBase)this)["MeetingDockControlPanelIDs"] = value; } } [Setting] public string MainFormConfigurationMap { get { return (string)((SettingsBase)this)["MainFormConfigurationMap"]; } set { ((SettingsBase)this)["MainFormConfigurationMap"] = value; } } [Setting] public string MainFormConfigurationList { get { return (string)((SettingsBase)this)["MainFormConfigurationList"]; } set { ((SettingsBase)this)["MainFormConfigurationList"] = value; } } [Setting] [DefaultSettingValue("3")] public int MainFormConfigurationDaysTimeout { get { return (int)((SettingsBase)this)["MainFormConfigurationDaysTimeout"]; } set { ((SettingsBase)this)["MainFormConfigurationDaysTimeout"] = value; } } [Setting] [DefaultSettingValue("10000")] public int MainFormConfigurationTrackerTimeoutMilliseconds { get { return (int)((SettingsBase)this)["MainFormConfigurationTrackerTimeoutMilliseconds"]; } set { ((SettingsBase)this)["MainFormConfigurationTrackerTimeoutMilliseconds"] = value; } } [Setting] [DefaultSettingValue("true")] public bool EnableMainFormConfigurationRestoration { get { return (bool)((SettingsBase)this)["EnableMainFormConfigurationRestoration"]; } set { ((SettingsBase)this)["EnableMainFormConfigurationRestoration"] = value; } } [Setting] public string HostToAddressMap { get { return (string)((SettingsBase)this)["HostToAddressMap"]; } set { ((SettingsBase)this)["HostToAddressMap"] = value; } } [Setting] [RestrictToTrustworthySources] public string ClientLaunchParametersConstraint { get { return (string)((SettingsBase)this)["ClientLaunchParametersConstraint"]; } set { ((SettingsBase)this)["ClientLaunchParametersConstraint"] = value; } } [Setting] public byte[] StoredDomain { get { return (byte[])((SettingsBase)this)["StoredDomain"]; } set { ((SettingsBase)this)["StoredDomain"] = value; } } [Setting] public byte[] StoredUserName { get { return (byte[])((SettingsBase)this)["StoredUserName"]; } set { ((SettingsBase)this)["StoredUserName"] = value; } } [Setting] public byte[] StoredPassword { get { return (byte[])((SettingsBase)this)["StoredPassword"]; } set { ((SettingsBase)this)["StoredPassword"] = value; } } [Setting] public DateTime StoredCredentialsExpirationDateTime { get { return (DateTime)((SettingsBase)this)["StoredCredentialsExpirationDateTime"]; } set { ((SettingsBase)this)["StoredCredentialsExpirationDateTime"] = value; } } [Setting] [DefaultSettingValue("1,4,8,24,72,120")] public string StoredCredentialsLifetimeOptionsInHours { get { return (string)((SettingsBase)this)["StoredCredentialsLifetimeOptionsInHours"]; } set { ((SettingsBase)this)["StoredCredentialsLifetimeOptionsInHours"] = value; } } [Setting] public byte[] DiscoveredProxyUri { get { return (byte[])((SettingsBase)this)["DiscoveredProxyUri"]; } set { ((SettingsBase)this)["DiscoveredProxyUri"] = value; } } [Setting] public byte[] ExplicitProxyUri { get { return (byte[])((SettingsBase)this)["ExplicitProxyUri"]; } set { ((SettingsBase)this)["ExplicitProxyUri"] = value; } } [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("60")] public int KeepAliveTimeSeconds { get { return (int)((SettingsBase)this)["KeepAliveTimeSeconds"]; } set { ((SettingsBase)this)["KeepAliveTimeSeconds"] = value; } } [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("1800")] public int ApplicationPingTimeSeconds { get { return (int)((SettingsBase)this)["ApplicationPingTimeSeconds"]; } set { ((SettingsBase)this)["ApplicationPingTimeSeconds"] = value; } } [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("1800000")] public int MaxRetrySleepMilliseconds { get { return (int)((SettingsBase)this)["MaxRetrySleepMilliseconds"]; } set { ((SettingsBase)this)["MaxRetrySleepMilliseconds"] = value; } } [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("21600000")] public int ClientConnectionLimitPeriodMilliseconds { get { return (int)((SettingsBase)this)["ClientConnectionLimitPeriodMilliseconds"]; } set { ((SettingsBase)this)["ClientConnectionLimitPeriodMilliseconds"] = value; } } [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("30")] public int ClientConnectionLimitPerPeriodBeforeMaxWait { get { return (int)((SettingsBase)this)["ClientConnectionLimitPerPeriodBeforeMaxWait"]; } set { ((SettingsBase)this)["ClientConnectionLimitPerPeriodBeforeMaxWait"] = value; } } [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("60000")] public int ClientServiceTimeoutMilliseconds { get { return (int)((SettingsBase)this)["ClientServiceTimeoutMilliseconds"]; } set { ((SettingsBase)this)["ClientServiceTimeoutMilliseconds"] = value; } } [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("")] public string EmptySessionProgramsToStart { get { return (string)((SettingsBase)this)["EmptySessionProgramsToStart"]; } set { ((SettingsBase)this)["EmptySessionProgramsToStart"] = value; } } [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("false")] public bool AutoConsentToBackstage { get { return (bool)((SettingsBase)this)["AutoConsentToBackstage"]; } set { ((SettingsBase)this)["AutoConsentToBackstage"] = value; } } [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("false")] public bool IsUserAllowedToRequireConsent { get { return (bool)((SettingsBase)this)["IsUserAllowedToRequireConsent"]; } set { ((SettingsBase)this)["IsUserAllowedToRequireConsent"] = value; } } [Setting] [DefaultSettingValue("false")] public bool IsConsentRequired { get { return (bool)((SettingsBase)this)["IsConsentRequired"]; } set { ((SettingsBase)this)["IsConsentRequired"] = value; } } [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("false")] public bool IsBackstageDefault { get { return (bool)((SettingsBase)this)["IsBackstageDefault"]; } set { ((SettingsBase)this)["IsBackstageDefault"] = value; } } [Setting] [DefaultSettingValue("200")] public int SendClipboardKeystrokesWarningCharacterThreshold { get { return (int)((SettingsBase)this)["SendClipboardKeystrokesWarningCharacterThreshold"]; } set { ((SettingsBase)this)["SendClipboardKeystrokesWarningCharacterThreshold"] = value; } } [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("false")] public bool AutoConsentIfUserProcessNotRunning { get { return (bool)((SettingsBase)this)["AutoConsentIfUserProcessNotRunning"]; } set { ((SettingsBase)this)["AutoConsentIfUserProcessNotRunning"] = value; } } [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("false")] public bool SupportAutoConsentIfUserProcessNotRunning { get { return (bool)((SettingsBase)this)["SupportAutoConsentIfUserProcessNotRunning"]; } set { ((SettingsBase)this)["SupportAutoConsentIfUserProcessNotRunning"] = value; } } [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("false")] public bool AccessAutoConsentIfUserProcessNotRunning { get { return (bool)((SettingsBase)this)["AccessAutoConsentIfUserProcessNotRunning"]; } set { ((SettingsBase)this)["AccessAutoConsentIfUserProcessNotRunning"] = value; } } [Setting] public byte[] AccessGuestVerificationKey { get { return (byte[])((SettingsBase)this)["AccessGuestVerificationKey"]; } set { ((SettingsBase)this)["AccessGuestVerificationKey"] = value; } } [UserScopedSetting] [DefaultSettingValue("TempAdmin-{0}")] public string CredentialProviderUserNameFormat { get { return (string)((SettingsBase)this)["CredentialProviderUserNameFormat"]; } set { ((SettingsBase)this)["CredentialProviderUserNameFormat"] = value; } } [UserScopedSetting] [DefaultSettingValue("true")] public bool MaintainEphemeralUsers { get { return (bool)((SettingsBase)this)["MaintainEphemeralUsers"]; } set { ((SettingsBase)this)["MaintainEphemeralUsers"] = value; } } [UserScopedSetting] [DefaultSettingValue("30")] public int EphemeralUserDisableDayCount { get { return (int)((SettingsBase)this)["EphemeralUserDisableDayCount"]; } set { ((SettingsBase)this)["EphemeralUserDisableDayCount"] = value; } } [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("false")] public bool SupportLockMachineOnDisconnect { get { return (bool)((SettingsBase)this)["SupportLockMachineOnDisconnect"]; } set { ((SettingsBase)this)["SupportLockMachineOnDisconnect"] = value; } } [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("false")] public bool AccessLockMachineOnDisconnect => (bool)((SettingsBase)this)["AccessLockMachineOnDisconnect"]; [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("false")] public bool SupportLockMachineOnConnect => (bool)((SettingsBase)this)["SupportLockMachineOnConnect"]; [Setting] [RestrictToTrustworthySources] [DefaultSettingValue("false")] public bool AccessLockMachineOnConnect => (bool)((SettingsBase)this)["AccessLockMachineOnConnect"]; protected ApplicationSettings() { } public ApplicationSettings(SettingsProvider provider) : base(provider) { } public bool ShouldShowBalloonOnConnect(SessionType sessionType) { return true; } public bool ShouldHideWallpaperOnConnect(SessionType sessionType) { if (!HideWallpaperOnConnect) { return false; } if (sessionType == SessionType.Support && !SupportHideWallpaperOnConnect) { return false; } if (sessionType == SessionType.Access && !AccessHideWallpaperOnConnect) { return false; } return true; } public bool ShouldShowBalloonOnHide(SessionType sessionType) { if (sessionType == SessionType.Support && !SupportShowBalloonOnHide) { return false; } if (sessionType == SessionType.Access && !AccessShowBalloonOnHide) { return false; } return true; } public bool ShouldShowUnderControlBanner(SessionType sessionType) { return true; } public bool ShouldShowSystemTrayIcon(SessionType sessionType) { return true; } public bool IsAlwaysOnTop(ProcessType processType) { if (processType == ProcessType.Host && HostAlwaysOnTop) { return true; } if (processType == ProcessType.Guest && GuestAlwaysOnTop) { return true; } if (AlwaysOnTop) { return true; } return false; } public void SetAlwaysOnTop(ProcessType processType, bool value) { if (processType == ProcessType.Host) { HostAlwaysOnTop = value; } else { GuestAlwaysOnTop = value; } AlwaysOnTop = false; } public bool ShouldSuspendControlAtStartup(SessionType sessionType) { if (SuspendControlAtStartup) { return true; } if (sessionType == SessionType.Support && SupportSuspendControlAtStartup) { return true; } if (sessionType == SessionType.Meeting && MeetingSuspendControlAtStartup) { return true; } if (sessionType == SessionType.Access && AccessSuspendControlAtStartup) { return true; } return false; } public bool ShouldAutoConsentIfUserProcessNotRunning(SessionType sessionType) { if (AutoConsentIfUserProcessNotRunning) { return true; } if (sessionType == SessionType.Support && SupportAutoConsentIfUserProcessNotRunning) { return true; } if (sessionType == SessionType.Access && AccessAutoConsentIfUserProcessNotRunning) { return true; } return false; } public bool ShouldLockMachineOnDisconnect(SessionType sessionType) { if (sessionType != SessionType.Support || !SupportLockMachineOnDisconnect) { if (sessionType == SessionType.Access) { return AccessLockMachineOnDisconnect; } return false; } return true; } public bool ShouldLockMachineOnConnect(SessionType sessionType) { if (sessionType != SessionType.Support || !SupportLockMachineOnConnect) { if (sessionType == SessionType.Access) { return AccessLockMachineOnConnect; } return false; } return true; } }