/[AnywhereTS-MSSQL]/trunk/TSAdminTool/frmConfigServices.cs
ViewVC logotype

Diff of /trunk/TSAdminTool/frmConfigServices.cs

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

--- trunk/TSAdminTool/frmConfigServices.cs	2012/07/16 12:58:43	180
+++ trunk/TSAdminTool/frmConfigServices.cs	2012/07/16 13:13:11	181
@@ -59,19 +59,40 @@
                 if (ATSGlobals.terminalServerConfig == 0)
                 {   // This computer is terminal server
 
-                    if (datatableTerminalServer.Rows.Count == 0) //Any other terminal servers?
-                    { // No other terminal servers
-                        RadTSthisComputer.Checked = true;
-                    }
-                    else
-                    {   // At least one other
-                        radTSboth.Checked = true;
-                    }
+                    //if (datatableTerminalServer.Rows.Count == 0) //Any other terminal servers?
+                    //{ // No other terminal servers
+                    //    RadTSthisComputer.Checked = true;
+                    //}
+                    //else
+                    //{   // At least one other
+                    //    radTSboth.Checked = true;
+                    //}
+                    RadTSthisComputer.Checked = true;
+                    RadTSthisComputer.Checked = false;
+                    radTSother.Checked = false;
                 }
-                else
-                {   // This computer is not terminal server
+                else if (ATSGlobals.terminalServerConfig == 1)
+                {
+                    RadTSthisComputer.Checked = false;
+                    RadTSthisComputer.Checked = true;
+                    radTSother.Checked = false;
+                }
+                else if (ATSGlobals.terminalServerConfig == 2)
+                {
+                    RadTSthisComputer.Checked = false;
+                    RadTSthisComputer.Checked = false;
                     radTSother.Checked = true;
                 }
+                else
+                {
+                    string error = "Error: Undefined terminal servers config (42002)";
+                    using (log4net.NDC.Push(string.Format("terminalServerConfig={0}", ATSGlobals.terminalServerConfig)))
+                    {
+                        Logging.ATSAdminLog.Error(error);
+                    }
+                    MessageBox.Show(string.Format("{0} -> {1}", error, string.Format("terminalServerConfig={0}", ATSGlobals.terminalServerConfig)));
+                    return;
+                }
 
             }
 
@@ -100,9 +121,9 @@
             if (RadTSthisComputer.Checked)
                 ATSGlobals.terminalServerConfig = 0;
             else if (radTSboth.Checked)
-                ATSGlobals.terminalServerConfig = 0;
-            else if (radTSother.Checked)
                 ATSGlobals.terminalServerConfig = 1;
+            else if (radTSother.Checked)
+                ATSGlobals.terminalServerConfig = 2;
             else
             {
                 string error = "Error: Undefined terminal servers config (42001)";
@@ -113,6 +134,7 @@
                 MessageBox.Show(string.Format("{0} -> {1}", error, string.Format("terminalServerConfig={0}", ATSGlobals.terminalServerConfig)));
                 return;
             }
+            ATSGlobals.SetATSRegValue(ATSGlobals.strRegTerminalServer, ATSGlobals.terminalServerConfig);
 
            
             string strPath; // The TFTP path

 

  ViewVC Help
Powered by ViewVC 1.1.22