示例#1
0
        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);
            }
        }
示例#2
0
        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));
        }