private void endLectureButton_Click(object sender, EventArgs e) { pptLoader.ChangeDisplayToNormal(); if (desktopStream) { SaveImagePlusTime(); timer.IsEnabled = false; timer.Stop(); hoGen.StopRecordingAudio(); slides = 0; hoGen = null; stream.EndStream(); streamStarted = false; MessageBox.Show("Lecture Ended"); slideShowPanel.Controls.Clear(); } else { stream.EndStream(); streamStarted = false; } //startdesktop.IsEnabled = true; //next.IsEnabled = true; //startcam.IsEnabled = true; }
private void SaveImagePlusTime() { slides++; TimeSpan time = (DateTime.Now - startTime); if (hoGen == null) { startTime = DateTime.Now; hoGen = new HandoutGenerator(startTime); } hoGen.WriteSlideTime(time.ToString()); hoGen.SaveScreenShoot(slides); }
private void streamDesktopButton_Click(object sender, EventArgs e) { if (!streamStarted) { //if(coursesWindow == null) //{ // coursesWindow = new StartLectureWindow(this); //} //TopMost = false; //coursesWindow.ShowDialog(); //startcam.IsEnabled = false; if (this.device.Mics.Count > 0) { if (this.device.WebCams.Contains("screen-capture-recorder")) { this.desktopStream = true; this.stream.VideoDevice = "screen-capture-recorder"; this.stream.AudioDevice = this.device.Mics[0]; this.stream.StreamName = Properties.Settings.Default.courseid; this.stream.CreateCommand(Instructor___Omlate.Stream.StreamClass.StreamType.DesktopStream); this.stream.StartStream(); this.streamStarted = true; this.slides = 0; this.startTime = DateTime.Now; this.hoGen = new HandoutGenerator(this.startTime); this.hoGen.StartRecordingAudio(); this.timer.IsEnabled = true; this.timer.Start(); } else { MessageBox.Show("Desktop Capture Component is missing"); } } else { MessageBox.Show("Audio Device not Found"); } } else { MessageBox.Show("Stream Already Started"); } }