private void BtnChangeArm_Click(object sender, RoutedEventArgs e) { ChkArm.Fill = new SolidColorBrush(Colors.Red); ChkDisarm.Fill = new SolidColorBrush(Colors.Red); ChkSleep.Fill = new SolidColorBrush(Colors.Red); ChkStay.Fill = new SolidColorBrush(Colors.Red); if (CmbArming.Text == "Regular Arm") { ipmm.AlarmAction(ParadoxIp.Enum.PartitionNumber.All, ParadoxIp.Enum.AlarmMode.RegularArm); ChkArm.Fill = new SolidColorBrush(Colors.Green); } else if (CmbArming.Text == "Sleep") { ipmm.AlarmAction(ParadoxIp.Enum.PartitionNumber.All, ParadoxIp.Enum.AlarmMode.SleepArm); ChkSleep.Fill = new SolidColorBrush(Colors.Green); } else if (CmbArming.Text == "Stay") { ipmm.AlarmAction(ParadoxIp.Enum.PartitionNumber.All, ParadoxIp.Enum.AlarmMode.StayArm); ChkStay.Fill = new SolidColorBrush(Colors.Green); } else if (CmbArming.Text == "Off") { ipmm.AlarmAction(ParadoxIp.Enum.PartitionNumber.All, ParadoxIp.Enum.AlarmMode.Disarm); ChkDisarm.Fill = new SolidColorBrush(Colors.Green); } }
public bool Put(PartitionSetModeRequest request) { var partitionId = (PartitionNumber)request.PartitionId; var mode = (AlarmMode)request.Mode; manager.AlarmAction(partitionId, mode); return(true); }
public void StayArmTest() { using (var manager = new IpModuleManager(module)) { manager.Login(); manager.GetAlarmInformation(); manager.AlarmAction(PartitionNumber.Two, AlarmMode.RegularArm); manager.Logout(); } }