Exemple #1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            if (e.Args.Length > 0)
            {
                var sp = e.Args[0].Split('-');
                foreach (var f in sp)
                {
                    if (string.IsNullOrEmpty(f))
                    {
                        continue;
                    }
                    if (string.IsNullOrEmpty(Wlst.Cr.CoreMims.Services.UserInfo.SelfLoginIndefyLoginNamex))
                    {
                        Wlst.Cr.CoreMims.Services.UserInfo.SelfLoginIndefyLoginNamex = f.Trim();
                        continue;
                    }
                    if (string.IsNullOrEmpty(Wlst.Cr.CoreMims.Services.UserInfo.SelfLoginIndefyLoginPsw))
                    {
                        Wlst.Cr.CoreMims.Services.UserInfo.SelfLoginIndefyLoginPsw = f.Trim();
                        break;
                    }
                }
            }

            Check_program();

            //DateTime dt = new DateTime(635488415400000000);
            //dt = DateTime.Now;

            base.OnStartup(e);
            base.DispatcherUnhandledException +=
                new System.Windows.Threading.DispatcherUnhandledExceptionEventHandler(App_DispatcherUnhandledException);

            try
            {
                //  Initializzze();

                var bts = new Xboot.Bootstrapper();
                bts.Run();
            }
            catch (Exception ec)
            {
                //  MessageBox.Show("System Err,Quit Now", "Error", MessageBoxButton.OK);
                Wlst.Cr.Core.UtilityFunction.WriteLog.WriteLogError("Application Run Error In App,Exception is:" + ec);
                Environment.Exit(0);
            }
        }
Exemple #2
0
        protected override void OnStartup(StartupEventArgs e)
        {
            //DateTime dt = new DateTime(635488415400000000);
            //dt = DateTime.Now;

            base.OnStartup(e);
            base.DispatcherUnhandledException +=
                new System.Windows.Threading.DispatcherUnhandledExceptionEventHandler(App_DispatcherUnhandledException);

            try
            {
                //  Initializzze();

                var bts = new Xboot.Bootstrapper();
                bts.Run();
            }
            catch (Exception ec)
            {
                //  MessageBox.Show("System Err,Quit Now", "Error", MessageBoxButton.OK);
                Wlst.Cr.Core.UtilityFunction.WriteLog.WriteLogError("Application Run Error In App,Exception is:" + ec);
                Environment.Exit(0);
            }
        }