some fixes
This commit is contained in:
parent
1c98fe8e19
commit
b9758bf437
@ -45,15 +45,6 @@ namespace FormLibrary
|
||||
{
|
||||
SelectedItemChanged?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
public void PopulateListBox(ListBox listBox, List<string> items)
|
||||
{
|
||||
listBox1.Items.Clear();
|
||||
|
||||
foreach (var item in items)
|
||||
{
|
||||
listBox.Items.Add(item);
|
||||
}
|
||||
}
|
||||
public void PopulateListBox(List<string> items)
|
||||
{
|
||||
listBox1.Items.Clear();
|
||||
|
@ -16,10 +16,8 @@ namespace FormLibrary
|
||||
{
|
||||
public partial class IntegerInputControl : UserControl
|
||||
{
|
||||
// Событие, вызываемое при изменении значения в TextBox
|
||||
public event EventHandler? ValueChanged;
|
||||
|
||||
// Событие, вызываемое при изменении состояния CheckBox
|
||||
public event EventHandler? CheckBoxChanged;
|
||||
|
||||
public IntegerInputControl()
|
||||
@ -57,18 +55,11 @@ namespace FormLibrary
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value == null)
|
||||
if(value is not null)
|
||||
{
|
||||
checkBoxNull.Checked = true;
|
||||
textBoxInput.Enabled = false;
|
||||
textBoxInput.Text = string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
checkBoxNull.Checked = false;
|
||||
textBoxInput.Enabled = true;
|
||||
textBoxInput.Text = value.ToString();
|
||||
}
|
||||
checkBoxNull.Checked = value is null;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -100,7 +100,7 @@ namespace Forms
|
||||
{
|
||||
new Student { Group = "Пибд-33", FullName = "Иванов Иван Иванович", Course = 3 },
|
||||
new Student { Group = "Пибд-33", FullName = "Петров Петр Петрович", Course = 2 },
|
||||
new Student { Group = "Пибд-33", FullName = "Сидоров Сидор Сидорович", Course = 1 }
|
||||
new Student { Group = "Пибд-33", FullName = "Антонов Антон Антонович", Course = 1 }
|
||||
};
|
||||
|
||||
valueTableControl1.FillData(students);
|
||||
|
Loading…
Reference in New Issue
Block a user