public static ObjTask AddTask(string taskName = "") { var task = new ObjTask() { TaskID = Guid.NewGuid() }; if (!string.IsNullOrEmpty(taskName)) { task.Rename(taskName); } ObjTasks.Add(task); TaskAdded(task); return(task); }