This commit is contained in:
Алексей Тихоненков 2024-09-05 15:25:41 +04:00
parent 079f196dcf
commit 4794158d40
2 changed files with 14 additions and 21 deletions

View File

@ -34,18 +34,16 @@ namespace WinFormsLibrary1
{
get
{
string checkedItems = "";
for (int i = 0; i < checkedListBox.Items.Count; i++)
if (checkedListBox.SelectedItem != null)
{
if (checkedListBox.GetItemChecked(i))
{
checkedItems += checkedListBox.Items[i].ToString() + " ";
return checkedListBox.SelectedItem.ToString();
}
}
if (checkedListBox.CheckedItems != null)
return checkedItems;
else
{
return "";
}
}
set
{

View File

@ -53,17 +53,12 @@ namespace COP
set
{
if (!minValue.HasValue || !maxValue.HasValue)
if (!minValue.HasValue || !maxValue.HasValue || value < minValue || value > maxValue)
{
throw new NoRangeException("Диапозон не был задан");
}
if (value < minValue || value > maxValue)
{
return;
}
dateTimePicker.Value = value.Value;
}