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

OnFinishedInit() public method

When finished initializing, show the default view.
public OnFinishedInit ( ) : bool
return bool
		public override bool OnFinishedInit()
		{
			CheckDisposed();

			if (!base.OnFinishedInit())
				return false;

			// Display Notes view
			if (SIBAdapter != null)
			{
				if (m_dataEntryView != null)
					m_dataEntryView.Focus();

#if !__MonoCS__ // TODO-Linux FWNX-236: // remove !MONO block when issue FWNX-236 resolved.
			/*if (SIBAdapter.CurrentTabItemProperties == null)
				{
					SIBAdapter.SetCurrentTabItem(kViewsSBTabInternalName,
						SIBAdapter.Tabs[0].Items[0].Name, true);
				}*/
#endif
			}
			return true;
		}

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::OnFinishedInit