static void Main() { //Application.ProductVersion.ToString() + "\n"; //System.Deployment.Application.ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); if (!CheckAppRunState()) { return; } LocalLogin localLogin = new LocalLogin(); localLogin.ShowDialog(); if (localLogin.DialogResult == DialogResult.OK) { var programeVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString() + "\n"; //WelcomeForm welcomeForm = new WelcomeForm(DeviceConfigParams.CableTestSystemName,programeVersion); //welcomeForm.Show(); //applicationContext = new ApplicationContext(); //applicationContext.Tag = welcomeForm; //Application.Idle += Application_Idle; //Application.Run(applicationContext); CMainForm cMainForm = new CMainForm(); cMainForm.Init(); Application.Run(cMainForm); } }
public void Navigate(NavigationEvent NavEvent) { switch (NavEvent) { case NavigationEvent.LocalLogin: LocalLogin?.Invoke(this, new EventArgs()); break; case NavigationEvent.LocalLogout: LocalLogout?.Invoke(this, new EventArgs()); break; default: break; } }