public FileSelectViewModel(IFileSpecsService fileSpecService, IFilePathService filePathService, IRegionManager regionManager) { fss = fileSpecService; fps = filePathService; rm = regionManager; GetSystemNameCommand = new DelegateCommand(AddFileSpecs); SystemNameRequest = new InteractionRequest <INotification>(); addFileSpecsCommand = new DelegateCommand(AddFileSpecs); addFilePathCommand = new DelegateCommand <object>(AddFilePath); fileSpecs = fss.GetSpecs(); }
private void Initialize() { tabViewList = new ObservableCollection <KeyValuePair <string, PositionConfigTabItemView> >(); lfs = fss.GetSpecs(); lfs.CollectionChanged += lfsChanged; FileData tempData; PositionConfigTabItemViewModel tempViewModel; KeyValuePair <string, PositionConfigTabItemView> ksp; foreach (FileSpecs fs in lfs) { fds.LoadData(fs); tempData = fds.GetData(fs.Name); tempViewModel = new PositionConfigTabItemViewModel(sss.AddSpecs(tempData)); ksp = new KeyValuePair <string, PositionConfigTabItemView>( fs.Name, new PositionConfigTabItemView(tempViewModel) ); tabViewList.Add(ksp); } }