本文整理汇总了C#中ITsTextProps.ObjData方法的典型用法代码示例。如果您正苦于以下问题:C# ITsTextProps.ObjData方法的具体用法?C# ITsTextProps.ObjData怎么用?C# ITsTextProps.ObjData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITsTextProps
的用法示例。
在下文中一共展示了ITsTextProps.ObjData方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsHyperlink
/// ------------------------------------------------------------------------------------
/// <summary>
/// Checks to see if the text properties are for a hyperlink.
/// </summary>
/// <param name="ttp">The text properties.</param>
/// <returns><c>true</c> if the properties are for a hyperlink; <c>false</c> otherwise.
/// </returns>
/// ------------------------------------------------------------------------------------
public static bool IsHyperlink(ITsTextProps ttp)
{
string objData = ttp.ObjData();
if (!String.IsNullOrEmpty(objData) && objData.Length > 1 && objData[0] == Convert.ToChar((int)FwObjDataTypes.kodtExternalPathName))
{
return true;
}
return false;
}
示例2: GetGuidFromProps
/// ------------------------------------------------------------------------------------
/// <summary>
/// Get a Guid from the given text props.
/// </summary>
/// <param name="ttp">The text props</param>
/// <param name="desiredOrcTypes">Set of ORC types that we're interested in, dude; or
/// null if it don't make no difference</param>
/// <param name="odt">Actual object type</param>
/// <returns>The GUID from the text props or Guid.Empty if the props do not contain
/// a GUID or have a type of ORC that is not one of the desired kinds</returns>
/// ------------------------------------------------------------------------------------
public static Guid GetGuidFromProps(ITsTextProps ttp, FwObjDataTypes[] desiredOrcTypes, out FwObjDataTypes odt)
{
odt = 0;
string sObjData = ttp.ObjData();
if (sObjData != null)
{
odt = (FwObjDataTypes)Convert.ToByte(sObjData[0]);
// See if it's one of the types of objects we want.
if (desiredOrcTypes == null || desiredOrcTypes.Contains(odt))
{
// Get GUID for ORC
return MiscUtils.GetGuidFromObjData(sObjData.Substring(1));
}
}
return Guid.Empty;
}