public DeviceMetricHistoryViewModel(
     IOptions <CoreOptions> coreOptions,
     DeviceService.DeviceServiceClient client)
 {
     this.coreOptions = coreOptions ?? throw new ArgumentNullException(nameof(coreOptions));
     this.client      = client ?? throw new ArgumentNullException(nameof(client));
 }
        public DeviceRunningParameterViewModel(
            IOptions <CoreOptions> coreOptions,
            DeviceService.DeviceServiceClient client)
        {
            this.coreOptions = coreOptions ?? throw new ArgumentNullException(nameof(coreOptions));
            this.client      = client ?? throw new ArgumentNullException(nameof(client));

            this.UpdateCommand = new DelegateCommand(this.ExecuteUpdateCommand);
        }
        public DeviceMetricHistoryExportViewModel(
            ILogger <DeviceMetricHistoryExportViewModel> logger,
            IOptions <CoreOptions> coreOptions,
            DeviceService.DeviceServiceClient client)
        {
            this.logger      = logger ?? throw new ArgumentNullException(nameof(logger));
            this.coreOptions = coreOptions ?? throw new ArgumentNullException(nameof(coreOptions));
            this.client      = client ?? throw new ArgumentNullException(nameof(client));

            this.ExportCommand = new DelegateCommand(this.ExecuteExport, this.CanExport);
        }
示例#4
0
        public DeviceListViewModel(
            IOptions <CoreOptions> coreOptions,
            IRegionManager regionManager,
            DeviceService.DeviceServiceClient client)
        {
            this.coreOptions   = coreOptions ?? throw new ArgumentNullException(nameof(coreOptions));
            this.regionManager = regionManager ?? throw new ArgumentNullException(nameof(regionManager));
            this.client        = client ?? throw new ArgumentNullException(nameof(client));

            this.ConfirmCommand = new DelegateCommand(this.ExecuteConfirmCommand);
        }
示例#5
0
        public LoginViewModel(
            IOptions <CoreOptions> coreOptions,
            IRegionManager regionManager,
            DeviceService.DeviceServiceClient client)
        {
            this.coreOptions   = coreOptions ?? throw new ArgumentNullException(nameof(coreOptions));
            this.regionManager = regionManager ?? throw new ArgumentNullException(nameof(regionManager));
            this.client        = client ?? throw new ArgumentNullException(nameof(client));

            this.LoginCommand        = new DelegateCommand <PasswordBox>(this.ExecuteLoginCommand);
            this.NavigateBackCommand = new DelegateCommand(this.ExecuteNavigateBackCommand);
        }
示例#6
0
        public DeviceMetricBoardViewModel(
            ILogger <DeviceMetricBoardViewModel> logger,
            IOptions <CoreOptions> coreOptions,
            DeviceService.DeviceServiceClient client)
        {
            this.logger      = logger ?? throw new ArgumentNullException(nameof(logger));
            this.coreOptions = coreOptions ?? throw new ArgumentNullException(nameof(coreOptions));
            this.client      = client ?? throw new ArgumentNullException(nameof(client));

            this.timer = new DispatcherTimer(
                TimeSpan.FromMilliseconds(this.coreOptions.Value.DefaultRefreshIntervalMillis),
                DispatcherPriority.DataBind,
                this.Timer_Tick,
                Dispatcher.CurrentDispatcher);
        }
        public DeviceControlViewModel(
            ILogger <DeviceControlViewModel> logger,
            IOptions <CoreOptions> coreOptions,
            DeviceService.DeviceServiceClient client)
        {
            this.logger      = logger ?? throw new ArgumentNullException(nameof(logger));
            this.coreOptions = coreOptions ?? throw new ArgumentNullException(nameof(coreOptions));
            this.client      = client ?? throw new ArgumentNullException(nameof(client));

            this.timer = new DispatcherTimer(
                TimeSpan.FromMilliseconds(this.coreOptions.Value.DefaultRefreshIntervalMillis),
                DispatcherPriority.DataBind,
                this.Timer_Tick,
                Dispatcher.CurrentDispatcher);

            this.SwitchOnClickCommand  = new DelegateCommand <string>(this.ExecuteSwitchOnClickCommand);
            this.SwitchOffClickCommand = new DelegateCommand <string>(this.ExecuteSwitchOffClickCommand);
        }