Example #1
0
        private void MostrarCaldrio()
        {
            if (this.ofrmCalendary != null)
            {
                return;     // salir!
            }
            this.ofrmCalendary = new frmCalendario();
            foreach (Control CTRL in this.ofrmCalendary.Controls)
            {
                if (CTRL is MonthCalendar)
                {
                    SetEventCalendar((MonthCalendar)CTRL);
                }
            }
            // Al cerrar calendario se pierde referencia -> this.ofrmCalendary = null;
            this.ofrmCalendary.FormClosing +=
                new System.Windows.Forms.FormClosingEventHandler(this.CerrarCaldrio);

            this.ofrmCalendary.Show();
        }
Example #2
0
 /*
  * Evento al presionar btOK de frmCalendario
  * */
 private void CerrarCaldrio(object sender, FormClosingEventArgs e)
 {
     this.ofrmCalendary = null;
 }