Ejemplo n.º 1
0
        public async Task Capture(string destination, IDownloadProgress progressObserver)
        {
            Log.Information("Preparing for Windows backup...");

            var device = deviceProvider.Device;
            await deployer.Backup(await device.GetWindowsVolume(), destination, progressObserver);
        }
        private async Task Backup()
        {
            uiServices.SaveFilePicker.DefaultExt = "*.wim";
            uiServices.SaveFilePicker.Filter     = "Windows Images (.wim)|*.wim";
            var imagePath = uiServices.SaveFilePicker.PickFile();

            if (imagePath == null)
            {
                return;
            }

            context.DeploymentOptions = new WindowsDeploymentOptions
            {
                ImageIndex = 1,
                ImagePath  = imagePath,
                UseCompact = lumiaSettingsService.UseCompactDeployment
            };

            await deployer.Backup(await context.Device.GetWindowsPartition(), imagePath, progress);

            await uiServices.ContextDialog.ShowAlert(this, Deployer.Lumia.Gui.Properties.Resources.Done, Deployer.Lumia.Gui.Properties.Resources.ImageCaptured);
        }