Exemple #1
0
        public ManifestationsView()
        {
            InitializeComponent();

            SelectedManifestation = null;
            DataContext           = this;
            Manifestations        = Repository.GetInstance().Manifestations;
            FilterInput.Focus();
        }
Exemple #2
0
 private void editBtnClicked(object sender, RoutedEventArgs e)
 {
     model.Manifestation target = SelectedManifestation;
     if (target == null)
     {
         MessageBox.Show("Please select a manifestation to edit.", "Edit failed", MessageBoxButton.OK, MessageBoxImage.Warning);
         return;
     }
     mainWindow.showManifestationEditView(target.Id);
 }
Exemple #3
0
 public void scrollTo(string ManifestationId)
 {
     foreach (model.Manifestation manif in Manifestations)
     {
         if (manif.Id == ManifestationId)
         {
             SelectedManifestation = manif;
             ManifestationsTable.ScrollIntoView(manif);
             break;
         }
     }
 }
Exemple #4
0
        private void DeleteBtnClicked(object sender, RoutedEventArgs e)
        {
            model.Manifestation target = SelectedManifestation;
            if (target == null)
            {
                MessageBox.Show("Please select a manifestation to delete.", "Delete failed", MessageBoxButton.OK, MessageBoxImage.Warning);
                return;
            }
            Repository       rep    = Repository.GetInstance();
            MessageBoxResult choice = MessageBox.Show($"Are you sure that you want to permanently delete manifestation \"{target.Id}\"?", "Delete manifestation", MessageBoxButton.YesNoCancel);

            if (choice == MessageBoxResult.Yes)
            {
                rep.DeleteManifestation(target.Id);
            }
        }