Ejemplo n.º 1
0
        protected void updatePositions()
        {
            this.SuspendLayout();
            this.Controls.Clear();
            _bOk.Location    = new Point(this.ClientRectangle.Width - ((128 + 16) * 2) - _hMargin * 2, _waBottom + (_vHeaderSize - _bOk.Height) / 2);
            _bClear.Location = new Point(this.ClientRectangle.Width - ((128 + 16) * 1) - _hMargin * 2, _waBottom + (_vHeaderSize - _bClear.Height) / 2);

            if (_paramControls.Count != 0)
            {
                for (int i = 0; i < _paramControls.Count; i++)
                {
                    int xPos = UsedColumnCount == 0 ? 0 : i % UsedColumnCount;
                    int yPos = UsedColumnCount == 0 ? 0 : i / UsedColumnCount;

                    CRSParameterBox iCtl = _paramControls[i];

                    iCtl.Location = new Point(
                        _hMargin * 2 + xPos * (columnWidth + _hMargin),
                        _waTop + _vMargin + yPos * _fieldHeight
                        );
                    iCtl.Size = new Size(
                        columnWidth - _vMargin * 2,
                        24
                        );

                    iCtl.Parent = this;
                }
            }


            this.Controls.Add(_bOk);
            this.Controls.Add(_bClear);
        }
Ejemplo n.º 2
0
        protected void updateParamFields()
        {
            if (_paramControls == null)
            {
                _paramControls = new List <CRSParameterBox>();
            }
            else
            {
                _paramControls.Clear();
            }

            foreach (ParameterField iParam in _paramFields)
            {
                CRSParameterBox lnParamBox = new CRSParameterBox(iParam);

                lnParamBox.Caption = iParam.PromptText;
                //lnParamBox.Text = iParam.DefaultValues[0].ToString();
                lnParamBox.EditFont = RsViewEngine.EditFont;

                _paramControls.Add(lnParamBox);
            }

            updatePositions();
        }