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

            // save the options as JSON
            this.SaveAsJson(options);
        }
Пример #2
0
        /// <summary>
        /// Saves the data-type PreValue options.
        /// </summary>
        public override void Save()
        {
            // set the options
            var options = new CFU_Options()
            {
                Username              = this.txtUsername.Text,
                ApiKey                = this.txtApiKey.Text,
                ShowMetaData          = this.chkShowMetaData.Checked,
                DefaultContainer      = ddlDefaultContainer.SelectedValue,
                DefaultContainerAlias = txtDefaultAlias.Text
            };

            // save the options as JSON
            this.SaveAsJson(options);
        }
Пример #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 (cfu_options == null)
            {
                cfu_options = new CFU_Options(true);
            }

            // set the values
            this.txtUsername.Text                  = cfu_options.Username;
            this.txtApiKey.Text                    = cfu_options.ApiKey;
            this.chkShowMetaData.Checked           = cfu_options.ShowMetaData;
            this.txtDefaultAlias.Text              = cfu_options.DefaultContainerAlias;
            this.ddlDefaultContainer.SelectedValue = cfu_options.DefaultContainer;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="CFU_PrevalueEditor"/> class.
 /// </summary>
 /// <param name="dataType">Type of the data.</param>
 public CFU_PrevalueEditor(BaseDataType dataType)
     : base(dataType, DBTypes.Ntext)
 {
     // get PreValues, load them into the controls.
     cfu_options = this.GetPreValueOptions<CFU_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 (cfu_options == null)
            {
                cfu_options = new CFU_Options(true);
            }

            // set the values
            this.txtUsername.Text = cfu_options.Username;
            this.txtApiKey.Text = cfu_options.ApiKey;
            this.chkShowMetaData.Checked = cfu_options.ShowMetaData;
            this.txtDefaultAlias.Text = cfu_options.DefaultContainerAlias;
            this.ddlDefaultContainer.SelectedValue = cfu_options.DefaultContainer;
        }
Пример #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CFU_PrevalueEditor"/> class.
 /// </summary>
 /// <param name="dataType">Type of the data.</param>
 public CFU_PrevalueEditor(BaseDataType dataType)
     : base(dataType, DBTypes.Ntext)
 {
     // get PreValues, load them into the controls.
     cfu_options = this.GetPreValueOptions <CFU_Options>();
 }