Esempio 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);
 }
Esempio 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);
 }
Esempio 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;
            }
        }
Esempio 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;
            }
        }