private void CreateNewGoalView(Goal goal) { var goalItem = new GoalView(goal); goalItem.Open += OpenGoal; goalItem.Delete += DeleteGoal; goalItem.AddTask += AddTask; GoalsPanel.Children.Add(goalItem); }
private void AddTask(GoalView obj) { var dw = new TaskDialogWindow(); if (dw.ShowDialog() == true) { CreateNewTaskView(dw.Task); } }
private void DeleteGoal(GoalView obj) => GoalsPanel.Children.Remove(obj);
private void OpenGoal(GoalView obj) => DetailedVIew.Goal = obj.Goal;