public void configurationToolStripMenuItem_Click(object sender, EventArgs e) { ConfigDialog c = new ConfigDialog(); c.Opacity = GetOpacity("ConfigOpacity"); double currentOp = Opacity; if (c.ShowDialog() == DialogResult.OK) { AppSettings.Current.SettingsTable = c.Settings.SettingsTable; AppSettings.Current.Save(); Templates.LoadTemplate(AppSettings.Current.Get <string>("Template")); if (ConfigDialog.GetLoadWithWindows() != c.LoadWithWindows) { string regkey = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; using (RegistryKey key = Registry.LocalMachine.CreateSubKey(regkey)) { if (c.LoadWithWindows) { key.SetValue("cuodesktop", Core.ExePath); } else { key.DeleteValue("cuodesktop", false); } } } Opacity = GetOpacity("BrowserOpacity"); Refresh(); } else { Opacity = currentOp; } }
public void configurationToolStripMenuItem_Click(object sender, EventArgs e) { ConfigDialog c = new ConfigDialog(); c.Opacity = GetOpacity("ConfigOpacity"); double currentOp = Opacity; if (c.ShowDialog() == DialogResult.OK) { AppSettings.Current.SettingsTable = c.Settings.SettingsTable; AppSettings.Current.Save(); Templates.LoadTemplate(AppSettings.Current.Get<string>("Template")); if (ConfigDialog.GetLoadWithWindows() != c.LoadWithWindows) { string regkey = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; using (RegistryKey key = Registry.LocalMachine.CreateSubKey(regkey)) { if (c.LoadWithWindows) key.SetValue("cuodesktop", Core.ExePath); else key.DeleteValue("cuodesktop", false); } } Opacity = GetOpacity("BrowserOpacity"); Refresh(); } else Opacity = currentOp; }
public void configurationToolStripMenuItem_Click(object sender, EventArgs e) { ConfigDialog c = new ConfigDialog(); c.ShowDialog(); }