Example #1
0
 void server_OnAccept(ASyncSocket AcceptedSocket)
 {
     if (this.InvokeRequired)
     {
         dserver_OnAccept d    = new dserver_OnAccept(server_OnAccept);
         object[]         args = { AcceptedSocket };
         this.Invoke(d, args);
     }
     else
     {
         AcceptedEmulator               = AcceptedSocket;
         AcceptedSocket.OnAccept       += new ASyncSocket.OnAcceptEventHandler(server_OnAccept);
         AcceptedSocket.OnReceive      += new ASyncSocket.OnReceiveEventHandler(server_OnReceive);
         AcceptedSocket.OnSend         += new ASyncSocket.OnSendEventHandler(server_OnSend);
         AcceptedSocket.OnListen       += new ASyncSocket.OnListenEventHandler(server_OnListen);
         AcceptedSocket.OnAcceptFailed += new ASyncSocket.OnAcceptFailedEventHandler(server_OnAcceptFailed);
         //server.OnConnect += new ASyncSocket.OnConnectEventHandler(server_OnConnect);
         //server.OnConnectFailed += new ASyncSocket.OnConnectFailedEventHandler(server_OnConnectFailed);
         //server.OnDisconnect += new ASyncSocket.OnDisconnectEventHandler(server_OnDisconnect);
         //server.OnDisconnectFailed += new ASyncSocket.OnDisconnectFailedEventHandler(server_OnDisconnectFailed);
         AcceptedSocket.OnListenFailed  += new ASyncSocket.OnListenFailedEventHandler(server_OnListenFailed);
         AcceptedSocket.OnReceiveFailed += new ASyncSocket.OnReceiveFailedEventHandler(server_OnReceiveFailed);
         AcceptedSocket.OnSendFailed    += new ASyncSocket.OnSendFailedEventHandler(server_OnSendFailed);
         // AcceptedSocket.Send("STEP\n");
         String command = "\n> Emulator Ready to receive order.\n";
         commandtb.AppendText(command);
         commandtb.ScrollToCaret();
     }
 }
Example #2
0
        void server_OnAccept(ASyncSocket AcceptedSocket)
        {
            if (this.InvokeRequired)
            {
                dserver_OnAccept d    = new dserver_OnAccept(server_OnAccept);
                object[]         args = { AcceptedSocket };
                this.Invoke(d, args);
            }
            else
            {
                AcceptedEmulator = AcceptedSocket;

                AcceptedSocket.OnReceive       += new ASyncSocket.OnReceiveEventHandler(server_OnReceive);
                AcceptedSocket.OnSend          += new ASyncSocket.OnSendEventHandler(server_OnSend);
                AcceptedSocket.OnDisconnect    += new ASyncSocket.OnDisconnectEventHandler(server_OnDisconnect);
                AcceptedSocket.OnReceiveFailed += new ASyncSocket.OnReceiveFailedEventHandler(server_OnReceiveFailed);
                AcceptedSocket.OnSendFailed    += new ASyncSocket.OnSendFailedEventHandler(server_OnSendFailed);

                String command = "\n> Emulator Ready to receive order.\n";
                outPutTxtBx.AppendText(command);
                outPutTxtBx.ScrollToCaret();


                foreach (DocumentForm doc in this.mainForm.cgEeditor1.dockPanel.Documents)
                {
                    //--- Get all breakPoints
                    foreach (Line line in doc.Scintilla.Lines)
                    {
                        int mask = doc.Scintilla.Markers.GetMarkerMask(line);
                        if (mask != 0)
                        {
                            BreakPoint breakpoint = new BreakPoint(doc.Text, (line.Number + 1).ToString());
                            this.sendAddBreakPointCommand(breakpoint);
                        }
                    }
                }
            }
        }
