private void LoginCavetube() { var loginBox = new LoginBox(); var viewModel = new LoginBoxViewModel(); viewModel.OnClose += () => { loginBox.Close(); }; loginBox.DataContext = viewModel; loginBox.ShowDialog(); base.OnPropertyChanged("LoginStatus"); this.PostName = this.config.UserId; }
private void ChangeUser_Command(object param) { LoginBox lb = new LoginBox(); if (lb.ShowDialog() == true) { App.CurrentVendor = lb.FoundUser; } }
private void AddPersonToPresentList(Consumer c, DateTime logoutDate = default(DateTime)) { if (c.Gesperrt) { LoginBox lb = new LoginBox(c.Name); if (!lb.ShowDialog() == true) return; } PresentPersons.Add(c); AllPersons.Remove(c); if(logoutDate == default(DateTime)) logoutDate = SetLogoutTime(c); Bierstrichler.Properties.Settings.Default.LoggedInUsers.Add(c.ID.ToString() + ";" + logoutDate.ToString()); CreateLogoutTimer(c.ID, logoutDate); Bierstrichler.Properties.Settings.Default.Save(); Log.WriteInformation(App.CurrentVendor.Name + " moved " + c.Name + " to Present List."); }