protected void OnButtonViewEntityClicked(object sender, EventArgs e) { IEntityConfig entityConfig = DomainConfiguration.GetEntityConfig(subjectType); if (entityConfig.SimpleDialog) { EntityEditSimpleDialog.RunSimpleDialog(this.Toplevel as Window, SubjectType, Subject); return; } ITdiTab mytab = DialogHelper.FindParentTab(this); if (mytab == null) { logger.Warn("Родительская вкладка не найдена."); return; } ITdiTab dlg = entityConfig.CreateDialog(Subject); mytab.TabParent.AddTab(dlg, mytab); }