39 lines
923 B
C#
39 lines
923 B
C#
namespace VisualComponentsForm
|
|
{
|
|
public partial class FormMain : Form
|
|
{
|
|
public FormMain()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void ButtonCheck_Click(object sender, EventArgs e)
|
|
{
|
|
labelCheck.Text = myListBox.SelectedString;
|
|
}
|
|
|
|
private void ButtonAddList_Click(object sender, EventArgs e)
|
|
{
|
|
myListBox.AddItem(textBoxInput.Text);
|
|
|
|
textBoxInput.Text = string.Empty;
|
|
}
|
|
|
|
private void ButtonClear_Click(object sender, EventArgs e)
|
|
{
|
|
myListBox.ClearAll();
|
|
}
|
|
|
|
private void ButtonCheckTwo_Click(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
labelCheckTwo.Text = myTextBox.TextBoxValue;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
MessageBox.Show(ex.Message);
|
|
}
|
|
}
|
|
}
|
|
} |