static void Main() { //处理未捕获的异常 Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); DevExpress.XtraEditors.WindowsFormsSettings.SetDPIAware(); DevExpress.XtraEditors.WindowsFormsSettings.EnableFormSkins(); DevExpress.XtraEditors.WindowsFormsSettings.DefaultLookAndFeel.SetSkinStyle("Office 2013 Light Gray"); DevExpress.XtraEditors.WindowsFormsSettings.ScrollUIMode = DevExpress.XtraEditors.ScrollUIMode.Touch; Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); AppStartService.Instance.Start(); //ERP.Winform.Report.PackingListReport reportFrm = new ERP.Winform.Report.PackingListReport(); //ERP.Winform.Report.ReportShowForm reportShowFrm = new ERP.Winform.Report.ReportShowForm(reportFrm); //Application.Run(new R103_JobTxDetail()); LoginForm2 frm = new LoginForm2(); if (frm.ShowDialog() == DialogResult.OK) { if (frm.formStyle == 0) { Application.Run(new MainTreeForm()); } else { Application.Run(new MainForm()); } } }
public bool login1(string softwarename, string main_exe, string version) { this.softwarename = softwarename; this.main_exe = main_exe; this.version = version; LoginForm2 form = new LoginForm2(softwarename, version); form.login_url = this.login_url; form.int_0 = this.usergroup; form.ShowDialog(); this.user_id = form.user_id; this.user_name = form.user_name; this.feetype = form.feetype; this.expiredate = form.expiredate; return(form.login_status); }