示例#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));
 }
 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;
 }