private void button1_Click(object sender, EventArgs e) { fileManager.Answers.Add(new Answers { Id = 6, Answer = textBox1.Text }); //Save Answers to Json File fileManager.SaveSurvey(); if (fileManager.TestSession) { fileManager.TestSession = false;//Finish Test Session Form13 form13 = new Form13(imageStream, fileManager); form13.Show(); this.Visible = false; } else { //bypass Form 6 // Looping in all videos if (fileManager.Cont < fileManager.Qtde) { Form3 form3 = new Form3(imageStream, fileManager); form3.Show(); this.Visible = false; } //Finished all videos, go to "Thank You" Form else { imageStream.Dispose(); Form12 form12 = new Form12(); form12.Show(); this.Visible = false; } } }
private void button1_Click(object sender, EventArgs e) { imageStream.DeviceInfo = GetCheckedDevice(); fileManager.User = GetCheckedUser(); Process p = new Process(); //ProcessStartInfo startInfo = new ProcessStartInfo(); //p.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; // p.StartInfo.WorkingDirectory = @"C:\Users\muril\AppData\Local\Android\Sdk\platform-tools"; //p.StartInfo.WorkingDirectory = @"%AppData%\Local\Android\Sdk\platform-tools";???? //p.StartInfo.FileName = "cmd.exe"; //p.StartInfo.Arguments = "/k adb devices "; // p.Start(); // var stdout = new Cli("cmd -k adb devices").Execute().StandardOutput; if (fileManager.User != "" && imageStream.DeviceInfo.name != "") { //Creates the Records folder if it does not exist fileManager.CreateRecordsFolder(); //If Webcam if (imageStream.DeviceInfo.model == PXCMCapture.DeviceModel.DEVICE_MODEL_GENERIC) { imageStream.Dispose(); imageStream.StreamType = new PXCMCapture.StreamType[] { PXCMCapture.StreamType.STREAM_TYPE_COLOR }; imageStream.FramesPerSecond = 30; imageStream.InitializeStream(640, 480, 30); } Form2 form2 = new Form2(imageStream, fileManager); form2.Show(); this.Visible = false; } else { MessageBox.Show("Selecione um Device e um Usuário para continuar"); } }