private void Grid_InventoryManagement_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { if (isConnected == true) { LoginWindow firstLogin = new LoginWindow(new Role[] { Role.Administrator, Role.DataRecorder }, appMgr); firstLogin.ShowDialog(); if (firstLogin.DialogResult == true) { UpdateLoggedInUser(); appMgr.InventoryManagement = new InventoryManager(appMgr); InventoryEditorWindow InventoryEditorView = new InventoryEditorWindow(appMgr.InventoryManagement); InventoryEditorView.ShowDialog(); appMgr.InventoryManagement = null; appMgr.Logout(); UpdateLoggedInUser(); } } else { MessageBox.Show("Nincs kapcsolat a szerverrel.", "Hiba történt", MessageBoxButton.OK, MessageBoxImage.Error); } }