Esempio n. 1
0
        /// -------------------------------------------------------------------------------------
        /// <summary>
        /// This method gets called whenever the focused reference in the error pane changes.
        /// We respond by telling the draft view to scroll to and select the text of the new
        /// verse.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// -------------------------------------------------------------------------------------
        private void OnRefInGridChanged(object sender, CheckingError e)
        {
            // TE-6691 -- Not fully initialized yet so return
            if (EditingHelper == null)
            {
                return;
            }
            if (e != CheckingError.Empty)
            {
                EditingHelper.EditedRootBox.DestroySelection();

                StTxtPara para = e.BeginObjectRA as StTxtPara;
                if (para != null && para.Owner is StFootnote)
                {
                    // Checking error is for text in a footnote. Make sure the footnote pane is open.
                    StFootnote footnote = para.Owner as StFootnote;
                    ((IViewFootnotes)DraftView).ShowFootnoteView(footnote);
                }
                else
                {
                    ((IViewFootnotes)DraftView).FootnoteViewFocused = false;
                }

                // Note: EditingHelper is actually the active editing helper, so the above
                // code can change its value.
                EditingHelper.GoToScrScriptureNoteRef(e);
            }
        }