public void Reload() { Items.Clear(); Resources["language"] = _application.CurrentLanguage; Items.Add(_semanticNetworkNode = new SemanticNetworkNode(_application)); _semanticNetworkNode.IsExpanded = true; }
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); }
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); }
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); }
public EditConceptCommand(ViewModels.Concept viewModel, ViewModels.Concept previousVersion, SemanticNetworkNode semanticNetworkNode, IInventorApplication application) : base(semanticNetworkNode, application) { ViewModel = viewModel; PreviousVersion = previousVersion; }
public AddStatementCommand(StatementViewModel viewModel, SemanticNetworkNode semanticNetworkNode, IInventorApplication application) : base(semanticNetworkNode, application) { ViewModel = viewModel; }
public EditStatementCommand(StatementViewModel viewModel, StatementViewModel previousVersion, SemanticNetworkNode semanticNetworkNode, IInventorApplication application) : base(semanticNetworkNode, application) { ViewModel = viewModel; PreviousVersion = previousVersion; }
public DeleteConceptCommand(IConcept concept, SemanticNetworkNode semanticNetworkNode, IInventorApplication application) : base(semanticNetworkNode, application) { Concept = concept; }
public virtual IEditCommand CreateRenameCommand(LocalizedString name, SemanticNetworkNode semanticNetworkNode, IInventorApplication application) { return(new RenameSemanticNetworkCommand(semanticNetworkNode, name, application)); }
public AddConceptCommand(ViewModels.Concept viewModel, SemanticNetworkNode semanticNetworkNode, IInventorApplication application) : base(semanticNetworkNode, application) { ViewModel = viewModel; }
protected BaseEditCommand(SemanticNetworkNode semanticNetworkNode, IInventorApplication application) { SemanticNetworkNode = semanticNetworkNode; Application = application; }
public DeleteStatementCommand(IStatement statement, SemanticNetworkNode semanticNetworkNode, IInventorApplication application) : base(semanticNetworkNode, application) { Statement = statement; }
public RenameSemanticNetworkCommand(SemanticNetworkNode semanticNetworkNode, LocalizedString newName, IInventorApplication application) : base(semanticNetworkNode, application) { PreviousName = LocalizedString.From(SemanticNetwork.Name); NewName = newName; }