- Add support for saving the chosen pipe mode
- Create pipe connected and disconnected signaling functions to support code reuse

svn path=/trunk/tools/reactosdbg/; revision=1086
This commit is contained in:
Gregor Schneider 2009-07-28 11:10:26 +00:00
parent a7a8471b9a
commit e7314a92ca
4 changed files with 30 additions and 19 deletions

View File

@ -44,6 +44,24 @@ namespace AbstractPipe
cmdList = new List<string>();
}
private void signalConnected()
{
bClientConn = true;
if (ClientConnectedEvent != null)
{
ClientConnectedEvent(this, EventArgs.Empty);
}
}
private void signalDisconnected()
{
bClientConn = false;
if (ClientDisconnectedEvent != null)
{
ClientDisconnectedEvent(this, EventArgs.Empty);
}
}
private void WaitForConnection()
{
try
@ -53,11 +71,7 @@ namespace AbstractPipe
if (sStream.IsConnected)
{
ioStream = sStream;
bClientConn = true;
if (ClientConnectedEvent != null)
{
ClientConnectedEvent(this, EventArgs.Empty);
}
signalConnected();
}
}
catch (IOException)
@ -88,11 +102,7 @@ namespace AbstractPipe
if (cStream.IsConnected)
{
ioStream = cStream;
bClientConn = true;
if (ClientConnectedEvent != null)
{
ClientConnectedEvent(this, EventArgs.Empty);
}
signalConnected();
return true;
}
else
@ -216,12 +226,8 @@ namespace AbstractPipe
* Connecion closed!
* We'll hijack this thread and use it to set up our pipe server again.
* This thread will terminate once the connection is set up, it does not block.
*/
if (ClientDisconnectedEvent != null)
{
ClientDisconnectedEvent(this, EventArgs.Empty);
}
*/
signalDisconnected();
break;
}
}

View File

@ -102,6 +102,7 @@ namespace RosDBG
pipeMode = ConnectionMode.MODE_AUTO;
Settings.SelectedConnType = Type;
Settings.Mode = cType.SelectedItem.ToString();
Settings.Save();
Close();

View File

@ -39,5 +39,5 @@ using System.Runtime.InteropServices;
// 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.66")]
[assembly: AssemblyFileVersion("1.0.2.66")]
[assembly: AssemblyVersion("1.0.2.67")]
[assembly: AssemblyFileVersion("1.0.2.67")]

View File

@ -265,7 +265,11 @@ namespace RosDBG
public static string SourceDirectory { get { return mProperties.SourceDirectory; } }
public static string OutputDirectory { get { return mProperties.OutputDirectory; } }
public static string Mode { get { return mProperties.Mode; } }
public static string Mode
{
get { return mProperties.Mode; }
set { mProperties.Mode = value; }
}
public static string Pipe { get { return mProperties.Pipe; } }
public static string ComPort { get { return mProperties.Port; } }
public static string Baudrate { get { return mProperties.Baudrate; } }