您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

FormattedText.cs 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*************************************************************************************
  2. DocX – DocX is the community edition of Xceed Words for .NET
  3. Copyright (C) 2009-2016 Xceed Software Inc.
  4. This program is provided to you under the terms of the Microsoft Public
  5. License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
  6. For more features and fast professional support,
  7. pick up Xceed Words for .NET at https://xceed.com/xceed-words-for-net/
  8. ***********************************************************************************/
  9. using System;
  10. namespace Xceed.Words.NET
  11. {
  12. public class FormattedText : IComparable
  13. {
  14. #region Public Members
  15. public int index;
  16. public string text;
  17. public Formatting formatting;
  18. #endregion
  19. #region Constructors
  20. public FormattedText()
  21. {
  22. }
  23. #endregion
  24. #region Public Methods
  25. public int CompareTo( object obj )
  26. {
  27. FormattedText other = ( FormattedText )obj;
  28. FormattedText tf = this;
  29. if( other.formatting == null || tf.formatting == null )
  30. return -1;
  31. return tf.formatting.CompareTo( other.formatting );
  32. }
  33. #endregion
  34. }
  35. }