private void bColor_Click(object sender, System.EventArgs e) { ColorDialog cd = new ColorDialog(); cd.AnyColor = true; cd.FullOpen = true; cd.CustomColors = MDIDesigner.GetCustomColors(); cd.Color = DesignerUtility.ColorFromHtml(cbColor.Text, System.Drawing.Color.Black); try { if (cd.ShowDialog() != DialogResult.OK) { return; } MDIDesigner.SetCustomColors(cd.CustomColors); if (sender == this.bColor) { cbColor.Text = ColorTranslator.ToHtml(cd.Color); } } finally { cd.Dispose(); } return; }
private void SetColor(ComboBox cbColor) { ColorDialog cd = new ColorDialog(); cd.AnyColor = true; cd.FullOpen = true; cd.CustomColors = MDIDesigner.GetCustomColors(); cd.Color = DesignerUtility.ColorFromHtml(cbColor.Text, System.Drawing.Color.Empty); try { if (cd.ShowDialog() != DialogResult.OK) { return; } MDIDesigner.SetCustomColors(cd.CustomColors); cbColor.Text = ColorTranslator.ToHtml(cd.Color); } finally { cd.Dispose(); } return; }
private void bColor_Click(object sender, System.EventArgs e) { using (ColorDialog cd = new ColorDialog()) { cd.AnyColor = true; cd.FullOpen = true; cd.CustomColors = MDIDesigner.GetCustomColors(); if (cd.ShowDialog() != DialogResult.OK) { return; } MDIDesigner.SetCustomColors(cd.CustomColors); if (sender == this.bEndColor) { cbEndColor.Text = ColorTranslator.ToHtml(cd.Color); } else if (sender == this.bBackColor) { cbBackColor.Text = ColorTranslator.ToHtml(cd.Color); } } return; }
internal DialogValidateRdl(MDIDesigner designer) { _RdlDesigner = designer; // // Required for Windows Form Designer support // InitializeComponent(); return; }
private void bClose_Click(object sender, EventArgs e) { MDIDesigner rd = this.Parent as MDIDesigner; if (rd == null) { return; } rd.ShowProperties(false); }