public void Release()
 {
     if ((null != _applicationObserver) && (!Program.IsDesign))
     {
         _applicationObserver.Dispose();
         _applicationObserver = null;
     }
 }
 /// <summary>
 /// Creates an instance of the class
 /// </summary>
 public ApplicationObserverControl()
 {
     try
     {
         InitializeComponent();
         if (!Program.IsDesign)
         {
             _applicationObserver = new OfficeApplicationObserver(listViewApps);
             textBoxHotKey.Text = _applicationObserver.HotKey.ToString();
             _applicationObserver.InstanceRunningCountChanged += new EventHandler(ApplicationObserver_InstanceRunningCountChanged);
             _applicationObserver.AllProcessesChanged += new EventHandler(ApplicationObserver_AllProcessesChanged);
         }
     }
     catch (Exception exception)
     {
         Forms.ErrorForm.ShowError(exception,ErrorCategory.NonCritical, Host.CurrentLanguageID);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Creates an instance of the class
 /// </summary>
 public ApplicationObserverControl()
 {
     try
     {
         InitializeComponent();
         if (!Program.IsDesign)
         {
             _applicationObserver = new OfficeApplicationObserver(listViewApps);
             textBoxHotKey.Text   = _applicationObserver.HotKey.ToString();
             _applicationObserver.InstanceRunningCountChanged += new EventHandler(ApplicationObserver_InstanceRunningCountChanged);
             _applicationObserver.AllProcessesChanged         += new EventHandler(ApplicationObserver_AllProcessesChanged);
         }
     }
     catch (Exception exception)
     {
         Forms.ErrorForm.ShowError(exception, ErrorCategory.NonCritical, Host.CurrentLanguageID);
     }
 }
 public void Release()
 {
     if ((null != _applicationObserver) && (!Program.IsDesign))
     {
         _applicationObserver.Dispose();
         _applicationObserver = null;
     }
 }