Example #1
0
        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;
            }
        }
Example #2
0
        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;
        }
Example #3
0
 public void configurationToolStripMenuItem_Click(object sender, EventArgs e)
 {
     ConfigDialog c = new ConfigDialog();
     c.ShowDialog();
 }
Example #4
0
        public void configurationToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ConfigDialog c = new ConfigDialog();

            c.ShowDialog();
        }