private void Timer_Tick(object sender, EventArgs e) { timer.Stop(); LoginWindowView view = new LoginWindowView(); view.Show(); this.Close(); }
private void lbl_logout_MouseUp(object sender, MouseButtonEventArgs e) { try { Logger.Info("Logout"); client.Logout(this.username); Logger.Info("delete token"); client.DeleteToken(this.token); logged = false; LoginWindowView v = new LoginWindowView(); v.Show(); this.Close(); } catch (FaultException <ServiceData> sd) { Logger.Error("[Service] " + sd.Message); MessageBox.Show(sd.Message); } }
private void ChangeUserWindow_Closed(object sender, EventArgs e) { MessageBox.Show("Please login again!"); try { Logger.Info("Logout"); client.Logout(this.username); Logger.Info("delete token"); client.DeleteToken(this.token); logged = false; LoginWindowView v = new LoginWindowView(); v.Show(); this.Close(); } catch (FaultException <ServiceData> sd) { Logger.Error("[Service] " + sd.Message); MessageBox.Show(sd.Message); } }