/// <summary> /// Unchecks this <see cref="Task"/>. /// </summary> public void Uncheck() { if (!IsChecked) { return; } IsChecked = false; TaskChanged?.Invoke(this, new TaskChangedEventArgs(TaskChangedEventArgs.ChangeTypes.Unchecked)); }
/// <summary> /// Checks this <see cref="Task"/>. /// </summary> public void Check() { if (IsChecked) { return; } IsChecked = true; TaskChanged?.Invoke(this, new TaskChangedEventArgs(TaskChangedEventArgs.ChangeTypes.Checked)); }
public void SetPriority(int priority) { if (Priority == priority) { return; } Priority = priority; TaskChanged?.Invoke(this, new TaskChangedEventArgs(TaskChangedEventArgs.ChangeTypes.PriorityChanged)); }
public void SetDueDate(DateTime date) { if (DueDate == date) { return; } DueDate = date; TaskChanged?.Invoke(this, new TaskChangedEventArgs(TaskChangedEventArgs.ChangeTypes.DateChanged)); }
/// <summary> /// Sets the message of the <see cref="Task"/> to the given <see cref="string"/> /// </summary> /// <param name="msg">New task message</param> public void SetMessage(string msg) { if (msg == Message) { return; } Message = msg; TaskChanged?.Invoke(this, new TaskChangedEventArgs(TaskChangedEventArgs.ChangeTypes.MessageChanged)); }
protected virtual void OnTaskChanged(TaskChangedEventArgs e) => TaskChanged?.Invoke(this, e);
public void InvokeTaskChanged(object sender, ModelChangedEventArgs <TaskRecord> arg) { TaskChanged?.Invoke(sender, arg); }