Ejemplo n.º 1
0
        private void Btn_LoadPackageList_Click(object sender, EventArgs e)
        {
            LibraryWorker pkgListLoader = new LibraryWorker(Library.ADB);

            pkgListLoader.SetOutputBox(rtb_adbOutput);
            pkgListLoader.AddParam(new string[] { "shell", "pm", "list", "packages", "-3" });
            pkgListLoader.DataProcessor = PkgDataProcessor;
            pkgListLoader.RunLibrary();
        }
Ejemplo n.º 2
0
        private void ADBCheckPhone()
        {
            label_PhoneStatus.Text = "正在檢查裝置 ...";
            LibraryWorker adb = new LibraryWorker(Library.ADB);

            adb.AddParam(new string[] { "-d", "shell", "getprop" });
            adb.SetOutputBox(rtb_adbOutput);
            adb.DataProcessor = AdbGetPhoneBrandModel;
            adb.JobFinished  += PhoneFound;
            adb.RunLibrary();
        }
Ejemplo n.º 3
0
        private void Btn_ManifestCheck_Click(object sender, EventArgs e)
        {
            string apkName = textBox1.Text.Split('\\').Last <string>();
            string args    = tbOutputDir.Text + "\\" + apkName + ".exctracted\\manifest\\AndroidManifest.xml";

            LibraryWorker ManifestCheck = new LibraryWorker(Library.ManifestCheck);

            ManifestCheck.AddParam(new string[] { args });
            ManifestCheck.SetOutputBox(this.tbOutput);
            //ManifestCheck.DataProcessor = PrivackyDataProcessor;
            //ManifestCheck.JobFinished += PrivacyCheck_Completed;
            ManifestCheck.RunLibrary();
        }
Ejemplo n.º 4
0
        private void Btn_InstallAPK_Click(object sender, EventArgs e)
        {
            openFileDialog1.Filter = "apk檔|*.apk";
            var result = openFileDialog1.ShowDialog();

            if (result == DialogResult.OK)
            {
                var file = openFileDialog1.FileName;
                rtb_adbOutput.AppendText("正在安裝APK...\r\n");

                LibraryWorker adbInstall = new LibraryWorker(Library.ADB);
                adbInstall.AddParam(new string[] { "-d", "install", file });
                adbInstall.SetOutputBox(rtb_adbOutput);
                adbInstall.JobFinished  += APKInstallCompleted;
                adbInstall.DataProcessor = InstallDataProcessor;
                adbInstall.RunLibrary();
            }

            openFileDialog1.Filter = "";
        }
Ejemplo n.º 5
0
        private void ContextMenu_ADB_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            contextMenu_ADB.Hide();
            var result = folderBrowserDialog1.ShowDialog();

            if (result != DialogResult.OK)
            {
                return;
            }
            var           pkgName      = e.ClickedItem.Tag as string;
            var           dataFolder   = "/data/data/" + pkgName;
            var           sdcardFolder = "/sdcard/" + pkgName;
            var           outputFolder = folderBrowserDialog1.SelectedPath + "\\" + pkgName;
            LibraryWorker cp           = new LibraryWorker(Library.ADBPull);

            cp.AddParam(new string[] { dataFolder, sdcardFolder, outputFolder });
            cp.SetOutputBox(rtb_adbOutput);
            cp.JobFinished += Cp_Completed;
            cp.RunLibrary();
        }
Ejemplo n.º 6
0
        private void Btn_WSScan_Click(object sender, EventArgs e)
        {
            if (tb_WSProjectName.Text == "" || tb_WSTargetFolder.Text == "")
            {
                MessageBox.Show("目標資料夾與Project Name不可為空");
                return;
            }

            var targetFolder = tb_WSTargetFolder.Text;
            var projectName  = tb_WSProjectName.Text;
            var configFile   = cb_OAInternet.Checked ?
                               "tools\\wss\\OA-whitesource-fs-agent.config" : "tools\\wss\\whitesource-fs-agent.config";

            LibraryWorker WhiteSource = new LibraryWorker(Library.WhiteSource);

            WhiteSource.AddParam(new string[] { configFile, targetFolder, projectName });
            WhiteSource.SetOutputBox(this.rtb_WhiteSource);
            WhiteSource.JobFinished  += WhiteSoutce_Completed;
            WhiteSource.DataProcessor = WSDataProcessor;
            WhiteSource.RunLibrary();
        }