lu
2025-04-03 9607b0b7ecb0f621e9e00c376063342c467788e9
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
37
38
39
40
41
42
43
44
using DevExpress.XtraEditors;
using Gs.DevApp.Properties;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
 
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("设置成功!");
        }
    }
}