private void RefreshInstalledApps() { cbx_InstallUninstallPackageUninstall.Items.Clear(); cbx_InstallUninstallPackageUninstall.Enabled = false; string output = adb.StartProcessingInThread("adb shell pm list packages -3", formMethods.SelectedDevice()); if (!String.IsNullOrEmpty(output)) { foreach (var item in output.Split(new string[] { "\n" }, StringSplitOptions.RemoveEmptyEntries)) { cbx_InstallUninstallPackageUninstall.Items.Add(item.Remove(0, 8)); } cbx_InstallUninstallPackageUninstall.Sorted = true; if (cbx_InstallUninstallPackageUninstall.Items.Count > 0) { cbx_InstallUninstallPackageUninstall.SelectedIndex = 0; } } cbx_InstallUninstallPackageUninstall.Enabled = true; }
private void Cbo_BackupPackage_CheckedChanged(object sender, EventArgs e) { if (cbo_BackupPackage.Checked) { cbo_BackupNoSystem.Enabled = false; cbo_BackupNoSystem.Checked = false; cbo_BackupShared.Enabled = false; cbo_BackupShared.Checked = false; cbo_BackupWithApk.Enabled = false; cbo_BackupWithApk.Checked = false; cbx_BackupPackage.Visible = true; label8.Visible = true; groupBox8.Enabled = false; groupBox14.Enabled = false; var output = CmdProcess.StartProcessingInThread("adb shell pm list packages -3", _formMethods.SelectedDevice()); if (!string.IsNullOrEmpty(output)) { foreach (var item in output.Split(new[] { "\n" }, StringSplitOptions.RemoveEmptyEntries)) { cbx_BackupPackage.Items.Add(item.Remove(0, 8)); } cbx_BackupPackage.Sorted = true; if (cbx_BackupPackage.Items.Count > 0) { cbx_BackupPackage.SelectedIndex = 0; } } groupBox8.Enabled = true; groupBox14.Enabled = true; } else { cbo_BackupNoSystem.Enabled = true; cbo_BackupShared.Enabled = true; cbo_BackupWithApk.Enabled = true; cbx_BackupPackage.Visible = false; cbx_BackupPackage.Items.Clear(); label8.Visible = false; } }