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();
            };
        }
Пример #2
0
        protected void OnTabNameChanged()
        {
            if (UoW?.ActionTitle != null)
            {
                uowGeneric.ActionTitle.UserActionTitle = $"Диалог '{TabName}'";
            }

            TabNameChanged?.Invoke(this, new TdiTabNameChangedEventArgs(TabName));
        }
Пример #3
0
        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));
        }
Пример #4
0
 public void Apply(TabNameChanged tabNameChanged)
 {
     Name = tabNameChanged.Name;
 }