Esempio n. 1
0
        private void frmMain_Shown(object sender, System.EventArgs e)
        {
            themes = ThemeReader.ReadThemes();
            this.themeBindingSource.DataSource = themes;

            cboCategory.Text = "Environment";
        }
Esempio n. 2
0
        private void lnkReset_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (MessageBox.Show("This will reset your Visual Studio theme back to stock. Are you sure?", "Reset Theme", MessageBoxButtons.YesNo) != DialogResult.Yes)
            {
                return;
            }

            var theme = this.themeBindingSource.Current as Theme;

            Process.Start("regedit.exe", "VS2012.Stock.Theme." + theme.Name + ".reg")
            .WaitForExit();

            var newThemes = ThemeReader.ReadThemes();

            this.themeBindingSource.DataSource       = null;
            this.categoryBindingSource.DataSource    = null;
            this.colorRecordBindingSource.DataSource = null;

            this.themeBindingSource.DataSource = newThemes;
        }