Пример #1
0
        public MainWindow()
        {
            var           mySet = GWPMaterialSet.GetDefaultGWPConcreteSetSeparateSteel();
            MaterialSetVM vm    = new MaterialSetVM(mySet, this);

            DataContext = vm;
            InitializeComponent();
        }
Пример #2
0
 public MaterialSetVM(GWPMaterialSet materialSet, IViewModelParent parent)
 {
     _materials = materialSet;
     _parent    = parent;
     //_materialVMs = new ObservableCollection<MaterialVM>();
     MaterialNames = new ObservableCollection <string>();
     foreach (var item in materialSet.Materials)
     {
         MaterialNames.Add(item.Name);
         //_materialVMs.Add(new MaterialVM(item, this));
     }
 }
Пример #3
0
 public MaterialSetVM(string name, GWPMaterialSet materialSet, ModelVM parent)
 {
     _materials    = materialSet;
     _parent       = parent;
     _materialVMs  = new ObservableCollection <MaterialVM>();
     MaterialNames = new List <string>();
     foreach (var item in materialSet.Materials)
     {
         MaterialNames.Add(item.Name);
         _materialVMs.Add(new MaterialVM(item));
     }
 }