/// <summary> /// Saves the data-type PreValue options. /// </summary> public override void Save() { // set the options var options = new CFCMD_Options() { Username = this.txtUsername.Text, ApiKey = this.txtApiKey.Text, DefaultContainer = ddlDefaultContainer.SelectedValue }; // save the options as JSON this.SaveAsJson(options); }
/// <summary> /// Saves the data-type PreValue options. /// </summary> public override void Save() { // set the options var options = new CFCMD_Options() { Username = this.txtUsername.Text, ApiKey = this.txtApiKey.Text, DefaultContainer = ddlDefaultContainer.SelectedValue }; // save the options as JSON this.SaveAsJson(options); }
/// <summary> /// Raises the <see cref="E:System.Web.UI.Control.Load"/> event. /// </summary> /// <param name="e">The <see cref="T:System.EventArgs"/> object that contains the event data.</param> protected override void OnLoad(EventArgs e) { base.OnLoad(e); // if the options are null, then load the defaults if (cfcmd_options == null) { cfcmd_options = new CFCMD_Options(true); } // set the values this.txtUsername.Text = cfcmd_options.Username; this.txtApiKey.Text = cfcmd_options.ApiKey; this.ddlDefaultContainer.SelectedValue = cfcmd_options.DefaultContainer; }
/// <summary> /// Initializes a new instance of the <see cref="CFCMD_PrevalueEditor"/> class. /// </summary> /// <param name="dataType">Type of the data.</param> public CFCMD_PrevalueEditor(BaseDataType dataType) : base(dataType, DBTypes.Ntext) { // get PreValues, load them into the controls. cfcmd_options = this.GetPreValueOptions<CFCMD_Options>(); }
/// <summary> /// Raises the <see cref="E:System.Web.UI.Control.Load"/> event. /// </summary> /// <param name="e">The <see cref="T:System.EventArgs"/> object that contains the event data.</param> protected override void OnLoad(EventArgs e) { base.OnLoad(e); // if the options are null, then load the defaults if (cfcmd_options == null) { cfcmd_options = new CFCMD_Options(true); } // set the values this.txtUsername.Text = cfcmd_options.Username; this.txtApiKey.Text = cfcmd_options.ApiKey; this.ddlDefaultContainer.SelectedValue = cfcmd_options.DefaultContainer; }
/// <summary> /// Initializes a new instance of the <see cref="CFCMD_PrevalueEditor"/> class. /// </summary> /// <param name="dataType">Type of the data.</param> public CFCMD_PrevalueEditor(BaseDataType dataType) : base(dataType, DBTypes.Ntext) { // get PreValues, load them into the controls. cfcmd_options = this.GetPreValueOptions <CFCMD_Options>(); }