Exemple #1
0
        private async void InstallApplicationFromFile(object obj)
        {
            var apkFile = FileDialogUtil.BrowseForOpenFile("Android Applications (*.apk)|*.apk|All Files (*.*)|*.*", "Select an APK");

            if (apkFile != null)
            {
                var progressController = await HostWindow.ShowProgressAsync("Installing", "Installing application");

                progressController.SetIndeterminate();
                Tuple <bool, string> installResult = await _pageState.InstallApplicationFromFileAsync(apkFile);

                var success = installResult.Item1;
                if (!success)
                {
                    await progressController.CloseAsync();

                    await HostWindow.ShowMessageAsync("Error", $"Application install failed with error: {installResult.Item2}");

                    return;
                }

                await progressController.CloseAsync();

                RefreshApplications(null);
            }
        }
Exemple #2
0
        private void BackupData(object obj)
        {
            var backupLocation = FileDialogUtil.BrowseForSaveFile("Android Backups (*.ab)|*.ab|All Files (*.*)|*.*", "Select an output file for the backup.");

            if (backupLocation != null)
            {
                RunApplicationBackup(false, false, backupLocation);
            }
        }
Exemple #3
0
        private void RestoreData(object obj)
        {
            var backupLocation = FileDialogUtil.BrowseForOpenFile("Android Backups (*.ab)|*.ab|All Files (*.*)|*.*", "Select an backup to restore.");

            if (backupLocation != null)
            {
                RunBackupRestore(backupLocation);
            }
        }
Exemple #4
0
 private void btnFileSelect_Click(object sender, EventArgs e)
 {
     txtDataFilePath.Text = FileDialogUtil.OpenFileDialog(txtDataFilePath.Text);
 }