Beispiel #1
0
        public string GenerateList(string title, List <ComponentListItem> items)
        {
            var model = new ComponentListModel(title, items);

            var component = new ComponentList(model);

            return(component.Generate());
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 public ComponentListViewModel(BaseViewModel parentViewModel, ComponentListModel dataModel)
     : this(parentViewModel, dataModel, ServiceLocator.Resolve <IDialogService>(), ServiceLocator.Resolve <ISaveFileDialog>)
 {
 }
Beispiel #4
0
 public ComponentList(ComponentListModel model)
 {
     Model      = model;
     ElementsUI = model.ToElementsCollection();
 }