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

            var component = new ComponentList(model);

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