Ejemplo n.º 1
0
 private void MenuItem_Scene_AddPerson_Click(object sender, RoutedEventArgs e)
 {
     if (!Object.ReferenceEquals(null, DataAccessFacade.Instance.GetSceneInUseAccess().GetScene()))
     {
         var addPersonWin = new ConfigurePerson();
         addPersonWin.Show();
     }
 }
Ejemplo n.º 2
0
        private void NewBtn_Click(object sender, RoutedEventArgs e)
        {
            var configurePersonWin = new ConfigurePerson();

            configurePersonWin.Show();
            configurePersonWin.Closed += (confSender, confE) =>
            {
                PersonDataGrid.ItemsSource = DataAccessFacade.Instance.GetPersonAccess().GetAll();
            };
        }
Ejemplo n.º 3
0
 private void EditBtn_Click(object sender, RoutedEventArgs e)
 {
     if (PersonDataGrid.SelectedItem is Person person)
     {
         var configurePersonWin = new ConfigurePerson(person);
         configurePersonWin.Show();
         configurePersonWin.Closed += (confSender, confE) =>
         {
             PersonDataGrid.ItemsSource = DataAccessFacade.Instance.GetPersonAccess().GetAll();
         };
     }
     else
     {
         MessageBox.Show(Properties.GUI.AllPersonsNotExists,
                         Properties.GUI.AllPersonsNotExistsTitle, MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }