PIbd-32.-Stroev-V.M.-COP/WinFormsLibrary1/WinFormsApp1/Form1.cs
2024-11-14 20:27:58 +04:00

37 lines
1.9 KiB
C#

using System;
using System.Windows.Forms;
using WinFormsLibrary1;
namespace WinFormsApp1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
listBoxUserControl.SetParams("Id {Id} Íàçâàíèå {Name} Ôàìèëèÿ {Familia}", '{', '}');
listBoxUserControl.AddObject<User>(new User(1, "status1", "Vova", "Stroev", 19, "FIST", 35000.50));
listBoxUserControl.AddObject<User>(new User(1, "status2", "Vladimir", "Stroev", 20, "FIST", 33000.50));
listBoxUserControl.AddObject<User>(new User(1, "status3", "Volodya", "Stroev", 21, "FIST", 39000.50));
listBoxUserControl.AddObject<User>(new User(1, "status3", "Volodya", "Stroev", 21, "FIST", 39000.50));
listBoxUserControl.AddObject<User>(new User(1, "status3", "Volodya", "Stroev", 21, "FIST", 39000.50));
listBoxUserControl.AddObject<User>(new User(1, "status3", "Volodya", "Stroev", 21, "FIST", 39000.50));
listBoxUserControl.AddObject<User>(new User(1, "status3", "Volodya", "Stroev", 21, "FIST", 39000.50));
listBoxUserControl.AddObject<User>(new User(1, "status3", "Volodya", "Stroev", 21, "FIST", 39000.50));
listBoxUserControl.AddObject<User>(new User(1, "status3", "Volodya", "Stroev", 21, "FIST", 39000.50));
listBoxUserControl.AddObject<User>(new User(1, "status3", "Volodya", "Stroev", 21, "FIST", 39000.50));
listBoxUserControl.AddObject<User>(new User(1, "status3", "Volodya", "Stroev", 21, "FIST", 39000.50));
}
private void ComboBoxUserControl_SelectedValueChanged(object sender, EventArgs e)
{
MessageBox.Show($"ComboBox selected: {comboBoxUserControl.SelectedValue}");
}
/*private void ListBoxUserControl_SelectedValueChanged(object sender, EventArgs e)
{
MessageBox.Show($"ListBox selected: {listBoxUserControl.SelectedValue}");
}*/
}
}