ArrowCap.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. namespace IndexFormula.Finance
  2. {
  3. using System;
  4. using System.ComponentModel;
  5. using System.Xml.Serialization;
  6. [Serializable, TypeConverter(typeof(ArrowCapConverter)), RefreshProperties(RefreshProperties.Repaint)]
  7. public class ArrowCap
  8. {
  9. private bool filled;
  10. private int height;
  11. private int width;
  12. public ArrowCap()
  13. {
  14. this.width = 10;
  15. this.height = 10;
  16. }
  17. public ArrowCap(int Width, int Height, bool Filled)
  18. {
  19. this.width = 10;
  20. this.height = 10;
  21. this.width = Width;
  22. this.height = Height;
  23. this.filled = Filled;
  24. }
  25. public override string ToString()
  26. {
  27. return string.Concat(new object[] { "", this.width, ",", this.height, ",", this.filled });
  28. }
  29. [DefaultValue(false), XmlAttribute]
  30. public bool Filled
  31. {
  32. get
  33. {
  34. return this.filled;
  35. }
  36. set
  37. {
  38. this.filled = value;
  39. }
  40. }
  41. [XmlAttribute, DefaultValue(10)]
  42. public int Height
  43. {
  44. get
  45. {
  46. return this.height;
  47. }
  48. set
  49. {
  50. this.height = value;
  51. if (this.width == 0)
  52. {
  53. this.width = value;
  54. }
  55. }
  56. }
  57. [DefaultValue(10), XmlAttribute]
  58. public int Width
  59. {
  60. get
  61. {
  62. return this.width;
  63. }
  64. set
  65. {
  66. this.width = value;
  67. if (this.height == 0)
  68. {
  69. this.height = value;
  70. }
  71. }
  72. }
  73. }
  74. }