internal TaskViewModel(Task task, IDialogService dialogService) { if (null == task) throw new ArgumentNullException("task"); if (null == dialogService) throw new ArgumentNullException("dialogService"); _dialog = dialogService; _task = task; _timeRegex = new Regex("[0-2][0-9][:][0-5][0-9]:[0-5][0-9]"); _task.ParentChanged += OnParentChanged; }
internal static void Load(XmlNode node, TaskCollection collection) { var task = new Task( node.Attributes["Name"].Value, XmlConvert.ToBoolean(node.Attributes["IsCompleted"].Value), XmlConvert.ToDateTime(node.Attributes["DateTime"].Value, XmlDateTimeSerializationMode.RoundtripKind), node.InnerText); task.Collection = collection; }