void monCal_monCalControlHandler(object sender, MonCalEventArgs e) { maskedTextBox1.Text = e.SelectedDate; value = DateTime.Parse(maskedTextBox1.Text); this.Controls.Remove(monCal); monCal = null; panel.Width = defaultWidth; panel.Height = defaultHeight; }
private void monthCalendar1_DateChanged(object sender, DateRangeEventArgs e) { seleccionarDias(horario); monCal = new MonCal(e.Start, hlDates, horario); monCal.MaxSelectionCount = 1; monCal.monCalControlHandler += new MonCal.MonCalControlHandler(monCal_monCalControlHandler); monCal.DateChanged += new System.Windows.Forms.DateRangeEventHandler(this.monthCalendar1_DateChanged); monCal.Location = new Point(0, 20); }
void DropButton_Click(object sender, EventArgs e) { monCal = new MonCal(DateTime.Today,hlDates,horario); monCal.MaxSelectionCount = 1; monCal.monCalControlHandler += new MonCal.MonCalControlHandler(monCal_monCalControlHandler); monCal.DateChanged += new System.Windows.Forms.DateRangeEventHandler(this.monthCalendar1_DateChanged); monCal.Location = new Point(0, 20); this.Controls.Add(monCal); this.panel.Height = this.Height; this.panel.Width = this.Width; }