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

Contents of /branches/TerminalServices/TSAdminTool/TerminalServer.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 271 - (show annotations) (download)
Sun Aug 26 00:04:01 2012 UTC (8 years, 1 month ago) by william
File size: 1428 byte(s)
+ switch TerminalServices backend to Cassia 2.0.0.60

1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4 using Cassia;
5
6 namespace AnywhereTS
7 { // Represents a terminal server
8 public class AtsTerminalServer
9 {
10 public bool Online; // true = terminal server is online, false = terminal server is offline
11 public string strError; // Error string if the terminal server is offline.
12 public string networkPath; // The network path to the terminal server
13 public List<ITerminalServicesSession> Session = new List<ITerminalServicesSession>();
14
15
16 // Update the terminal server and session data
17 public void Update()
18 {
19 Online = false;
20 try
21 {
22 TSManager.ListSessions(networkPath);
23 Session = TSManager.ListSessions(networkPath);
24 if (Session.Count > 0)
25 {
26 // Getting sessions went ok
27 }
28 if (strError.Length == 0)
29 { // Getting sessions went ok
30 Online = true;
31 // Sort the sessions
32 //Session.Sort();
33 }
34 }
35 catch
36 {
37 strError = "Could not connect to terminal server '" + networkPath + "'.";
38 }
39 }
40 } // Class AtsTerminalServer
41 } // Namespace AnywhereTS

  ViewVC Help
Powered by ViewVC 1.1.22