Exemplo n.º 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);
            }
        }
Exemplo n.º 2
0
        private void btnPopUp_Click(object sender, EventArgs e)
        {
            popUpControl.Show(this);
            //if (ud == null)
            //{
            //    ud = new UCDataSelector();
            //    ud.OnDateSelected += new DateRangeEventHandler(ud_OnDateSelected);
            //    this.Parent.Controls.Add(ud);
            //    ud.Visible = false;
            //}

            //if (!ud.Visible)
            //{
            //    ud.Left = this.Left;
            //    ud.Top = this.Top + this.Height - 1;
            //    ud.Show();
            //    ud.BringToFront();
            //}
            //else
            //{
            //    ud.Hide();
            //}
        }