本文整理汇总了C#中IVwStylesheet.GetDefaultBasedOnStyleName方法的典型用法代码示例。如果您正苦于以下问题:C# IVwStylesheet.GetDefaultBasedOnStyleName方法的具体用法?C# IVwStylesheet.GetDefaultBasedOnStyleName怎么用?C# IVwStylesheet.GetDefaultBasedOnStyleName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IVwStylesheet
的用法示例。
在下文中一共展示了IVwStylesheet.GetDefaultBasedOnStyleName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReadStyles
private void ReadStyles(IVwStylesheet vss)
{
string normalStyleName = vss.GetDefaultBasedOnStyleName();
m_styleTable = new StyleInfoTable(normalStyleName,
m_cache.ServiceLocator.WritingSystemManager);
int cStyles = vss.CStyles;
for (int i = 0; i < cStyles; ++i)
{
int hvo = vss.get_NthStyle(i);
var sty = m_cache.ServiceLocator.GetInstance<IStStyleRepository>().GetObject(hvo);
// CSS does not implement the kind of inheritance our styles use. To get the style
// definitions we want in the CSS, we must create these styles using the 'net effect' of
// each style and all the ones it is based on. Happily the VwStyleSheet knows exactly
// how to do this.
var props = vss.GetStyleRgch(sty.Name.Length, sty.Name);
var exportStyleInfo = new ExportStyleInfo(sty, props);
m_styleTable.Add(GetValidCssClassName(sty.Name), exportStyleInfo);
}
}
示例2: ReadStyles
private void ReadStyles(IVwStylesheet vss)
{
string normalStyleName = vss.GetDefaultBasedOnStyleName();
m_styleTable = new StyleInfoTable(normalStyleName,
m_cache.LanguageWritingSystemFactoryAccessor);
int cStyles = vss.CStyles;
for (int i = 0; i < cStyles; ++i)
{
int hvo = vss.get_NthStyle(i);
IStStyle sty = StStyle.CreateFromDBObject(m_cache, hvo);
m_styleTable.Add(sty.Name, new ExportStyleInfo(sty));
}
}