public static void LoadMenu(Views.LoginView loginForm) { Views.MainMenu menu = new Views.MainMenu(); loginForm.Hide(); menu.Closed += (senderObj, eventArgs) => loginForm.Close(); menu.Show(); }
public static void LoadMenu(Views.PatientManagementView patientManagement) { Views.MainMenu menu = new Views.MainMenu(); patientManagement.Hide(); menu.Closed += (senderObj, EventArgs) => patientManagement.Close(); menu.Show(); }
public static void Logout(Views.MainMenu menuForm) { Views.LoginView login = new Views.LoginView(); menuForm.Hide(); login.Closed += (senderObj, eventArgs) => menuForm.Close(); login.Show(); }
public static void LoadMainMenu(Views.AppointmentManagementView appointment) { Views.MainMenu menu = new Views.MainMenu(); appointment.Hide(); menu.Closed += (senderObj, EventArgs) => appointment.Close(); menu.Show(); }
public static void LoadMainMenu(Views.StaffView staff) { Views.MainMenu menu = new Views.MainMenu(); staff.Hide(); menu.Closed += (senderObj, EventArgs) => staff.Close(); menu.Show(); }
private void FindLocationFromMap_FormClosing(object sender, FormClosingEventArgs e) { Views.MainMenu main = new Views.MainMenu(); main.MdiParent = this.ParentForm; main.Show(); this.Hide(); }
public static void LoadStaff(Views.MainMenu menu) { Views.StaffView staff = new Views.StaffView(); menu.Hide(); staff.Closed += (senderObj, EventArgs) => menu.Close(); staff.Show(); }
public void createViewHome() { _view = new LoginView(); Models.MainMenu _modelHome = new Models.MainMenu(); Views.MainMenu _viewMenu = new Views.MainMenu(); MainMenuController _ctrlMenu = new MainMenuController(_modelHome, _viewMenu); _flag = true; _ctrlMenu.createViewMenu(); }
private void create_Click(object sender, EventArgs e) { if(DAOs.UsersDAO.isUserValid(tbUser.Text,tbPassWord.Text)) { tiraxco.Properties.Settings.Default.role = DAOs.UsersDAO.userRole(tbUser.Text); tiraxco.Properties.Settings.Default.UserID = DAOs.UsersDAO.userID(tbUser.Text); MainMenu mm = new Views.MainMenu(); this.Hide(); mm.ShowDialog(); this.Close(); } }
private async void LoginActionAsync(object x) { if (IsBusy) { return; } IsBusy = true; try { using (var res = new Services.RestService()) { this.Email = "*****@*****.**"; this.Password = "******"; token = await res.GenerateTokenAsync(this.Email, Password); if (token != null) { var main = new Views.MainMenu(token); Helpers.Main.Token = token; ((App)App.Current).ChangeScreen(main); } else { MessagingCenter.Send(new MessagingCenterAlert { Title = "Error", Message = "Gagal Login", Cancel = "OK" }, "message"); } } } catch (Exception ex) { Debug.WriteLine(ex); MessagingCenter.Send(new MessagingCenterAlert { Title = "Error", Message = ex.Message, Cancel = "OK" }, "message"); } finally { IsBusy = false; } }
private void FarmersLocationsDetails_FormClosing(object sender, FormClosingEventArgs e) { foreach (Form form in Application.OpenForms) { if (form.GetType() == typeof(MainMenu)) { form.Activate(); return; } } Views.MainMenu main = new Views.MainMenu(); main.MdiParent = this.ParentForm; main.Show(); this.Hide(); }
public static void DisplayMenu() { var template = new Views.MainMenu() { Model = 0 }; var page = template.GenerateString(); var size = new Size(300, 500); if (_browser == null) { SetupBrowser(page, size); } else { _browser.DisplayPage(page, new int[] { size.Width, size.Height }); } }
public MainMenuController(Models.MainMenu model, Views.MainMenu view) { this._model = model; this._view = view; createViewMenu(); }
private void BackButton_Clicked() { Views.MainMenu newMainMenu = new Views.MainMenu(); newMainMenu.DataContext = new ViewModels.MainMenuVM(this); _nav.Navigate(newMainMenu); }
internal void setView(Views.MainMenu view) { this.view = view; loadJsonFile(this.jsonFile); highscores = new Highscores(config.HighscoreDatabase); }