Actualizacion de aplicacion
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
<ApplicationIcon>EFC.ico</ApplicationIcon>
|
||||
<ErrorReport>send</ErrorReport>
|
||||
<Copyright>Aduanasoft©2025</Copyright>
|
||||
<FileVersion>26.2.1.1</FileVersion>
|
||||
<FileVersion>26.2.2.2</FileVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -18,6 +18,8 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="FontAwesome" Version="4.7.0" />
|
||||
<PackageReference Include="FontAwesome.Sharp" Version="6.6.0" />
|
||||
<PackageReference Include="Microsoft.Windows.Compatibility" Version="10.0.1" />
|
||||
<PackageReference Include="System.Data.SQLite" Version="1.0.119" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -222,6 +222,10 @@ namespace EFCDesk.Forms
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
SecureDataHandler.DeleteData();
|
||||
Globales.configJson = ConfiguracionJSON.LoadFromJson();
|
||||
Globales.configJson.UsuarioExp = null;
|
||||
Globales.configJson.PasswordExp = null;
|
||||
Globales.configJson.SaveToJson();
|
||||
Application.Restart();
|
||||
}
|
||||
|
||||
|
||||
78
Forms/Login.Designer.cs
generated
78
Forms/Login.Designer.cs
generated
@@ -33,13 +33,17 @@ namespace EFCDesk
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Login));
|
||||
pictureBox1 = new PictureBox();
|
||||
label2 = new Label();
|
||||
textBoxContrasenia = new TextBoxConPaste();
|
||||
buttonInicioSesion = new Button();
|
||||
label3 = new Label();
|
||||
buttonOpciones = new Button();
|
||||
label1 = new Label();
|
||||
txtUsuario = new TextBox();
|
||||
textBoxContrasenia = new TextBox();
|
||||
Ver = new FontAwesome.Sharp.IconPictureBox();
|
||||
iconUser = new FontAwesome.Sharp.IconPictureBox();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)Ver).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)iconUser).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// pictureBox1
|
||||
@@ -64,28 +68,16 @@ namespace EFCDesk
|
||||
label2.TabIndex = 3;
|
||||
label2.Text = "Contraseña:";
|
||||
//
|
||||
// textBoxContrasenia
|
||||
//
|
||||
textBoxContrasenia.Location = new Point(126, 104);
|
||||
textBoxContrasenia.Margin = new Padding(4);
|
||||
textBoxContrasenia.Name = "textBoxContrasenia";
|
||||
textBoxContrasenia.Size = new Size(247, 27);
|
||||
textBoxContrasenia.TabIndex = 4;
|
||||
textBoxContrasenia.TextAlign = HorizontalAlignment.Center;
|
||||
textBoxContrasenia.UseSystemPasswordChar = true;
|
||||
textBoxContrasenia.TextChanged += textBoxContrasenia_TextChanged;
|
||||
textBoxContrasenia.KeyDown += textBoxContrasenia_KeyDown;
|
||||
//
|
||||
// buttonInicioSesion
|
||||
//
|
||||
buttonInicioSesion.BackgroundImage = (Image)resources.GetObject("buttonInicioSesion.BackgroundImage");
|
||||
buttonInicioSesion.Cursor = Cursors.Hand;
|
||||
buttonInicioSesion.FlatStyle = FlatStyle.Flat;
|
||||
buttonInicioSesion.ForeColor = Color.White;
|
||||
buttonInicioSesion.Location = new Point(15, 150);
|
||||
buttonInicioSesion.Location = new Point(12, 150);
|
||||
buttonInicioSesion.Margin = new Padding(4);
|
||||
buttonInicioSesion.Name = "buttonInicioSesion";
|
||||
buttonInicioSesion.Size = new Size(357, 38);
|
||||
buttonInicioSesion.Size = new Size(385, 38);
|
||||
buttonInicioSesion.TabIndex = 5;
|
||||
buttonInicioSesion.Text = "Iniciar Sesión";
|
||||
buttonInicioSesion.UseVisualStyleBackColor = true;
|
||||
@@ -133,22 +125,66 @@ namespace EFCDesk
|
||||
//
|
||||
txtUsuario.Location = new Point(126, 39);
|
||||
txtUsuario.Name = "txtUsuario";
|
||||
txtUsuario.Size = new Size(247, 27);
|
||||
txtUsuario.Size = new Size(241, 27);
|
||||
txtUsuario.TabIndex = 9;
|
||||
txtUsuario.TextAlign = HorizontalAlignment.Center;
|
||||
//
|
||||
// textBoxContrasenia
|
||||
//
|
||||
textBoxContrasenia.Location = new Point(126, 101);
|
||||
textBoxContrasenia.Name = "textBoxContrasenia";
|
||||
textBoxContrasenia.Size = new Size(241, 27);
|
||||
textBoxContrasenia.TabIndex = 10;
|
||||
textBoxContrasenia.TextAlign = HorizontalAlignment.Center;
|
||||
textBoxContrasenia.UseSystemPasswordChar = true;
|
||||
textBoxContrasenia.KeyDown += textBoxContrasenia_KeyDown_1;
|
||||
//
|
||||
// Ver
|
||||
//
|
||||
Ver.BackColor = Color.White;
|
||||
Ver.ForeColor = Color.Black;
|
||||
Ver.IconChar = FontAwesome.Sharp.IconChar.Eye;
|
||||
Ver.IconColor = Color.Black;
|
||||
Ver.IconFont = FontAwesome.Sharp.IconFont.Solid;
|
||||
Ver.IconSize = 25;
|
||||
Ver.Location = new Point(373, 101);
|
||||
Ver.Name = "Ver";
|
||||
Ver.Size = new Size(25, 25);
|
||||
Ver.SizeMode = PictureBoxSizeMode.CenterImage;
|
||||
Ver.TabIndex = 11;
|
||||
Ver.TabStop = false;
|
||||
Ver.MouseLeave += Ver_MouseLeave;
|
||||
Ver.MouseHover += Ver_MouseHover;
|
||||
//
|
||||
// iconUser
|
||||
//
|
||||
iconUser.BackColor = Color.White;
|
||||
iconUser.ForeColor = Color.Black;
|
||||
iconUser.IconChar = FontAwesome.Sharp.IconChar.User;
|
||||
iconUser.IconColor = Color.Black;
|
||||
iconUser.IconFont = FontAwesome.Sharp.IconFont.Solid;
|
||||
iconUser.IconSize = 25;
|
||||
iconUser.Location = new Point(373, 39);
|
||||
iconUser.Name = "iconUser";
|
||||
iconUser.Size = new Size(25, 25);
|
||||
iconUser.SizeMode = PictureBoxSizeMode.CenterImage;
|
||||
iconUser.TabIndex = 12;
|
||||
iconUser.TabStop = false;
|
||||
//
|
||||
// Login
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(9F, 19F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
BackColor = Color.White;
|
||||
ClientSize = new Size(379, 226);
|
||||
ClientSize = new Size(410, 226);
|
||||
Controls.Add(iconUser);
|
||||
Controls.Add(Ver);
|
||||
Controls.Add(textBoxContrasenia);
|
||||
Controls.Add(txtUsuario);
|
||||
Controls.Add(label1);
|
||||
Controls.Add(buttonOpciones);
|
||||
Controls.Add(label3);
|
||||
Controls.Add(buttonInicioSesion);
|
||||
Controls.Add(textBoxContrasenia);
|
||||
Controls.Add(label2);
|
||||
Controls.Add(pictureBox1);
|
||||
Font = new Font("Century Gothic", 12F, FontStyle.Bold, GraphicsUnit.Point, 0);
|
||||
@@ -161,6 +197,8 @@ namespace EFCDesk
|
||||
Text = "Expediente Electrónico";
|
||||
Shown += Login_Shown;
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)Ver).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)iconUser).EndInit();
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
@@ -169,11 +207,13 @@ namespace EFCDesk
|
||||
|
||||
private PictureBox pictureBox1;
|
||||
private Label label2;
|
||||
private TextBoxConPaste textBoxContrasenia;
|
||||
private Button buttonInicioSesion;
|
||||
private Label label3;
|
||||
private Button buttonOpciones;
|
||||
private Label label1;
|
||||
private TextBox txtUsuario;
|
||||
private TextBox textBoxContrasenia;
|
||||
private FontAwesome.Sharp.IconPictureBox Ver;
|
||||
private FontAwesome.Sharp.IconPictureBox iconUser;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,6 +55,7 @@ namespace EFCDesk
|
||||
public Login()
|
||||
{
|
||||
InitializeComponent();
|
||||
Ver.IconChar = FontAwesome.Sharp.IconChar.EyeSlash;
|
||||
}
|
||||
|
||||
private void buttonOpciones_Click(object sender, EventArgs e)
|
||||
@@ -213,7 +214,7 @@ namespace EFCDesk
|
||||
|
||||
bool EsvalidoDatos = Utils.Util.StringsValidos(user, pass);
|
||||
|
||||
if(!EsvalidoDatos)
|
||||
if (!EsvalidoDatos)
|
||||
{
|
||||
MessageBox.Show("Debe ingresar el usuario y contrase<73>a", "Informaci<63>n", MessageBoxButtons.OK);
|
||||
return;
|
||||
@@ -246,7 +247,7 @@ namespace EFCDesk
|
||||
MessageBox.Show("No se ha configurado el usuario o contrase<73>a de expediente electronico", "Informaci<63>n", MessageBoxButtons.OK);
|
||||
return;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
textBoxContrasenia.Text = configJson.PasswordExp ?? String.Empty;
|
||||
}
|
||||
@@ -262,7 +263,7 @@ namespace EFCDesk
|
||||
|
||||
bool EsLoginValido = await Utils.Util.Login(txtUsuario.Text, textBoxContrasenia.Text);
|
||||
|
||||
if (!EsLoginValido)
|
||||
if (!EsLoginValido)
|
||||
{
|
||||
MessageBox.Show("No se pudo hacer login.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
@@ -276,7 +277,7 @@ namespace EFCDesk
|
||||
|
||||
//SecureDataHandler.SaveData(textBoxContrasenia.Text);
|
||||
//textBoxContrasenia.Text = string.Empty;
|
||||
|
||||
|
||||
this.Hide();
|
||||
FormMain Main = new FormMain(Globales.gMonitor);
|
||||
Main.Show();
|
||||
@@ -317,5 +318,56 @@ namespace EFCDesk
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void textBoxContrasenia_KeyDown_1(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Enter)
|
||||
{
|
||||
//buttonInicioSesion_Click(this, new EventArgs());
|
||||
buttonInicioSesion.PerformClick();
|
||||
}
|
||||
}
|
||||
|
||||
private void iconbtnVerContrasenia_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void iconbtnVerContrasenia_MouseHover(object sender, EventArgs e)
|
||||
{
|
||||
textBoxContrasenia.UseSystemPasswordChar = !textBoxContrasenia.UseSystemPasswordChar;
|
||||
}
|
||||
|
||||
private void iconPictureBox1_MouseHover(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void iconPictureBox1_MouseLeave(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void iconPicVer_MouseHover(object sender, EventArgs e)
|
||||
{
|
||||
textBoxContrasenia.UseSystemPasswordChar = true;
|
||||
}
|
||||
|
||||
private void iconPicVer_MouseLeave(object sender, EventArgs e)
|
||||
{
|
||||
textBoxContrasenia.UseSystemPasswordChar = false;
|
||||
}
|
||||
|
||||
private void Ver_MouseHover(object sender, EventArgs e)
|
||||
{
|
||||
textBoxContrasenia.UseSystemPasswordChar = false;
|
||||
Ver.IconChar = FontAwesome.Sharp.IconChar.Eye;
|
||||
}
|
||||
|
||||
private void Ver_MouseLeave(object sender, EventArgs e)
|
||||
{
|
||||
textBoxContrasenia.UseSystemPasswordChar = true;
|
||||
Ver.IconChar = FontAwesome.Sharp.IconChar.EyeSlash;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user