Пример #1
0
 public void AddRange(ProtocolBase[] cProt)
 {
     foreach (var cP in cProt)
     {
         List.Add(cP);
     }
     RaiseCollectionChangedEvent(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, cProt));
 }
Пример #2
0
 public void Remove(ProtocolBase cProt)
 {
     try
     {
         List.Remove(cProt);
         RaiseCollectionChangedEvent(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, cProt));
     }
     catch (Exception)
     {
     }
 }
Пример #3
0
 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);
     }
 }
Пример #4
0
 public ProtocolBase Add(ProtocolBase cProt)
 {
     this.List.Add(cProt);
     return(cProt);
 }
Пример #5
0
 public void Teardown()
 {
     _protocolList = null;
     _protocol1 = null;
     _protocol2 = null;
     _protocol3 = null;
 }
Пример #6
0
 public void Setup()
 {
     _protocolList = new ProtocolList();
     _protocol1 = new ProtocolTelnet();
     _protocol2 = new ProtocolSSH2();
     _protocol3 = new ProtocolVNC();
 }
Пример #7
0
 public void Add(ProtocolBase cProt)
 {
     List.Add(cProt);
     RaiseCollectionChangedEvent(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, cProt));
 }
Пример #8
0
 public void Add(ProtocolBase cProt)
 {
     List.Add(cProt);
     RaiseCollectionChangedEvent(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, cProt));
 }
Пример #9
0
 private static void BuildConnectionInterfaceController(ConnectionInfo connectionInfo, ProtocolBase newProtocol, Control connectionContainer)
 {
     newProtocol.InterfaceControl = new InterfaceControl(connectionContainer, newProtocol, connectionInfo);
 }
Пример #10
0
 private static void SetConnectionFormEventHandlers(ProtocolBase newProtocol, Form connectionForm)
 {
     newProtocol.Closed += ((ConnectionWindow)connectionForm).Prot_Event_Closed;
 }
Пример #11
0
 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;
 }