Exemple #1
0
 private void button_compile_Click(object sender, EventArgs e)
 {
     if (!linkLabel1.Text.Equals("None"))
     {
         System.Diagnostics.Process process = new System.Diagnostics.Process();
         process.StartInfo.WorkingDirectory = linkLabel1.Text;
         process.StartInfo.FileName         = System.Environment.GetEnvironmentVariable("ComSpec");
         process.StartInfo.Arguments        = "/c ant.bat debug";
         FormConsole fc = new FormConsole();
         fc.doProcess(process);
     }
 }
Exemple #2
0
        private void button_create_Click(object sender, EventArgs e)
        {
            if (!linkLabel1.Text.Equals("None"))
            {
                String str = "/c android create project --target ";
                str += target_tb.Text;
                str += " --name " + name_tb.Text;
                str += " --activity " + activity_tb.Text;
                str += " --path " + linkLabel1.Text + "\\" + directory_tb.Text;
                str += " --package " + package_tb.Text;


                System.Diagnostics.Process process = new System.Diagnostics.Process();
                process.StartInfo.FileName  = System.Environment.GetEnvironmentVariable("ComSpec");
                process.StartInfo.Arguments = str;
                FormConsole fc = new FormConsole();
                fc.doProcess(process);
                process.WaitForExit();
                linkLabel1.Text = linkLabel1.Text + "\\" + directory_tb.Text;
            }
        }
Exemple #3
0
        private void button_install_Click(object sender, EventArgs e)
        {
            if (!linkLabel1.Text.Equals("None"))
            {
                System.Diagnostics.Process process = new System.Diagnostics.Process();
                process.StartInfo.WorkingDirectory = linkLabel1.Text;
                process.StartInfo.FileName         = "adb";
                FormConsole fc = new FormConsole();

                process.StartInfo.Arguments = "kill-server";
                fc.doProcess(process);

                process.StartInfo.Arguments = "start-server";
                fc.doProcess(process);

                process.StartInfo.Arguments = "devices";
                fc.doProcess(process);

                process.StartInfo.Arguments = "install bin\\" + name_tb.Text + "-debug.apk";
                fc.doProcess(process);
            }
        }