2021-07-24 15:13:51 +08:00
|
|
|
using DevExpress.Skins;
|
2021-04-17 15:40:26 +08:00
|
|
|
using DevExpress.UserSkins;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
using DevExpress.LookAndFeel;
|
2021-05-11 08:51:35 +08:00
|
|
|
using Login;
|
2021-04-25 18:49:28 +08:00
|
|
|
using WinformGeneralDeveloperFrame.Commons;
|
2021-04-17 15:40:26 +08:00
|
|
|
|
|
|
|
|
namespace WinformGeneralDeveloperFrame.Start
|
|
|
|
|
{
|
|
|
|
|
static class Program
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2021-10-10 17:09:35 +08:00
|
|
|
/// The main entry point for the application.测试 1
|
2021-04-17 15:40:26 +08:00
|
|
|
/// </summary>
|
|
|
|
|
[STAThread]
|
|
|
|
|
static void Main()
|
|
|
|
|
{
|
2021-10-10 17:09:35 +08:00
|
|
|
string str = EncodeHelper.AES_Encrypt("数据库连接");
|
2021-07-24 15:19:43 +08:00
|
|
|
string str1 = EncodeHelper.AES_Decrypt(str);//
|
2021-04-17 15:40:26 +08:00
|
|
|
DevExpress.Skins.SkinManager.EnableFormSkins();
|
2021-07-02 17:35:46 +08:00
|
|
|
UserLookAndFeel.Default.SetSkinStyle("Office 2007 Silver");
|
2021-04-17 15:40:26 +08:00
|
|
|
BonusSkins.Register();
|
|
|
|
|
Application.EnableVisualStyles();
|
|
|
|
|
Application.SetCompatibleTextRenderingDefault(false);
|
2021-04-25 18:49:28 +08:00
|
|
|
Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
|
2021-05-11 08:51:35 +08:00
|
|
|
LoginView dlg = new LoginView();
|
|
|
|
|
if (DialogResult.OK == dlg.ShowDialog())
|
|
|
|
|
{
|
|
|
|
|
if (dlg.bLogin)
|
|
|
|
|
{
|
|
|
|
|
Application.Run(new MainForm());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
dlg.Dispose();
|
2021-04-17 15:40:26 +08:00
|
|
|
}
|
2021-04-25 18:49:28 +08:00
|
|
|
private static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs ex)
|
|
|
|
|
{
|
|
|
|
|
if (DialogResult.Yes == "系统发生错误,您需要退出系统吗?".ShowYesNoAndError())
|
|
|
|
|
{
|
|
|
|
|
Application.Exit();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-04-17 15:40:26 +08:00
|
|
|
}
|
|
|
|
|
}
|