コード例 #1
0
        /// ------------------------------------------------------------------------------------
        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;
            }
        }
コード例 #2
0
        /// ------------------------------------------------------------------------------------
        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);
        }