Exemplo n.º 1
0
		public MainViewModel()
		{
			Current = this;
			CancelProgressCommand = new RelayCommand(OnCancelProgress);
			SendRequestCommand = new RelayCommand(OnSendRequest);
			AutoDetectDeviceCommand = new RelayCommand(OnAutoDetectDevice, CanAutoDetectDevice);
			ReadConfigurationCommand = new RelayCommand(OnReadConfiguration, CanReadConfiguration);
			ReadJournalCommand = new RelayCommand(OnReadJournal, CanReadJournal);
			GetInformationCommand = new RelayCommand(OnGetInformation, CanGetInformation);
			SynchronizeTimeCommand = new RelayCommand(OnSynchronizeTime, CanSynchronizeTime);
			SetPasswordCommand = new RelayCommand(OnSetPassword, CanSetPassword);
			RunOtherFunctionsCommand = new RelayCommand(OnRunOtherFunctions, CanRunOtherFunctions);
			UpdateFirmwhareCommand = new RelayCommand(OnUpdateFirmwhare, CanUpdateFirmwhare);
			WriteConfigurationCommand = new RelayCommand(OnWriteConfiguration, CanWriteConfiguration);
			GetDeviceStatusCommand = new RelayCommand(OnGetDeviceStatus, CanGetResetDeviceStatus);
			TestCommand = new RelayCommand(OnTest);
			MergeJournalCommand = new RelayCommand(OnMergeJournal, CanMergeJournal);
			DevicesViewModel = new DevicesViewModel();
			ZonesViewModel = new ZonesViewModel();
			ZonesViewModel.Initialize();
			ProgressInfos = new ObservableRangeCollection<FS2ProgressInfo>();
			CallbackManager.ProgressEvent += new System.Action<FS2Api.FS2ProgressInfo>(CallbackManager_ProgressEvent);
		}
Exemplo n.º 2
0
		public DevicesViewModel()
		{
			Current = this;
			BuildTree();
			OnPropertyChanged("RootDevices");
		}
Exemplo n.º 3
0
		void OnAutoDetectDevice()
		{
			var fs2Contract = new FS2Contract();
			var deviceConfiguration = fs2Contract.DeviceAutoDetectChildren(DevicesViewModel.SelectedDevice.Device.UID, false, "Тестовый пользователь").Result;
			if (deviceConfiguration == null)
				return;
			var autoDetectedDevicesViewModel = new DevicesViewModel(deviceConfiguration.RootDevice);
			autoDetectedDevicesViewModel.Title = "Найденные устройства";
			DialogService.ShowModalWindow(autoDetectedDevicesViewModel);
		}
Exemplo n.º 4
0
		public PropertiesViewModel(DevicesViewModel deviceViewModel)
		{
			Context = deviceViewModel;
		}