private void panel_theme_Click(object sender, EventArgs e)
        {
            Theme.CI ci = (Theme.CI)(((Control)sender).Tag);        // tag carries the colour we want to edit

            if (EditColor(ci))
            {
                UpdatePatchesEtc();
            }
        }
        public bool EditColor(Theme.CI ex)
        {
            ColorDialog MyDialog = new ColorDialog();

            MyDialog.AllowFullOpen = true;
            MyDialog.FullOpen      = true;
            MyDialog.Color         = Theme.GetColor(ex);

            if (MyDialog.ShowDialog(this) == DialogResult.OK)
            {
                Theme.SetColor(ex, MyDialog.Color);
                Theme.SetCustom();
                ApplyChanges?.Invoke(Theme);
                return(true);
            }
            else
            {
                return(false);
            }
        }
 private void SetPanel(Panel pn, string name, Theme.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);
 }
 private void UpdatePatch(Panel pn)
 {
     Theme.CI ci = (Theme.CI)(pn.Tag);
     pn.BackColor = Theme.GetColor(ci);
 }