Esempio n. 1
0
 public ProductsListViewModel(IProductsMonitoringModel productsModel) : base(productsModel as ModelBase)
 {
     _productsModel = productsModel;
     //Products = new ObservableCollection<ProductViewModel>();
     //Products.CollectionChanged += Products_CollectionChanged;
     ContextMenuProductCopyProductKey = new SingleDelegateCommand(CopyProductKey);
     AddProductCommand    = new MultipleDelegateCommand(AddProduct, CanAddProduct);
     RemoveProductCommand = new RelayCommand <ProductViewModel>(RemoveProduct);
     //DisplayProductsList();
 }
Esempio n. 2
0
 public UpdateClientViewModel(IUpdateClientModel model) : base(model as ModelBase)
 {
     _updateClientModel = model;
     RegisterProperty(nameof(IUpdateClientModel.DownloadedFilesCount), nameof(DownloadStatusText));
     RegisterProperty(nameof(IUpdateClientModel.IsUpdating), nameof(IsUpdateDownloading));
     RegisterProperty(nameof(IUpdateClientModel.DownloadProgress), nameof(DownloadProgressValue));
     RegisterProperty(nameof(IUpdateClientModel.IsUpdateDownloaded), nameof(IsDownloadCompleted));
     DownloadButtonCommand = new SingleDelegateCommand(DownloadUpdate);
     InstallButtonCommand  = new SingleDelegateCommand(InstallUpdate);
 }
Esempio n. 3
0
        public MonitoringTreeViewModel(IMonitoringModel model) : base(model as ModelBase)
        {
            _model = model;
            _model.PropertyChanged += model_PropertyChanged;

            ShowProductsCommand        = new MultipleDelegateCommand(ShowProducts, CanShowProducts);
            SensorDoubleClickCommand   = new SingleDelegateCommand(ExpandSensor);
            MenuShowSettingsCommand    = new SingleDelegateCommand(ShowSettingsWindow);
            GenerateCertificateCommand = new SingleDelegateCommand(ShowGenerateCertificateWindow);
        }