Currently only LexReferenceSequenceView displays a full sequence for lexical relations sequence. Otherwise we could also manufacture ReferenceSequenceUi from ReferenceBaseUi.MakeUi(). But since only LexReferenceSequenceView (e.g. Calendar) is handling changing the sequence of items through the context menu, we'll wait till we really need it to come up with a solution that can "exclude self" from the list in moving calculations.
Наследование: VectorReferenceUi
Пример #1
0
		/// <summary>
		/// Currently only LexReferenceSequenceView displays a full sequence for lexical relations sequence.
		/// (e.g. Calendar), so we can use ReferenceSequenceUi for handling the moving of items through context menu.
		/// </summary>
		/// <param name="where"></param>
		/// <param name="hvo"></param>
		/// <returns></returns>
		protected override bool HandleRightClickOnObject(int hvo)
		{
			if (hvo == 0)
				return false;

			ReferenceBaseUi ui = new ReferenceSequenceUi(Cache, m_rootObj, m_rootFlid, hvo);
			if (ui != null)
			{
				//Debug.WriteLine("hvo=" + hvo.ToString() + " " + ui.Object.ShortName + "  " + ui.Object.ToString());
				return ui.HandleRightClick(Mediator, this, true);
			}

			return false;
		}
		protected override bool HandleRightClickOnObject(int hvo)
		{
			if (hvo == 0)
				return false;

			// We do NOT want a Using here. The temporary colleague created inside HandleRightClick should dispose
			// of the object. (Not working as of the time of writing, but disposing it makes a much more definite
			// problem, because it is gone before the user can choose one of the menu items. (FWR-2798 reopened)
			ReferenceBaseUi ui = new ReferenceSequenceUi(Cache, m_rootObj, m_rootFlid, hvo);
			if (ui != null)
			{
				//Debug.WriteLine("hvo=" + hvo.ToString() + " " + ui.Object.ShortName + "  " + ui.Object.ToString());
				return ui.HandleRightClick(Mediator, this, true);
			}

			return false;
		}