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

            // 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 CFCC_Options()
            {
                Username = this.txtUsername.Text,
                ApiKey = this.txtApiKey.Text,
                ShowMetaData = this.chkShowMetaData.Checked
            };

            // save the options as JSON
            this.SaveAsJson(options);
        }
Esempio n. 3
0
        /// <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 (cfcc_options == null)
            {
                cfcc_options = new CFCC_Options(true);
            }

            // set the values
            this.txtUsername.Text        = cfcc_options.Username;
            this.txtApiKey.Text          = cfcc_options.ApiKey;
            this.chkShowMetaData.Checked = cfcc_options.ShowMetaData;
        }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CFCC_PrevalueEditor"/> class.
 /// </summary>
 /// <param name="dataType">Type of the data.</param>
 public CFCC_PrevalueEditor(BaseDataType dataType)
     : base(dataType, DBTypes.Ntext)
 {
     // get PreValues, load them into the controls.
     cfcc_options = this.GetPreValueOptions <CFCC_Options>();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="CFCC_PrevalueEditor"/> class.
 /// </summary>
 /// <param name="dataType">Type of the data.</param>
 public CFCC_PrevalueEditor(BaseDataType dataType)
     : base(dataType, DBTypes.Ntext)
 {
     // get PreValues, load them into the controls.
     cfcc_options = this.GetPreValueOptions<CFCC_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 (cfcc_options == null)
            {
                cfcc_options = new CFCC_Options(true);
            }

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