/// <summary>
        /// Saves the data-type PreValue options.
        /// </summary>
        public override void Save()
        {
            // set the options
            var options = new CFLC_Options()
            {
                Username = this.txtUsername.Text,
                ApiKey = this.txtApiKey.Text,
                ShowMetaData = this.chkShowMetaData.Checked
            };

            // save the options as JSON
            this.SaveAsJson(options);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="CFLC_PrevalueEditor"/> class.
 /// </summary>
 /// <param name="dataType">Type of the data.</param>
 public CFLC_PrevalueEditor(BaseDataType dataType)
     : base(dataType, DBTypes.Ntext)
 {
     // get PreValues, load them into the controls.
     cflc_options = this.GetPreValueOptions<CFLC_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 (cflc_options == null)
            {
                cflc_options = new CFLC_Options(true);
            }

            // set the values
            this.txtUsername.Text = cflc_options.Username;
            this.txtApiKey.Text = cflc_options.ApiKey;
            this.chkShowMetaData.Checked = cflc_options.ShowMetaData;
        }