public void BeforeClose() { PageCollection.Save(); Properties.Settings.Default.Save(); RegistryKey registryKey = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Run", true); string executablePath = AppDomain.CurrentDomain.BaseDirectory + "Sidebar.exe"; if (Properties.Settings.Default.AddToStartup) { registryKey.SetValue("SideBar", executablePath); } else { registryKey.DeleteValue("SideBar", false); } }
/* ----------------------------------------------------------------- */ /// /// ExecRecovery /// /// <summary> /// 復旧処理を実行します。 /// </summary> /// /* ----------------------------------------------------------------- */ static void ExecRecovery(PageCollection pages, SettingsFolder settings) { Puts(Properties.Resources.ExecRecovery); pages.Recover(settings.MaxAbstractLength); pages.Save(); }