private void FatherItemMouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     if (MessageBox.Show("Видаляться всі дії з таким словом", "Ви впевнені?", MessageBoxButton.YesNoCancel) == MessageBoxResult.Yes)
     {
         XMLControl.DeleteEvent((sender as TreeViewItem).Header.ToString());
         EventControl.DeleteFromName((sender as TreeViewItem).Header.ToString());
         MainStackEvents.Children.Clear();
         InfoStackEvents.Children.Clear();
         InfoStackEvents.UpdateLayout();
         Start();
     }
 }
Exemple #2
0
 private void BtnAddClick(object sender, RoutedEventArgs e)
 {
     if (TextBoxName.Text != "")
     {
         PageAddEventData.AddStorage.Name        = TextBoxName.Text;
         PageAddEventData.AddStorage.Description = TextBoxDescription.Text;
         EventData.Events.Add(PageAddEventData.AddStorage);
         XMLControl.SaveToFileEvent(PageAddEventData.AddStorage);
         TextBoxName.BorderBrush = null;
         StackPanelTask.Children.Clear();
         PageAddEventData.AddStorage = new EventModel();
     }
     else
     {
         TextBoxName.BorderBrush = Brushes.Red;
     }
 }
 public static void LoadEvents()
 {
     XMLControl.LoadFileEvents();
 }