lu
2025-04-14 ecb7a60de1639f520712ce95f99414b0dd2c9713
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using Gs.DevApp.Properties;
using System;
 
namespace Gs.DevApp.UserControl
{
    public partial class SelectFont : DevExpress.XtraEditors.XtraForm
    {
        public SelectFont()
        {
            InitializeComponent();
        }
 
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            if (comboBoxEdit1.SelectedIndex <= 0)
            {
                Gs.DevApp.ToolBox.MsgHelper.ShowInformation("请选择字体大小!");
                return;
            }
            string strFont = comboBoxEdit1.Text.Trim();
            Settings.Default.fontSizeName = strFont;
            Settings.Default.Save();
            string[] ary = strFont.Split(',');
            float _ft = float.Parse(ary[1]);
            #region 设置默认字体、日期格式、汉化dev
            DevExpress.Utils.AppearanceObject.DefaultFont = new System.Drawing.Font(ary[0], _ft);
            DevExpress.XtraEditors.WindowsFormsSettings.DefaultFont = new System.Drawing.Font(ary[0], _ft);
            DevExpress.XtraEditors.WindowsFormsSettings.DefaultMenuFont = new System.Drawing.Font(ary[0], _ft);
            DevExpress.XtraEditors.WindowsFormsSettings.DefaultPrintFont = new System.Drawing.Font(ary[0], _ft);
            #endregion
 
            Gs.DevApp.ToolBox.MsgHelper.ShowInformation("设置成功!");
            this.Close();
        }
    }
}