DataViewSetting.cs 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. //
  2. // System.Data.DataViewSetting
  3. //
  4. // Authors:
  5. // Rodrigo Moya ([email protected])
  6. // Tim Coleman ([email protected])
  7. //
  8. // (C) Ximian, Inc. 2002
  9. // Copyright (C) Tim Coleman, 2002
  10. //
  11. //
  12. // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
  13. //
  14. // Permission is hereby granted, free of charge, to any person obtaining
  15. // a copy of this software and associated documentation files (the
  16. // "Software"), to deal in the Software without restriction, including
  17. // without limitation the rights to use, copy, modify, merge, publish,
  18. // distribute, sublicense, and/or sell copies of the Software, and to
  19. // permit persons to whom the Software is furnished to do so, subject to
  20. // the following conditions:
  21. //
  22. // The above copyright notice and this permission notice shall be
  23. // included in all copies or substantial portions of the Software.
  24. //
  25. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  26. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  27. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  28. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  29. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  30. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  31. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  32. //
  33. using System.ComponentModel;
  34. namespace System.Data
  35. {
  36. /// <summary>
  37. /// Represents the default settings for ApplyDefaultSort, DataViewManager, RowFilter, RowStateFilter, Sort, and Table for DataViews created from the DataViewManager.
  38. /// </summary>
  39. [TypeConverterAttribute (typeof (ExpandableObjectConverter))]
  40. [Serializable]
  41. public class DataViewSetting
  42. {
  43. #region Fields
  44. bool applyDefaultSort;
  45. DataViewManager dataViewManager;
  46. string rowFilter;
  47. DataViewRowState rowStateFilter;
  48. string sort;
  49. DataTable dataTable;
  50. #endregion // Fields
  51. #region Constructors
  52. internal DataViewSetting ()
  53. {
  54. }
  55. #endregion // Constructors
  56. #region Properties
  57. public bool ApplyDefaultSort {
  58. get { return applyDefaultSort; }
  59. set { applyDefaultSort = value; }
  60. }
  61. [Browsable (false)]
  62. public DataViewManager DataViewManager {
  63. get { return dataViewManager; }
  64. }
  65. public string RowFilter {
  66. get { return rowFilter; }
  67. set { rowFilter = value; }
  68. }
  69. public DataViewRowState RowStateFilter {
  70. get { return rowStateFilter; }
  71. set { rowStateFilter = value; }
  72. }
  73. public string Sort {
  74. get { return sort; }
  75. set { sort = value; }
  76. }
  77. [MonoTODO]
  78. [Browsable (false)]
  79. public DataTable Table {
  80. get { return dataTable; }
  81. }
  82. #endregion // Properties
  83. }
  84. }