(JohnT, by inspection not as author:) this class seems to be responsible for the whole body, not just the launcher button, of an AdhocCoProhibVectorReferenceSlice, which is (for example) used in Grammar/Ad hoc Co-prohibitions, Other Morphemes slice. It is basically a VectorReferenceLauncher, with some special code mainly related to the chooser button.
Inheritance: SIL.FieldWorks.Common.Framework.DetailControls.VectorReferenceLauncher
		/// <summary>
		/// Override method to add suitable control.
		/// </summary>
		public override void FinishInit()
		{
			CheckDisposed();
			Debug.Assert(m_cache != null);
			Debug.Assert(m_configurationNode != null);

			base.FinishInit();
			AdhocCoProhibVectorLauncher launcher = new AdhocCoProhibVectorLauncher();
			string className = m_cache.MetaDataCacheAccessor.GetClassName((uint)m_obj.ClassID);
			m_fieldName = XmlUtils.GetManditoryAttributeValue(m_configurationNode, "field");
			m_flid = AutoDataTreeMenuHandler.ContextMenuHelper.GetFlid(m_cache.MetaDataCacheAccessor,
				className, m_fieldName);
			launcher.Initialize(m_cache, m_obj, m_flid, m_fieldName,
				null, Mediator,
				DisplayNameProperty,
				BestWsName);
			// We don't want to be visible until later, since otherwise we get a temporary
			// display in the wrong place with the wrong size that serves only to annoy the
			// user.  See LT-1518 "The drawing of the DataTree for Lexicon/Advanced Edit draws
			// some initial invalid controls."  Becoming visible when we set the width and
			// height seems to delay things enough to avoid this visual clutter.
			launcher.Visible = false;
			Control = launcher;
			launcher.ViewSizeChanged += new FwViewSizeChangedEventHandler(this.OnViewSizeChanged);
			VectorReferenceView view = (VectorReferenceView)launcher.MainControl;
			view.ViewSizeChanged += new FwViewSizeChangedEventHandler(this.OnViewSizeChanged);
		}
示例#2
0
        /// <summary>
        /// Override method to add suitable control.
        /// </summary>
        public override void FinishInit()
        {
            CheckDisposed();
            Debug.Assert(m_cache != null);
            Debug.Assert(m_configurationNode != null);

            base.FinishInit();
            AdhocCoProhibVectorLauncher launcher = new AdhocCoProhibVectorLauncher();
            string className = m_cache.MetaDataCacheAccessor.GetClassName((uint)m_obj.ClassID);

            m_fieldName = XmlUtils.GetManditoryAttributeValue(m_configurationNode, "field");
            m_flid      = AutoDataTreeMenuHandler.ContextMenuHelper.GetFlid(m_cache.MetaDataCacheAccessor,
                                                                            className, m_fieldName);
            launcher.Initialize(m_cache, m_obj, m_flid, m_fieldName,
                                null, Mediator,
                                DisplayNameProperty,
                                BestWsName);
            // We don't want to be visible until later, since otherwise we get a temporary
            // display in the wrong place with the wrong size that serves only to annoy the
            // user.  See LT-1518 "The drawing of the DataTree for Lexicon/Advanced Edit draws
            // some initial invalid controls."  Becoming visible when we set the width and
            // height seems to delay things enough to avoid this visual clutter.
            launcher.Visible          = false;
            Control                   = launcher;
            launcher.ViewSizeChanged += new FwViewSizeChangedEventHandler(this.OnViewSizeChanged);
            VectorReferenceView view = (VectorReferenceView)launcher.MainControl;

            view.ViewSizeChanged += new FwViewSizeChangedEventHandler(this.OnViewSizeChanged);
        }