public override void Initialize()
        {
            base.Initialize();

            // install watchers only once, in the first desktop window (the main window)
            if (!_watchersInstalled)
            {
                _watchersInstalled = true;
                _failureWatcher    = new ActivityMonitorFailureWatcher(this.Context.DesktopWindow, Show);
                _failureWatcher.Initialize();

                _localServerWatcher = LocalServerWatcher.Instance;
                _localServerWatcher.DiskSpaceUsageChanged += LocalServerWatcherOnDiskSpaceUsageChanged;
                CheckDiskspaceUsageExceeded();
            }
        }
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (_failureWatcher != null)
         {
             _failureWatcher.Dispose();
             _failureWatcher = null;
         }
         if (_localServerWatcher != null)
         {
             _localServerWatcher.DiskSpaceUsageChanged -= LocalServerWatcherOnDiskSpaceUsageChanged;
             _localServerWatcher = null;
         }
     }
     base.Dispose(disposing);
 }
Ejemplo n.º 3
0
 public DisconnectedState(ActivityMonitorFailureWatcher component)
     : base(component)
 {
 }
Ejemplo n.º 4
0
 protected ConnectionState(ActivityMonitorFailureWatcher owner)
 {
     Owner = owner;
 }