Author: gschneider
Date: Tue Jul 28 00:21:45 2009
New Revision: 42260
URL:
http://svn.reactos.org/svn/reactos?rev=42260&view=rev
Log:
RosDbg:
- Don't crash if there are no COM ports available (inspired by Talley's patch),
remove serial tab in that case to avoid user confusion
- Get rid of tab order dependencies
See issue #4585 for more details.
Modified:
trunk/tools/reactosdbg/RosDBG/Connect.cs
trunk/tools/reactosdbg/RosDBG/Properties/AssemblyInfo.cs
Modified: trunk/tools/reactosdbg/RosDBG/Connect.cs
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/Connect.cs…
==============================================================================
--- trunk/tools/reactosdbg/RosDBG/Connect.cs [iso-8859-1] (original)
+++ trunk/tools/reactosdbg/RosDBG/Connect.cs [iso-8859-1] Tue Jul 28 00:21:45 2009
@@ -112,12 +112,21 @@
int i = 0;
/* Serial */
- foreach (string s in SerialPort.GetPortNames())
+ string[] serialPorts = SerialPort.GetPortNames();
+ if (serialPorts == null || serialPorts.Length == 0)
{
- cPort.Items.Add(s);
+ tabControl.TabPages.Remove(tabSerial);
+ Settings.SelectedConnType = ConnectionType.Pipe;
}
- SelectComboItem(cPort, Settings.ComPort);
- SelectComboItem(cBaud, Settings.Baudrate);
+ else
+ {
+ foreach (string s in serialPorts)
+ {
+ cPort.Items.Add(s);
+ }
+ SelectComboItem(cPort, Settings.ComPort);
+ SelectComboItem(cBaud, Settings.Baudrate);
+ }
/* Pipe */
DefaultRadioBtn.Text += " [" + defaultPipeName + "]";
@@ -128,7 +137,18 @@
}
cType.SelectedIndex = i;
- tabControl.SelectedIndex = (int) Settings.SelectedConnType;
+ switch (Settings.SelectedConnType)
+ {
+ case ConnectionType.Pipe:
+ tabControl.SelectedTab = tabPipe;
+ break;
+ case ConnectionType.Serial:
+ tabControl.SelectedTab = tabSerial;
+ break;
+ case ConnectionType.Socket:
+ tabControl.SelectedTab = tabSocket;
+ break;
+ }
}
private void CustomRadioBtn_CheckedChanged(object sender, EventArgs e)
@@ -139,7 +159,18 @@
private void tabControl_SelectedIndexChanged(object sender, EventArgs e)
{
- Type = (ConnectionType) ((TabControl)sender).SelectedIndex;
+ if (tabControl.SelectedTab == tabPipe)
+ {
+ Type = ConnectionType.Pipe;
+ }
+ else if(tabControl.SelectedTab == tabSerial)
+ {
+ Type = ConnectionType.Serial;
+ }
+ else if (tabControl.SelectedTab == tabSocket)
+ {
+ Type = ConnectionType.Socket;
+ }
}
}
}
Modified: trunk/tools/reactosdbg/RosDBG/Properties/AssemblyInfo.cs
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/Properties…
==============================================================================
--- trunk/tools/reactosdbg/RosDBG/Properties/AssemblyInfo.cs [iso-8859-1] (original)
+++ trunk/tools/reactosdbg/RosDBG/Properties/AssemblyInfo.cs [iso-8859-1] Tue Jul 28
00:21:45 2009
@@ -39,5 +39,5 @@
// will be increased as well. MSI installers must not be generated with the same Build
Number
// otherwise they won't upgrade the old installation!
-[assembly: AssemblyVersion("1.0.2.63")]
-[assembly: AssemblyFileVersion("1.0.2.63")]
+[assembly: AssemblyVersion("1.0.2.64")]
+[assembly: AssemblyFileVersion("1.0.2.64")]