public void ControlGKDoor(Guid uid, GKDoorCommandType commandType)
		{
			ControlGKDoor(RubezhServiceFactory.UID, uid, commandType);
		}
		public void ControlGKDoor(Guid clientUID, Guid uid, GKDoorCommandType commandType)
		{
			SafeOperationCall(() =>
			{
				var rubezhService = RubezhServiceFactory.Create(TimeSpan.FromMinutes(10));
				using (rubezhService as IDisposable)
					rubezhService.ControlGKDoor(clientUID, uid, commandType);
			}, "ControlGKDoor");
		}
Beispiel #3
0
		public static void ControlGKDoor(Guid clientUID, Guid uid, GKDoorCommandType commandType)
		{
			var door = GKManager.Doors.FirstOrDefault(x => x.UID == uid);
			if (door == null)
				return;
			if (commandType == GKDoorCommandType.Automatic)
				RubezhServiceManager.SafeRubezhService.GKSetAutomaticRegime(clientUID, uid, GKBaseObjectType.Door);
			if (commandType == GKDoorCommandType.Ignore)
				RubezhServiceManager.SafeRubezhService.GKSetIgnoreRegime(clientUID, uid, GKBaseObjectType.Door);
			if (commandType == GKDoorCommandType.Manual)
				RubezhServiceManager.SafeRubezhService.GKSetManualRegime(clientUID, uid, GKBaseObjectType.Door);
			if (commandType == GKDoorCommandType.Open)
				RubezhServiceManager.SafeRubezhService.GKTurnOn(clientUID, uid, GKBaseObjectType.Door);
			if (commandType == GKDoorCommandType.Close)
				RubezhServiceManager.SafeRubezhService.GKTurnOff(clientUID, uid, GKBaseObjectType.Door);
			if (commandType == GKDoorCommandType.OpenInAutomatic)
				RubezhServiceManager.SafeRubezhService.GKTurnOnInAutomatic(clientUID, uid, GKBaseObjectType.Door);
			if (commandType == GKDoorCommandType.CloseInAutomatic)
				RubezhServiceManager.SafeRubezhService.GKTurnOffInAutomatic(clientUID, uid, GKBaseObjectType.Door);
			if (commandType == GKDoorCommandType.CloseNow)
				RubezhServiceManager.SafeRubezhService.GKTurnOffNow(clientUID, uid, GKBaseObjectType.Door);
			if (commandType == GKDoorCommandType.CloseNowInAutomatic)
				RubezhServiceManager.SafeRubezhService.GKTurnOffNowInAutomatic(clientUID, uid, GKBaseObjectType.Door);
			if (commandType == GKDoorCommandType.OpenForever)
			{
				RubezhServiceManager.SafeRubezhService.GKSetManualRegime(clientUID, uid, GKBaseObjectType.Door);
				RubezhServiceManager.SafeRubezhService.GKTurnOn(clientUID, uid, GKBaseObjectType.Door);
			}
			if (commandType == GKDoorCommandType.CloseForever)
			{
				RubezhServiceManager.SafeRubezhService.GKSetManualRegime(clientUID, uid, GKBaseObjectType.Door);
				RubezhServiceManager.SafeRubezhService.GKTurnOffNow(clientUID, uid, GKBaseObjectType.Door);
			}
			if (commandType == GKDoorCommandType.Norm)
			{
				RubezhServiceManager.SafeRubezhService.GKTurnOffNow(clientUID, uid, GKBaseObjectType.Door);
				RubezhServiceManager.SafeRubezhService.GKSetAutomaticRegime(clientUID, uid, GKBaseObjectType.Door);
			}
		}
		public void ControlGKDoor(Guid clientUID, Guid uid, GKDoorCommandType commandType)
		{
			ProcedureHelper.ControlGKDoor(clientUID, uid, commandType);
		}
		public static void ControlGKDoor(Guid clientUID, Guid uid, GKDoorCommandType commandType)
		{
			if (OnControlGKDoor != null)
				OnControlGKDoor(clientUID, uid, commandType);
		}