diff --git a/LectorVerdnatura/frmPrincipal.cs b/LectorVerdnatura/frmPrincipal.cs index 08f0e46..9e561c9 100644 --- a/LectorVerdnatura/frmPrincipal.cs +++ b/LectorVerdnatura/frmPrincipal.cs @@ -96,7 +96,10 @@ namespace LectorVerdnatura private void frmPrincipal_FormClosing(object sender, FormClosingEventArgs e) { - Application.Exit(); + DialogResult respuesta = MessageBox.Show("La aplicacion debe estar en marcha para recoger los fichajes!" + Environment.NewLine + "¿ Esta seguro de que desea cerrar la aplicacion ?", "Confirmacion", MessageBoxButtons.YesNo); + if (respuesta == DialogResult.No) + e.Cancel = true; + //e.Cancel = true; //this.WindowState = FormWindowState.Minimized; //frmPrincipal_Resize(this, null);