示例#1
0
        /// <summary>
        /// Saves the data-type PreValue options.
        /// </summary>
        public override void Save()
        {
            int parsed;

            // set the options
            var options = new IRImagePickerPreValue
            {
                Width             = Int32.TryParse(txtWidth.Text, out parsed) ? parsed : 0,
                Height            = Int32.TryParse(txtHeight.Text, out parsed) ? parsed : 0,
                ThumbWidth        = Int32.TryParse(txtThumbWidth.Text, out parsed) ? parsed : 0,
                AutoLaunchCropper = chkAutoLaunchCropper.Checked,
                DataFormat        = (IRImagePickerDataFormat)Enum.Parse(typeof(IRImagePickerDataFormat), rdoDataFormat.SelectedValue)
            };

            // save the options as JSON
            SaveAsJson(options);
        }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="IRImagePickerData" /> class.
 /// </summary>
 /// <param name="DataType">Type of the data.</param>
 /// <param name="preValue">The pre value.</param>
 public IRImagePickerData(BaseDataType DataType,
                          IRImagePickerPreValue preValue)
     : base(DataType)
 {
     _preValue = preValue;
 }
示例#3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="IRImagePickerDataEditor"/> class.
 /// </summary>
 /// <param name="data">The data.</param>
 /// <param name="preValue">The pre value.</param>
 /// <param name="dtdId">The DTD id.</param>
 internal IRImagePickerDataEditor(IData data, IRImagePickerPreValue preValue, int dtdId)
 {
     _data     = data;
     _preValue = preValue;
     _dtdId    = dtdId;
 }