private void LoadTemplateCommand_Executed(object parameter) { FileDialogEventArgs fileDialogEventArgs = new FileDialogEventArgs() { Title = TranslationManager.Instance.GetResourceText("SelectTemplate"), Filter = TranslationManager.Instance.GetResourceText("FileDialogFilter_Templates") + " (*.xml)|*.xml" }; FileDialogRequested?.Invoke(this, fileDialogEventArgs); string templateFile = fileDialogEventArgs.File; if (!string.IsNullOrWhiteSpace(templateFile)) { BinaryTemplateTabViewModel loadedTemplate = new BinaryTemplateTabViewModel(templateFile); if (loadedTemplate.LoadTemplateFromFile(templateFile)) { AddNewTab(loadedTemplate); } else { // TODO! } } }
private void NewTemplateCommand_Executed(object parameter) { var newTab = new BinaryTemplateTabViewModel("new template"); AddNewTab(newTab); }