Main window for Translation Editor
Inheritance: SIL.FieldWorks.Common.Framework.FwMainWnd, IControlCreator, IPageSetupCallbacks, IMessageFilter, ITeImportCallbacks
示例#1
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Perform the import with an undo task, including the code that handles displaying the
		/// ImportedBooks dialog box, issuing synch messages, etc.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		public static void ImportWithUndoTask(TeMainWnd mainWnd, IScrImportSet settings)
		{
			TestImportManager mgr = new TestImportManager(mainWnd);
			mgr.CompleteImport(mgr.ImportWithUndoTask(settings, false, string.Empty));
		}
示例#2
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="T:TeDraftViewProxy"/> class with a flag
		/// indicating whether it is intended to host a back translation
		/// </summary>
		/// <param name="mainWnd">The main window.</param>
		/// <param name="name">The name of the view.</param>
		/// <param name="fEditable"><c>true</c> if this view is editable, <c>false</c> if
		/// read-only.</param>
		/// <param name="viewType">Bit-flags indicating type of view.</param>
		/// ------------------------------------------------------------------------------------
		public TeDraftViewProxy(TeMainWnd mainWnd, string name, bool fEditable, TeViewType viewType)
			: base(mainWnd, name, fEditable)
		{
			m_viewType = viewType;
		}
示例#3
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="TestImportManager"/> class.
		/// </summary>
		/// <param name="mainWnd">The main window we belong to</param>
		/// ------------------------------------------------------------------------------------
		protected TestImportManager(TeMainWnd mainWnd) : base(mainWnd.Cache, mainWnd.StyleSheet, null, false)
		{
		}
示例#4
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="T:CheckingViewProxy"/> class.
		/// </summary>
		/// <param name="mainWnd">The main window.</param>
		/// <param name="name">The name of the view.</param>
		/// ------------------------------------------------------------------------------------
		public CheckingViewProxy(TeMainWnd mainWnd, string name) :
			base(mainWnd, name, true)
		{
		}
示例#5
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="T:TeViewProxy"/> class
		/// </summary>
		/// <param name="mainWnd">The main window.</param>
		/// <param name="name">The name of the view.</param>
		/// <param name="fEditable"><c>true</c> if this view is editable, <c>false</c> if
		/// read-only.</param>
		/// ------------------------------------------------------------------------------------
		public TeViewProxy(TeMainWnd mainWnd, string name, bool fEditable)
			: base(name, fEditable)
		{
			m_mainWnd = mainWnd;
		}
示例#6
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="T:TeFootnoteDraftViewProxy"/> class.
		/// </summary>
		/// <param name="mainWnd">The main window.</param>
		/// <param name="name">The name of the view.</param>
		/// <param name="fEditable"><c>true</c> if this draft view is editable, <c>false</c>
		/// if it is read-only.</param>
		/// <param name="fBackTrans"><c>true</c> if this view displays a back translation.</param>
		/// ------------------------------------------------------------------------------------
		public TeFootnoteDraftViewProxy(TeMainWnd mainWnd, string name, bool fEditable,
			bool fBackTrans)
			: base(mainWnd, name, fEditable, TeViewType.FootnoteView | TeViewType.Horizontal |
			(fBackTrans ? TeViewType.BackTranslation : TeViewType.Scripture))
		{
		}
示例#7
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="T:DraftStylebarProxy"/> class.
		/// </summary>
		/// <param name="mainWnd">The main window.</param>
		/// <param name="name">The root name of the view ("StyleBar" will be appended).</param>
		/// <param name="fForFootnotes"><c>true</c> if this stylebar is for footnotes.</param>
		/// ------------------------------------------------------------------------------------
		public DraftStylebarProxy(TeMainWnd mainWnd, string name, bool fForFootnotes) :
			base(mainWnd, name + "StyleBar", false)
		{
			m_forFootnotes = fForFootnotes;
		}
示例#8
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="T:TeScrDraftViewProxy"/> class.
		/// </summary>
		/// <param name="mainWnd">The main window.</param>
		/// <param name="name">The name of the view.</param>
		/// <param name="fEditable"><c>true</c> if this draft view is editable, <c>false</c>
		/// if it is read-only.</param>
		/// <param name="fShowInTable"><c>true</c> to display the view as a table.</param>
		/// <param name="fMakeRootAutomatically"><c>true</c> to call MakeRoot(), <c>false</c>
		/// if caller will call MakeRoot().</param>
		/// <param name="viewType">Bit-flags indicating type of view.</param>
		/// ------------------------------------------------------------------------------------
		public TeScrDraftViewProxy(TeMainWnd mainWnd, string name, bool fEditable,
			bool fShowInTable, bool fMakeRootAutomatically, TeViewType viewType) :
			base(mainWnd, name, fEditable, viewType)
		{
			m_showInTable = fShowInTable;
			m_makeRootAutomatically = fMakeRootAutomatically;
		}
示例#9
0
		/// <summary>
		/// Constructor.
		/// </summary>
		public ContextMenuHelper(TeMainWnd wnd)
		{
			m_mainWnd = wnd;
		}
示例#10
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="TestImportManager"/> class.
		/// </summary>
		/// <param name="mainWnd">The main window we belong to</param>
		/// ------------------------------------------------------------------------------------
		protected TestImportManager(TeMainWnd mainWnd) : base(mainWnd, mainWnd)
		{
		}
示例#11
0
		/// <summary>
		/// Executes in two distinct scenarios.
		///
		/// 1. If disposing is true, the method has been called directly
		/// or indirectly by a user's code via the Dispose method.
		/// Both managed and unmanaged resources can be disposed.
		///
		/// 2. If disposing is false, the method has been called by the
		/// runtime from inside the finalizer and you should not reference (access)
		/// other managed objects, as they already have been garbage collected.
		/// Only unmanaged resources can be disposed.
		/// </summary>
		/// <param name="disposing"></param>
		/// <remarks>
		/// If any exceptions are thrown, that is fine.
		/// If the method is being done in a finalizer, it will be ignored.
		/// If it is thrown by client code calling Dispose,
		/// it needs to be handled by fixing the bug.
		///
		/// If subclasses override this method, they should call the base implementation.
		/// </remarks>
		protected override void Dispose(bool disposing)
		{
			// Must not be run more than once.
			if (IsDisposed)
				return;

			if (disposing)
			{
				// Dispose managed resources here.
			}

			// Dispose unmanaged resources here, whether disposing is true or false.
			m_window = null;

			base.Dispose(disposing);
		}
示例#12
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		///
		/// </summary>
		/// <param name="wnd">The TeMainWnd to get filter information from</param>
		/// ------------------------------------------------------------------------------------
		public BookChangeWatcher(TeMainWnd wnd)
			:
			base(wnd.Cache, (int)Scripture.ScriptureTags.kflidScriptureBooks)
		{
			Debug.Assert(wnd.Cache != null);
			m_window = wnd;
		}