当前位置: 首页>>代码示例>>C#>>正文


C# Utils.StringTable类代码示例

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


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


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