// Public public AppSettings() { CurrentUser=Registry.CurrentUser; Autorun= CurrentUser.OpenSubKey ( @"Software\Microsoft\Windows\CurrentVersion\Run", true ); AppKey= SafeRegistryMethods.GetRegistrySubKey ( CurrentUser, @"Software\CW" ); defSettings=new DefaultAppSettings(); height= SafeRegistryMethods.GetIntValue ( AppKey, "Height", defSettings.Height ); if(height<0) height=defSettings.Height; width= SafeRegistryMethods.GetIntValue ( AppKey, "Width", defSettings.Width ); if(width<0) width=defSettings.Width; localization= SafeRegistryMethods.GetEnumValue ( AppKey, "Localization", defSettings.Localization ); confirmClipboardClear= SafeRegistryMethods.GetBoolValue ( AppKey, "ConfirmClipboardClear", defSettings.ConfirmClipboardClear ); confirmExit= SafeRegistryMethods.GetBoolValue ( AppKey, "ConfirmExit", defSettings.ConfirmExit ); showNotifyIcon= SafeRegistryMethods.GetBoolValue ( AppKey, "ShowNotifyIcon", defSettings.ShowNotifyIcon ); trayMinimize= SafeRegistryMethods.GetBoolValue ( AppKey, "TrayMinimize", defSettings.TrayMinimize ); showNotifications= SafeRegistryMethods.GetBoolValue ( AppKey, "ShowNotifications", defSettings.ShowNotifications ); }
// Public public AppSettings() { CurrentUser = Registry.CurrentUser; Autorun = CurrentUser.OpenSubKey ( @"Software\Microsoft\Windows\CurrentVersion\Run", true ); AppKey = SafeRegistryMethods.GetRegistrySubKey ( CurrentUser, @"Software\CW" ); defSettings = new DefaultAppSettings(); height = SafeRegistryMethods.GetIntValue ( AppKey, "Height", defSettings.Height ); if (height < 0) { height = defSettings.Height; } width = SafeRegistryMethods.GetIntValue ( AppKey, "Width", defSettings.Width ); if (width < 0) { width = defSettings.Width; } localization = SafeRegistryMethods.GetEnumValue ( AppKey, "Localization", defSettings.Localization ); toolBarVisible = SafeRegistryMethods.GetBoolValue ( AppKey, "ToolBarVisible", defSettings.ToolBarVisible ); listViewVisible = SafeRegistryMethods.GetBoolValue ( AppKey, "ListViewVisible", defSettings.ListViewVisible ); listViewHorizontalAlignment = SafeRegistryMethods.GetEnumValue ( AppKey, "ListViewHorizontalAlignment", defSettings.ListViewHorizontalAlignment ); tabItemAlignment = SafeRegistryMethods.GetEnumValue ( AppKey, "TabItemAlignment", defSettings.TabItemAlignment ); statusBarVisible = SafeRegistryMethods.GetBoolValue ( AppKey, "StatusBarVisible", defSettings.StatusBarVisible ); confirmClipboardClear = SafeRegistryMethods.GetBoolValue ( AppKey, "ConfirmClipboardClear", defSettings.ConfirmClipboardClear ); confirmExit = SafeRegistryMethods.GetBoolValue ( AppKey, "ConfirmExit", defSettings.ConfirmExit ); showNotifyIcon = SafeRegistryMethods.GetBoolValue ( AppKey, "ShowNotifyIcon", defSettings.ShowNotifyIcon ); trayMinimize = SafeRegistryMethods.GetBoolValue ( AppKey, "TrayMinimize", defSettings.TrayMinimize ); showNotifications = SafeRegistryMethods.GetBoolValue ( AppKey, "ShowNotifications", defSettings.ShowNotifications ); }