void ConnectionManager_ConnectionHasChanged(object sender, ConnectionEventArgs args) { Logging.LogMessage (args); if (args.ChangeType == ChangeType.New) { if (args.Connectables != null) { foreach (IConnectable connectable in args.Connectables) { _connectionWidget.AddConnectable (connectable); } } if (args.Connections != null) { foreach (IConnection connection in args.Connections) { _connectionWidget.AddConnection (connection); } } } else if (args.ChangeType == ChangeType.Deleted) { if (args.Connections != null) { foreach (IConnection connection in args.Connections) { _connectionWidget.RemoveConnection (connection); } } if (args.Connectables != null) { foreach (IConnectable connectable in args.Connectables) { _connectionWidget.RemoveConnectable (connectable); } } } else if (args.ChangeType == ChangeType.Content) { if (args.Connectables != null) { foreach (IConnectable connectable in args.Connectables) { _connectionWidget.UpdateConnectable (connectable); } } } _connectionWidget.AddMessage (args.Message, args.Params); }
public static void LogMessage(ConnectionEventArgs args) { GetLogging ().LogConnectionWrapper (args); }
void ConnectionManager_BackendHasChanged(object sender, ConnectionEventArgs args) { Logging.LogMessage (args); switch (args.ChangeType) { case ChangeType.BackendExited: _connectionWidget.Clear (); break; } _connectionWidget.AddMessage (args.Message, args.Params); }