[go: up one dir, main page]

0% found this document useful (0 votes)
10 views5 pages

Programación I - TP Inicial

This document outlines a practical programming assignment for a Programming I course, detailing the students involved and the professor. It includes code for three forms in a C# Windows Forms application, demonstrating user interactions such as displaying messages, changing colors, and managing a tree view. The assignment emphasizes basic programming concepts and user interface design.

Uploaded by

Gonzalo Diaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views5 pages

Programación I - TP Inicial

This document outlines a practical programming assignment for a Programming I course, detailing the students involved and the professor. It includes code for three forms in a C# Windows Forms application, demonstrating user interactions such as displaying messages, changing colors, and managing a tree view. The assignment emphasizes basic programming concepts and user interface design.

Uploaded by

Gonzalo Diaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

PROGRAMACIÓN I

TRABAJO PRÁCTICO INICIAL


Laboratorios

ALUMNOS:
Diaz, Gonzalo
Fernández, Pilar
Stragliati, Florencia
Vais, Brian
Valdez, Jeremias
PROFESOR: Frankel, Bartolome Alejandro
FECHA: 13/04/2025 CUATRIMESTRE: 1º Cuatrimestre

FORMULARIO FormPpal
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 TPinicial
{
public partial class Formppal : Form
{
public Formppal()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)


{
Form1 frm = new Form1();

frm.BackColor = Color.Coral;

frm.Show();
}

private void button1_Click_1(object sender, EventArgs e)


{
Form2 frm = new Form2();

frm.BackColor = Color.LightBlue;

frm.Show();
}

private void label1_Click_1(object sender, EventArgs e)


{
MessageBox.Show("Programacion 1");
}

private void label2_Click_1(object sender, EventArgs e)


{
MessageBox.Show("Alejandro Frankel");
}

private void label3_Click(object sender, EventArgs e)


{

}
}
}
FORMULARIO Form1
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 TPinicial
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)


{

private void btnAceptar_Click(object sender, EventArgs e)


{
if (textBox1.Text.Length == 0)
{
MessageBox.Show("por favor ingrese su nombre.");
}
else
{
MessageBox.Show(" Bienvenido " + textBox1.Text + "!");
}
}

private void btmCambiarFuente_Click(object sender, EventArgs e)


{
fontDialog1.ShowDialog();
lblNom.Font = fontDialog1.Font;
}

private void rbRed_CheckedChanged(object sender, EventArgs e)


{
}

private void btnGroupBox_Click(object sender, EventArgs e)


{
if (rbRed.Checked)
{
groupBox1.BackColor = Color.Red;
}
else
{
if (rbBlue.Checked)
{
groupBox1.BackColor = Color.Blue;
}
else { groupBox1.BackColor = Color.Yellow; }
}
}
}
}

FORMULARIO Form2
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 TPinicial
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}

private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)


{

}
private void btnAgregarpadres_Click(object sender, EventArgs e)
{
if (txtNodo.Text.Length == 0)
{
MessageBox.Show("por favor ingrese un nombre.");
}
TreeNode tn = new TreeNode(txtNodo.Text);

treeView1.Nodes.Add(tn);
}

private void btnAgregarHijos_Click(object sender, EventArgs e)


{
if (txtNodo.Text.Length == 0)
{
MessageBox.Show("por favor ingrese un nombre.");
}
else
{
if (treeView1 == null)
{
MessageBox.Show("seleccione un nodo.");
}
else
{
TreeNode tn = new TreeNode(txtNodo.Text);

treeView1.SelectedNode.Nodes.Add(tn);
}
}

}
}
}

You might also like