Example #1
0
 /// <summary>
 /// Constructor for Edit window
 /// </summary>
 /// <param name="toDo">passed in todo item to be edited</param>
 public UpdateWindow(TDList.Update action, ToDo toDo = null)
 {
     InitializeComponent();
     Title = action.ToString();
     if (toDo != null)
     {
         this.toDo = toDo;
         PopulateEditControls();
     }
 }
Example #2
0
 /// <summary>
 /// Set warning label and title depending on selected item enumeration.
 /// </summary>
 /// <param name="Update">delete or edit enumeration</param>
 public void SetControls(TDList.Update action)
 {
     Title = action.ToString();
     WarningLabel.Content = "Are you sure you want to " + action.ToString() + " the selected item?";
 }