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(); }
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(); }
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(); }