예제 #1
0
        private void panel_theme_Click(object sender, EventArgs e)
        {
            ThemeStandard.Settings.CI ci = (ThemeStandard.Settings.CI)(((Control)sender).Tag);        // tag carries the colour we want to edit

            if (EditColor(ci))
            {
                ApplyChanges?.Invoke();
                UpdatePatchesEtc();
            }
        }
예제 #2
0
        public bool EditColor(ThemeStandard.Settings.CI ex)
        {
            ColorDialog MyDialog = new ColorDialog();

            MyDialog.AllowFullOpen = true;
            MyDialog.FullOpen      = true;
            MyDialog.Color         = theme.currentsettings.colors[ex];

            if (MyDialog.ShowDialog(this) == DialogResult.OK)
            {
                theme.currentsettings.colors[ex] = MyDialog.Color;
                theme.SetCustom();
                return(true);
            }
            else
            {
                return(false);
            }
        }
예제 #3
0
 private void SetPanel(Panel pn, string name, ThemeStandard.Settings.CI ex)
 {
     toolTip1.SetToolTip(pn, name);        // assign tool tips and indicate which color to edit
     pn.Tag         = ex;
     pn.MouseClick += new System.Windows.Forms.MouseEventHandler(this.panel_theme_Click);
 }
예제 #4
0
 private void UpdatePatch(Panel pn)
 {
     ThemeStandard.Settings.CI ci = (ThemeStandard.Settings.CI)(pn.Tag);
     pn.BackColor = theme.currentsettings.colors[ci];
 }