Beispiel #1
0
        public NodeRoot Copy()
        {
            var newRoot = new NodeRoot(EventAggregator, viewModel)
            {
                Nodes = new ObservableCollection <NodeExcel>()
            };


            newRoot.Nodes = new ObservableCollection <NodeExcel>(Nodes.Select(n => new NodeExcel(EventAggregator, newRoot, viewModel)
            {
                Name        = n.Name,
                Description = n.Description,
                IsExpanded  = true,
                Nodes       = new ObservableCollection <NodeTab>(n.Nodes.ToList().Select(t => new NodeTab(EventAggregator, n, viewModel)
                {
                    Name        = t.Name,
                    Description = t.Description,
                    Nodes       = new ObservableCollection <NodeDbTable>(t.Nodes.ToList().Select(table => new NodeDbTable(EventAggregator, t, viewModel)
                    {
                        Name        = table.Name,
                        Description = table.Description,
                        Nodes       = new ObservableCollection <NodeDbColumn>(table.Nodes.ToList().Select(c => new NodeDbColumn(EventAggregator, table, viewModel)
                        {
                            Name        = c.Name,
                            Description = c.Description
                        }))
                    }))
                }))
            }));

            return(newRoot);
        }
Beispiel #2
0
        public NodeRoot Copy()
        {
            var newRoot = new NodeRoot(EventAggregator, viewModel)
            {
                Nodes = new ObservableCollection <IFulltext>()
            };


            //newRoot.Nodes = new ObservableCollection<IFulltext>(Nodes.Select(n => new NodeExcel(EventAggregator, newRoot, viewModel)
            //{
            //    Name = n.Name,
            //    Description = (n as NodeBase).Description,
            //    IsExpanded = true,
            //    Nodes = new ObservableCollection<NodeTab>(n.Nodes.ToList().Select(t => new NodeTab(EventAggregator, (NodeBase)n, viewModel)
            //    {
            //        Name = t.Name,
            //        Description = (t as NodeBase).Description,
            //        Nodes = new ObservableCollection<NodeDbTable>(t.Nodes.ToList().Select(table => new NodeDbTable(EventAggregator, t as NodeBase, viewModel)
            //        {
            //            Name = table.Name,
            //            Description = (table as NodeBase).Description,
            //            Nodes = new ObservableCollection<NodeDbColumn>(table.Nodes.ToList().Select(c => new NodeDbColumn(EventAggregator, table, viewModel)
            //            {
            //                Name = c.Name,
            //                Description = (c as NodeBase).Description
            //            }))
            //        }))
            //    }))
            //}));

            return(newRoot);
        }
Beispiel #3
0
        public UISprint(IEventAggregator evAgg, ObservableCollection <UISprint> sprints, NodeRoot root)
        {
            EvAgg        = evAgg;
            Root         = root;
            Sprints      = sprints;
            InsertSprint = new DelegateCommand(() => DoInsertSprint());
            RemoveSprint = new DelegateCommand(() => DoRemoveSprint());
            CopySprint   = new DelegateCommand(() => DoCopySprint());

            this.ConfirmationRequest = new InteractionRequest <IConfirmation>();
        }
Beispiel #4
0
        public UISprint(IEventAggregator evAgg, ObservableCollection <UISprint> sprints, NodeRoot root, MainViewModel viewModel, DatabaseSchemaViewModel databaseSchemaViewModel)
        {
            this.viewModel = viewModel;
            this.databaseSchemaViewModel = databaseSchemaViewModel;

            EvAgg        = evAgg;
            Root         = root;
            Sprints      = sprints;
            InsertSprint = new DelegateCommand(() => DoInsertSprint());
            RemoveSprint = new DelegateCommand(() => DoRemoveSprint());
            CopySprint   = new DelegateCommand(() => DoCopySprint());

            this.ConfirmationRequest = new InteractionRequest <IConfirmation>();
        }
Beispiel #5
0
 public NodeExcel(IEventAggregator eventAggregator, NodeRoot root, MainViewModel viewModel) : base(eventAggregator)
 {
     this.viewModel = viewModel;
     AddTab         = new DelegateCommand(DoAddTab);
     Root           = root;
 }
Beispiel #6
0
 public NodeExcel(IEventAggregator eventAggregator, NodeRoot root) : base(eventAggregator)
 {
     AddTab = new DelegateCommand(DoAddTab);
     Root   = root;
 }