/// ------------------------------------------------------------------------------------ public override void Deactivated() { if (_grid != null) { _grid.Stop(); } if (_file != null) { _file.BeforeSave -= HandleBeforeAnnotationFileSaved; _file.AfterSave -= HandleAfterAnnotationFileSaved; } if (_watcher != null) { _watcher.Changed -= HandleAnnotationFileChanged; _watcher.Dispose(); _watcher = null; } }
/// ------------------------------------------------------------------------------------ protected override void OnMouseClick(DataGridViewCellMouseEventArgs e) { base.OnMouseClick(e); if (e.RowIndex != _grid.CurrentCellAddress.Y || !IsMouseIsOverButtonArea || e.Button != MouseButtons.Left) { return; } if (_grid.PlaybackInProgress) { _grid.Stop(); } else { _grid.Play(); } _grid.InvalidateCell(this); }