public ComponentListViewModel(BaseViewModel parentViewModel, ComponentListModel dataModel, IDialogService dialogService, Func<ISaveFileDialog> saveFileDialogFactory) : base(parentViewModel) { Contract.Requires(dialogService != null); Contract.Requires(saveFileDialogFactory != null); _dialogService = dialogService; _saveFileDialogFactory = saveFileDialogFactory; _dataModel = dataModel; _dataModel.PropertyChanged += (sender, e) => OnPropertyChanged(e.PropertyName); }
public void OpenComponentListExecuted() { var model = new ComponentListModel(); model.Load(); var loadVm = new ComponentListViewModel(this, model); _dialogService.Show<WindowComponentList>(this, loadVm); }
public ComponentListViewModel(BaseViewModel parentViewModel, ComponentListModel dataModel) : this(parentViewModel, dataModel, ServiceLocator.Resolve<IDialogService>(), ServiceLocator.Resolve<ISaveFileDialog>) { }