void LicenseInfo(object sender, EventArgs e)
 {
     logger.Log("Begin LicenseInfo");
     if (initialized)
     {
         try
         {
             MessageBox.Show("LicenseInfo screen here");
         }
         catch (Exception ex)
         {
             //if (!AutoRestartService())
             {
                 string msg = "Failed to Launch ManagementUIApp with Screen LicenseInfo- Exception:" + ex.Message;
                 logger.Error(msg);
                 logger.Error(ex.StackTrace);
                 MessageBox.Show(msg);
             }
         }
     }
     else
     {
         MessageBox.Show("Failed connect to server");
     }
     logger.Log("End LicenseInfo");
 }
      public BizBrainAgentSysTrayApp()
      {
          //log4net.Config.XmlConfigurator.Configure();
          logger = new Logger("BizBrainAgentSysTrayApp");

          logger.Log("BizBrainAgentSysTrayApp ctor");

          /* if (!EventLog.SourceExists(source))
           * {
           *   EventLog.CreateEventSource(source, log);
           * }*/
          // Initialize Tray Icon
          try
          {
              //EventLog.WriteEntry(source,"Before Initialize");
              logger.Log("Before Initialize");
              bool isAdmin = IsUserAnAdmin();
              SetIcon();
              MessageBox.Show("Running");
              logger.Log("After Initialize");
          }
          catch (Exception e)
          {
              logger.Log("Initialize Exception:" + e.Message);
              logger.Log(e.StackTrace);
              //EventLog.WriteEntry(source,e.Message);
              //EventLog.WriteEntry(source,e.StackTrace);
              Application.Exit();
              System.Environment.Exit(0);
          }
          if (initialized)
          {
              try
              {
                  SetIcon();
              }
              catch (Exception e)
              {
                  MessageBox.Show(e.Message);
                  MessageBox.Show(e.StackTrace);
                  logger.Log("SetIcon:" + e.Message);

                  //EventLog.WriteEntry(source, e.Message);
                  //EventLog.WriteEntry(source, e.StackTrace);

                  Application.Exit();
                  System.Environment.Exit(0);
              }
          }
      }