コード例 #1
0
        private void Install_Click(object sender, System.EventArgs e)
        {
            if (!IsEmpty(adbPath.Text))
            {
                WarningDialog("Please select a directory.", "Hint");
                return;
            }

            ADBInstaller.InstallADBTo(adbPath.Text);
            MessageBox.Show("Install successfully.", "Hint", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
コード例 #2
0
 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);
     }
 }
コード例 #3
0
        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);
            }
        }
コード例 #4
0
        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);
        }