コード例 #1
0
        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
ファイル: TdiTabBase.cs プロジェクト: kozlov-d/QSProjects
        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;
 }