public void AddRange(ProtocolBase[] cProt) { foreach (var cP in cProt) { List.Add(cP); } RaiseCollectionChangedEvent(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, cProt)); }
public void Remove(ProtocolBase cProt) { try { List.Remove(cProt); RaiseCollectionChangedEvent(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, cProt)); } catch (Exception) { } }
public InterfaceControl(Control parent, ProtocolBase protocol, ConnectionInfo info) { try { Protocol = protocol; Info = info; Parent = parent; Location = new Point(0, 0); Size = Parent.Size; Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; InitializeComponent(); } catch (Exception ex) { Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, "Couldn\'t create new InterfaceControl" + Environment.NewLine + ex.Message); } }
public ProtocolBase Add(ProtocolBase cProt) { this.List.Add(cProt); return(cProt); }
public void Teardown() { _protocolList = null; _protocol1 = null; _protocol2 = null; _protocol3 = null; }
public void Setup() { _protocolList = new ProtocolList(); _protocol1 = new ProtocolTelnet(); _protocol2 = new ProtocolSSH2(); _protocol3 = new ProtocolVNC(); }
public void Add(ProtocolBase cProt) { List.Add(cProt); RaiseCollectionChangedEvent(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, cProt)); }
private static void BuildConnectionInterfaceController(ConnectionInfo connectionInfo, ProtocolBase newProtocol, Control connectionContainer) { newProtocol.InterfaceControl = new InterfaceControl(connectionContainer, newProtocol, connectionInfo); }
private static void SetConnectionFormEventHandlers(ProtocolBase newProtocol, Form connectionForm) { newProtocol.Closed += ((ConnectionWindow)connectionForm).Prot_Event_Closed; }
private static void SetConnectionEventHandlers(ProtocolBase newProtocol) { newProtocol.Disconnected += Prot_Event_Disconnected; newProtocol.Connected += Prot_Event_Connected; newProtocol.Closed += Prot_Event_Closed; newProtocol.ErrorOccured += Prot_Event_ErrorOccured; }