Example #1
0
        /// <summary>
        /// 窗体加载时执行
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void F_Main_Load(object sender, EventArgs e)
        {
            // 绑定复选框
            string IsTop = ToolConfig.GetAppSetting("IsTop");
            string IsLog = ToolConfig.GetAppSetting("IsLog");

            cb_IsTop.Checked = IsTop != "0";
            cb_Log.Checked   = IsLog != "0";
            TopMost          = cb_IsTop.Checked;

            string name = "T:";

            // 绑定类的信息
            BindCom(
                cmb_Class,
                _assembly.GetTypes(),
                c => c.BaseType == typeof(BaseFun),// 父类是BaseFun
                c => new ComBoxItem()
            {
                Display = GetNote(name + c.FullName, ""), Value = c.FullName
            });

            // 绑定数据库列表
            BindCom(
                cmb_Database,
                ToolConfig.GetConList(),
                c => true,
                c => new ComBoxItem()
            {
                Display = c, Value = c
            });
        }
Example #2
0
        static void Main()
        {
            //设置默认字体
            DevExpress.Utils.AppearanceObject.DefaultFont = new System.Drawing.Font("微软雅黑", 9);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle(ToolConfig.GetAppSetting("SkinName").IfNullOrWhitespace("Office 2019"));
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new FrmMain());
        }