Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
        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;
        }
Ejemplo n.º 4
0
        internal DialogValidateRdl(MDIDesigner designer)
        {
            _RdlDesigner = designer;
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            return;
        }
Ejemplo n.º 5
0
        private void bClose_Click(object sender, EventArgs e)
        {
            MDIDesigner rd = this.Parent as MDIDesigner;

            if (rd == null)
            {
                return;
            }

            rd.ShowProperties(false);
        }