private void Configure() { var journal = new PermissionControlledRepresentationJournal(model); journal.Mode = multipleSelect ? JournalSelectMode.Multiple : JournalSelectMode.Single; journal.ObjectSelected += (sender, e) => { List <EntityNode> selectedResult = new List <EntityNode>(); foreach (int selectedId in e.GetSelectedIds()) { selectedResult.Add(new EntityNode(selectedId, entityType)); } OnEntitySelectedResult?.Invoke(sender, new JournalSelectedNodesEventArgs(selectedResult.ToArray())); }; JournalTab = journal; JournalTab.TabNameChanged += (sender, e) => TabNameChanged?.Invoke(sender, e); JournalTab.TabClosed += (sender, e) => { TabParent?.ForceCloseTab(this); journal.Destroy(); Dispose(); }; journal.Destroyed += (sender, e) => { TabParent?.ForceCloseTab(this); journal.Destroy(); Dispose(); }; }
protected void OnTabNameChanged() { if (UoW?.ActionTitle != null) { uowGeneric.ActionTitle.UserActionTitle = $"Диалог '{TabName}'"; } TabNameChanged?.Invoke(this, new TdiTabNameChangedEventArgs(TabName)); }
protected virtual void OnTabNameChanged() { var uowDlg = this as ISingleUoWDialog; if (uowDlg?.UoW?.ActionTitle != null) { uowDlg.UoW.ActionTitle.UserActionTitle = $"Вкладка '{TabName}'"; } TabNameChanged?.Invoke(this, new TdiTabNameChangedEventArgs(TabName)); }
public void Apply(TabNameChanged tabNameChanged) { Name = tabNameChanged.Name; }