Ejemplo n.º 1
0
        private void FormatCapitalsCheckBox_CheckedChanged(object sender, EventArgs e)
        {
            if ((sender as CheckBox).Checked)
            {
                var form = new FormattingForm();
                form.ExampleTemplate = "{0}M&rinecraft!";
                form.ShowDialog("Pick Capital format");

                if (form.DialogResult != DialogResult.OK)
                {
                    return;
                }

                CapitalizationFormatting = form.Formatting;
            }
            else
            {
                CapitalizationFormatting = string.Empty;
            }
            UpdatePreview();
        }
Ejemplo n.º 2
0
        private void FormatQuotesTextBox_CheckedChanged(object sender, EventArgs e)
        {
            if ((sender as CheckBox).Checked)
            {
                var form = new FormattingForm();
                form.ExampleTemplate = "{0}\"&rNo{0}\"&r he said.";
                form.ShowDialog("Pick Quote format");

                if (form.DialogResult != DialogResult.OK)
                {
                    return;
                }

                QuoteFormatting = form.Formatting;

                form.ExampleTemplate = form.Formatting + '"' + "{0}No" + form.Formatting + '"' + "&r he said";
                form.ShowDialog("Pick Quote body format");

                if (form.DialogResult != DialogResult.OK)
                {
                    return;
                }

                QuoteBodyFormatting = form.Formatting;
            }
            else
            {
                QuoteFormatting = string.Empty;
                QuoteBodyFormatting = string.Empty;
            }
            UpdatePreview();
        }
Ejemplo n.º 3
0
        private void ChangeColorCheckBox_CheckedChanged(object sender, EventArgs e)
        {
            if ((sender as CheckBox).Checked)
            {
                var form = new FormattingForm();
                form.ExampleTemplate = "{0}normal text";
                form.ShowDialog();

                if (form.DialogResult != DialogResult.OK)
                {
                    return;
                }

                DefaultFormatting = form.Formatting;
            }
            else
            {
                DefaultFormatting = string.Empty;
            }
            UpdatePreview();
        }