Добавлена проверка
This commit is contained in:
parent
4bb7f3c12c
commit
6992a7df68
@ -84,19 +84,22 @@ namespace DesktopTools.Controls
|
||||
try
|
||||
{
|
||||
_element = value;
|
||||
SetValues?.Invoke(_element);
|
||||
if (tabControl.Visible)
|
||||
if (_element != null)
|
||||
{
|
||||
foreach (TabPage page in tabControl.TabPages)
|
||||
SetValues?.Invoke(_element);
|
||||
if (tabControl.Visible)
|
||||
{
|
||||
if (page.Name == tabPageMain.Name)
|
||||
foreach (TabPage page in tabControl.TabPages)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (page.Controls[0] is IControlChildEntity cntrl)
|
||||
{
|
||||
cntrl.ParentId = _element.Id;
|
||||
cntrl.Open(new ControlOpenModel { OpenMode = ControlOpenMode.Child });
|
||||
if (page.Name == tabPageMain.Name)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (page.Controls[0] is IControlChildEntity cntrl)
|
||||
{
|
||||
cntrl.ParentId = _element.Id;
|
||||
cntrl.Open(new ControlOpenModel { OpenMode = ControlOpenMode.Child });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user