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

编辑器/阅读器

开发平台:

C#

  1. // -- FILE ------------------------------------------------------------------
  2. // name       : Calendar.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.WebControls;
  13. namespace Itenso.WebUserForms.Controls
  14. {
  15. // ------------------------------------------------------------------------
  16. [DefaultProperty( "FieldName" )]
  17. [Designer( typeof( UserFormFieldDesigner ) )]
  18. [ToolboxBitmap( typeof( ResFinder ), "Itenso.WebUserForms.Controls.Images.Calendar.png" )]
  19. public class Calendar : System.Web.UI.WebControls.Calendar, IUserFormField
  20. {
  21. // ----------------------------------------------------------------------
  22. [DefaultValue( "" )]
  23. [Description( "Calendar Form Field Name" )]
  24. [Category( "Web User Forms" )]
  25. public string FieldName
  26. {
  27. get { return this.fieldName; }
  28. set { this.fieldName = value; }
  29. } // FieldName
  30. // ----------------------------------------------------------------------
  31. [DefaultValue( "" )]
  32. [Description( "Calendar Form Field Value" )]
  33. [Category( "Web User Forms" )]
  34. public string FieldValue
  35. {
  36. get { return SelectedDate.ToString(); }
  37. set { SelectedDate = DateTime.Parse( value ); }
  38. } // FieldValue
  39. // ----------------------------------------------------------------------
  40. [Browsable( false )]
  41. bool IUserFormField.AllowEdit
  42. {
  43. get { return Enabled; }
  44. set { Enabled = value; }
  45. } // AllowEdit
  46. // ----------------------------------------------------------------------
  47. public override string ToString()
  48. {
  49. return FormFieldTool.GetFieldDescription( this );
  50. } // ToString
  51. // ----------------------------------------------------------------------
  52. // members
  53. private string fieldName;
  54. } // class Calendar
  55. } // namespace Itenso.WebUserForms.Controls
  56. // -- EOF -------------------------------------------------------------------