[ros-diffs] [gschneider] 42265: RosDbg: - Add support for saving the chosen pipe mode - Create pipe connected and disconnected signaling functions to support code reuse

gschneider at svn.reactos.org gschneider at svn.reactos.org
Tue Jul 28 13:10:26 CEST 2009


Author: gschneider
Date: Tue Jul 28 13:10:26 2009
New Revision: 42265

URL: http://svn.reactos.org/svn/reactos?rev=42265&view=rev
Log:
RosDbg:
- Add support for saving the chosen pipe mode
- Create pipe connected and disconnected signaling functions to support code reuse

Modified:
    trunk/tools/reactosdbg/Pipe/namedpipe.cs
    trunk/tools/reactosdbg/RosDBG/Connect.cs
    trunk/tools/reactosdbg/RosDBG/Properties/AssemblyInfo.cs
    trunk/tools/reactosdbg/RosDBG/Settings.cs

Modified: trunk/tools/reactosdbg/Pipe/namedpipe.cs
URL: http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/Pipe/namedpipe.cs?rev=42265&r1=42264&r2=42265&view=diff
==============================================================================
--- trunk/tools/reactosdbg/Pipe/namedpipe.cs [iso-8859-1] (original)
+++ trunk/tools/reactosdbg/Pipe/namedpipe.cs [iso-8859-1] Tue Jul 28 13:10:26 2009
@@ -44,6 +44,24 @@
             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 @@
                 if (sStream.IsConnected)
                 {
                     ioStream = sStream;
-                    bClientConn = true;
-                    if (ClientConnectedEvent != null)
-                    {
-                        ClientConnectedEvent(this, EventArgs.Empty);
-                    }
+                    signalConnected();
                 }
             }
             catch (IOException)
@@ -88,11 +102,7 @@
                 if (cStream.IsConnected)
                 {
                     ioStream = cStream;
-                    bClientConn = true;
-                    if (ClientConnectedEvent != null)
-                    {
-                        ClientConnectedEvent(this, EventArgs.Empty);
-                    }
+                    signalConnected();
                     return true;
                 }
                 else
@@ -216,12 +226,8 @@
                              * 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;
                         }
                     }

Modified: trunk/tools/reactosdbg/RosDBG/Connect.cs
URL: http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/Connect.cs?rev=42265&r1=42264&r2=42265&view=diff
==============================================================================
--- trunk/tools/reactosdbg/RosDBG/Connect.cs [iso-8859-1] (original)
+++ trunk/tools/reactosdbg/RosDBG/Connect.cs [iso-8859-1] Tue Jul 28 13:10:26 2009
@@ -102,6 +102,7 @@
                 pipeMode = ConnectionMode.MODE_AUTO;
 
             Settings.SelectedConnType = Type;
+            Settings.Mode = cType.SelectedItem.ToString();
             Settings.Save();
 
             Close();

Modified: trunk/tools/reactosdbg/RosDBG/Properties/AssemblyInfo.cs
URL: http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/Properties/AssemblyInfo.cs?rev=42265&r1=42264&r2=42265&view=diff
==============================================================================
--- trunk/tools/reactosdbg/RosDBG/Properties/AssemblyInfo.cs [iso-8859-1] (original)
+++ trunk/tools/reactosdbg/RosDBG/Properties/AssemblyInfo.cs [iso-8859-1] Tue Jul 28 13:10:26 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.66")]
-[assembly: AssemblyFileVersion("1.0.2.66")]
+[assembly: AssemblyVersion("1.0.2.67")]
+[assembly: AssemblyFileVersion("1.0.2.67")]

Modified: trunk/tools/reactosdbg/RosDBG/Settings.cs
URL: http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/Settings.cs?rev=42265&r1=42264&r2=42265&view=diff
==============================================================================
--- trunk/tools/reactosdbg/RosDBG/Settings.cs [iso-8859-1] (original)
+++ trunk/tools/reactosdbg/RosDBG/Settings.cs [iso-8859-1] Tue Jul 28 13:10:26 2009
@@ -265,7 +265,11 @@
 
         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; } }




More information about the Ros-diffs mailing list