Ejemplo n.º 1
0
 private void connect()
 {
     controller = JeromeController.create(currentConnection.jeromeParams);
     if (currentTemplate.uartEncoder)
     {
         controller.usartBytesReceived += usartBytesReceived;
     }
     controller.onDisconnected += onDisconnect;
     controller.onConnected    += onConnect;
     controller.usartBinaryMode = true;
     if (currentConnection.hwLimits)
     {
         controller.lineStateChanged += lineStateChanged;
     }
     controller.asyncConnect();
     updateGUI(
         delegate()
     {
         connectionsDropdown = new ToolStripMenuItem[miConnections.DropDownItems.Count];
         miConnections.Text  = "Отключиться";
         miConnections.DropDownItems.CopyTo(connectionsDropdown, 0);
         miConnections.DropDownItems.Clear();
         Text          = currentConnection.name + " идет соединение";
         lCaption.Text = Text;
         Icon          = (Icon)Resources.ResourceManager.GetObject(CommonInf.icons[currentConnection.icon]);
     });
 }
Ejemplo n.º 2
0
 public void connectTerminal()
 {
     if (!terminalJConnection.connected)
     {
         config.terminalActive = true;
         writeConfig();
         terminalJConnection.asyncConnect();
     }
 }