Ejemplo n.º 1
0
 public VmAttrWindow(Application myApplication) //, List<ObjectItemAttr> tree) //, new List<ObjectItemAttr>() { new ObjectItemAttr() }
 {
     this.myApplication = myApplication;
     //Tree = tree;
     GetAtrName = new List <string>();
     CmdSelect  = new Helpers.RelayCommand(ExeSelect);
 }
            public VmMainWindow(MainWindow frm, Application myApplication)
            {
                DeviceBasedOnType  = new List <ObjectItem>();
                this.frm           = frm;
                this.myApplication = myApplication;
                MyGrid             = new ObservableCollection <ModelData>();
                CmdAdd             = new Helpers.RelayCommand(ExeAdd);
                CmdAddAttr         = new Helpers.RelayCommand(ExeAddAttr);
                Type       = new ObservableCollection <ComboModelView>();
                StringType = new List <string>();
                MaterialModel _devices = new MaterialModel();


                myApplication.Selection[0].ExecuteFormula("Ut;A5;", out catalogName); //only if run from materials and uner materials. have to do one for standardkatalog

                MaskDescriptionModel mappedDesc = new MaskDescriptionModel();

                myApplication.Folders.Catalogs.Children.ToList().ForEach(items =>
                {
                    if (items.Name == catalogName)
                    {
                        _devices.DeviceObjMat        = getAllDeviceMat();
                        _devices.DeviceByStringTypes = getAllDeviceByStringType(_devices.DeviceObjMat);
                        getAllDeviceByStringType(_devices.DeviceObjMat).Distinct().ToList().ForEach(item => { Type.Add(new ComboModelView()
                            {
                                TypeName = item
                            });  StringType.Add(item); });
                    }
                });

                Icon = myApplication.Folders.Attributes.Image;
            }
Ejemplo n.º 3
0
 public MainWindowViewModel(List <ObjectItemTypeDefinationModel> tree, Application myApplication)
 {
     Tree               = tree;
     CmdAdd             = new Helpers.RelayCommand(exeAdd);
     CmdImportPage      = new Helpers.RelayCommand(PushImportPage);
     this.myApplication = myApplication;
 }
 public ImportWindowViewModel(Application myApplication, List <ObjectitemTabTree> Tablist, List <ObjectitemToDragToTree> AttributeList)
 {
     CmdImport          = new Helpers.RelayCommand(exeImport);
     CmdConfirm         = new Helpers.RelayCommand(exeAddNewAtt);
     cmdSearch          = new Helpers.RelayCommand(exeSearch);
     this.myApplication = myApplication;
     ToDragTree         = AttributeList;
     TabTree            = Tablist;
 }
 public ListDatabasesViewModel()
 {
    
     SelectDatabase = new Helpers.RelayCommand<Databases>(GoDatabaseDetails); 
     //GetDatabases = new RelayCommand(()=>GetDatabasesCommand());
     LogOut = new RelayCommand(()=> LogoutNow());
     Exceptionpopupcommand = new RelayCommand(() => HandleException());
 }