Taller Solucion

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Danilo Esteban Martinez Perdomo

1000254053

Demartinezpeåacademia.usbbog.edu.co
24/2/2023

Diseño:

Codigo:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Salariominimo
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void label1_Click(object sender, EventArgs e)


{

}
private void label1_Click_1(object sender, EventArgs e)
{

private void label2_Click(object sender, EventArgs e)


{

private void label4_Click(object sender, EventArgs e)


{

private void button2_Click(object sender, EventArgs e)


{
if(MessageBox.Show("Desea
Salir","Salir",MessageBoxButtons.YesNo,MessageBoxIcon.Exclamation,MessageBoxDefaultButton.Button1)
==System.Windows.Forms.DialogResult.Yes)
{
this.Close();
}
else
{
textBox1.Focus();
}
}

private void button1_Click(object sender, EventArgs e)


{
int Salario;
int Valorhora;
int Valordia;
float totalpagar;

Salario = int.Parse(textBox1.Text);
Valordia = int.Parse(textBox2.Text);

Valorhora = (Salario / 30 / 8);

totalpagar = (Valordia * Valorhora + Salario);

label4.Text = ("$" + totalpagar.ToString());


}

private void button3_Click(object sender, EventArgs e)


{
textBox1.Clear();
textBox2.Clear();
label4.Text = "0";
textBox1.Focus();
}

private void textBox1_TextChanged(object sender, EventArgs e)


{

private void textBox1_KeyPress(object sender, KeyPressEventArgs e)


{
if (char.IsDigit(e.KeyChar))
{
e.Handled = false;
}
else
{
if (char.IsControl(e.KeyChar))
{
e.Handled = false;
}
else
{
e.Handled = true;
}
}

}
}
}

Diseño con resultado:

You might also like