Exemple #1
0
        public FieldProperties(string name, ProcessingFieldType type, LogicalRectangle bounds, bool enableIcr, bool enableOcr, bool isNumerical, bool isICRSupported)
        {
            InitializeComponent();

            this.Text = "\"" + name + "\"" + " Properties";

            if (type == ProcessingFieldType.Text)
            {
                _methodGroup.Enabled  = true;
                _typeGroup.Enabled    = true;
                _enableOcr            = enableOcr;
                _chkEnableOcr.Checked = enableOcr;

                _enableIcr            = enableIcr;
                _chkEnableIcr.Checked = enableIcr && isICRSupported;

                _isNumerical = isNumerical;
                _radioTextNumerical.Checked = isNumerical;
                _radioTextCharacter.Checked = !isNumerical;
            }
            else
            {
                _methodGroup.Enabled = false;
                _typeGroup.Enabled   = false;

                _enableOcr            = true;
                _chkEnableOcr.Checked = true;

                _enableIcr            = false;
                _chkEnableIcr.Checked = false;

                _isNumerical = false;
                _radioTextNumerical.Checked = false;
                _radioTextCharacter.Checked = true;
            }

            _chkEnableIcr.Enabled = isICRSupported;

            _name         = name;
            _txtName.Text = name;

            _type         = type;
            _cmbType.Text = type.ToString();

            _left         = bounds.Left;
            _txtLeft.Text = bounds.Left.ToString();

            _top         = bounds.Top;
            _txtTop.Text = bounds.Top.ToString();

            _width         = bounds.Width;
            _txtWidth.Text = bounds.Width.ToString();

            _height         = bounds.Height;
            _txtHeight.Text = bounds.Height.ToString();
        }
Exemple #2
0
 private void _btnCancel_Click(object sender, EventArgs e)
 {
     _chkEnableIcr.Checked       = _enableIcr;
     _chkEnableOcr.Checked       = _enableOcr;
     _radioTextNumerical.Checked = _isNumerical;
     _radioTextCharacter.Checked = !_isNumerical;
     _txtName.Text   = _name;
     _cmbType.Text   = _type.ToString();
     _txtLeft.Text   = _left.ToString();
     _txtTop.Text    = _top.ToString();
     _txtWidth.Text  = _width.ToString();
     _txtHeight.Text = _height.ToString();
     DialogResult    = DialogResult.Cancel;
 }