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();
     }
 }
示例#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;
     }
 }
示例#3
0
 public static void LoadEvents()
 {
     XMLControl.LoadFileEvents();
 }