Actualizacion de aplicacion

This commit is contained in:
2026-02-16 09:49:20 -07:00
parent 7cca957e1a
commit dcfd606a1c
4 changed files with 122 additions and 24 deletions

View File

@@ -10,7 +10,7 @@
<ApplicationIcon>EFC.ico</ApplicationIcon> <ApplicationIcon>EFC.ico</ApplicationIcon>
<ErrorReport>send</ErrorReport> <ErrorReport>send</ErrorReport>
<Copyright>Aduanasoft©2025</Copyright> <Copyright>Aduanasoft©2025</Copyright>
<FileVersion>26.2.1.1</FileVersion> <FileVersion>26.2.2.2</FileVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@@ -18,6 +18,8 @@
</ItemGroup> </ItemGroup>
<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="Microsoft.Windows.Compatibility" Version="10.0.1" />
<PackageReference Include="System.Data.SQLite" Version="1.0.119" /> <PackageReference Include="System.Data.SQLite" Version="1.0.119" />
</ItemGroup> </ItemGroup>

View File

@@ -222,6 +222,10 @@ namespace EFCDesk.Forms
private void button1_Click(object sender, EventArgs e) private void button1_Click(object sender, EventArgs e)
{ {
SecureDataHandler.DeleteData(); SecureDataHandler.DeleteData();
Globales.configJson = ConfiguracionJSON.LoadFromJson();
Globales.configJson.UsuarioExp = null;
Globales.configJson.PasswordExp = null;
Globales.configJson.SaveToJson();
Application.Restart(); Application.Restart();
} }

View File

@@ -33,13 +33,17 @@ namespace EFCDesk
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Login)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Login));
pictureBox1 = new PictureBox(); pictureBox1 = new PictureBox();
label2 = new Label(); label2 = new Label();
textBoxContrasenia = new TextBoxConPaste();
buttonInicioSesion = new Button(); buttonInicioSesion = new Button();
label3 = new Label(); label3 = new Label();
buttonOpciones = new Button(); buttonOpciones = new Button();
label1 = new Label(); label1 = new Label();
txtUsuario = new TextBox(); txtUsuario = new TextBox();
textBoxContrasenia = new TextBox();
Ver = new FontAwesome.Sharp.IconPictureBox();
iconUser = new FontAwesome.Sharp.IconPictureBox();
((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit(); ((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit();
((System.ComponentModel.ISupportInitialize)Ver).BeginInit();
((System.ComponentModel.ISupportInitialize)iconUser).BeginInit();
SuspendLayout(); SuspendLayout();
// //
// pictureBox1 // pictureBox1
@@ -64,28 +68,16 @@ namespace EFCDesk
label2.TabIndex = 3; label2.TabIndex = 3;
label2.Text = "Contraseña:"; 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
// //
buttonInicioSesion.BackgroundImage = (Image)resources.GetObject("buttonInicioSesion.BackgroundImage"); buttonInicioSesion.BackgroundImage = (Image)resources.GetObject("buttonInicioSesion.BackgroundImage");
buttonInicioSesion.Cursor = Cursors.Hand; buttonInicioSesion.Cursor = Cursors.Hand;
buttonInicioSesion.FlatStyle = FlatStyle.Flat; buttonInicioSesion.FlatStyle = FlatStyle.Flat;
buttonInicioSesion.ForeColor = Color.White; buttonInicioSesion.ForeColor = Color.White;
buttonInicioSesion.Location = new Point(15, 150); buttonInicioSesion.Location = new Point(12, 150);
buttonInicioSesion.Margin = new Padding(4); buttonInicioSesion.Margin = new Padding(4);
buttonInicioSesion.Name = "buttonInicioSesion"; buttonInicioSesion.Name = "buttonInicioSesion";
buttonInicioSesion.Size = new Size(357, 38); buttonInicioSesion.Size = new Size(385, 38);
buttonInicioSesion.TabIndex = 5; buttonInicioSesion.TabIndex = 5;
buttonInicioSesion.Text = "Iniciar Sesión"; buttonInicioSesion.Text = "Iniciar Sesión";
buttonInicioSesion.UseVisualStyleBackColor = true; buttonInicioSesion.UseVisualStyleBackColor = true;
@@ -133,22 +125,66 @@ namespace EFCDesk
// //
txtUsuario.Location = new Point(126, 39); txtUsuario.Location = new Point(126, 39);
txtUsuario.Name = "txtUsuario"; txtUsuario.Name = "txtUsuario";
txtUsuario.Size = new Size(247, 27); txtUsuario.Size = new Size(241, 27);
txtUsuario.TabIndex = 9; txtUsuario.TabIndex = 9;
txtUsuario.TextAlign = HorizontalAlignment.Center; 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 // Login
// //
AutoScaleDimensions = new SizeF(9F, 19F); AutoScaleDimensions = new SizeF(9F, 19F);
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
BackColor = Color.White; 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(txtUsuario);
Controls.Add(label1); Controls.Add(label1);
Controls.Add(buttonOpciones); Controls.Add(buttonOpciones);
Controls.Add(label3); Controls.Add(label3);
Controls.Add(buttonInicioSesion); Controls.Add(buttonInicioSesion);
Controls.Add(textBoxContrasenia);
Controls.Add(label2); Controls.Add(label2);
Controls.Add(pictureBox1); Controls.Add(pictureBox1);
Font = new Font("Century Gothic", 12F, FontStyle.Bold, GraphicsUnit.Point, 0); Font = new Font("Century Gothic", 12F, FontStyle.Bold, GraphicsUnit.Point, 0);
@@ -161,6 +197,8 @@ namespace EFCDesk
Text = "Expediente Electrónico"; Text = "Expediente Electrónico";
Shown += Login_Shown; Shown += Login_Shown;
((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit(); ((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit();
((System.ComponentModel.ISupportInitialize)Ver).EndInit();
((System.ComponentModel.ISupportInitialize)iconUser).EndInit();
ResumeLayout(false); ResumeLayout(false);
PerformLayout(); PerformLayout();
} }
@@ -169,11 +207,13 @@ namespace EFCDesk
private PictureBox pictureBox1; private PictureBox pictureBox1;
private Label label2; private Label label2;
private TextBoxConPaste textBoxContrasenia;
private Button buttonInicioSesion; private Button buttonInicioSesion;
private Label label3; private Label label3;
private Button buttonOpciones; private Button buttonOpciones;
private Label label1; private Label label1;
private TextBox txtUsuario; private TextBox txtUsuario;
private TextBox textBoxContrasenia;
private FontAwesome.Sharp.IconPictureBox Ver;
private FontAwesome.Sharp.IconPictureBox iconUser;
} }
} }

View File

@@ -55,6 +55,7 @@ namespace EFCDesk
public Login() public Login()
{ {
InitializeComponent(); InitializeComponent();
Ver.IconChar = FontAwesome.Sharp.IconChar.EyeSlash;
} }
private void buttonOpciones_Click(object sender, EventArgs e) private void buttonOpciones_Click(object sender, EventArgs e)
@@ -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;
}
} }
} }