private void ProcessColorFields(ColorFields fields)
        {
            var result = colDiag.ShowDialog();

            if (result == DialogResult.OK)
            {
                fields.SetColor(colDiag.Color);
            }
            UpdateColorDiff();
        }
        void UpdateSearch(TextBox txt, ColorFields fields)
        {
            Color col = FormColorMain.GetResearchFieldColor(txt);

            if (col != Color.Empty)
            {
                fields.SetColor(col);
            }
            UpdateColorDiff();
        }
        private void UpdateColorUI(ColorHelper.TextColorInfo info)
        {
            Color       col    = FormColorMain.GetResearchFieldColor(info.TextBox);
            ColorFields fields = GetFielsForText(info.TextBox);

            if (col != Color.Empty)
            {
                fields.SetColor(col);
            }
            UpdateColorDiff();
        }
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            _colFields1 = new ColorFields()
            {
                TxtSearch = txtSearchCol1,
                TxtHex    = txtHexColor,
                TxtRgb    = txtRGB,
                PanColor  = panColor
            };

            _colFields2 = new ColorFields()
            {
                TxtSearch = txtSearchCol2,
                TxtHex    = txtHex2,
                TxtRgb    = txtRGB2,
                PanColor  = panColor2
            };
            ColorHelper.RegisterColorField(txtSearchCol1, UpdateColorUI);
            ColorHelper.RegisterColorField(txtSearchCol2, UpdateColorUI);
        }