private void ADBWindow_Load(object sender, System.EventArgs e) { if (Settings.Default.adbPath != "" & ADBInstaller.CheckADB(Settings.Default.adbPath)) { LoadADB(); adbPath.Text = Settings.Default.adbPath; } else { MessageBox.Show("Please load ADB in this window.", "Hint", MessageBoxButtons.OK, MessageBoxIcon.Warning); SetButtonsAvailableOrNot(false); } }
private void Uninstall_Click(object sender, System.EventArgs e) { if (!ADBInstaller.CheckADB(adbPath.Text)) { MessageBox.Show("This folder doesn't contain ADB.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } DialogResult dr = MessageBox.Show("ADB will be uninstalled, and this app can NOT be used!", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (dr == DialogResult.Yes) { ADBInstaller.UninstallADB(adbPath.Text); SetButtonsAvailableOrNot(false); MessageBox.Show("Uninstall successfully.", "Hint", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void Load_Click_1(object sender, System.EventArgs e) { if (!ADBInstaller.CheckADB(adbPath.Text)) { MessageBox.Show("This folder doesn't contain ADB.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } Settings.Default.adbPath = adbPath.Text; path = adbPath.Text; Settings.Default.Save(); LoadADB(); LoadDevices(); SetButtonsAvailableOrNot(true); MessageBox.Show("Load successfully.", "Hint", MessageBoxButtons.OK, MessageBoxIcon.Information); }