public override bool deleteElement(DataControl dataControl, bool askConfirmation) { var milestone = dataControl as MilestoneDataControl; if (milestone == null) { return(false); } if (milestoneDataControls.Contains(milestone)) { milestoneDataControls.Remove(milestone); var milestones = progress.getMilestones(); milestones.Remove(milestone.getContent() as Completable.Milestone); progress.setMilestones(milestones); return(true); } return(false); }
public static XmlElement buildProgressDOM(Completable.Progress progress) { XmlElement progressNode = Writer.GetDoc().CreateElement("progress"); progressNode.SetAttribute("type", progress.getType().ToString()); foreach (Completable.Milestone milestone in progress.getMilestones()) { progressNode.AppendChild(CompletableDOMWriter.buildMilestoneDOM(milestone)); } return(progressNode); }
public ProgressDataControl(Completable.Progress progress) { this.progress = progress; milestoneDataControls = progress.getMilestones().ConvertAll(m => new MilestoneDataControl(m)); }