private void ExecuteAddViewTemplate(object parameter) { ViewTemplate viewTemplate = new ViewTemplate(); viewTemplate.Id = Guid.NewGuid(); ViewTemplateEntryView view = new ViewTemplateEntryView(); view.DataContext = viewTemplate; if (!base.ShowDialog(Translator.Translate("UI_CATEGORY"), view)) { return; } _dataManager.Views.Add(viewTemplate); _dataManager.SaveChanges(); }
private void ExecuteOpenViewTemplatesForm(object parameter) { ViewsManager dataManager = ViewsManager.Create(); ViewTemplateView view = new ViewTemplateView(); view.DataContext = new ViewTemplateViewModel(dataManager.Views); if (!base.ShowDialog(Translator.Translate("UI_CATEGORIES"), view)) { return; } dataManager.SaveChanges(); }
private void CreateViewTemplate(Guid id, string description) { var viewTemplate = new ViewTemplate() { Id = id, Description = description }; ViewTemplateEntryView view = new ViewTemplateEntryView(); view.DataContext = viewTemplate; if (!base.ShowDialog(Translator.Translate("UI_CATEGORY"), view)) { return; } _dataManager.Views.Add(viewTemplate); _dataManager.SaveChanges(); }