public GoalBlock(Goal goal, GoalListBlock parent) { ParentBlock = parent; InitializeComponent(); Goal = goal; SetFields(goal); }
public GoalBlock(string listName, GoalListBlock parent) { InitializeComponent(); ParentBlock = parent; Goal = new Goal() { Name = "New Goal", Description = "Default Description", DueTime = DateTimeOffset.Now, Labels = new List <string>(), AttachmentFilePaths = new List <string>(), CheckListLabels = new List <(string, bool?)>(), ListName = listName, DueTimeSet = false }; SetFields(Goal); }