コード例 #1
0
 public static void DeactivateAll(string operatingMode)
 {
     if (WaterRelaisControl.Instance.DeactivateAllConnections(operatingMode))
     {
         RelaisControl2.DeactivateAll(operatingMode);
     }
 }
コード例 #2
0
 //TODO: move http query into method, change to https, move uri to static context
 public static void Activate(int channelId, bool activateWithMasterChannel, string operatingMode, TimeSpan duration)
 {
     if (WaterRelaisControl.Instance.Activate(channelId, activateWithMasterChannel, operatingMode, duration, out bool activateMasterChannel))
     {
         RelaisControl2.Activate(channelId, activateMasterChannel, operatingMode);
     }
 }
コード例 #3
0
 public static void Deactivate(int channelId, string operatingMode)
 {
     if (WaterRelaisControl.Instance.Deactivate(channelId, operatingMode, out bool deactivateMasterChannel))
     {
         RelaisControl2.Deactivate(channelId, operatingMode);
     }
     else if (deactivateMasterChannel)
     {
         RelaisControl2.Deactivate(0, operatingMode);
     }
 }