Ejemplo n.º 1
0
        public static void Save()
        {
            try
            {
                RegistryKey branch = Registry.CurrentUser.OpenSubKey(sBranch, true);
                if (branch == null)
                {
                    branch = Registry.CurrentUser.CreateSubKey(sBranch);
                }

                if (branch != null)
                {
                    branch.SetValue(sMainWindowTop, MainWindowTop, RegistryValueKind.DWord);
                    branch.SetValue(sMainWindowLeft, MainWindowLeft, RegistryValueKind.DWord);
                    branch.SetValue(sMainWindowHeight, MainWindowHeight, RegistryValueKind.DWord);
                    branch.SetValue(sMainWindowWidth, MainWindowWidth, RegistryValueKind.DWord);
                    branch.SetValue(sSearchTabSplitterPosition, SearchTabSplitterPosition, RegistryValueKind.DWord);
                    branch.SetValue(sKeepArchivesDays, KeepArchivesDays, RegistryValueKind.DWord);
                    branch.SetValue(sMainWindowMaximized, MainWindowMaximized.ToString(), RegistryValueKind.String);
                    branch.SetValue(sCheckForUpdates, CheckForUpdates.ToString(), RegistryValueKind.String);
                    branch.SetValue(sIntroductionShown, IntroductionShown.ToString(), RegistryValueKind.String);
                    branch.SetValue(sShowFilenameInTitle, ShowFilenameInTitle.ToString(), RegistryValueKind.String);
                    branch.SetValue(sShowOpenDialogEachStart, ShowOpenDialogEachStart.ToString(), RegistryValueKind.String);
                    branch.SetValue(sLastUpdateDate, LastUpdateDate.ToString(), RegistryValueKind.String);
                    branch.SetValue(sUpdateInfoShown, UpdateInfoShown, RegistryValueKind.String);
                    branch.SetValue(sLanguage, Language, RegistryValueKind.String);
                }
            }
            catch (Exception e)
            {
                Log.Write(e);
            }
        }
Ejemplo n.º 2
0
        public static void Save()
        {
            try
            {
                RegistryKey branch = Registry.CurrentUser.OpenSubKey(sBranch, true);
                if (branch == null)
                {
                    branch = Registry.CurrentUser.CreateSubKey(sBranch);
                }

                if (branch != null)
                {
                    branch.SetValue(sMainWindowTop, Convert.ToInt64(MainWindowTop), RegistryValueKind.QWord);
                    branch.SetValue(sMainWindowLeft, Convert.ToInt64(MainWindowLeft), RegistryValueKind.QWord);
                    branch.SetValue(sMainWindowHeight, Convert.ToInt64(MainWindowHeight), RegistryValueKind.QWord);
                    branch.SetValue(sMainWindowWidth, Convert.ToInt64(MainWindowWidth), RegistryValueKind.QWord);
                    branch.SetValue(sMainWindowMaximized, MainWindowMaximized.ToString(), RegistryValueKind.String);
                    branch.SetValue(sCheckForUpdates, CheckForUpdates.ToString(), RegistryValueKind.String);
                    branch.SetValue(sIntroductionShown, IntroductionShown.ToString(), RegistryValueKind.String);
                    branch.SetValue(sLastUpdateDate, LastUpdateDate.ToString(), RegistryValueKind.String);
                    // branch.SetValue(sDebugLog, DebugLog.ToString(), RegistryValueKind.String);
                    branch.SetValue(sBackupAtNight, BackupAtNight.ToString(), RegistryValueKind.String);
                    branch.SetValue(sLanguage, Language, RegistryValueKind.String);
                }
            }
            catch (Exception e)
            {
                Log.Write(e);
            }
        }