Exemple #1
0
        private void txtTime_Click(object sender, EventArgs e)
        {
            textBoxCurrent = sender as System.Windows.Forms.TextBox;

            if (textBoxCurrent.Equals(txtHour))
            {
                ucTimeSelector.Items = hours;
            }
            else if (textBoxCurrent.Equals(txtMinute))
            {
                ucTimeSelector.Items = minutes;
            }
            else if (textBoxCurrent.Equals(txtSecond))
            {
                ucTimeSelector.Items = seconds;
            }
            else
            {
                return;
            }
            popUpControl.Show(textBoxCurrent, false);
            textBoxCurrent.Focus();
            if (!string.IsNullOrEmpty(textBoxCurrent.Text))
            {
                ucTimeSelector.SelectedValue = int.Parse(textBoxCurrent.Text);
            }
        }
        private bool checkData(TextBox textBox, Label label)
        {
            label.Text = "";

            if (!textBox.Text.Equals(""))
            {
                if (textBox.Name.Equals("txtUsuarioModificarNombre") || textBox.Equals("txtUsuarioModificarContrasenia"))
                {
                    if (!Util.todasLetras(textBox.Text))
                    {
                        label.Text = "Valor Incorrecto";
                        return false;
                    }
                }
            }
            else
            {
                label.Text = "Vacio";

                return false;
            }

            return true;
        }
        private void txtTime_Click(object sender, EventArgs e)
        {
            textBoxCurrent = sender as System.Windows.Forms.TextBox;

            if (textBoxCurrent.Equals(txtHour))
            {
                ucTimeSelector.Items = hours;

            }
            else if (textBoxCurrent.Equals(txtMinute))
            {
                ucTimeSelector.Items = minutes;
            }
            else if (textBoxCurrent.Equals(txtSecond))
            {
                ucTimeSelector.Items = seconds;
            }
            else
            {
                return;
            }
            popUpControl.Show(textBoxCurrent, false);
            textBoxCurrent.Focus();
            if (!string.IsNullOrEmpty(textBoxCurrent.Text))
            {
                ucTimeSelector.SelectedValue = int.Parse(textBoxCurrent.Text);
            }
        }
Exemple #4
0
        private void TextBox_Click(object sender, EventArgs e)
        {
            m_cCurrentControl = (TextBox)sender;

            if (m_cCurrentControl.Equals(PasswordTextBox) || m_cCurrentControl.Equals(ConfirmPassTextBox)) m_bInPassBox = true;
            else m_bInPassBox = false;

            m_pCursorPosition = Cursor.Current.HotSpot;
            m_iSelectionIndex = m_cCurrentControl.SelectionStart;
        }