Exemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (!File.Exists(Program.Localpath + "\\output.mp4"))
     {
         MessageBox.Show("File Not Available.");
         isclosedbycode = true;
         timerform timerform = new timerform();
         timerform.Show();
         this.Close();
         return;
     }
     if (CheckForInternetConnection())
     {
         btnUpload.Enabled      = false;
         btnRecordAgain.Enabled = false;
         progressBar1.Show();
         lblProgress.Show();
         Thread thread = new Thread(UploadVideo);
         thread.Start();
     }
     else
     {
         MessageBox.Show("Internet connection not detected try again.");
         Environment.Exit(1);
     }
 }
Exemplo n.º 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (_recorder)
     {
         timerRecordTime.Stop();
         _recorder = false;
         this.Text = "Recording Stopped.";
         MainWindowView.StopRecording();
         MainWindowView.StopCamera();
         // Thread thread = new Thread(showplay);
         //thread.Start();
         VideoPreview videoPreview = new VideoPreview();
         videoPreview.Show();
         ClosedByCode = true;
         this.Close();
     }
     else
     {
         cmbMicrophone.Enabled = cmbWebCamera.Enabled = false;
         _recorder             = true;
         //Thread tr= new Thread(startCamera);
         //tr.Start();
         IsRecordLoad = false;
         timerform timerform = new timerform();
         timerform.ShowDialog();
         button1.BackgroundImage = Resources.StopRecording2;
         this.Text = "Recording...";
         bool isaudio = waveInCapabilities.Count > 0 ? true : false;
         MainWindowView.StartRecording(isaudio, cmbMicrophone.SelectedIndex, 2);
         timerRecordTime.Start();
         timerRecordTime.Interval = 1000;
     }
     //timerRecordTime.Stop();
     //timer1.Start();
 }
Exemplo n.º 3
0
        private void btnRecordAgain_Click(object sender, EventArgs e)
        {
            Program.IsRecordAgain    = true;
            RecordVideo.IsRecordLoad = true;
            timerform form1 = new timerform();

            form1.Show();
            isclosedbycode = true;
            this.Close();
        }