TimePicker.cs
上传用户:husern
上传日期:2022-03-24
资源大小:534k
文件大小:3k
源码类别:

编辑器/阅读器

开发平台:

C#

  1. // -- FILE ------------------------------------------------------------------
  2. // name       : TimePicker.cs
  3. // project    : Itenso Web User Forms
  4. // created    : Jani Giannoudis - 2008.10.30
  5. // language   : c#
  6. // environment: .NET 2.0
  7. // copyright  : (c) 2008 by Itenso GmbH, Switzerland
  8. // --------------------------------------------------------------------------
  9. using System;
  10. using System.Drawing;
  11. using System.ComponentModel;
  12. using System.Web.UI;
  13. using System.Web.UI.WebControls;
  14. namespace Itenso.WebUserForms.Controls
  15. {
  16. #if TP_DATE_FIELDS
  17. // ------------------------------------------------------------------------
  18. [DefaultProperty( "FieldName" )]
  19. [Designer( typeof( UserFormFieldDesigner ) )]
  20. [ToolboxBitmap( typeof( ResFinder ), "Itenso.WebUserForms.Controls.Images.TimePicker.png" )]
  21. public class TimePicker : System.Web.UI.WebControls.TextBox, IUserFormField, IPlaceholderControl
  22. {
  23. // ----------------------------------------------------------------------
  24. public TimePicker()
  25. {
  26. base.ReadOnly = true;
  27. } // TimePicker
  28. // ----------------------------------------------------------------------
  29. [DefaultValue( "" )]
  30. [Description( "TimePicker Form Field Name" )]
  31. [Category( "Web User Forms" )]
  32. public string FieldName
  33. {
  34. get { return this.fieldName; }
  35. set { this.fieldName = value; }
  36. } // FieldName
  37. // ----------------------------------------------------------------------
  38. [DefaultValue( "" )]
  39. [Description( "TimePicker Form Field Value" )]
  40. [Category( "Web User Forms" )]
  41. public string FieldValue
  42. {
  43. get { return Text; }
  44. set { Text = value; }
  45. } // FieldValue
  46. // ----------------------------------------------------------------------
  47. [DefaultValue( "" )]
  48. [Description( "TimePicker Form Field Time Format" )]
  49. [Category( "Web User Forms" )]
  50. public string TimeFormat
  51. {
  52. get { return this.timeFormat; }
  53. set { this.timeFormat = value; }
  54. } // TimeFormat
  55. // ----------------------------------------------------------------------
  56. [Browsable( false )]
  57. bool IUserFormField.AllowEdit
  58. {
  59. get { return false; }
  60. set { ; }
  61. } // AllowEdit
  62. // ----------------------------------------------------------------------
  63. [Browsable( false )]
  64. Control IPlaceholderControl.Control
  65. {
  66. get { return this; }
  67. } // IPlaceholderControl.Control
  68. // ----------------------------------------------------------------------
  69. public override bool ReadOnly
  70. {
  71. get { return base.ReadOnly; }
  72. set { ; }
  73. } // ReadOnly
  74. // ----------------------------------------------------------------------
  75. public override string ToString()
  76. {
  77. return FormFieldTool.GetFieldDescription( this );
  78. } // ToString
  79. // ----------------------------------------------------------------------
  80. // members
  81. private string fieldName;
  82. private string timeFormat;
  83. } // class TimePicker
  84. #endif // TP_DATE_FIELDS
  85. } // namespace Itenso.WebUserForms.Controls
  86. // -- EOF -------------------------------------------------------------------