Пример #1
0
		public CodeReaderDetailsViewModel(GKCodeReaderSettings codeReaderSettings)
		{
			Title = "Настройка кодонаборника";
			CodeReaderSettings = codeReaderSettings;
			SetGuardSettingsViewModel = new CodeReaderSettingsViewModel(codeReaderSettings.SetGuardSettings);
			ResetGuardSettingsViewModel = new CodeReaderSettingsViewModel(codeReaderSettings.ResetGuardSettings);
			ChangeGuardSettingsViewModel = new CodeReaderSettingsViewModel(codeReaderSettings.ChangeGuardSettings);
			AlarmSettingsViewModel = new CodeReaderSettingsViewModel(codeReaderSettings.AlarmSettings);
		}
		public MPTCodeReaderDetailsViewModel(GKCodeReaderSettings codeReaderSettings, GKMPTDeviceType mptDeviceType)
		{
			Title = "Настройка кодонаборника";
			MPTDeviceType = mptDeviceType;
			CodeReaderSettings = codeReaderSettings;
			CodeReaderSettingsPart = codeReaderSettings.MPTSettings;
			switch (mptDeviceType)
			{
				case GKMPTDeviceType.HandAutomaticOn:
					CodeName = "Действие для постановки на автоматику";
					break;
				case GKMPTDeviceType.HandAutomaticOff:
					CodeName = "Действие для снятия с автоматики";
					break;
				case GKMPTDeviceType.HandStart:
					CodeName = "Действие для пуска";
					break;
				case GKMPTDeviceType.HandStop:
					CodeName = "Действие для останова";
					break;
			}

			CodeReaderSettingsViewModel = new CodeReaderSettingsViewModel(CodeReaderSettingsPart);
		}