private void MakeTextBoxVisible(Mobilize.Web.TextBox txtBox, Mobilize.Web.VBUC.FlexGrid grid)
 {
     txtBox.Text = Convert.ToString(grid[grid.CurrentRowIndex, grid.CurrentColumnIndex].Value);
     // txtBox.Move .CellLeft + .Left, .CellTop + .Top, .CellWidth, .CellHeight
     txtBox.Visible = true;
     txtBox.Enabled = true;
     // DoEvents
     txtBox.Focus();
     modFunctions.SelectAll(txtBox);
 }
Beispiel #2
0
        private void MakeTextBoxVisible(Mobilize.Web.TextBox txtBox, Mobilize.Web.VBUC.FlexGrid grid)
        {
            if (grid.CurrentRowIndex < 0 || grid.CurrentColumnIndex < 0)
            {
                return;
            }
            txtBox.Text    = Convert.ToString(grid[grid.CurrentRowIndex, grid.CurrentColumnIndex].Value);
            txtBox.Enabled = true;

            txtBox.Focus();
            Stub._System.Windows.Forms.Application.DoEvents();
            editingQuantity = true;
        }
        private void txtEntry_KeyDown(object eventSender, Mobilize.Web.KeyEventArgs eventArgs)
        {
            int KeyCode = (int)eventArgs.KeyCode;
            int Shift   = ((int)eventArgs.KeyData) / 65536;

            try
            {
                Mobilize.Web.TextBox tempRefParam = txtEntry;
                EditKeyCode(fgProducts, Mobilize.Web.ReferenceExtensions.Ref(() => tempRefParam), KeyCode, Shift);
                txtEntry = tempRefParam;
            }
            finally
            {
                eventArgs.Handled = KeyCode == 0;
            }
        }
Beispiel #4
0
        public void ExitTextBox(Mobilize.Web.TextBox txt)
        {
            string contents = txt.Text;
            int    newValue = 0;

            try
            {
                newValue = Convert.ToInt32(Double.Parse(contents));
                txt.Text = newValue.ToString();
                UpdateTotals();
            }
            catch
            {
                txt.Text = "0";
                UpdateTotals();
            }
        }
Beispiel #5
0
        internal static bool ValidateTextBoxDouble(Mobilize.Web.TextBox txBox, Mobilize.Web.Form parentForm)
        {
            bool result = false;

            try
            {
                DoubleValue(txBox.Text);
                return(true);
            }
            catch
            {
                modMain.LogStatus("The value inserted is not valid", parentForm);
                txBox.Text = "";
                txBox.Focus();
                result = false;
            }
            return(result);
        }
Beispiel #6
0
        internal static bool TextBoxNumberEmpty(Mobilize.Web.TextBox textbox)
        {
            //if the input is not a numeric then true
            bool result = false;

            if (!Stub._Microsoft.VisualBasic.Information.IsNumeric(textbox.Text))
            {
                result = true;
                Mobilize.Web.MessageBox.Show("The field requires a numeric value.", System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).ProductName, Mobilize.Web.MessageBoxButtons.OK, Mobilize.Web.MessageBoxIcon.Exclamation);
                textbox.Focus();
                SelectAll(textbox);
            }
            else
            {
                result = false;
            }
            return(result);
        }
Beispiel #7
0
        internal static bool TextBoxNumberEmpty(Mobilize.Web.TextBox textbox)
        {
            // if the input is not a numeric then true
            bool result = false;

            if (!Mobilize.Web.Information.IsNumeric(textbox.Text))
            {
                result = true;
                Mobilize.Web.MessageBox.Show("The field requires a numeric value.", AssemblyHelper.GetTitle(System.Reflection.Assembly.GetExecutingAssembly()), Mobilize.Web.MessageBoxButtons.OK, Mobilize.Web.MessageBoxIcon.Exclamation);
                textbox.Focus();
                SelectAll(textbox);
            }
            else
            {
                result = false;
            }

            return(result);
        }
Beispiel #8
0
        internal static bool TextBoxEmpty(Mobilize.Web.TextBox stext, object TabObject = null, int TabIndex = 0)
        {
            //UPGRADE_WARNING: (2080) IsEmpty was upgraded to a comparison and has a new behavior. More Information: https://www.mobilize.net/vbtonet/ewis/ewi2080
            bool result = false;

            if (String.IsNullOrEmpty(stext.Text.Trim()) || stext.Text == "  /  /    ")
            {
                result = true;
                Mobilize.Web.MessageBox.Show("You need to fill in all required fields", System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).ProductName, Mobilize.Web.MessageBoxButtons.OK, Mobilize.Web.MessageBoxIcon.Exclamation);
                //UPGRADE_WARNING: (2080) IsEmpty was upgraded to a comparison and has a new behavior. More Information: https://www.mobilize.net/vbtonet/ewis/ewi2080
                if (!TabIndex.Equals(0))
                {
                    //TabObject.SelectedItem = TabObject.Tabs(TabIndex)
                }
                stext.Focus();
            }
            else
            {
                result = false;
            }
            return(result);
        }
Beispiel #9
0
 internal static void SelectAll(Mobilize.Web.TextBox txtBox)
 {
     txtBox.SelectionStart  = 0;
     txtBox.SelectionLength = Strings.Len(txtBox.Text);
 }
Beispiel #10
0
 internal static void SelectAll(Mobilize.Web.TextBox txtBox)
 {
     txtBox.SelectionStart  = 0;
     txtBox.SelectionLength = txtBox?.Text?.Length ?? 0;
 }
Beispiel #11
0
 private void Highlight(Mobilize.Web.TextBox X)
 {
     ClearHighlight();
     X.BackColor   = Color.Yellow;
     m_LastTextBox = X;
 }