Esempio n. 1
0
 //Button and Combo Box Event
 private void StartStream_Button_Click(object sender, EventArgs e)
 {
     streamManager.ConnectionString        = this.StreamConnection_Box.Text;
     streamManager.Password                = this.Password_TextBox.Text;
     streamManager.User                    = this.User_TextBox.Text;
     StreamConnection_Box.Enabled          = false;
     User_TextBox.Enabled                  = false;
     Password_TextBox.Enabled              = false;
     DatabaseConnection_Box.Enabled        = false;
     FaceApiKey_Box.Enabled                = false;
     FaceApiUri_Box.Enabled                = false;
     selectCameraToolStripMenuItem.Enabled = false;
     try
     {
         streamManager.StartStream();
         Recording             = true;
         this.VideoStatus.Text = "On Stream";
     }
     catch (Exception ex)
     {
         OutputResult.Text = ex.Message;
         while (ex.InnerException != null)
         {
             ex = ex.InnerException;
             OutputResult.Text += "\n" + ex.Message;
         }
         this.StopStream_Button_Click(sender, e);
     }
 }