static void Main() { //初始化数据库 PublicManager.DB.ConnectionManager.Open("main", "Data Source=" + System.IO.Path.Combine(Application.StartupPath, "static.db")); //载入配置 MainConfig.loadConfig(); //加载皮肤 //if (MainConfig.Config.Dict.ContainsKey("当前皮肤")) //{ //string skinName = MainConfig.Config.Dict["当前皮肤"]; //DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle(string.IsNullOrEmpty(skinName) ? "Office 2010 Blue" : skinName); DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle("Office 2010 Blue"); //} if (MainConfig.Config.Dict.ContainsKey("皮肤颜色1")) { int colorVal = int.Parse(MainConfig.Config.Dict["皮肤颜色1"]); DevExpress.LookAndFeel.UserLookAndFeel.Default.SkinMaskColor = Color.FromArgb(colorVal); } if (MainConfig.Config.Dict.ContainsKey("皮肤颜色2")) { int colorVal = int.Parse(MainConfig.Config.Dict["皮肤颜色2"]); DevExpress.LookAndFeel.UserLookAndFeel.Default.SkinMaskColor2 = Color.FromArgb(colorVal); } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new MainForm()); }
static void Main() { //添加忽略 PublicReporterLib.PluginLoader.IgnoreLoadDllFiles.Add("PublicReporterLib.dll"); PublicReporterLib.PluginLoader.IgnoreLoadDllFiles.Add("Noear.Weed3.dll"); PublicReporterLib.PluginLoader.IgnoreLoadDllFiles.Add("Aspose.Words.dll"); PublicReporterLib.PluginLoader.IgnoreLoadDllFiles.Add("Newtonsoft.Json.dll"); PublicReporterLib.PluginLoader.IgnoreLoadDllFiles.Add("ICSharpCode.SharpZipLib.dll"); PublicReporterLib.PluginLoader.IgnoreLoadDllFiles.Add("SuperCodeFactoryLib.dll"); PublicReporterLib.PluginLoader.IgnoreLoadDllFiles.Add("SuperCodeFactoryUILib.dll"); //载入配置 MainConfig.constConfigFile = Path.Combine(Application.StartupPath, "config.json"); MainConfig.loadConfig(); //加载皮肤 DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle("Office 2010 Blue"); //if (MainConfig.Config.StringDict.ContainsKey("当前皮肤")) //{ // string skinName = MainConfig.Config.StringDict["当前皮肤"]; // DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle(string.IsNullOrEmpty(skinName) ? "Office 2010 Blue" : skinName); //} if (MainConfig.Config.StringDict.ContainsKey("皮肤颜色1")) { int colorVal = int.Parse(MainConfig.Config.StringDict["皮肤颜色1"]); DevExpress.LookAndFeel.UserLookAndFeel.Default.SkinMaskColor = Color.FromArgb(colorVal); } if (MainConfig.Config.StringDict.ContainsKey("皮肤颜色2")) { int colorVal = int.Parse(MainConfig.Config.StringDict["皮肤颜色2"]); DevExpress.LookAndFeel.UserLookAndFeel.Default.SkinMaskColor2 = Color.FromArgb(colorVal); } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new WelcomeForm()); }