Example #1
0
        private void _edNumberOfColumns_Validating(object sender, System.ComponentModel.CancelEventArgs e)
        {
            int val;

            if (!GUIConversion.IsInteger(this._edNumberOfColumns.Text, out val))
            {
                e.Cancel = true;
                return;
            }

            if (_controller != null)
            {
                e.Cancel |= _controller.EhNumberOfColumnsChanged(val);
            }
        }
        public bool EhNumberOfRowsChanged(string val)
        {
            int v;

            if (!GUIConversion.IsInteger(val, out v))
            {
                Current.Gui.ErrorMessageBox("You have to provide an integer value here");
                return(true);
            }
            if (v < 1)
            {
                Current.Gui.ErrorMessageBox("Please provide a value >0 here");
                return(true);
            }
            _tempDoc.NumberOfRows = v;
            SetEnableConditions();
            return(false);
        }