public ControlClientViewModel()
        {
            this._currentModel = ModelType.None;

            this._currentChartOption = this.GetDefaultChartOption();

            this.DeleteMeasTaskCommand = new WpfCommand(this.OnDeleteMeasTaskCommand);
            this.RunMeasTaskCommand    = new WpfCommand(this.OnRunMeasTaskCommand);
            this.StopMeasTaskCommand   = new WpfCommand(this.OnStopMeasTaskCommand);

            this.RefreshShortTasksCommand         = new WpfCommand(this.OnRefreshShortTasksCommand);
            this.RefreshShortSensorsCommand       = new WpfCommand(this.OnRefreshShortSensorsCommand);
            this.ShowHideMeasTaskDetailCommand    = new WpfCommand(this.OnShowHideMeasTaskDetailCommand);
            this.ShowHideMeasResultsDetailCommand = new WpfCommand(this.OnShowHideMeasResultsDetailCommand);


            this._shortMeasTasks              = new ShortMeasTaskDataAdatper();
            this._shortMeasResults            = new ShortMeasurementResultsDataAdatper();
            this._shortSensors                = new ShortSensorDataAdatper();
            this._measTaskDetailStations      = new MeasTaskDetailStationDataAdapter();
            this._resultsMeasurementsStations = new ResultsMeasurementsStationDataAdapter();
            this._levelMeasurements           = new LevelMeasurementsCarDataAdapter();


            this.ReloadShortMeasTasks();
            this.ReloadShorSensors();
        }
Beispiel #2
0
        public ConfigurationViewModel()
        {
            _configurationModel = new ConfigurationModel();
            _configurationModel.PropertyChanged += (s, e) => { OnPropertyChanged(e.PropertyName); };

            SaveCommand            = new WpfCommand(_configurationModel.SaveConfiguration);
            SetLocalAddressCommand = new WpfCommand(_configurationModel.SaveLocalAddress);
        }
Beispiel #3
0
        public ConfigurationAuthorisationViewModel(ViewModelContext viewModelContext, AuthorisationManagerServiceManager authorisationManagerServiceManager)
            : base(viewModelContext)
        {
            this.authorisationManagerServiceManager = authorisationManagerServiceManager;

            NewUserCommand     = new WpfCommand(OnNewUser);
            NewRoleCommand     = new WpfCommand(OnNewRole);
            NewActivityCommand = new WpfCommand(OnNewActivity);
            SaveCommand        = new WpfCommand(OnEntitySave);
            DeleteCommand      = new WpfCommand(OnEntityDelete);
            RemoveItemCommand  = new WpfCommand(OnRemoveItem);
            DragDropCommand    = new WpfCommand(OnDragDrop);
            SelectItemCommand  = new WpfCommand(OnSelectItem);

            Logger.Log("ConfigurationAuthorisationViewModel initialised", Category.Info, Priority.None);
        }
Beispiel #4
0
        public DownloadViewModel()
        {
            SavePath        = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyVideos), "M3U8\\");
            M3U8Source      = new ObservableCollection <M3U8FileModel>();
            _canceltokenDic = new Dictionary <M3U8FileModel, CancellationTokenSource>();

            _downloader = new DownloadHelper();
            _downloader.ProgressChanged += OnDownloadProgressChanged;

            CommandAnalyze       = new WpfCommand(OnAnalyze, CanAnalyze);
            CommandViewPath      = new WpfCommand <string>(OnViewPath, CanViewPath);
            CommandDownload      = new WpfCommand(OnDownload, CanDownload);
            CommandAbortDownload = new WpfCommand(OnAbortDownload, CanAbortDownload);
            CommandCombine       = new WpfCommand(OnCombine, CanCombine);

            CommandRefreshM3U8Content    = new WpfCommand(OnRefreshM3U8Content, CanRefreshM3U8Content);
            CommandSaveM3U8ContentToFile = new WpfCommand(OnSaveContentToFile, CanSaveContentToFile);
        }