public EditKnowledgeModel(int id, Control control, ISummaryEditor editor) : base(control) { SaveCommand = new DelegateCommand(OnSaveCommand); Entity = (id > 0 ? KbContext.CurrentKb.ManagerKnowledge.GetByID(id) : new Knowledge()) ?? new Knowledge(); _summaryEditor = editor; _summaryEditor.Value = Entity.Summary; Keywords = new ObservableCollection <Keyword>(KbContext.CurrentKb.ManagerKeyword.GetByListID(Entity.KewordsAssociations)); }
/// <summary> /// Initializes a new instance of the <see cref="EditKnowledgeWindow"/> class. /// </summary> public EditKnowledgeWindow() { InitializeComponent(); boxSummary = AppCore.GetObject <ISummaryEditor>(); tabSummary.Content = boxSummary; listUserFiles.DataContext = AppCore.Workspace.UserFiles; }