Exemplo n.º 1
0
        /// ------------------------------------------------------------------------------------
        private void InitializeGrid()
        {
            _grid = new TextAnnotationEditorGrid(_project.TranscriptionFont, _project.FreeTranslationFont);

            _grid.TranscriptionFontChanged += font =>
            {
                _project.TranscriptionFont = font;
                _project.Save();
            };

            // SP-873: Translation font not saving
            _grid.TranslationFontChanged += font =>
            {
                _project.FreeTranslationFont = font;
                _project.Save();
            };

            L10NSharpExtender gridLocExtender = new L10NSharpExtender();

            gridLocExtender.LocalizationManagerId = "SayMore";
            gridLocExtender.SetLocalizingId(_grid, "TextAnnotationEditorGrid");
            gridLocExtender.EndInit();

            _grid.Dock = DockStyle.Fill;
            _splitter.Panel2.Controls.Add(_grid);
        }
Exemplo n.º 2
0
        /// ------------------------------------------------------------------------------------
        protected override void OnDataGridViewChanged()
        {
            base.OnDataGridViewChanged();

            if (_grid != null)
            {
                UnsubscribeToGridEvents();
            }

            _grid = DataGridView as TextAnnotationEditorGrid;

            if (_grid != null)
            {
                SubscribeToGridEvents();
            }
        }
Exemplo n.º 3
0
        /// ------------------------------------------------------------------------------------
        protected override void OnDataGridViewChanged()
        {
            base.OnDataGridViewChanged();

            if (_grid != null)
            {
                HandleGridHandleDestroyed(null, null);
            }

            _grid = DataGridView as TextAnnotationEditorGrid;

            if (_grid != null)
            {
                _grid.CellMouseLeave  += HandleGridCellMouseLeave;
                _grid.RowEnter        += HandleGridRowEnter;
                _grid.HandleDestroyed += HandleGridHandleDestroyed;
                if (RowIndex >= 0)
                {
                    SetToolTipText(_grid.CurrentCellAddress.Y);
                }
            }
        }