private void OpenPackageFromLocal() { bool canceled = AskToSaveCurrentFile(); if (canceled) { return; } string selectedFile; bool result = UIServices.OpenFileDialog( "Select File", StringResources.Dialog_OpenFileFilter, out selectedFile); if (result) { OpenLocalPackage(selectedFile); } }
private Task OpenPackageFromLocal() { var canceled = AskToSaveCurrentFile(); if (canceled) { return(Task.FromResult(0)); } var result = UIServices.OpenFileDialog( "Select File", StringResources.Dialog_OpenFileFilter, out var selectedFile); if (result) { return(OpenLocalPackage(selectedFile)); } return(Task.FromResult(0)); }