public override async Task Run(MesCommand command) { OpenFileDialog dialog = new OpenFileDialog { Filter = "All Supported Files|" + String.Join(";", _editorProviders .SelectMany(x => x.FileTypes).Select(x => "*" + x.FileExtension)) }; dialog.Filter += "|" + String.Join("|", _editorProviders .SelectMany(x => x.FileTypes) .Select(x => x.Name + "|*" + x.FileExtension)); if (dialog.ShowDialog() == true) { _shell.OpenDocument(await GetEditor(dialog.FileName)); } }
public Task Run(MesCommand command) { _shell.OpenDocument((IMesDocument)command.Tag); return(MesTaskUtility.Completed); }