• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Utils.StringTable类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中SIL.Utils.StringTable的典型用法代码示例。如果您正苦于以下问题:C# StringTable类的具体用法?C# StringTable怎么用?C# StringTable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



StringTable类属于SIL.Utils命名空间,在下文中一共展示了StringTable类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: FixtureSetup

		public override void FixtureSetup()
		{
			string partDirectory = Path.Combine(SIL.FieldWorks.Common.Utils.DirectoryFinder.FwSourceDirectory,
				@"common\controls\detailcontrols\detailcontrolstests");
			Dictionary<string, string[]> keyAttrs = new Dictionary<string, string[]>();
			keyAttrs["layout"] = new string[] {"class", "type", "name" };
			keyAttrs["group"] = new string[] {"label"};
			keyAttrs["part"] = new string[] {"ref"};

			string configurationDir = Path.Combine(SIL.FieldWorks.Common.Utils.DirectoryFinder.FWCodeDirectory,
				@"Language Explorer\Configuration");
			m_stringTable = new SIL.Utils.StringTable(configurationDir);

			m_layouts = new Inventory(new string[] {partDirectory},
				"*Layouts.xml", "/LayoutInventory/*", keyAttrs);

			keyAttrs = new Dictionary<string, string[]>();
			keyAttrs["part"] = new string[] {"id"};

			m_parts = new Inventory(new string[] {partDirectory},
				"*Parts.xml", "/PartInventory/bin/*", keyAttrs);

			m_cache = FdoCache.Create("TestLangProj");

			m_entry = new LexEntry();
			m_cache.LangProject.LexDbOA.EntriesOC.Add(m_entry);
			m_entry.CitationForm.VernacularDefaultWritingSystem = "rubbish";
			// We set both alternatives because currently the default part for Bibliography uses vernacular,
			// but I think this will probably get fixed. Anyway, this way the test is robust.
			m_entry.Bibliography.SetAnalysisDefaultWritingSystem("My rubbishy bibliography");
			m_entry.Bibliography.SetVernacularDefaultWritingSystem("My rubbishy bibliography");
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:32,代码来源:DataTreeTests.cs


示例2: InflAffixTemplateControl

		public InflAffixTemplateControl(FdoCache cache, int hvoRoot, XmlNode xnSpec, StringTable stringTable)
			: base(hvoRoot, XmlUtils.GetAttributeValue(xnSpec, "layout"), stringTable, true)
		{
			m_xnSpec = xnSpec["deParams"];
			Cache = cache;
			m_template = new MoInflAffixTemplate(cache, m_hvoRoot);
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:7,代码来源:InflAffixTemplateControl.cs


示例3: StringTable

 public StringTable(string baseDirectory)
 {
     m_parent = null;
     m_baseDirectory = baseDirectory;
     string sWs = System.Globalization.CultureInfo.CurrentUICulture.Name;
     Load(sWs);
 }
开发者ID:sillsdev,项目名称:CarlaLegacy,代码行数:7,代码来源:StringTable.cs


示例4: LayoutFinder

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// normal constructor.
		/// </summary>
		/// <param name="cache">The cache.</param>
		/// <param name="layoutName">Name of the layout.</param>
		/// <param name="colSpec">The col spec.</param>
		/// <param name="stringTbl">The string TBL.</param>
		/// ------------------------------------------------------------------------------------
		public LayoutFinder(FdoCache cache, string layoutName, XmlNode colSpec, StringTable stringTbl)
		{
			m_layoutName = layoutName;
			m_colSpec = colSpec;
			m_stringTbl = stringTbl;
			Cache = cache;
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:16,代码来源:LayoutFinder.cs


示例5: PhEnvStrRepresentationSlice

		/// <summary>
		/// We want the persistence provider, and the easiest way to get it is to get all
		/// this other stuff we don't need or use.
		/// </summary>
		/// <param name="cache"></param>
		/// <param name="editor"></param>
		/// <param name="flid"></param>
		/// <param name="node"></param>
		/// <param name="obj"></param>
		/// <param name="stringTbl"></param>
		/// <param name="persistenceProvider"></param>
		/// <param name="ws"></param>
		public PhEnvStrRepresentationSlice(FdoCache cache, string editor, int flid,
			System.Xml.XmlNode node, ICmObject obj, StringTable stringTbl,
			IPersistenceProvider persistenceProvider, int ws)
			: base(new StringRepSliceView(obj.Hvo), obj, StringRepSliceVc.Flid)
		{
			m_persistenceProvider = persistenceProvider;
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:19,代码来源:PhEnvStrRepresentationSlice.cs


示例6: InflAffixTemplateControl

		public InflAffixTemplateControl(FdoCache cache, int hvoRoot, XmlNode xnSpec, StringTable stringTable)
			: base(hvoRoot, XmlUtils.GetAttributeValue(xnSpec, "layout"), stringTable, true)
		{
			m_xnSpec = xnSpec["deParams"];
			Cache = cache;
			m_template = Cache.ServiceLocator.GetInstance<IMoInflAffixTemplateRepository>().GetObject(m_hvoRoot);
		}
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:7,代码来源:InflAffixTemplateControl.cs


示例7: SummarySlice

		/// <summary>
		/// Construct one, using the "part ref" element (caller) that
		/// invoked the "slice" node that specified this editor.
		/// </summary>
		/// <param name="caller"></param>
		/// <param name="node"></param>
		public SummarySlice(ICmObject obj, XmlNode caller, XmlNode node, StringTable stringTbl)
			: base()
		{
			string paramType = XmlUtils.GetOptionalAttributeValue(node.ParentNode, "paramType");
			if (paramType == "LiteralString")
			{
				// Instead of the parameter being a layout name, it is literal text which will be
				// the whole contents of the slice, with standard properties.
				string text = XmlUtils.GetManditoryAttributeValue(caller, "label");
				if (stringTbl != null)
					text = stringTbl.LocalizeAttributeValue(text);
				m_view = new LiteralLabelView(text, this);
				m_fLiteralString = true;
			}
			else
			{
				string layout = XmlUtils.GetOptionalAttributeValue(caller, "param");
				if (layout == null)
					layout = XmlUtils.GetManditoryAttributeValue(node, "layout");
				m_view = new SummaryXmlView(obj.Hvo, layout, stringTbl, this);
			}
			UserControl mainControl = new UserControl();
			m_view.Dock = DockStyle.Left;
			m_view.LayoutSizeChanged += new EventHandler(m_view_LayoutSizeChanged);
			mainControl.Height = m_view.Height;
			Control = mainControl;

			m_commandControl = new SummaryCommandControl(this);
			m_commandControl.Dock = DockStyle.Fill;
			m_commandControl.Visible = XmlUtils.GetOptionalBooleanAttributeValue(caller, "commandVisible", false);
			mainControl.Controls.Add(m_commandControl);
			mainControl.Dock = DockStyle.Fill;
			mainControl.Controls.Add(m_view);
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:40,代码来源:SummarySlice.cs


示例8: MorphBreakHelperMenu

		/// <summary>
		/// Constructor for Morph Break Helper Context Menu
		/// </summary>
		/// <param name="textbox">the textbox to insert regex characters into</param>
		/// <param name="helpTopicProvider">usually IHelpTopicProvider.App</param>
		/// <param name="cache">cache</param>
		/// <param name="stringTable">stringTable</param>
		public MorphBreakHelperMenu(FwTextBox textbox, IHelpTopicProvider helpTopicProvider, FdoCache cache, StringTable stringTable)
			: base(textbox, helpTopicProvider)
		{
			m_cache = cache;
			m_stringTable = stringTable;
			Init();
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:14,代码来源:MorphBreakHelperMenu.cs


示例9: XmlRDEBrowseViewVc

		/// <summary>
		/// Constructor.
		/// </summary>
		/// <param name="xnSpec"></param>
		/// <param name="fakeFlid"></param>
		/// <param name="stringTable"></param>
		/// <param name="xbv"></param>
		public XmlRDEBrowseViewVc(XmlNode xnSpec, int fakeFlid, StringTable stringTable, XmlBrowseViewBase xbv)
			: base(xnSpec, fakeFlid, stringTable, xbv)
		{
			// set the border color
			BorderColor = SystemColors.ControlDark;

			// Check for the special editable row attributes.
			// this one is independently optional so we can handle it separately.
			m_sEditRowMergeMethod = XmlUtils.GetAttributeValue(xnSpec, "editRowMergeMethod", null);
			XmlAttribute xa = xnSpec.Attributes["editRowModelClass"];
			if (xa != null && xa.Value.Length != 0)
			{
				m_sEditRowModelClass = xa.Value;
				xa = xnSpec.Attributes["editRowSaveMethod"];
				if (xa != null && xa.Value.Length != 0)
				{
					m_sEditRowSaveMethod = xa.Value;
					xa = xnSpec.Attributes["editRowAssembly"];
					if (xa != null && xa.Value.Length != 0)
					{
						m_sEditRowAssembly = xa.Value;
						xa = xnSpec.Attributes["editRowClass"];
						if (xa != null && xa.Value.Length != 0)
						{
							m_sEditRowClass = xa.Value;
						}
						else
						{
							// Should we complain to the user?  Die horribly? ...
							m_sEditRowModelClass = null;
							m_sEditRowSaveMethod = null;
							m_sEditRowAssembly = null;
							Debug.WriteLine("editRowModelClass, editRowSaveMethod, and " +
								"editRowAssembly are set, but editRowClass is not!?");
						}
					}
					else
					{
						// Should we complain to the user?  Die horribly? ...
						m_sEditRowModelClass = null;
						m_sEditRowSaveMethod = null;
						Debug.WriteLine("editRowModelClass and editRowSaveMethod are set, " +
							"but editRowAssembly is not!?");
					}
				}
				else
				{
					// Should we complain to the user?  Die horribly? ...
					m_sEditRowModelClass = null;
					Debug.WriteLine("editRowModelClass is set, but editRowSaveMethod is not!?");
				}
			}

			InstallVirtualHandlersForColumns();

			// For RDE use, we want total RTL user experience (see LT-5127).
			Cache = m_xbv.Cache;
			m_fShowColumnsRTL = IsWsRTL(m_cache.DefaultVernWs);
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:66,代码来源:XmlRDEBrowseViewVc.cs


示例10: PhoneEnvReferenceSlice

		public PhoneEnvReferenceSlice(FdoCache cache, ICmObject obj, int flid,
			XmlNode configurationNode, IPersistenceProvider persistenceProvider,
			Mediator mediator, StringTable stringTbl)
			: base(cache, obj, flid,configurationNode, persistenceProvider, mediator, stringTbl)
		{
			Debug.Assert(obj is MoAffixAllomorph || obj is MoStemAllomorph);
			m_persistenceProvider = persistenceProvider;
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:8,代码来源:PhoneEnvReferenceSlice.cs


示例11: BasicIPASymbolSlice

		/// <summary>
		/// Constructor invoked via the editor="customWithParams" slice XML configuration
		/// </summary>
		/// <param name="cache"></param>
		/// <param name="editor"></param>
		/// <param name="flid"></param>
		/// <param name="node"></param>
		/// <param name="obj"></param>
		/// <param name="stringTbl"></param>
		/// <param name="persistenceProvider"></param>
		/// <param name="ws"></param>
		public BasicIPASymbolSlice(FdoCache cache, string editor, int flid,
						System.Xml.XmlNode node, ICmObject obj, StringTable stringTbl,
						IPersistenceProvider persistenceProvider, int ws)
			: base(obj, flid, ws)
		{
			var phoneme = (IPhPhoneme)m_obj;
			phoneme.BasicIPASymbolChanged += UpdatePhoneme;
		}
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:19,代码来源:BasicIPASymbolSlice.cs


示例12: GenerateStringTable

		private SIL.Utils.StringTable m_stringTable;  // for "LabelAbbreviations"

		#region Fixture Setup and Teardown
		internal static StringTable GenerateStringTable()
		{
			string configurationDir = Path.Combine(FwDirectoryFinder.CodeDirectory,
				@"Language Explorer/Configuration");
			var stringTable = new SIL.Utils.StringTable(configurationDir);

			return stringTable;
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:11,代码来源:DataTreeTests.cs


示例13: AtomicReferenceSlice

		/// -----------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="AtomicReferenceSlice"/> class.
		/// </summary>
		/// -----------------------------------------------------------------------------------
		public AtomicReferenceSlice(FdoCache cache, ICmObject obj, int flid,
			XmlNode configurationNode, IPersistenceProvider persistenceProvider,
			Mediator mediator, StringTable stringTbl)
			: base(cache, obj, flid, configurationNode, persistenceProvider, mediator, stringTbl)
		{
			m_sda = m_cache.MainCacheAccessor;
			m_sda.AddNotification(this);
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:13,代码来源:AtomicReferenceSlice.cs


示例14: ReversalIndexEntryFormSlice

#pragma warning restore 0414

		public ReversalIndexEntryFormSlice(FdoCache cache, string editor, int flid, XmlNode node,
			ICmObject obj, StringTable stringTbl, IPersistenceProvider persistenceProvider, int ws)
			: base(obj, flid, WritingSystemServices.kwsAllReversalIndex, 0, false, true, true)
		{
			m_configNode = node;
			m_stringTbl = stringTbl;
			m_persistProvider = persistenceProvider;
		}
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:10,代码来源:ReversalIndexEntryFormSlice.cs


示例15: AnalysisInterlinearRS

		/// <summary>
		/// Make one. Everything interesting happens when it is given a root object, however.
		/// </summary>
		/// <param name="cache"></param>
		/// <param name="hvoAnalysis"></param>
		/// <param name="configurationNode"></param>
		/// <param name="stringTable"></param>
		public AnalysisInterlinearRS(FdoCache cache, int hvoAnalysis,
			XmlNode configurationNode, StringTable stringTable) : base(cache)
		{
			m_configurationNode = configurationNode;
			m_hvoWfiAnalysis = hvoAnalysis;
			m_wordform = (WfiWordform)CmObject.CreateFromDBObject(m_fdoCache, m_fdoCache.GetOwnerOfObject(m_hvoWfiAnalysis), false);
			//			RightMouseClickedEvent += new FwRightMouseClickEventHandler(InterlinDocChild_RightMouseClickedEvent);
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:15,代码来源:AnalysisInterlinearRS.cs


示例16: LayoutFinder

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// normal constructor.
		/// </summary>
		/// <param name="cache">The cache.</param>
		/// <param name="layoutName">Name of the layout.</param>
		/// <param name="colSpec">The col spec.</param>
		/// <param name="stringTbl">The string TBL.</param>
		/// <param name="app">The application.</param>
		/// ------------------------------------------------------------------------------------
		public LayoutFinder(FdoCache cache, string layoutName, XmlNode colSpec,
			StringTable stringTbl, IApp app): this()
		{
			m_layoutName = layoutName;
			m_colSpec = colSpec;
			m_stringTbl = stringTbl;
			m_app = app;
			Cache = cache;
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:19,代码来源:LayoutFinder.cs


示例17: PhonologicalFeatureListDlgLauncherSlice

				/// <summary>
		/// We want the persistence provider, and the easiest way to get it is to get all
		/// this other stuff we don't need or use.
		/// </summary>
		/// <param name="cache"></param>
		/// <param name="editor"></param>
		/// <param name="flid"></param>
		/// <param name="node"></param>
		/// <param name="obj"></param>
		/// <param name="stringTbl"></param>
		/// <param name="persistenceProvider"></param>
		/// <param name="ws"></param>
		public PhonologicalFeatureListDlgLauncherSlice(FdoCache cache, string editor, int flid,
			System.Xml.XmlNode node, ICmObject obj, StringTable stringTbl,
			IPersistenceProvider persistenceProvider, int ws)
				{
					m_obj = obj; // is PhPhoneme
					m_persistenceProvider = persistenceProvider;
					m_ws = ws;
					m_node = node;
					m_configurationNode = node;
				}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:22,代码来源:PhonologicalFeatureListDlgLauncherSlice.cs


示例18: TryFindPluralFormFromClassId

		/// <summary>
		///
		/// </summary>
		/// <param name="mdc"></param>
		/// <param name="tbl"></param>
		/// <param name="clsId"></param>
		/// <param name="titleStr">*{dstClass}* if couldn't find result.</param>
		/// <returns>true if we found an alternate form. false if titleStr is null or in *{ClassName}* format.</returns>
		public static bool TryFindPluralFormFromClassId(IFwMetaDataCache mdc, StringTable tbl, int clsId, out string titleStr)
		{
			titleStr = null;
			if (clsId != 0)
			{
				string className = mdc.GetClassName(clsId);
				return TryFindString(tbl, "AlternativeTitles", String.Format("{0}-Plural", className), out titleStr);
			}
			return false;
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:18,代码来源:XmlViewsUtils.cs


示例19: AnalysisInterlinearRs

		/// <summary>
		/// Make one. Everything interesting happens when it is given a root object, however.
		/// </summary>
		/// <param name="cache"></param>
		/// <param name="analysis"></param>
		/// <param name="configurationNode"></param>
		/// <param name="stringTable"></param>
		public AnalysisInterlinearRs(FdoCache cache, IWfiAnalysis analysis,
			XmlNode configurationNode, StringTable stringTable) : base(cache)
		{
			if (analysis == null)
				throw new ArgumentNullException("analysis");
			if (configurationNode == null)
				throw new ArgumentNullException("configurationNode");

			m_configurationNode = configurationNode;
			m_wfiAnalysis = analysis;
			m_wordform = m_wfiAnalysis.Wordform;
			//			RightMouseClickedEvent += new FwRightMouseClickEventHandler(InterlinDocChild_RightMouseClickedEvent);
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:20,代码来源:AnalysisInterlinearRS.cs


示例20: TryFindPluralFormFromFlid

		/// <summary>
		/// looks up plural form alternative first for given flid, secondly for its destination class.
		/// </summary>
		/// <param name="mdc"></param>
		/// <param name="tbl"></param>
		/// <param name="owningFlid"></param>
		/// <param name="titleStr">*{dstClass}* if couldn't find result.</param>
		/// <returns>true if we found an alternate form. false if titleStr is null or in *{key}* format.</returns>
		public static bool TryFindPluralFormFromFlid(IFwMetaDataCache mdc, StringTable tbl, int owningFlid, out string titleStr)
		{
			// first see if we can find an expanded name for the name of a flid.
			string flidName = mdc.GetFieldName(owningFlid);
			if (!String.IsNullOrEmpty(flidName))
			{
				if (TryFindString(tbl, "AlternativeTitles", flidName, out titleStr))
					return true;
			}
			// secondly, see if we can find the plural form for the destination class.
			int dstClass = mdc.GetDstClsId(owningFlid);
			return TryFindPluralFormFromClassId(mdc, tbl, dstClass, out titleStr);
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:21,代码来源:XmlViewsUtils.cs



注:本文中的SIL.Utils.StringTable类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# SharedScrUtils.BCVRef类代码示例发布时间:2022-05-26
下一篇:
C# Tool.PublicationInformation类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap