/[OhmsLawCalc]/trunk/OhmsLawCalc/Form1.cs
ViewVC logotype

Diff of /trunk/OhmsLawCalc/Form1.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/OhmsLawCalc/Form1.cs	2014/01/29 07:57:25	22
+++ trunk/OhmsLawCalc/Form1.cs	2014/01/29 08:07:43	23
@@ -44,7 +44,7 @@
             // ENABLE_API_TESTING is defined
 #warning ENABLE_API_TESTING is defined -- please undefine it after your are done testing the API
 
-        // test API
+            // test API
             OhmsLawAPITest test = new OhmsLawAPITest();
             test.TestAPI();
 #endif
@@ -77,12 +77,12 @@
 
         private void btnCurrentReset_Click(object sender, EventArgs e)
         {
-            ResetTabPage(GetCurrentTab());       
+            ResetTabPage(GetCurrentTab());
         }
         private void btnResistanceReset_Click(object sender, EventArgs e)
         {
             ResetTabPage(GetCurrentTab());
-        }   
+        }
         private void btnVoltageReset_Click(object sender, EventArgs e)
         {
             ResetTabPage(GetCurrentTab());
@@ -129,11 +129,13 @@
             if (values.Count == 0) { return; }
             var result = OhmsLaw.CreateInstance(type, values);
 
-           ISetValue sv = GetResultControlForTabPage(tp);
-           if (sv != null)
-           {
-               sv.SetValue(result);
-           }
+            result = OhmsLaw.AutoConvertResult(result);
+
+            ISetValue sv = GetResultControlForTabPage(tp);
+            if (sv != null)
+            {
+                sv.SetValue(result);
+            }
         }
 
         private ISetValue GetResultControlForTabPage(TabPage tp)

 

  ViewVC Help
Powered by ViewVC 1.1.22