FontInfo.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /**
  2. * Project : Mono
  3. * Namespace : System.Web.UI.MobileControls
  4. * Class : FontInfo
  5. * Author : Gaurav Vaish
  6. *
  7. * Copyright : 2003 with Gaurav Vaish, and with
  8. * Ximian Inc
  9. */
  10. using System.Web.Mobile;
  11. namespace System.Web.UI.MobileControls
  12. {
  13. public class FontInfo
  14. {
  15. private Style style;
  16. internal FontInfo(Style style)
  17. {
  18. this.style = style;
  19. }
  20. public BooleanOption Bold
  21. {
  22. get
  23. {
  24. if(style != null)
  25. return style.Bold;
  26. return BooleanOption.False;
  27. }
  28. set
  29. {
  30. if(style != null)
  31. style.Bold = value;
  32. }
  33. }
  34. public BooleanOption Italic
  35. {
  36. get
  37. {
  38. if(style != null)
  39. return style.Italic;
  40. return BooleanOption.False;
  41. }
  42. set
  43. {
  44. if(style != null)
  45. style.Italic = value;
  46. }
  47. }
  48. public string Name
  49. {
  50. get
  51. {
  52. if(style != null)
  53. return style.FontName;
  54. return String.Empty;
  55. }
  56. set
  57. {
  58. if(style != null)
  59. style.FontName = value;
  60. }
  61. }
  62. public FontSize Size
  63. {
  64. get
  65. {
  66. if(style != null)
  67. return style.FontSize;
  68. return FontSize.Normal;
  69. }
  70. set
  71. {
  72. if(style != null)
  73. style.FontSize = value;
  74. }
  75. }
  76. [MonoTODO]
  77. public override string ToString()
  78. {
  79. //string retVal = String.Empty;
  80. throw new NotImplementedException();
  81. }
  82. }
  83. }