SetOwningPropInfo() public method

Set the properties that we will pretend the fake owning property has.
public SetOwningPropInfo ( int destClass, string className, string fieldName ) : void
destClass int
className string
fieldName string
return void
Example #1
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Create a view with multiple LexEntry objects.
		/// </summary>
		/// <param name="rghvoEntries"></param>
		/// <param name="cache"></param>
		/// <param name="styleSheet"></param>
		/// <returns></returns>
		/// ------------------------------------------------------------------------------------
		private XmlView CreateSummaryView(List<int> rghvoEntries, FdoCache cache, IVwStylesheet styleSheet)
		{
			// Make a decorator to publish the list of entries as a fake property of the LexDb.
			int kflidEntriesFound = 8999950; // some arbitrary number not conflicting with real flids.
			var sda = new ObjectListPublisher(cache.DomainDataByFlid as ISilDataAccessManaged, kflidEntriesFound);
			int hvoRoot = RootHvo;
			sda.CacheVecProp(hvoRoot, rghvoEntries.ToArray());
			//TODO: Make this method return a GeckoBrowser control, and generate the content here.
			// The name of this property must match the property used by the publishFound layout.
			sda.SetOwningPropInfo(LexDbTags.kflidClass, "LexDb", "EntriesFound");

			// Make an XmlView which displays that object using the specified layout.
			XmlView xv = new XmlView(hvoRoot, "publishFound", null, false, sda);
			xv.Cache = cache;
			xv.Mediator = m_mediator;
			xv.StyleSheet = styleSheet;
			return xv;
		}
Example #2
0
		private void InitBrowseView(string guiControl, List<DummyCmObject> mergeCandidates)
		{
			XmlNode configurationParameters = (XmlNode)m_mediator.PropertyTable.GetValue("WindowConfiguration");
			XmlNode toolNode = configurationParameters.SelectSingleNode("controls/parameters/guicontrol[@id='" + guiControl + "']/parameters");

			const int kfakeFlid = 8999958;
			ObjectListPublisher sda = new ObjectListPublisher((ISilDataAccessManaged)m_cache.DomainDataByFlid , kfakeFlid);

			int[] hvos = (from obj in mergeCandidates select obj.Hvo).ToArray();
			for (int i = 0; i < mergeCandidates.Count; i++)
				m_candidates[mergeCandidates[i].Hvo] = mergeCandidates[i];
			sda.SetOwningPropInfo(WfiWordformTags.kClassId, "LangProject", "Options");
			sda.SetOwningPropValue(hvos);

			m_bvMergeOptions = new BrowseViewer(toolNode, m_cache.LangProject.Hvo, ObjectListPublisher.OwningFlid, m_cache, m_mediator, null, sda);
			m_bvMergeOptions.StyleSheet = Common.Widgets.FontHeightAdjuster.StyleSheetFromMediator(m_mediator);
			m_bvMergeOptions.SelectedIndexChanged += m_bvMergeOptions_SelectedIndexChanged;
			m_bvMergeOptions.Dock = DockStyle.Fill;
			m_bvPanel.Controls.Add(m_bvMergeOptions);
		}