28 lines
638 B
C#
28 lines
638 B
C#
namespace WinForms
|
|
{
|
|
public partial class Form1 : Form
|
|
{
|
|
List<string> list = new List<string>();
|
|
public Form1()
|
|
{
|
|
list = new List<string>();
|
|
list.AddRange(new string[] { "õëåá", "ìîëîêî", "êîëáàñà" });
|
|
InitializeComponent();
|
|
dropDownList.LoadValues(new List<string>() { "ñîê", "ÿáëîêî", "ëóê" });
|
|
}
|
|
private void buttonAdd_Click(object sender, EventArgs e)
|
|
{
|
|
dropDownList.LoadValues(list);
|
|
}
|
|
|
|
private void buttonInfo_Click(object sender, EventArgs e)
|
|
{
|
|
labelInfo.Text = dropDownList.SelectedValue;
|
|
}
|
|
|
|
private void buttonClear_Click(object sender, EventArgs e)
|
|
{
|
|
dropDownList.Clear();
|
|
}
|
|
}
|
|
} |