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

Diff of /trunk/TSAdminTool/frmAdmin.cs

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

revision 64 by william, Thu Jul 12 18:56:31 2012 UTC revision 94 by william, Sat Jul 14 02:52:23 2012 UTC
# Line 24  namespace AnywhereTS Line 24  namespace AnywhereTS
24          private string selectedClientMacAddress; // The MAC address of the currently selected client.          private string selectedClientMacAddress; // The MAC address of the currently selected client.
25          public frmAdmin()          public frmAdmin()
26          {          {
27              InitializeComponent();                          Logging.ATSAdminLog.Debug("Entering frmAdmin .ctor()");
28                InitializeComponent();
29                Logging.ATSAdminLog.Debug("Leaving frmAdmin .ctor()");
30          }            }  
31    
32          private void frmAdmin_Load(object sender, EventArgs e)          private void frmAdmin_Load(object sender, EventArgs e)
33          {                      {            
34              //this.Cursor = Cursors.WaitCursor;              //this.Cursor = Cursors.WaitCursor;
35                Logging.ATSAdminLog.Debug("Entering frmAdmin_Load()");
36              UpdateControlsToReflectProgramVersion();              UpdateControlsToReflectProgramVersion();
37    
38              // Check if AnywhereTS is configured              // Check if AnywhereTS is configured
# Line 58  namespace AnywhereTS Line 60  namespace AnywhereTS
60              ATSImageDesigntimeConfig newConfig = new ATSImageDesigntimeConfig();              ATSImageDesigntimeConfig newConfig = new ATSImageDesigntimeConfig();
61              newConfig.ReadDefaultFromDatabase();              newConfig.ReadDefaultFromDatabase();
62              newConfig.WriteDefaultsToDatabase();              newConfig.WriteDefaultsToDatabase();
63                Logging.ATSAdminLog.Debug("Leaving frmAdmin_Load()");
64          } // form load          } // form load
65    
66          private void UpdateControlsToReflectProgramVersion()          private void UpdateControlsToReflectProgramVersion()
67          {          {
68                Logging.ATSAdminLog.Debug("Entering UpdateControlsToReflectProgramVersion()");
69              // Update the application to reflect the type of license and release              // Update the application to reflect the type of license and release
70              ATSGlobals.isPro = true;              ATSGlobals.isPro = true;
71              Globals.isPro = ATSGlobals.isPro; // Update program status for the VB part of the application.              Globals.isPro = ATSGlobals.isPro; // Update program status for the VB part of the application.
# Line 70  namespace AnywhereTS Line 74  namespace AnywhereTS
74    
75              this.Text = ATSGlobals.ApplicationTitle; // Set name in window title              this.Text = ATSGlobals.ApplicationTitle; // Set name in window title
76              aboutToolStripMenuItem.Text = "About " + ATSGlobals.ApplicationTitle;              aboutToolStripMenuItem.Text = "About " + ATSGlobals.ApplicationTitle;
77                Logging.ATSAdminLog.Debug("Leaving UpdateControlsToReflectProgramVersion()");
78          }          }
79    
80          // Update database from terminal server sessions          // Update database from terminal server sessions
# Line 747  namespace AnywhereTS Line 752  namespace AnywhereTS
752          // Run first time starting ATS and can also be invoked from the Tools menu.                  // Run first time starting ATS and can also be invoked from the Tools menu.        
753          private bool ConfigureATS()          private bool ConfigureATS()
754          {          {
755                Logging.ATSAdminLog.Debug("Entering ConfigureATS()");
756              DialogResult result;              DialogResult result;
757    
758              if (!ProSupport.IsAnAdministrator())              if (!ProSupport.IsAnAdministrator())
# Line 840  DisplayConfig: // Config services Line 845  DisplayConfig: // Config services
845              // Configuration completed              // Configuration completed
846              ATSGlobals.configured = 1; // Indicate that configuration process is completed              ATSGlobals.configured = 1; // Indicate that configuration process is completed
847              ATSGlobals.SetATSRegValue(ATSGlobals.strRegConfigured, ATSGlobals.configured); // Save to registry              ATSGlobals.SetATSRegValue(ATSGlobals.strRegConfigured, ATSGlobals.configured); // Save to registry
848                Logging.ATSAdminLog.Debug("Leaving ConfigureATS()");
849              return true;              return true;
850          }          }
851    
852          void SetMode()          void SetMode()
853          {          {
854                Logging.ATSAdminLog.Debug("Entering SetMode()");
855              if (ATSGlobals.managedMode == 1)              if (ATSGlobals.managedMode == 1)
856              { // We are running in managed mode, enable all controls related to client administration.              { // We are running in managed mode, enable all controls related to client administration.
857                  lblClientProperties.Enabled = true;                  lblClientProperties.Enabled = true;
# Line 936  If you want to register more terminal se Line 943  If you want to register more terminal se
943                      Logging.ATSAdminLog.Error("Error, no mode selected (56541)");                      Logging.ATSAdminLog.Error("Error, no mode selected (56541)");
944                  }                  }
945              }              }
946                Logging.ATSAdminLog.Debug("Leaving SetMode()");
947          }          }
948    
949          private void frmAdmin_Resize(object sender, EventArgs e)          private void frmAdmin_Resize(object sender, EventArgs e)
# Line 972  If you want to register more terminal se Line 980  If you want to register more terminal se
980          // Saves the computer name of the current computer, being the one running the admin tool into the database          // Saves the computer name of the current computer, being the one running the admin tool into the database
981          private void SaveMachineNameToDatabase()          private void SaveMachineNameToDatabase()
982          {          {
983                Logging.ATSAdminLog.Debug("Entering SaveMachineNameToDatabase()");
984              string machineName = Environment.MachineName;              string machineName = Environment.MachineName;
985              atsDataSet datasetAppInfo;              atsDataSet datasetAppInfo;
986              DataRow row;              DataRow row;
# Line 997  If you want to register more terminal se Line 1006  If you want to register more terminal se
1006              }              }
1007              // Save changes              // Save changes
1008              ProSupport.appInfoTableAdapter.Update(datasetAppInfo.AppInfo);              ProSupport.appInfoTableAdapter.Update(datasetAppInfo.AppInfo);
1009                Logging.ATSAdminLog.Debug("Leaving SaveMachineNameToDatabase()");
1010          }          }
1011    
1012      } // FrmAdmin      } // FrmAdmin

Legend:
Removed from v.64  
changed lines
  Added in v.94

  ViewVC Help
Powered by ViewVC 1.1.22