PIbd-32.-Stroev-V.M.-COP/WinFormsLibrary1/WinFormsApp1/Form1.cs

37 lines
1.9 KiB
C#
Raw Normal View History

2024-10-14 13:05:17 +04:00
using System;
using System.Windows.Forms;
using WinFormsLibrary1;
namespace WinFormsApp1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
listBoxUserControl.SetParams("Id {Id} <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> {Name} <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> {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));
2024-10-14 13:05:17 +04:00
}
private void ComboBoxUserControl_SelectedValueChanged(object sender, EventArgs e)
{
MessageBox.Show($"ComboBox selected: {comboBoxUserControl.SelectedValue}");
}
/*private void ListBoxUserControl_SelectedValueChanged(object sender, EventArgs e)
2024-10-14 13:05:17 +04:00
{
MessageBox.Show($"ListBox selected: {listBoxUserControl.SelectedValue}");
}*/
2024-10-14 13:05:17 +04:00
}
}