Exemplo n.º 1
0
        static void Main()
        {
            if (_componentVersion != SoftwareVersion.VersionForAuthentication || _componentVersion != Common.Versions)
            {
                return;
            }
            Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
            //Application.Run(new TrialValidation());
            Process instance = RunningInstance();

            if (instance == null)
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                if (_componentVersion != SoftwareVersions.S)
                {
                    Application.Run(new Login());
                }
                else
                {
                    Application.Run(DeviceManage.GetInstance(new Login()));
                }
                //Application.Run(new UserWizard());
            }
            else
            {
                HandleRunningInstance(instance);
            }
        }
Exemplo n.º 2
0
        private void ShowMainForm()
        {
            this.Hide();
            DeviceManage dm = DeviceManage.GetInstance(this);

            if (dm != null && !dm.IsDisposed)
            {
                dm.WindowState = FormWindowState.Maximized;
                dm.Show();
            }
        }
Exemplo n.º 3
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            if (loginUI.Login())
            {
                //this.tbAccount.Focus();
                //this.tbAccount.Clear();
                this.tbPwd.Clear();
                this.lbAccount.Text = "";
                this.lbPwd.Text     = "";
                this.Visible        = false;

                DeviceManage dm = DeviceManage.GetInstance(this);
                if (dm != null && !dm.IsDisposed)
                {
                    dm.Show();
                }
            }
        }