Exemple #1
0
 void menuItemFont_Click(object sender, EventArgs e)
 {
     if (FontDlg.ShowDialog() != System.Windows.Forms.DialogResult.Cancel)
     {
         this.SelectionFont = FontDlg.Font;
     }
 }
Exemple #2
0
 private void SelectionFont_TSMI_Click(object sender, EventArgs e)
 {
     FontDlg.Font = rtb.Font;
     if (FontDlg.ShowDialog() == DialogResult.OK)
     {
         rtb.SelectionFont = FontDlg.Font;
     }
 }
 private void FontToolStripButton_Click(object sender, EventArgs e)
 {
     if (FontDlg.ShowDialog(this) != DialogResult.Cancel)
     {
         rtb.SelectionFont = FontDlg.Font;
         _modified         = true;
     }
 }
Exemple #4
0
 private void Font_TSMI_Click(object sender, EventArgs e)
 {
     if (FontDlg.ShowDialog() == DialogResult.Cancel)
     {
         return;
     }
     rtb.Font      = FontDlg.Font;
     rtb.ForeColor = FontDlg.Color;
 }
Exemple #5
0
 private void FontBtn_Click(object sender, EventArgs e)
 {
     if (FontDlg.ShowDialog() == DialogResult.OK)
     {
         stroke.ExtendedProperties.Add(Root.TEXTFONT_GUID, FontDlg.Font.Name);
         stroke.ExtendedProperties.Add(Root.TEXTFONTSIZE_GUID, (double)FontDlg.Font.Size);
         stroke.ExtendedProperties.Add(Root.TEXTFONTSTYLE_GUID, FontDlg.Font.Style);
         string st = InputML.Text;
         // to run event for refresh
         InputML.Text = ""; InputML.Text = st;
     }
 }
Exemple #6
0
 private void DefaultFontBtn_Click(object sender, EventArgs e)
 {
     FontDlg.Font = new Font(Root.TextFont, (float)Root.TextSize,
                             (Root.TextItalic ? FontStyle.Italic : FontStyle.Regular) | (Root.TextBold ? FontStyle.Bold : FontStyle.Regular));
     if (FontDlg.ShowDialog() == DialogResult.OK)
     {
         Root.TextFont   = FontDlg.Font.Name;
         Root.TextItalic = (FontDlg.Font.Style & FontStyle.Italic) != 0;
         Root.TextBold   = (FontDlg.Font.Style & FontStyle.Bold) != 0;
         Root.TextSize   = (int)FontDlg.Font.Size;
     }
 }