twain / twain-cs

A C# interface for TWAIN
172 stars 67 forks source link

Twain.DatParent - CloseDs should be CloseDsm [sf#5] #9

Closed kolomiets closed 7 years ago

kolomiets commented 7 years ago

Reported by mcdon on 2014-10-18 17:36 UTC in TWAIN.cs, If a_msg is OPENDSM, then transitions to state S3. if a_msg is CLOSEDS, then transitions to state S2. looks like a typo, and should be if a_msg is CLOSEDSM, then transition to state S2. see attached patch.

kolomiets commented 7 years ago

Updated by mlmcl on 2014-10-19 15:42 UTC

kolomiets commented 7 years ago

Commented by mlmcl on 2014-10-19 15:43 UTC Fixed in 2.3.0.5

Thanks! Made the fix...

kolomiets commented 7 years ago

Updated by mlmcl on 2014-10-19 15:43 UTC

kolomiets commented 7 years ago

Commented by mcdon on 2014-10-20 04:57 UTC updated to revision 17, but didn't see the change in Twain.cs DatParent. recreated patch at rev 17.

Thanks Attached file TWAIN.cs.patch:

Index: twaincs/source/TWAIN.cs
===================================================================
--- twaincs/source/TWAIN.cs (revision 17)
+++ twaincs/source/TWAIN.cs (working copy)
@@ -4786,7 +4786,7 @@
                 return (STS.BUMMER);
             }

-            // If we opened, go to state 4...
+            // If we opened DSM, go to state 3...
             if (a_msg == MSG.OPENDSM)
             {
                 if (sts == STS.SUCCESS)
@@ -4795,8 +4795,8 @@
                 }
             }

-            // If we closed, go to state 2...
-            else if (a_msg == MSG.CLOSEDS)
+            // If we closed DSM, go to state 2...
+            else if (a_msg == MSG.CLOSEDSM)
             {
                 if (sts == STS.SUCCESS)
                 {
@@ -7564,8 +7564,8 @@
     /// </summary>
     public static class Log
     {
-       // Public methods...
-       #region Public methods
+        // Public methods...
+        #region Public methods

         /// <summary>
         /// Close tracing...
@@ -7585,7 +7585,7 @@
         /// <param name="a_szMessage">The message</param>
         public static void Msg(Severity a_eSeverity, string a_szMessage)
         {
-           switch (a_eSeverity)
+            switch (a_eSeverity)
             {
                 case Severity.Info:
                     WriteEntry(" ", a_szMessage, ms_blFlush);
@@ -7615,7 +7615,7 @@
             }
         }

-       #endregion
+        #endregion

         // Public definitions...
@@ -7684,8 +7684,8 @@
         #endregion

-       // Private attributes...
-       #region Private attributes
+        // Private attributes...
+        #region Private attributes

         private static bool ms_blFirstPass = true;
         private static bool ms_blFlush = false;
kolomiets commented 7 years ago

Commented by mlmcl on 2014-10-30 22:58 UTC Ah...yup, I've been having no luck getting the stuff checked in properly. I think you'll find I got it right this time...