public SemanticNetworkStatementsNode(IInventorApplication application)
 {
     _application = application;
     foreach (var statement in SemanticNetwork.Statements)
     {
         Children.Add(new StatementNode(statement, application));
     }
 }
 public SemanticNetworkConceptsNode(IInventorApplication application)
 {
     _application = application;
     foreach (var concept in SemanticNetwork.Concepts)
     {
         Children.Add(new ConceptNode(concept, application));
     }
 }
示例#3
0
        public StatementNode(IStatement statement, IInventorApplication application)
        {
            _statement   = statement;
            _application = application;

            /*foreach (var concept in _statement.GetChildConcepts)
             * {
             *      children.Add(new ConceptNode(concept));
             * }*/
        }
        public void Initialize(
            IInventorApplication application,
            ChangeController changeController,
            ViewModels.IViewModelFactory viewModelFactory,
            Commands.ICommandsFactory commandsFactory)
        {
            _application      = application;
            _changeController = changeController;
            _viewModelFactory = viewModelFactory;
            _commandsFactory  = commandsFactory;
            _owner            = application.MainForm as Window;

            Reload();
        }
示例#5
0
 public EditStatementCommand(StatementViewModel viewModel, StatementViewModel previousVersion, SemanticNetworkNode semanticNetworkNode, IInventorApplication application)
     : base(semanticNetworkNode, application)
 {
     ViewModel       = viewModel;
     PreviousVersion = previousVersion;
 }
示例#6
0
 public DeleteConceptCommand(IConcept concept, SemanticNetworkNode semanticNetworkNode, IInventorApplication application)
     : base(semanticNetworkNode, application)
 {
     Concept = concept;
 }
示例#7
0
 public virtual IEditCommand CreateRenameCommand(LocalizedString name, SemanticNetworkNode semanticNetworkNode, IInventorApplication application)
 {
     return(new RenameSemanticNetworkCommand(semanticNetworkNode, name, application));
 }
示例#8
0
        public virtual IEditCommand CreateDeleteCommand(ExtendedTreeNode node, SemanticNetworkNode semanticNetworkNode, IInventorApplication application)
        {
            var conceptNode = node as ConceptNode;

            if (conceptNode != null)
            {
                return(new DeleteConceptCommand(conceptNode.Concept, semanticNetworkNode, application));
            }

            var statementNode = node as StatementNode;

            if (statementNode != null)
            {
                return(new DeleteStatementCommand(statementNode.Statement, semanticNetworkNode, application));
            }

            return(null);
        }
示例#9
0
        public virtual IEditCommand CreateEditCommand(IKnowledgeViewModel viewModel, SemanticNetworkNode semanticNetworkNode, IInventorApplication application, IViewModelFactory viewModelFactory)
        {
            var conceptViewModel = viewModel as Concept;

            if (conceptViewModel != null)
            {
                var previousVersion = new Concept(conceptViewModel.BoundObject);
                return(new EditConceptCommand(conceptViewModel, previousVersion, semanticNetworkNode, application));
            }

            var statementViewModel = viewModel as StatementViewModel;

            if (statementViewModel != null)
            {
                var previousVersion = viewModelFactory.CreateStatementByInstance(statementViewModel.BoundStatement, application.CurrentLanguage);
                return(new EditStatementCommand(statementViewModel, previousVersion, semanticNetworkNode, application));
            }

            return(null);
        }
示例#10
0
 public RenameSemanticNetworkCommand(SemanticNetworkNode semanticNetworkNode, LocalizedString newName, IInventorApplication application)
     : base(semanticNetworkNode, application)
 {
     PreviousName = LocalizedString.From(SemanticNetwork.Name);
     NewName      = newName;
 }
示例#11
0
 public EditConceptCommand(ViewModels.Concept viewModel, ViewModels.Concept previousVersion, SemanticNetworkNode semanticNetworkNode, IInventorApplication application)
     : base(semanticNetworkNode, application)
 {
     ViewModel       = viewModel;
     PreviousVersion = previousVersion;
 }
示例#12
0
 public void Initialize(IInventorApplication application)
 {
     dockPanelMain.DataContext = _application = application;
     treeViewSemanticNetwork.Initialize(application, _changeController, _viewModelFactory, _commandsFactory);
     setModel(application.SemanticNetwork, string.Empty);
 }
示例#13
0
 protected BaseEditCommand(SemanticNetworkNode semanticNetworkNode, IInventorApplication application)
 {
     SemanticNetworkNode = semanticNetworkNode;
     Application         = application;
 }
示例#14
0
 public DeleteStatementCommand(IStatement statement, SemanticNetworkNode semanticNetworkNode, IInventorApplication application)
     : base(semanticNetworkNode, application)
 {
     Statement = statement;
 }
示例#15
0
 public AddStatementCommand(StatementViewModel viewModel, SemanticNetworkNode semanticNetworkNode, IInventorApplication application)
     : base(semanticNetworkNode, application)
 {
     ViewModel = viewModel;
 }
示例#16
0
 public ConceptNode(IConcept concept, IInventorApplication application)
 {
     _concept     = concept;
     _application = application;
 }
示例#17
0
 public AddConceptCommand(ViewModels.Concept viewModel, SemanticNetworkNode semanticNetworkNode, IInventorApplication application)
     : base(semanticNetworkNode, application)
 {
     ViewModel = viewModel;
 }
示例#18
0
        public virtual IEditCommand CreateAddCommand(IKnowledgeViewModel viewModel, SemanticNetworkNode semanticNetworkNode, IInventorApplication application)
        {
            var conceptViewModel = viewModel as Concept;

            if (conceptViewModel != null)
            {
                return(new AddConceptCommand(conceptViewModel, semanticNetworkNode, application));
            }

            var statementViewModel = viewModel as StatementViewModel;

            if (statementViewModel != null)
            {
                return(new AddStatementCommand(statementViewModel, semanticNetworkNode, application));
            }

            return(null);
        }
示例#19
0
 public SemanticNetworkNode(IInventorApplication application)
 {
     _application            = application;
     Children.Add(Concepts   = new SemanticNetworkConceptsNode(application));
     Children.Add(Statements = new SemanticNetworkStatementsNode(application));
 }