void SplashTask() { if (ServerUtil.ReportStatus()) { if (QueryController.Store.IsIdValid(Properties.Settings.Default.StoreId)) { UserLogin userLogin = new UserLogin(); Extensions.RunApplication(userLogin); } else { // Store Login StoreAuth storeLogin = new StoreAuth(); Extensions.RunApplication(storeLogin); } this.Hide(); } else { // Close Software timExit = new Timer(); timExit.Tick += new EventHandler(TimExit_Tick); timExit.Interval = 1000; // 1 second timExit.Start(); } }
public static void LogStoreOut(Form parentForm) { try { //Reset Store Properties.Settings.Default.StoreId = null; Properties.Settings.Default.Store = ""; //Form Login StoreAuth storeAuth = new StoreAuth { //Props TopMost = true, WindowState = parentForm.WindowState }; Extensions.HideAndShow(parentForm, storeAuth); } catch (Exception) { Extensions.ExitApplication(); } }