コード例 #1
0
        public RootViewModel(List <Procedure> proceduresList)
            : base(null)
        {
            List <ProcedureViewModel> childrenProcs = new List <ProcedureViewModel>();

            foreach (Procedure p in proceduresList)
            {
                ProcedureViewModel procViewModel = new ProcedureViewModel(this, p);
                childrenProcs.Add(procViewModel);
                base.Children.Add(procViewModel);
            }
            procedures = new ObservableCollection <ProcedureViewModel>(childrenProcs);
        }
コード例 #2
0
 // For procedures that are a child of Procedure
 public ProcedureViewModel(ProcedureViewModel parent, Procedure procedure)
     : base(parent)
 {
     this.procedure = procedure;
 }