public DebugManager() { InitializeComponent(); BreakPoints = new List <BreakPoint>(); Watchs = new List <Watch>(); server = new ASyncSocket(); server.OnAccept += new ASyncSocket.OnAcceptEventHandler(server_OnAccept); server.OnReceive += new ASyncSocket.OnReceiveEventHandler(server_OnReceive); server.OnSend += new ASyncSocket.OnSendEventHandler(server_OnSend); server.OnListen += new ASyncSocket.OnListenEventHandler(server_OnListen); server.OnAcceptFailed += new ASyncSocket.OnAcceptFailedEventHandler(server_OnAcceptFailed); server.OnListenFailed += new ASyncSocket.OnListenFailedEventHandler(server_OnListenFailed); server.OnReceiveFailed += new ASyncSocket.OnReceiveFailedEventHandler(server_OnReceiveFailed); server.OnSendFailed += new ASyncSocket.OnSendFailedEventHandler(server_OnSendFailed); server.Listen(8171); }
public DebugManager() { InitializeComponent(); BreakPoints = new List<BreakPoint>(); Watchs = new List<Watch>(); server = new ASyncSocket(); server.OnAccept += new ASyncSocket.OnAcceptEventHandler(server_OnAccept); server.OnReceive += new ASyncSocket.OnReceiveEventHandler(server_OnReceive); server.OnSend += new ASyncSocket.OnSendEventHandler(server_OnSend); server.OnListen += new ASyncSocket.OnListenEventHandler(server_OnListen); server.OnAcceptFailed += new ASyncSocket.OnAcceptFailedEventHandler(server_OnAcceptFailed); server.OnListenFailed += new ASyncSocket.OnListenFailedEventHandler(server_OnListenFailed); server.OnReceiveFailed += new ASyncSocket.OnReceiveFailedEventHandler(server_OnReceiveFailed); server.OnSendFailed += new ASyncSocket.OnSendFailedEventHandler(server_OnSendFailed); server.Listen(8171); }
public void initServer() { if (server == null) { BreakPoints = new List <BreakPoint>(); Watchs = new List <Watch>(); server = new ASyncSocket(); server.OnAccept += new ASyncSocket.OnAcceptEventHandler(server_OnAccept); server.OnReceive += new ASyncSocket.OnReceiveEventHandler(server_OnReceive); server.OnSend += new ASyncSocket.OnSendEventHandler(server_OnSend); server.OnListen += new ASyncSocket.OnListenEventHandler(server_OnListen); server.OnAcceptFailed += new ASyncSocket.OnAcceptFailedEventHandler(server_OnAcceptFailed); server.OnListenFailed += new ASyncSocket.OnListenFailedEventHandler(server_OnListenFailed); server.OnReceiveFailed += new ASyncSocket.OnReceiveFailedEventHandler(server_OnReceiveFailed); server.OnSendFailed += new ASyncSocket.OnSendFailedEventHandler(server_OnSendFailed); server.Listen(8171); } BreakPoints.Clear(); Watchs.Clear(); DocumentForm doc = this.mainForm.cgEeditor1.ActiveDocument; if (doc != null) { foreach (Line line in doc.Scintilla.Lines) { int mask = doc.Scintilla.Markers.GetMarkerMask(line); if (mask != 0) { BreakPoints.Add(new BreakPoint(doc.Text, line.Number.ToString())); } } } }
////////////////////////////////////////// /// INIT METHODS ////////////////////////////////////////// public void initServer() { if (this.project != null) { this.setHandLostWithSimulator(true); this.mainForm.workspaceViewToolStripMenuItem.Enabled = false; if (server == null) { LastCommandReceive = ""; CurrentCommandSend = ""; BreakPoints = new List <BreakPoint>(); Watchs = new List <Watch>(); server = new ASyncSocket(); server.OnAccept += new ASyncSocket.OnAcceptEventHandler(server_OnAccept); server.OnReceive += new ASyncSocket.OnReceiveEventHandler(server_OnReceive); server.OnSend += new ASyncSocket.OnSendEventHandler(server_OnSend); server.OnListen += new ASyncSocket.OnListenEventHandler(server_OnListen); server.OnAcceptFailed += new ASyncSocket.OnAcceptFailedEventHandler(server_OnAcceptFailed); server.OnListenFailed += new ASyncSocket.OnListenFailedEventHandler(server_OnListenFailed); server.OnReceiveFailed += new ASyncSocket.OnReceiveFailedEventHandler(server_OnReceiveFailed); server.OnSendFailed += new ASyncSocket.OnSendFailedEventHandler(server_OnSendFailed); server.Listen("127.0.0.1", 8171); } BreakPoints.Clear(); Watchs.Clear(); this.outPutTxtBx.Clear(); this.watchesListView.Items.Clear(); this.localsListView.Items.Clear(); this.backtraceListView.Items.Clear(); try { this.closeAllTempFilesFromEditor(); //Create a debug temp directory string tempFolderPath = this.project.BuildFolderPath + "\\..\\DebugTemp"; if (Directory.Exists(tempFolderPath)) { Directory.Delete(tempFolderPath, true); } DirectoryInfo info = Directory.CreateDirectory(tempFolderPath); //Copy all Lua source of the build directory foreach (String filePath in Directory.GetFiles(this.project.BuildFolderPath, "*.lua")) { string name = filePath.Substring(filePath.LastIndexOf("\\") + 1); File.Copy(filePath, info.FullName + "\\" + name, true); } } catch (Exception ex) { MessageBox.Show("Error during creation of debug temp files\n" + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } DocumentForm doc = this.mainForm.cgEeditor1.ActiveDocument; if (doc != null) { foreach (Line line in doc.Scintilla.Lines) { int mask = doc.Scintilla.Markers.GetMarkerMask(line); if (mask != 0) { BreakPoints.Add(new BreakPoint(doc.Text, (line.Number + 1).ToString())); } } } } }
public void initServer() { if (server == null) { BreakPoints = new List<BreakPoint>(); Watchs = new List<Watch>(); server = new ASyncSocket(); server.OnAccept += new ASyncSocket.OnAcceptEventHandler(server_OnAccept); server.OnReceive += new ASyncSocket.OnReceiveEventHandler(server_OnReceive); server.OnSend += new ASyncSocket.OnSendEventHandler(server_OnSend); server.OnListen += new ASyncSocket.OnListenEventHandler(server_OnListen); server.OnAcceptFailed += new ASyncSocket.OnAcceptFailedEventHandler(server_OnAcceptFailed); server.OnListenFailed += new ASyncSocket.OnListenFailedEventHandler(server_OnListenFailed); server.OnReceiveFailed += new ASyncSocket.OnReceiveFailedEventHandler(server_OnReceiveFailed); server.OnSendFailed += new ASyncSocket.OnSendFailedEventHandler(server_OnSendFailed); server.Listen(8171); } BreakPoints.Clear(); Watchs.Clear(); DocumentForm doc = this.mainForm.cgEeditor1.ActiveDocument; if (doc != null) { foreach (Line line in doc.Scintilla.Lines) { int mask = doc.Scintilla.Markers.GetMarkerMask(line); if (mask != 0) { BreakPoints.Add(new BreakPoint(doc.Text, line.Number.ToString())); } } } }
////////////////////////////////////////// /// INIT METHODS ////////////////////////////////////////// public void initServer() { if (this.project != null) { this.setHandLostWithSimulator(true); this.mainForm.workspaceViewToolStripMenuItem.Enabled = false; if (server == null) { LastCommandReceive = ""; CurrentCommandSend = ""; BreakPoints = new List<BreakPoint>(); Watchs = new List<Watch>(); server = new ASyncSocket(); server.OnAccept += new ASyncSocket.OnAcceptEventHandler(server_OnAccept); server.OnReceive += new ASyncSocket.OnReceiveEventHandler(server_OnReceive); server.OnSend += new ASyncSocket.OnSendEventHandler(server_OnSend); server.OnListen += new ASyncSocket.OnListenEventHandler(server_OnListen); server.OnAcceptFailed += new ASyncSocket.OnAcceptFailedEventHandler(server_OnAcceptFailed); server.OnListenFailed += new ASyncSocket.OnListenFailedEventHandler(server_OnListenFailed); server.OnReceiveFailed += new ASyncSocket.OnReceiveFailedEventHandler(server_OnReceiveFailed); server.OnSendFailed += new ASyncSocket.OnSendFailedEventHandler(server_OnSendFailed); server.Listen("127.0.0.1", 8171); } BreakPoints.Clear(); Watchs.Clear(); this.outPutTxtBx.Clear(); this.watchesListView.Items.Clear(); this.localsListView.Items.Clear(); this.backtraceListView.Items.Clear(); try { this.closeAllTempFilesFromEditor(); //Create a debug temp directory string tempFolderPath = this.project.BuildFolderPath + "\\..\\DebugTemp"; if (Directory.Exists(tempFolderPath)) Directory.Delete(tempFolderPath, true); DirectoryInfo info = Directory.CreateDirectory(tempFolderPath); //Copy all Lua source of the build directory foreach (String filePath in Directory.GetFiles(this.project.BuildFolderPath, "*.lua")) { string name = filePath.Substring(filePath.LastIndexOf("\\") + 1); File.Copy(filePath, info.FullName + "\\" + name, true); } } catch (Exception ex) { MessageBox.Show("Error during creation of debug temp files\n" + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } DocumentForm doc = this.mainForm.cgEeditor1.ActiveDocument; if (doc != null) { foreach (Line line in doc.Scintilla.Lines) { int mask = doc.Scintilla.Markers.GetMarkerMask(line); if (mask != 0) { BreakPoints.Add(new BreakPoint(doc.Text, (line.Number + 1).ToString())); } } } } }
//--------------------------------------------------- //-------------------Methods------------------------ //--------------------------------------------------- public void initServer(string ip, int port, RemoteControllerForm remoteControllerForm) { this.remoteControllerForm = remoteControllerForm; if (server != null) { server.Disconnect(); server.StopListenSocket(); server = null; } if (server == null) { LastCommandReceive = ""; CurrentCommandSend = ""; server = new ASyncSocket(); server.OnAccept += new ASyncSocket.OnAcceptEventHandler(server_OnAccept); server.OnReceive += new ASyncSocket.OnReceiveEventHandler(server_OnReceive); server.OnSend += new ASyncSocket.OnSendEventHandler(server_OnSend); server.OnListen += new ASyncSocket.OnListenEventHandler(server_OnListen); server.OnAcceptFailed += new ASyncSocket.OnAcceptFailedEventHandler(server_OnAcceptFailed); server.OnListenFailed += new ASyncSocket.OnListenFailedEventHandler(server_OnListenFailed); server.OnReceiveFailed += new ASyncSocket.OnReceiveFailedEventHandler(server_OnReceiveFailed); server.OnSendFailed += new ASyncSocket.OnSendFailedEventHandler(server_OnSendFailed); server.Listen(ip, port); } currentBuffer = ""; // config map //this.gMapControl1.MapProvider = GMapProviders.GoogleMap; //this.gMapControl1.Position = new PointLatLng(54.6961334816182, 25.2985095977783); //this.gMapControl1.MinZoom = 0; //this.gMapControl1.MaxZoom = 24; //this.gMapControl1.Zoom = 9; //this.gMapControl1.Overlays.Add(routes); //this.gMapControl1.Overlays.Add(markers); }