RecordEditView implements a RecordView (view showing one object at a time from a sequence) in which the single object is displayed using a DataTree configured using XDEs. It requires that the XML configuration node have the attribute 'templatePath' (in addition to 'field' as required by RecordView to specify the list of objects). This tells it where to start looking for XDEs. This path is relative to the FW root directory (DistFiles in a development system), e.g., "IText\XDEs". This version uses the DetailControls version of DataTree, and will eventually replace the original.
Inheritance: RecordView
Beispiel #1
0
		private void InitializeInfoView(RecordClerk clerk)
		{
			if (m_mediator == null)
				return;
			XmlNode xnWindow = (XmlNode)m_mediator.PropertyTable.GetValue("WindowConfiguration");
			if (xnWindow == null)
				return;
			XmlNode xnControl = xnWindow.SelectSingleNode(
				"controls/parameters/guicontrol[@id=\"TextInformationPane\"]/control/parameters");
			if (xnControl == null)
				return;
			m_xrev = new InterlinearTextsRecordEditView();
			m_xrev.Clerk = clerk;
			m_xrev.Init(m_mediator, xnControl);
			m_xrev.Dock = DockStyle.Fill;
			this.Controls.Add(m_xrev);
		}
Beispiel #2
0
		private void InitializeInfoView(RecordClerk clerk)
		{
			if (m_mediator == null)
				return;
			var xnWindow = (XmlNode)m_mediator.PropertyTable.GetValue("WindowConfiguration");
			if (xnWindow == null)
				return;
			XmlNode xnControl = xnWindow.SelectSingleNode(
				"controls/parameters/guicontrol[@id=\"TextInformationPane\"]/control/parameters");
			if (xnControl == null)
				return;
			var activeClerk = m_mediator.PropertyTable.GetValue("ActiveClerk") as RecordClerk;
			var toolChoice = m_mediator.PropertyTable.GetStringProperty("currentContentControl", null);
			if(m_xrev != null)
			{
				//when re-using the infoview we want to remove and dispose of the old recordeditview and
				//associated datatree. (LT-13216)
				Controls.Remove(m_xrev);
				m_xrev.Dispose();
			}
			m_xrev = new InterlinearTextsRecordEditView(this);
			if (clerk.GetType().Name == "InterlinearTextsRecordClerk")
			{
				m_xrev.Clerk = clerk;
			}
			else
			{
				//We want to make sure that the following initialization line will initialize this
				//clerk if we haven't already set it. Without this assignment to null, the InfoPane
				//misbehaves in the Concordance view (it uses the filter from the InterlinearTexts view)
				m_xrev.Clerk = null;
			}
			m_xrev.Init(m_mediator, xnControl); // <-- This call will change the ActiveClerk
			DisplayCurrentRoot();
			m_xrev.Dock = DockStyle.Fill;
			Controls.Add(m_xrev);
			// There are times when moving to the InfoPane causes the wrong ActiveClerk to be set.
			// See FWR-3390 (and InterlinearTextsRecordClerk.OnDisplayInsertInterlinText).
			var activeClerkNew = m_mediator.PropertyTable.GetValue("ActiveClerk") as RecordClerk;
			if (toolChoice != "interlinearEdit" && activeClerk != null && activeClerk != activeClerkNew)
			{
				m_mediator.PropertyTable.SetProperty("ActiveClerk", activeClerk);
				activeClerk.ActivateUI(true);
			}
		}