public static void DeactivateAll(string operatingMode) { if (WaterRelaisControl.Instance.DeactivateAllConnections(operatingMode)) { RelaisControl2.DeactivateAll(operatingMode); } }
//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); } }
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); } }