예제 #1
0
 private void Event_Button_EditTask_OnClick(object sender, RoutedEventArgs e)
 {
     var plan = (TimePlan)TaskViewer.SelectedItem;
     if(plan.IsProtected) return;
     var window = new TaskEditor { CurrentPlan = plan };
     window.Show();
     _Invoke_Button((Button)sender, () => window.IsClosed);
 }
예제 #2
0
 private void Event_Button_NewTask_OnClick(object sender, RoutedEventArgs e)
 {
     var window = new TaskEditor();
     window.Show();
     _Invoke_Button((Button)sender, () => window.IsClosed, () =>
     {
         if (window.IsAllowChanged)
         {
             _timePlans.AddSafe(window.CurrentPlan);
         }
     });
 }