/[AnywhereTS-MSSQL]/branches/TerminalServices/TSAdminTool/Environment.cs
ViewVC logotype

Diff of /branches/TerminalServices/TSAdminTool/Environment.cs

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

--- branches/TerminalServices/TSAdminTool/Environment.cs	2012/08/25 23:01:27	270
+++ branches/TerminalServices/TSAdminTool/Environment.cs	2012/08/26 00:04:01	271
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.Text;
 using System.Data;
+using Cassia;
 
 namespace AnywhereTS
 {   // Represents the AnywhereTS environment
@@ -10,8 +11,7 @@
         public static int ClientsConnected; // The number of clients that are connected to a ts, but not logged in
 
         public static List<AtsTerminalServer> TerminalServers = new List<AtsTerminalServer>();
-        public static List<AtsSession> Sessions = new List<AtsSession>();
-
+        public static List<ITerminalServicesSession> Sessions = new List<ITerminalServicesSession>();
         // Refresh the AnywhereTS environment objects
         public static void Refresh()
         {
@@ -51,14 +51,8 @@
         public static void SessionsRefresh()
         {
             Sessions.Clear();
-            foreach (AtsTerminalServer ts in TerminalServers)
-            {
-                foreach (AtsSession session in ts.Session)
-                {
-                    Sessions.Add(session);
-                }
-            }
-            Sessions.Sort();
+            var sesssions = TSManager.ListSessions();
+            foreach (var t in sesssions) { Sessions.Add(t); }
         }
 
     } // AtsEnvironment

 

  ViewVC Help
Powered by ViewVC 1.1.22