コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 public ProgressDataControl(Completable.Progress progress)
 {
     this.progress         = progress;
     milestoneDataControls = progress.getMilestones().ConvertAll(m => new MilestoneDataControl(m));
 }