Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using Ext.Net;
- using System.Web.UI;
- using System.ComponentModel;
- [assembly: WebResource("MyAssembly.Controls.ExtNet.resources.DatePickerPlus.datepickerplus.js", "application/javascript")]
- namespace MyAssembly.Controls.ExtNet
- {
- [ToolboxData("<{0}:DatePickerPlus runat=\"server\" />")]
- [Description("DatePickerPlus extension is used when multiple dates needs to be selected")]
- public class DatePickerPlus : DatePicker
- {
- protected override List<ResourceItem> Resources
- {
- get
- {
- List<ResourceItem> baseList = base.Resources;
- baseList.Capacity += 1;
- baseList.Add(new ClientScriptItem(typeof(DatePickerPlus), "MyAssembly.Controls.ExtNet.resources.DatePickerPlus.datepickerplus.js", "ux/extensions/datepickerplus/datepickerplus.js"));
- return baseList;
- }
- }
- public override string InstanceOf
- {
- get
- {
- return "Ext.ux.DatePickerPlus";
- }
- }
- public override string XType
- {
- get
- {
- return "datepickerplus";
- }
- }
- /// <summary>
- /// True to allow selection of multiple dates. Defaults to true.
- /// </summary>
- [Meta]
- [ConfigOption]
- [DefaultValue(true)]
- [NotifyParentProperty(true)]
- [Description("True to allow selection of multiple dates. Defaults to true.")]
- public virtual bool MultipleSelection
- {
- get
- {
- object obj = this.ViewState["MultipleSelection"];
- return (obj == null) ? true : (bool)obj;
- }
- set
- {
- this.ViewState["MultipleSelection"] = value;
- }
- }
- [Browsable(false)]
- [EditorBrowsable(EditorBrowsableState.Never)]
- [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
- [System.Xml.Serialization.XmlIgnore]
- [Newtonsoft.Json.JsonIgnore]
- public override ConfigOptionsCollection ConfigOptions
- {
- get
- {
- ConfigOptionsCollection list = base.ConfigOptions;
- list.Add("multiSelection", new ConfigOption("multiSelection", null, true, this.MultipleSelection));
- return (list);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement