Ejemplo n.º 1
0
 /// <summary>
 /// Default constructor
 /// ‍</summary>
 public TimeInputBoxExtender()
 {
     this.EnableClientState = true;
     this.NullStrings = new string[0];
     this.state = new TimeInputClientState();
     this.ClientStateValuesLoaded += new EventHandler(this.ExtenderClientStateLoaded);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Default constructor
 /// ‍</summary>
 public TimeInputBoxExtender()
 {
     this.EnableClientState        = true;
     this.NullStrings              = new string[0];
     this.state                    = new TimeInputClientState();
     this.ClientStateValuesLoaded += new EventHandler(this.ExtenderClientStateLoaded);
 }
Ejemplo n.º 3
0
        /// <summary>‍
        /// Handle loading of client state
        /// </summary>
        /// <param name="sender">sender</param>
        /// <param name="e">args</param>
        private void ExtenderClientStateLoaded(object sender, EventArgs e)
        {
            if (this.ClientState != null)
            {
                JavaScriptSerializer jss = new JavaScriptSerializer();
                jss.RegisterConverters(new JavaScriptConverter[] { new NhsTimeJavascriptConverter() });

                this.state = jss.Deserialize <TimeInputClientState>(ClientState);

                this.value = this.state.Value;
            }
        }
Ejemplo n.º 4
0
        /// <summary>‍
        /// Handle loading of client state
        /// </summary>
        /// <param name="sender">sender</param>
        /// <param name="e">args</param>
        private void ExtenderClientStateLoaded(object sender, EventArgs e)
        {
            if (this.ClientState != null)
            {
                JavaScriptSerializer jss = new JavaScriptSerializer();
                jss.RegisterConverters(new JavaScriptConverter[] { new NhsTimeJavascriptConverter() });

                this.state = jss.Deserialize<TimeInputClientState>(ClientState);
                
                this.value = this.state.Value;
            }
        }