From 1c814a06326a2a5672dbba04327362358c36ed33 Mon Sep 17 00:00:00 2001 From: Ernesto Abarca Ortiz Date: Mon, 10 Dec 2018 14:34:56 +0100 Subject: [PATCH] =?UTF-8?q?Peque=C3=B1os=20cambios:=20mas=20y=20mejor=20lo?= =?UTF-8?q?gging?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LectorVerdnatura/frmPrincipal.Designer.cs | 2 +- LectorVerdnatura/frmPrincipal.cs | 8 ++++++-- LectorVerdnatura/sdklector.cs | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/LectorVerdnatura/frmPrincipal.Designer.cs b/LectorVerdnatura/frmPrincipal.Designer.cs index 0dc3ee5..0d4d752 100644 --- a/LectorVerdnatura/frmPrincipal.Designer.cs +++ b/LectorVerdnatura/frmPrincipal.Designer.cs @@ -248,7 +248,7 @@ namespace LectorVerdnatura this.txtMaxRegistros.Name = "txtMaxRegistros"; this.txtMaxRegistros.Size = new System.Drawing.Size(45, 20); this.txtMaxRegistros.TabIndex = 10; - this.txtMaxRegistros.Text = "300"; + this.txtMaxRegistros.Text = "1000"; this.txtMaxRegistros.Leave += new System.EventHandler(this.txtMaxRegistros_Leave); // // frmPrincipal diff --git a/LectorVerdnatura/frmPrincipal.cs b/LectorVerdnatura/frmPrincipal.cs index ec4551e..19c395e 100644 --- a/LectorVerdnatura/frmPrincipal.cs +++ b/LectorVerdnatura/frmPrincipal.cs @@ -115,7 +115,7 @@ namespace LectorVerdnatura private void frmPrincipal_FormClosing(object sender, FormClosingEventArgs e) { - if (! systemShutdown) + if (!systemShutdown) { // Reset the variable because the user might cancel the shutdown. systemShutdown = false; @@ -123,8 +123,12 @@ namespace LectorVerdnatura 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; + else + logevent.logeventwritefile("AVISO: FormClosing() ejecutado y el usuario confirmo el cierre: CERRANDO APLICACION...."); + } + else { + logevent.logeventwritefile("AVISO: FormClosing() ejecutado y apagado del sistema detectado: CERRANDO APLICACION...."); } - //e.Cancel = true; //this.WindowState = FormWindowState.Minimized; diff --git a/LectorVerdnatura/sdklector.cs b/LectorVerdnatura/sdklector.cs index 85a2144..c8bba15 100644 --- a/LectorVerdnatura/sdklector.cs +++ b/LectorVerdnatura/sdklector.cs @@ -83,7 +83,7 @@ namespace LectorVerdnatura out idwInOutMode, out idwYear, out idwMonth, out idwDay, out idwHour, out idwMinute, out idwSecond, ref idwWorkcode)) { String FechaRegistro = idwYear.ToString() + "-" + String.Format("{0:0#}", idwMonth) + "-" + String.Format("{0:0#}", idwDay) + " " + String.Format("{0:0#}", idwHour) + ":" + String.Format("{0:0#}", idwMinute) + ":" + String.Format("{0:0#}", idwSecond); - nuevoregistro = "Registro --> " + sdwEnrollNumber + " --> WH: " + warehouseFk.ToString() + " --> " + FechaRegistro; + nuevoregistro = "Registro --> NIS=" + sdwEnrollNumber + " --> WH: " + warehouseFk.ToString() + " --> " + FechaRegistro; DateTime fecha = DateTime.Parse(FechaRegistro);