private void Add()
 {
     Subitems.Add(new HierarchicalElementViewModel(this)
     {
         Name = "Child Element"
     });
 }
Ejemplo n.º 2
0
        public AnalyticItemViewModel(IAnalyticItem analyticItem)
        {
            if (analyticItem == null)
            {
                throw new ArgumentNullException("analyticItem");
            }
            this.analyticItem = analyticItem;
            IAnalyticModel analyticModel = analyticItem as IAnalyticModel;

            if (analyticModel != null)
            {
                foreach (IAnalyticModel submodel in analyticModel.Models)
                {
                    Subitems.Add(new AnalyticItemViewModel(submodel));
                }
                foreach (IAnalyticRule subrule in analyticModel.Rules)
                {
                    Subitems.Add(new AnalyticItemViewModel(subrule));
                }
            }
            InitializeHistory(analyticItem.MarksHistory);
        }
Ejemplo n.º 3
0
 public void AppendChild(CanonicalItem child)
 {
     Subitems.Add(child);
     child.Parent = this;
 }