Пример #1
0
        private void fontColorToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                ColorDialog dlgColorChooser = new ColorDialog();
                dlgColorChooser.AllowFullOpen = true;
                dlgColorChooser.AnyColor      = true;
                if (dlgColorChooser.ShowDialog() == DialogResult.OK)
                {
                    Color  selectedColor = dlgColorChooser.Color;
                    string rgbColor      = ConvertColorToRgb(selectedColor);

                    builder.ChangeFontColor(rgbColor);
                    modifiedDocument = true;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }