コード例 #1
0
 public void Release()
 {
     if ((null != _applicationObserver) && (!Program.IsDesign))
     {
         _applicationObserver.Dispose();
         _applicationObserver = null;
     }
 }
コード例 #2
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);
     }
 }
コード例 #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);
     }
 }
コード例 #4
0
 public void Release()
 {
     if ((null != _applicationObserver) && (!Program.IsDesign))
     {
         _applicationObserver.Dispose();
         _applicationObserver = null;
     }
 }