public string GenerateList(string title, List <ComponentListItem> items) { var model = new ComponentListModel(title, items); var component = new ComponentList(model); return(component.Generate()); }
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 ComponentListViewModel(BaseViewModel parentViewModel, ComponentListModel dataModel) : this(parentViewModel, dataModel, ServiceLocator.Resolve <IDialogService>(), ServiceLocator.Resolve <ISaveFileDialog>) { }
public ComponentList(ComponentListModel model) { Model = model; ElementsUI = model.ToElementsCollection(); }