CheckBoxRendererData.cs 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. //#########################################################################################
  2. //★★★★★★★ http://www.cnpopsoft.com [华普软件] ★★★★★★★
  3. //★★★★★★★ 华普软件 - VB & C#.NET 专业论文与源码荟萃! ★★★★★★★
  4. //#########################################################################################
  5. /*
  6. * Copyright ?2005, Mathew Hall
  7. * All rights reserved.
  8. *
  9. * Redistribution and use in source and binary forms, with or without modification,
  10. * are permitted provided that the following conditions are met:
  11. *
  12. * - Redistributions of source code must retain the above copyright notice,
  13. * this list of conditions and the following disclaimer.
  14. *
  15. * - Redistributions in binary form must reproduce the above copyright notice,
  16. * this list of conditions and the following disclaimer in the documentation
  17. * and/or other materials provided with the distribution.
  18. *
  19. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  20. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  21. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  22. * IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
  23. * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  24. * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
  25. * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  26. * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  27. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
  28. * OF SUCH DAMAGE.
  29. */
  30. using System;
  31. using System.ComponentModel;
  32. using XPTable.Themes;
  33. namespace XPTable.Renderers
  34. {
  35. /// <summary>
  36. /// Contains information about the current state of a Cell's check box
  37. /// </summary>
  38. public class CheckBoxRendererData
  39. {
  40. #region Class Data
  41. /// <summary>
  42. /// The current state of the Cells check box
  43. /// </summary>
  44. private CheckBoxStates checkState;
  45. #endregion
  46. #region Constructor
  47. /// <summary>
  48. /// Initializes a new instance of the ButtonRendererData class with the
  49. /// specified CheckBox state
  50. /// </summary>
  51. /// <param name="checkState">The current state of the Cells CheckBox</param>
  52. public CheckBoxRendererData(CheckBoxStates checkState)
  53. {
  54. this.checkState = checkState;
  55. }
  56. #endregion
  57. #region Properties
  58. /// <summary>
  59. /// Gets or sets the current state of the Cells checkbox
  60. /// </summary>
  61. public CheckBoxStates CheckState
  62. {
  63. get
  64. {
  65. return this.checkState;
  66. }
  67. set
  68. {
  69. if (!Enum.IsDefined(typeof(CheckBoxStates), value))
  70. {
  71. throw new InvalidEnumArgumentException("value", (int) value, typeof(CheckBoxStates));
  72. }
  73. this.checkState = value;
  74. }
  75. }
  76. #endregion
  77. }
  78. }