示例#1
0
        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();
            }
        }
示例#2
0
 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);
 }
 public DisconnectedState(ActivityMonitorFailureWatcher component)
     : base(component)
 {
 }
 protected ConnectionState(ActivityMonitorFailureWatcher owner)
 {
     Owner = owner;
 }
			public DisconnectedState(ActivityMonitorFailureWatcher component)
				: base(component)
			{
			}
			protected ConnectionState(ActivityMonitorFailureWatcher owner)
			{
				Owner = owner;
			}