SIL.FieldWorks.TE.NotesMainWnd.ScrollToScrEditingLocation C# (CSharp) Method

ScrollToScrEditingLocation() public method

Scrolls to SCR editing location.
public ScrollToScrEditingLocation ( object sender, SIL.FieldWorks.TE.TeEditingHelper editingHelper ) : void
sender object The sender.
editingHelper SIL.FieldWorks.TE.TeEditingHelper The editing helper.
return void
		public void ScrollToScrEditingLocation(object sender, TeEditingHelper editingHelper)
		{
			NotesDataEntryView view = ActiveView as NotesDataEntryView;
			Debug.Assert(view != null);
			if (view != null && sender != view)
				view.ScrollRelevantAnnotationIntoView(editingHelper);
		}

Usage Example

示例#1
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Toggles the visibility of the notes view.
		/// </summary>
		/// <param name="arg">The menu or toolbar item</param>
		/// <returns><c>true</c> because we handled the message.</returns>
		/// ------------------------------------------------------------------------------------
		protected bool OnViewNotes(object arg)
		{
			NotesMainWnd notesWnd = ((TeApp)m_app).NotesWindow;

			if (notesWnd == null)
			{
				try
				{
					// Make sure the user can't close the main window when bringing up the
					// notes window (TE-8561)
					m_app.EnableMainWindows(false);

					m_syncHandler.IgnoreAnySyncMessages = true;
					notesWnd = new NotesMainWnd(m_app, m_StyleSheet, DraftViewZoomPercent);
					m_app.InitAndShowMainWindow(notesWnd, null);
					if (!notesWnd.OnFinishedInit())
						Debug.Fail("Notes window did not initialize properly");
				}
				finally
				{
					m_app.EnableMainWindows(true);
					m_syncHandler.IgnoreAnySyncMessages = false;
				}

				((TeApp)m_app).NotesWindow = notesWnd;
				RespondToSyncScrollingMsgs(true);
				notesWnd.SyncHandler = m_syncHandler;
				if (ActiveEditingHelper != null)
					notesWnd.ScrollToScrEditingLocation(this, ActiveEditingHelper);
			}
			else if (arg != null)
			{
				// The user chose the View/Notes menu option, which is a toggle,
				// so we close the existing window.
				notesWnd.Close();
			}

			return true;
		}
All Usage Examples Of SIL.FieldWorks.TE.NotesMainWnd::ScrollToScrEditingLocation