Esempio n. 1
0
        public void handleAddRowCol_Result(object sender, EventArgs e)
        {
            _addRowsCols.Visible = false;
            _addRowsCols.Hide();
            addRowsColumnsResult result = _addRowsCols.Result;

            if (result.ResultOK)
            {
                if (result.LeftColumns > 0)
                {
                    this.blockView.addNColumnToLeft(result.LeftColumns);
                }
                if (result.RightColumns > 0)
                {
                    this.blockView.addNColumnToRight(result.RightColumns);
                }
                if (result.BottomRows > 0)
                {
                    this.blockView.addNRowToBottom(result.BottomRows);
                }
                if (result.TopRows > 0)
                {
                    this.blockView.addNRowToTop(result.TopRows);
                }
            }
        }
Esempio n. 2
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            if ((this.tbBottom.Text.Trim() == String.Empty || this.tbBottom.Text.Trim() == "0") &&
                (this.tbTop.Text.Trim() == String.Empty || this.tbTop.Text.Trim() == "0") &&
                (this.tbLeft.Text.Trim() == String.Empty || this.tbLeft.Text.Trim() == "0") &&
                (this.tbRight.Text.Trim() == String.Empty || this.tbRight.Text.Trim() == "0"))
            {
                this.Result = new addRowsColumnsResult();
            }
            else
            {
                int bottomResult;
                int topResult;
                int leftResult;
                int rightResult;

                if ((int.TryParse(tbBottom.Text.Trim(), out bottomResult)) &&
                    (int.TryParse(tbTop.Text.Trim(), out topResult)) &&
                    (int.TryParse(tbLeft.Text.Trim(), out leftResult)) &&
                    (int.TryParse(tbRight.Text.Trim(), out rightResult)))
                {
                    if (bottomResult > 0 || topResult > 0 || leftResult > 0 || rightResult > 0)
                    {
                        Result = new addRowsColumnsResult(topResult, bottomResult, leftResult, rightResult);
                    }
                    else
                    {
                        Result = new addRowsColumnsResult();
                    }
                }
                else
                {
                    Result = new addRowsColumnsResult();
                }
            }
        }
        private void btnOK_Click(object sender, EventArgs e)
        {
            if ((this.tbBottom.Text.Trim() == String.Empty || this.tbBottom.Text.Trim() == "0")
                && (this.tbTop.Text.Trim() == String.Empty || this.tbTop.Text.Trim() == "0")
                && (this.tbLeft.Text.Trim() == String.Empty || this.tbLeft.Text.Trim() == "0")
                && (this.tbRight.Text.Trim() == String.Empty || this.tbRight.Text.Trim() == "0"))
            {
                this.Result = new addRowsColumnsResult();
            }
            else
            {
                int bottomResult;
                int topResult;
                int leftResult;
                int rightResult;

                if ((int.TryParse(tbBottom.Text.Trim(), out bottomResult))
                && (int.TryParse(tbTop.Text.Trim(), out topResult))
                && (int.TryParse(tbLeft.Text.Trim(), out leftResult))
                && (int.TryParse(tbRight.Text.Trim(), out rightResult)))
                {
                    if (bottomResult > 0 || topResult > 0 || leftResult > 0 || rightResult > 0)
                    {
                        Result = new addRowsColumnsResult(topResult, bottomResult, leftResult, rightResult);
                    }
                    else
                    {
                        Result = new addRowsColumnsResult();
                    }
                }
                else
                {
                    Result = new addRowsColumnsResult();
                }
            }
        }
Esempio n. 4
0
 private void btnCancel_Click(object sender, EventArgs e)
 {
     Result = new addRowsColumnsResult();
 }
Esempio n. 5
0
 public frmAddRowsCols()
 {
     InitializeComponent();
     Result = null;
 }
 private void btnCancel_Click(object sender, EventArgs e)
 {
     Result = new addRowsColumnsResult();
 }
 public frmAddRowsCols()
 {
     InitializeComponent();
     Result = null;
 }