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

Diff of /trunk/TSAdminTool/ProSupport.cs

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

revision 46 by william, Thu Jul 12 14:17:14 2012 UTC revision 91 by william, Sat Jul 14 00:36:23 2012 UTC
# Line 11  using System.Security.Principal; Line 11  using System.Security.Principal;
11  using System.IO;  using System.IO;
12  using System.Management;  using System.Management;
13  using System.Net;  using System.Net;
14    using log4net;
15    
16  // Support class for the AnywhereTS version. This file should only be included in the Pro version.  // Support class for the AnywhereTS version. This file should only be included in the Pro version.
17  namespace AnywhereTS  namespace AnywhereTS
# Line 26  namespace AnywhereTS Line 27  namespace AnywhereTS
27          // Registry keys          // Registry keys
28          public const string strRegTFTP_root = "TFTP_root"; // Reg key for TFTP root directory in database          public const string strRegTFTP_root = "TFTP_root"; // Reg key for TFTP root directory in database
29          public const string strRegDatabaseDir = "DatabaseDir"; // Reg key for database directory          public const string strRegDatabaseDir = "DatabaseDir"; // Reg key for database directory
30          public const string strRegDatabaseServer = "DatabaseServer"; // Reg key for database server          public const string strRegDatabaseServer = "AnywhereTSServer"; // Reg key for database server
31          public const string strRegDestDir = "DestDir"; // Reg key for Destination directory, used in unmanged mode..          public const string strRegDestDir = "DestDir"; // Reg key for Destination directory, used in unmanged mode..
32                    
33          // Database constants          // Database constants
# Line 38  namespace AnywhereTS Line 39  namespace AnywhereTS
39          public static atsDataSetTableAdapters.TerminalServerTableAdapter terminalServerTableAdapter; // The AnywhereTS application data adapter for the terminal servers table. Only this adapter should be used.          public static atsDataSetTableAdapters.TerminalServerTableAdapter terminalServerTableAdapter; // The AnywhereTS application data adapter for the terminal servers table. Only this adapter should be used.
40          public static atsDataSetTableAdapters.AppInfoTableAdapter appInfoTableAdapter; // The AnywhereTS application data adapter for the AppInfo table. Only this adapter should be used.          public static atsDataSetTableAdapters.AppInfoTableAdapter appInfoTableAdapter; // The AnywhereTS application data adapter for the AppInfo table. Only this adapter should be used.
41    
42          public static string strDatabaseServer; // If this computer does not contain the database server, this is the name of the database server that contains the ATS database. Used by the Control Panel          public static string strAnywhereTSServer; // If this computer does not contain the database server, this is the name of the database server that contains the ATS database. Used by the Control Panel
43                    
44          // Directories          // Directories
45          public static string strDatabasePath; // The directory where the database file is located.          public static string strDatabasePath; // The directory where the database file is located.
# Line 50  namespace AnywhereTS Line 51  namespace AnywhereTS
51              // Initiate variables from registry              // Initiate variables from registry
52              strDatabasePath = ATSGlobals.GetATSRegValueString(strRegDatabaseDir);              strDatabasePath = ATSGlobals.GetATSRegValueString(strRegDatabaseDir);
53              strDestDir = ATSGlobals.GetATSRegValueString(strRegDestDir);              strDestDir = ATSGlobals.GetATSRegValueString(strRegDestDir);
54              strDatabaseServer = ATSGlobals.GetATSRegValueString(strRegDatabaseServer);              strAnywhereTSServer = ATSGlobals.GetATSRegValueString(strRegDatabaseServer);
55          }          }
56    
57          // Loook up local IP for computer          // Loook up local IP for computer
# Line 226  namespace AnywhereTS Line 227  namespace AnywhereTS
227                  }                  }
228              }              }
229              else              else
230                  throw new Exception("Unknown TFTP mode 28158");              {
231                    string error = "Error: Unknown TFTP Config mode (28158)";
232                    using (log4net.NDC.Push(string.Format("tftpConfig={0}", ATSGlobals.tftpConfig)))
233                    {
234                        Logging.ATSAdminLog.Error(error);
235                    }
236                    MessageBox.Show(string.Format("{0} -> {1}", error, string.Format("tftpConfig={0}", ATSGlobals.tftpConfig)));
237                    return;
238                }
239          }          }
240    
241          // Copy image file to all external tftp directories/servers          // Copy image file to all external tftp directories/servers
# Line 346  namespace AnywhereTS Line 355  namespace AnywhereTS
355                  }                  }
356              }              }
357              else              else
358                  throw new Exception("Unknown TFTP mode 48158");              {
359                    string error = "Error: Unknown TFTP Config mode (48158)";
360                    using (log4net.NDC.Push(string.Format("tftpConfig={0}", ATSGlobals.tftpConfig)))
361                    {
362                        Logging.ATSAdminLog.Error(error);
363                    }
364                    MessageBox.Show(string.Format("{0} -> {1}", error, string.Format("tftpConfig={0}", ATSGlobals.tftpConfig)));
365                    return;
366                }
367          }          }
368    
369    
# Line 464  namespace AnywhereTS Line 481  namespace AnywhereTS
481                  }                  }
482              }              }
483              else              else
484                  throw new Exception("Unknown TFTP mode 88158");              {
485                    string error = "Error: Unknown TFTP Config mode (88158)";
486                    using (log4net.NDC.Push(string.Format("tftpConfig={0}", ATSGlobals.tftpConfig)))
487                    {
488                        Logging.ATSAdminLog.Error(error);
489                    }
490                    MessageBox.Show(string.Format("{0} -> {1}", error, string.Format("tftpConfig={0}", ATSGlobals.tftpConfig)));
491                    return;
492                }
493    
494              WriteHostsFiles();              WriteHostsFiles();
495              ATSImageRuntimeConfig currentConfig = new ATSImageRuntimeConfig();              ATSImageRuntimeConfig currentConfig = new ATSImageRuntimeConfig();

Legend:
Removed from v.46  
changed lines
  Added in v.91

  ViewVC Help
Powered by ViewVC 1.1.22