49 lines
1.3 KiB
C#
49 lines
1.3 KiB
C#
|
using AbazovViewComponents.Components;
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.ComponentModel;
|
|||
|
using System.Data;
|
|||
|
using System.Drawing;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using System.Windows.Forms;
|
|||
|
|
|||
|
namespace AbazovAppView
|
|||
|
{
|
|||
|
public partial class FormTest : Form
|
|||
|
{
|
|||
|
public FormTest()
|
|||
|
{
|
|||
|
InitializeComponent();
|
|||
|
}
|
|||
|
|
|||
|
private void buttonAdd_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
Random random = new Random();
|
|||
|
List<string> items = new List<string>();
|
|||
|
for (int i = 0; i < 3; i++)
|
|||
|
{
|
|||
|
items.Add("item" + random.Next(0, 10000));
|
|||
|
}
|
|||
|
abazovCheckedListBox.addItems(items);
|
|||
|
abazovCheckedListBox.selectedItem = items[1];
|
|||
|
}
|
|||
|
|
|||
|
private void abazovCheckedListBox_SelectedItemChange(string obj)
|
|||
|
{
|
|||
|
MessageBox.Show(obj, "Select event");
|
|||
|
}
|
|||
|
|
|||
|
private void buttonClear_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
abazovCheckedListBox.clear();
|
|||
|
}
|
|||
|
|
|||
|
private void buttonSelected_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
MessageBox.Show(abazovCheckedListBox.selectedItem ?? "null", "By getter");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|