0% found this document useful (0 votes)
65 views1 page

Public Partial Class Form2

This C# code defines a form with checkboxes and textboxes. When a button is clicked, text from the textboxes is added as a list item along with concatenated strings from selected checkboxes for color, flavor, and texture attributes. The list item is then added to a list view control on the form.
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)
65 views1 page

Public Partial Class Form2

This C# code defines a form with checkboxes and textboxes. When a button is clicked, text from the textboxes is added as a list item along with concatenated strings from selected checkboxes for color, flavor, and texture attributes. The list item is then added to a list view control on the form.
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

public partial class Form2 : Form

{
ListViewItem lista;
public Form2()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)


{
string color = "";
if ([Link] == true) color = color + " " + [Link];
if ([Link] == true) color = color + " " + [Link];
if ([Link] == true) color = color + " " + [Link];

string sabor = "";


if ([Link] == true) sabor = sabor + " " + [Link];
if ([Link] == true) sabor = sabor + " " + [Link];
if ([Link] == true) sabor = sabor + " " + [Link];

string textura = "";


if ([Link] == true) textura = textura + " " + [Link];
if ([Link] == true) textura = textura + " " + [Link];
if ([Link] == true) textura = textura + " " + [Link];

lista = new ListViewItem([Link]);


[Link](lista);
[Link](color);
[Link](sabor);
[Link](textura);
}
}
}

You might also like