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