Example #1
0
        public Font ShowDialog(Font SelectedFont)
        {
            var fontDialog = new XtraFontDialog(SelectedFont);

            if (fontDialog.ShowDialog() == DialogResult.OK)
            {
                SelectedFont = fontDialog.ResultFont;
            }
            fontDialog.Dispose();
            return(SelectedFont);
        }
Example #2
0
        void ShowFontDialog()
        {
            if (CurrentRichTextBox == null)
            {
                return;
            }
            Font dialogFont = null;

            if (SelectFont != null)
            {
                dialogFont = (Font)SelectFont.Clone();
            }
            else
            {
                dialogFont = CurrentRichTextBox.Font;
            }
            XtraFontDialog dlg = new XtraFontDialog(dialogFont);

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                CurrentRichTextBox.SelectionFont = dlg.ResultFont;
                beiFontSize.EditValue            = dlg.ResultFont.Size;
            }
        }
Example #3
0
 void ShowFontDialog()
 {
     if (rtbData == null) return;
     Font dialogFont = null;
     if (SelectFont != null)
         dialogFont = (Font)SelectFont.Clone();
     else dialogFont = rtbData.Font;
     XtraFontDialog dlg = new XtraFontDialog(dialogFont);
     if (dlg.ShowDialog() == DialogResult.OK)
     {
         rtbData.SelectionFont = dlg.ResultFont;
         beiFontSize.EditValue = dlg.ResultFont.Size;
     }
 }