Example #3
0
        void server_OnAccept(ASyncSocket AcceptedSocket)
        {
            if (this.InvokeRequired)
            {
                dserver_OnAccept d = new dserver_OnAccept(server_OnAccept);
                object[] args = { AcceptedSocket };
                this.Invoke(d, args);
            }
            else
            {
                AcceptedEmulator = AcceptedSocket;

                AcceptedSocket.OnReceive += new ASyncSocket.OnReceiveEventHandler(server_OnReceive);
                AcceptedSocket.OnSend += new ASyncSocket.OnSendEventHandler(server_OnSend);
                AcceptedSocket.OnDisconnect += new ASyncSocket.OnDisconnectEventHandler(server_OnDisconnect);
                AcceptedSocket.OnReceiveFailed += new ASyncSocket.OnReceiveFailedEventHandler(server_OnReceiveFailed);
                AcceptedSocket.OnSendFailed += new ASyncSocket.OnSendFailedEventHandler(server_OnSendFailed);

                String command = "\n> Emulator Ready to receive order.\n";
                outPutTxtBx.AppendText(command);
                outPutTxtBx.ScrollToCaret();

                foreach (DocumentForm doc in this.mainForm.cgEeditor1.dockPanel.Documents)
                {
                    //--- Get all breakPoints
                    foreach (Line line in doc.Scintilla.Lines)
                    {
                        int mask = doc.Scintilla.Markers.GetMarkerMask(line);
                        if (mask != 0)
                        {
                            BreakPoint breakpoint = new BreakPoint(doc.Text, (line.Number + 1).ToString());
                            this.sendAddBreakPointCommand(breakpoint);
                        }

                    }
                }

            }
        }
Example #4
0
        void server_OnAccept(ASyncSocket AcceptedSocket)
        {
            if (this.InvokeRequired)
            {
                dserver_OnAccept d = new dserver_OnAccept(server_OnAccept);
                object[] args = { AcceptedSocket };
                this.Invoke(d, args);
            }
            else
            {

                AcceptedEmulator = AcceptedSocket;
                AcceptedSocket.OnAccept += new ASyncSocket.OnAcceptEventHandler(server_OnAccept);
                AcceptedSocket.OnReceive += new ASyncSocket.OnReceiveEventHandler(server_OnReceive);
                AcceptedSocket.OnSend += new ASyncSocket.OnSendEventHandler(server_OnSend);
                AcceptedSocket.OnListen += new ASyncSocket.OnListenEventHandler(server_OnListen);
                AcceptedSocket.OnAcceptFailed += new ASyncSocket.OnAcceptFailedEventHandler(server_OnAcceptFailed);
                //server.OnConnect += new ASyncSocket.OnConnectEventHandler(server_OnConnect);
                //server.OnConnectFailed += new ASyncSocket.OnConnectFailedEventHandler(server_OnConnectFailed);
                //server.OnDisconnect += new ASyncSocket.OnDisconnectEventHandler(server_OnDisconnect);
                //server.OnDisconnectFailed += new ASyncSocket.OnDisconnectFailedEventHandler(server_OnDisconnectFailed);
                AcceptedSocket.OnListenFailed += new ASyncSocket.OnListenFailedEventHandler(server_OnListenFailed);
                AcceptedSocket.OnReceiveFailed += new ASyncSocket.OnReceiveFailedEventHandler(server_OnReceiveFailed);
                AcceptedSocket.OnSendFailed += new ASyncSocket.OnSendFailedEventHandler(server_OnSendFailed);
               // AcceptedSocket.Send("STEP\n");
                String command = "\n> Emulator Ready to receive order.\n";
                commandtb.AppendText(command);
                commandtb.ScrollToCaret();
            }
        }
Example #5
0
        void server_OnAccept(ASyncSocket AcceptedSocket)
        {
            if (this.InvokeRequired)
            {
                dserver_OnAccept d = new dserver_OnAccept(server_OnAccept);
                object[] args = { AcceptedSocket };
                this.Invoke(d, args);
            }
            else
            {
                ASyncSocket newClient = AcceptedSocket;

                this.AcceptedClients.Add(newClient);

                AcceptedSocket.OnReceive += new ASyncSocket.OnReceiveEventHandler(server_OnReceive);
                AcceptedSocket.OnSend += new ASyncSocket.OnSendEventHandler(server_OnSend);

                AcceptedSocket.OnDisconnect += new ASyncSocket.OnDisconnectEventHandler(server_OnDisconnect);

                AcceptedSocket.OnReceiveFailed += new ASyncSocket.OnReceiveFailedEventHandler(server_OnReceiveFailed);
                AcceptedSocket.OnSendFailed += new ASyncSocket.OnSendFailedEventHandler(server_OnSendFailed);

                String command = "\n> Emulator Ready to send order.\n";

            }
        }