public void NotifyLoggedOut() { // show login form again CurrentStaff = null; ShoppingCart.Clear(); List<Form> openForms = new List<Form>(); foreach (Form f in Application.OpenForms) openForms.Add(f); foreach (Form f in openForms) { if (f.GetType() != typeof(Root)) { ((MetroForm)f).Flag_DoNotKillRoot = true; f.Close(); } } new LoginForm(this).Show(); }
public void NotifyLoggedIn(Userdata user) { // set current user and bring user to main form CurrentStaff = user; new MainForm(this).Show(); }