Control containing the tool strip and the tree of key terms.
Inheritance: SIL.FieldWorks.TE.TeEditorialChecks.CheckControl
Esempio n. 1
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Creates the check control.
		/// </summary>
		/// <returns></returns>
		/// ------------------------------------------------------------------------------------
		protected override CheckControl CreateCheckControl()
		{
			// in tests, m_bookFiltereInstance won't be set during initialization,
			// so set it now based upon the draftView's handle.
			if (m_bookFilterInstance == 0 && ControlCreator != null && ControlCreator is Control)
			{
				m_bookFilterInstance = (ControlCreator as Control).Handle.ToInt32();
			}
			KeyTermsControl ktControl =
				new KeyTermsControl(((ISelectableView)this).BaseInfoBarCaption,	m_sProjectName);

			ktControl.Wrapper = this;
			ktControl.Content = m_ktTree;
			ktControl.UpdateToolStripButtons();

			((KeyTermRenderingsControl)m_gridControl).ReferenceChanged += ktControl.OnScrReferenceChanged;
			((KeyTermRenderingsControl)m_gridControl).ReferenceListEmptied += ktControl.OnReferenceListEmptied;
			((ISelectionChangeNotifier)m_draftView).VwSelectionChanged +=
				new EventHandler<VwSelectionArgs>(ktControl.OnSelChangedInDraftView);

			return ktControl;
		}
Esempio n. 2
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Creates the check control.
		/// </summary>
		/// <returns></returns>
		/// ------------------------------------------------------------------------------------
		protected override CheckControl CreateCheckControl()
		{
			KeyTermsControl ktControl =
				new KeyTermsControl(((ISelectableView)this).BaseInfoBarCaption,	m_sProjectName);

			ktControl.Wrapper = this;
			ktControl.MainPanelContent = m_ktTree;
			ktControl.UpdateToolStripButtons();

			((KeyTermRenderingsControl)m_gridControl).ReferenceChanged += ktControl.OnScrReferenceChanged;
			((KeyTermRenderingsControl)m_gridControl).ReferenceListEmptied += ktControl.OnReferenceListEmptied;
			if (m_draftView is ISelectionChangeNotifier)
				((ISelectionChangeNotifier) m_draftView).VwSelectionChanged += ktControl.OnSelChangedInDraftView;

			return ktControl;
		}