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


C# FwStyleSheet.GetUiFontForWritingSystem方法代码示例

本文整理汇总了C#中FwStyleSheet.GetUiFontForWritingSystem方法的典型用法代码示例。如果您正苦于以下问题:C# FwStyleSheet.GetUiFontForWritingSystem方法的具体用法?C# FwStyleSheet.GetUiFontForWritingSystem怎么用?C# FwStyleSheet.GetUiFontForWritingSystem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FwStyleSheet的用法示例。


在下文中一共展示了FwStyleSheet.GetUiFontForWritingSystem方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: KeyTermRenderingsControl

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="T:KeyTermRenderingsControl"/> class.
		/// </summary>
		/// <param name="cache">The cache.</param>
		/// <param name="mainWnd">the FwMainWnd that owns this control.</param>
		/// ------------------------------------------------------------------------------------
		public KeyTermRenderingsControl(FdoCache cache, FwMainWnd mainWnd) : base(cache, mainWnd)
		{
			InitializeComponent();
			AccessibleName = Name;
			DataGridView = m_dataGridView;

			// Setup columns
			m_Rendering.Cache = m_cache;
			m_Rendering.WritingSystemCode = m_cache.DefaultVernWs;
			m_OriginalTerm.Cache = m_cache;

			IWritingSystem ws;
			m_cache.ServiceLocator.WritingSystemManager.GetOrSet("grc", out ws);
			m_wsGreek = ws.Handle;
			if (m_wsGreek <= 0)
				throw new Exception("The Greek writing system is not defined.");
			m_cache.ServiceLocator.WritingSystemManager.GetOrSet("hbo", out ws);
			m_wsHebrew = ws.Handle;
			if (m_wsHebrew <= 0)
				throw new Exception("The Hebrew writing system is not defined.");

			if (mainWnd != null)
			{
				Parent = mainWnd;
				m_stylesheet = mainWnd.StyleSheet;
				m_Rendering.Font = m_stylesheet.GetUiFontForWritingSystem(cache.DefaultVernWs,
					FontInfo.kDefaultFontSize);
			}

			m_list = new List<ICheckGridRowObject>();
			m_gridSorter = new CheckGridListSorter(m_list);
			m_gridSorter.AddComparer(m_Rendering.DataPropertyName, m_tsStrComparer);
			m_gridSorter.AddComparer(m_OriginalTerm.DataPropertyName, m_tsStrComparer);
			m_gridSorter.AddComparer(m_Status.DataPropertyName, new RenderingStatusComparer());
			m_gridSorter.AddComparer(m_Reference.DataPropertyName,
				new ScriptureReferenceComparer(m_cache.LanguageProject.TranslatedScriptureOA.ScrProjMetaDataProvider));

			m_dataGridView.Cache = m_cache;
			m_dataGridView.ColumnHeaderMouseClick += m_dataGridView_ColumnHeaderMouseClick;
		}
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:47,代码来源:KeyTermRenderingsControl.cs


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