Exemplo n.º 1
0
        private void OnFontSelect(object sender, EventArgs args)
        {
            GFontDialog gd = new GFontDialog();

            gd.SetFont(_useClearType, _font, _japaneseFont);
            DialogResult r = GCUtil.ShowModalDialog(FindForm(), gd);

            if (r == DialogResult.OK)
            {
                Font f = gd.ASCIIFont;
                _font            = f;
                _japaneseFont    = gd.JapaneseFont;
                _useClearType    = gd.UseClearType;
                _fontSample.Font = f;
                AdjustFontDescription(f, gd.JapaneseFont);
            }
        }
        private void OnFontSelect(object sender, EventArgs args)
        {
            GFontDialog gd = new GFontDialog();
            Font        nf = GUtil.CreateFont(_profile.FontName, _profile.FontSize);
            Font        jf = GUtil.CreateFont(_profile.JapaneseFontName, _profile.FontSize);

            gd.SetFont(_profile.UseClearType, nf, jf);
            if (GCUtil.ShowModalDialog(this, gd) == DialogResult.OK)
            {
                Font f = gd.ASCIIFont;
                _profile.FontName         = f.Name;
                _profile.JapaneseFontName = gd.JapaneseFont.Name;
                _profile.FontSize         = f.Size;
                _profile.UseClearType     = gd.UseClearType;
                _fontSample.Font          = f;
                AdjustFontDescription(f.Name, gd.JapaneseFont.Name, f.Size);
            }
        }
Exemplo n.º 3
0
        private void OnFontSelect(object sender, EventArgs args)
        {
            GFontDialog gd = new GFontDialog();
            Font        nf = RuntimeUtil.CreateFont(_profile.FontName, _profile.FontSize);
            Font        jf = RuntimeUtil.CreateFont(_profile.CJKFontName, _profile.FontSize);

            gd.SetFont(_profile.UseClearType, _profile.EnableBoldStyle, _profile.ForceBoldStyle, nf, jf);
            if (gd.ShowDialog(this) == DialogResult.OK)
            {
                Font f = gd.ASCIIFont;
                _profile.FontName        = f.Name;
                _profile.CJKFontName     = gd.CJKFont.Name;
                _profile.FontSize        = f.Size;
                _profile.UseClearType    = gd.UseClearType;
                _profile.EnableBoldStyle = gd.EnableBoldStyle;
                _fontSample.Font         = f;
                AdjustFontDescription(f.Name, gd.CJKFont.Name, f.Size);
            }
        }
Exemplo n.º 4
0
        private void OnFontSelect(object sender, EventArgs args)
        {
            GFontDialog gd = new GFontDialog();

            gd.SetFont(_useClearType, _enableBoldStyle, _forceBoldStyle, _font, _cjkFont);
            DialogResult r = gd.ShowDialog(FindForm());

            if (r == DialogResult.OK)
            {
                Font f = gd.ASCIIFont;
                _font            = f;
                _cjkFont         = gd.CJKFont;
                _useClearType    = gd.UseClearType;
                _enableBoldStyle = gd.EnableBoldStyle;
                _forceBoldStyle  = gd.ForceBoldStyle;
                _fontSample.Font = f;
                AdjustFontDescription(f, gd.CJKFont);
            }
        }
Exemplo n.º 5
0
 private void OnFontSelect(object sender, EventArgs args)
 {
     GFontDialog gd = new GFontDialog();
     Font nf = GUtil.CreateFont(_profile.FontName, _profile.FontSize);
     Font jf = GUtil.CreateFont(_profile.JapaneseFontName, _profile.FontSize);
     gd.SetFont(_profile.UseClearType, nf, jf);
     if(GCUtil.ShowModalDialog(this, gd)==DialogResult.OK) {
         Font f = gd.ASCIIFont;
         _profile.FontName = f.Name;
         _profile.JapaneseFontName = gd.JapaneseFont.Name;
         _profile.FontSize = f.Size;
         _profile.UseClearType = gd.UseClearType;
         _fontSample.Font = f;
         AdjustFontDescription(f.Name, gd.JapaneseFont.Name, f.Size);
     }
 }
Exemplo n.º 6
0
 private void OnFontSelect(object sender, EventArgs args) {
     GFontDialog gd = new GFontDialog();
     Font nf = RuntimeUtil.CreateFont(_profile.FontName, _profile.FontSize);
     Font jf = RuntimeUtil.CreateFont(_profile.CJKFontName, _profile.FontSize);
     gd.SetFont(_profile.UseClearType, _profile.EnableBoldStyle, _profile.ForceBoldStyle, nf, jf);
     if (gd.ShowDialog(this) == DialogResult.OK) {
         Font f = gd.ASCIIFont;
         _profile.FontName = f.Name;
         _profile.CJKFontName = gd.CJKFont.Name;
         _profile.FontSize = f.Size;
         _profile.UseClearType = gd.UseClearType;
         _profile.EnableBoldStyle = gd.EnableBoldStyle;
         _fontSample.Font = f;
         AdjustFontDescription(f.Name, gd.CJKFont.Name, f.Size);
     }
 }
Exemplo n.º 7
0
 private void OnFontSelect(object sender, EventArgs args)
 {
     GFontDialog gd = new GFontDialog();
     gd.SetFont(_useClearType, _font, _japaneseFont);
     DialogResult r = GCUtil.ShowModalDialog(FindForm(), gd);
     if(r==DialogResult.OK) {
         Font f = gd.ASCIIFont;
         _font = f;
         _japaneseFont = gd.JapaneseFont;
         _useClearType = gd.UseClearType;
         _fontSample.Font = f;
         AdjustFontDescription(f, gd.JapaneseFont);
     }
 }
Exemplo n.º 8
0
 private void OnFontSelect(object sender, EventArgs args) {
     GFontDialog gd = new GFontDialog();
     gd.SetFont(_useClearType, _enableBoldStyle, _forceBoldStyle, _font, _cjkFont);
     DialogResult r = gd.ShowDialog(FindForm());
     if (r == DialogResult.OK) {
         Font f = gd.ASCIIFont;
         _font = f;
         _cjkFont = gd.CJKFont;
         _useClearType = gd.UseClearType;
         _enableBoldStyle = gd.EnableBoldStyle;
         _forceBoldStyle = gd.ForceBoldStyle;
         _fontSample.Font = f;
         AdjustFontDescription(f, gd.CJKFont);
     }
 }