private void HabilitaBotones() { // Habilita los botones. try { // CmdAceptar.Enabled = false; // // Si los contenidos de los campos son diferentes a los textos originales. if (ObjPr_InfoBD.getUserApp_PWD().Length == 0) { if (TxtClave1.Text != stPr_Clave1_Ori && TxtClave2.Text != stPr_Clave2_Ori) { if (TxtClave1.Text.Length > 0 && TxtClave2.Text.Length > 0) { CmdAceptar.Enabled = true; } } } else { if (TxtClave.Text != stPr_Clave_Ori && TxtClave1.Text != stPr_Clave1_Ori && TxtClave2.Text != stPr_Clave2_Ori) { if (TxtClave.Text.Length > 0 && TxtClave1.Text.Length > 0 && TxtClave2.Text.Length > 0) { CmdAceptar.Enabled = true; } } } // } catch (System.AccessViolationException ex_0) { CLNBTN_Lg objL_Log = new CLNBTN_Lg(_st_User, _st_FileLog, _bl_OutLineConsole, _bl_OutFileLog, _bl_OutWindow); objL_Log.WriteOutErrorMessage(_st_Relac, _st_RelacSon, "FrmChgPwd(1). System.AccessViolationException", "", ex_0.Message.ToString()); } catch (Exception ex) { CLNBTN_Lg objL_Log = new CLNBTN_Lg(_st_User, _st_FileLog, _bl_OutLineConsole, _bl_OutFileLog, _bl_OutWindow); objL_Log.WriteOutErrorMessage(_st_Relac, _st_RelacSon, "FrmChgPwd(1). Exception", "", ex.Message.ToString()); } }
public void GetParam(String LicName, String WinTittle, String UserName, String LogFile, String ConfFile, String AppInfo_Name, String AppInfo_Ver, String AppInfo_Cia, ref CLNBTN_IQy Obj_BaseDeDatos) { // Toma los parametros. String stL_Aux = ""; try { CLNBTN_Gp ObL_Lic = new CLNBTN_Gp(LicName); _st_Lic = ObL_Lic.getLicName(); if (_st_Lic.Length == 0) { MessageBox.Show("Invalid Lic To work"); } // Guarda textos originales. stPr_Clave_Ori = TxtClave.Text; stPr_Clave1_Ori = TxtClave1.Text; stPr_Clave2_Ori = TxtClave2.Text; // inPr_NumIntentos = 0; LblMensaje.Text = ""; // this.Text = WinTittle; _st_User = UserName; _st_FileLog = LogFile; stPr_ArchivoConfigApp = ConfFile; // stPr_Nombre_App = AppInfo_Name; stPr_Version_App = AppInfo_Ver; stPr_NombreEmpresa_App = AppInfo_Cia; // Coloca aplicacion y version this.LblModuloVersion.Text = stPr_Nombre_App + " " + stPr_Version_App; this.LblNombreCia.Text = stPr_NombreEmpresa_App; // // Crea instancia para la clase que maneja las configuraciones ObjPr_Conf = new CLNBTN_Cg(stPr_ArchivoConfigApp, _st_User, _st_FileLog, _st_Lic); // ObjPr_Utils = new CLNBTN_Ul(_st_User, _st_FileLog, _st_Lic); // // Lee el esquema de color stL_Aux = ""; stL_Aux = ObjPr_Conf.ReadAKeyFromSection(SECCION_ID_APP, "Color"); if (stL_Aux.Length == 0) { stL_Aux = "0"; } // La informacion de la base de datos para manejar la conexion con la base de datos. ObjPr_InfoBD = new CLNBTN_IQy(_st_Lic); ObjPr_InfoBD = Obj_BaseDeDatos; // if (ObjPr_InfoBD.getUserApp_PWD().Length == 0) { GrpClave.Visible = false; } // HabilitaBotones(); CmdCancelar.Enabled = true; // } catch (System.AccessViolationException ex_0) { CmdCancelar.Enabled = true; CLNBTN_Lg objL_Log = new CLNBTN_Lg(_st_User, _st_FileLog, _bl_OutLineConsole, _bl_OutFileLog, _bl_OutWindow); objL_Log.WriteOutErrorMessage(_st_Relac, _st_RelacSon, "GetParam. System.AccessViolationException", "", ex_0.Message.ToString()); } catch (Exception ex) { CmdCancelar.Enabled = true; CLNBTN_Lg objL_Log = new CLNBTN_Lg(_st_User, _st_FileLog, _bl_OutLineConsole, _bl_OutFileLog, _bl_OutWindow); objL_Log.WriteOutErrorMessage(_st_Relac, _st_RelacSon, "GetParam. Exception", "", ex.Message.ToString()); } }