Author: cwittich
Date: Tue May 26 23:26:20 2009
New Revision: 41128
URL:
http://svn.reactos.org/svn/reactos?rev=41128&view=rev
Log:
disconnect debug connections on exit
Modified:
trunk/tools/reactosdbg/DebugProtocol/DebugConnection.cs
trunk/tools/reactosdbg/RosDBG/MainWindow.Designer.cs
trunk/tools/reactosdbg/RosDBG/MainWindow.cs
Modified: trunk/tools/reactosdbg/DebugProtocol/DebugConnection.cs
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/DebugProtocol/Deb…
==============================================================================
--- trunk/tools/reactosdbg/DebugProtocol/DebugConnection.cs [iso-8859-1] (original)
+++ trunk/tools/reactosdbg/DebugProtocol/DebugConnection.cs [iso-8859-1] Tue May 26
23:26:20 2009
@@ -114,19 +114,20 @@
set
{
mConnectionMode = value;
- if (DebugConnectionModeChangedEvent != null)
+ if ((DebugConnectionModeChangedEvent != null) &&
(!mFormClosing))
DebugConnectionModeChangedEvent(this, new
DebugConnectionModeChangedEventArgs(value));
}
}
bool mRunning = true;
+ bool mFormClosing = false;
public bool Running
{
get { return mRunning; }
set
{
mRunning = value;
- if (DebugRunningChangeEvent != null)
+ if ((DebugRunningChangeEvent != null) && (!mFormClosing))
DebugRunningChangeEvent(this, new
DebugRunningChangeEventArgs(value));
}
}
@@ -320,6 +321,12 @@
if (args.Current)
mNewCurrentThread = args.Tid;
+ }
+
+ public void Close(bool FormClosing)
+ {
+ mFormClosing = FormClosing;
+ Close();
}
public void Close()
Modified: trunk/tools/reactosdbg/RosDBG/MainWindow.Designer.cs
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/MainWindow…
==============================================================================
--- trunk/tools/reactosdbg/RosDBG/MainWindow.Designer.cs [iso-8859-1] (original)
+++ trunk/tools/reactosdbg/RosDBG/MainWindow.Designer.cs [iso-8859-1] Tue May 26 23:26:20
2009
@@ -426,6 +426,7 @@
this.MainMenuStrip = this.menuStrip1;
this.Name = "MainWindow";
this.Text = "ReactOS Debug Shell";
+ this.FormClosing += new
System.Windows.Forms.FormClosingEventHandler(this.MainWindow_FormClosing);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel1.PerformLayout();
this.splitContainer1.Panel2.ResumeLayout(false);
Modified: trunk/tools/reactosdbg/RosDBG/MainWindow.cs
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/MainWindow…
==============================================================================
--- trunk/tools/reactosdbg/RosDBG/MainWindow.cs [iso-8859-1] (original)
+++ trunk/tools/reactosdbg/RosDBG/MainWindow.cs [iso-8859-1] Tue May 26 23:26:20 2009
@@ -356,6 +356,11 @@
CopyEvent(this, new CopyEventArgs(WorkTabs.SelectedTab.Controls[0]));
}
+ private void MainWindow_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ mConnection.Close(true);
+ }
+
}
public class InteractiveInputEventArgs : EventArgs
@@ -385,4 +390,4 @@
public delegate void CanCopyChangedEventHandler(object sender,
CanCopyChangedEventArgs args);
public delegate void CopyEventHandler(object sender, CopyEventArgs args);
-}
+}