public void Disconnect() { try { switcher?.Disconnect(); } catch (NotConnectedException ex) { string errorMessage = string.Format("Tried to disconnect from a BlackMagic Design mixer/switcher (ID: {0}) with IP {1}, but wasn't connected. Exception message: [{2}]", ID, IpAddress, ex.Message); LogDispatcher.W(LOG_TAG, errorMessage); } }
public void _run() { if (CurrentStackDepth >= MaxStackDepthSetting.Value) { string logMessage = string.Format("Can't execute #{0} ({1}) macro, because stack is full ({2}).", ID, Name, CurrentStackDepth); LogDispatcher.W(LOG_TAG, logMessage); return; } CurrentStackDepth++; foreach (MacroCommandWithArguments commandWA in commands) { commandWA.Run(); } CurrentStackDepth--; }
public void Connect() { try { switcher?.Connect(); } catch (CouldNotConnectException ex) { string errorMessage = string.Format("Couldn't connect to a BlackMagic Design mixer/switcher (ID: {0}) with IP {1}. Exception message: [{2}]", ID, IpAddress, ex.Message); LogDispatcher.E(LOG_TAG, errorMessage); } catch (AlreadyConnectedException ex) { string errorMessage = string.Format("Tried to connect to a BlackMagic Design mixer/switcher (ID: {0}) with IP {1}, but was already connected. Exception message: [{2}]", ID, IpAddress, ex.Message); LogDispatcher.W(LOG_TAG, errorMessage); } }