예제 #1
0
        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());
                }
            }
        }
예제 #2
0
파일: VipUtil.cs 프로젝트: shaibaoj/youpp
    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);
    }
예제 #3
0
 public IActionResult Login2([FromBody] LoginForm2 l)
 {
     try
     {
         string testpasswd = _cryptoService.Decrypter(Convert.FromBase64String(l.Passwd));
         User   u          = _clientService.LoginNRN(l.NatRegNbr, Base64.Base64Decode(l.Passwd));
         if (u is not null)
         {
             u.Token = _tokenService.GenerateToken(u);
         }
         return(ApiControllerHelper.SendOk(this, new ApiResult <User>(HttpStatusCode.OK, null, u), true));
     }
     catch (Exception ex)
     {
         return(ApiControllerHelper.SendError(this, ex));
     }
 }