/// <summary> /// Update the form's status to display what's going on /// </summary> public void UpdateStatus() { if (kCurrentPodcast == null) { BigButton.Text = "START\nSHOW"; BigButton.BackColor = Color.DarkGreen; BigButton.Height = this.Height; iPodButton.Visible = false; BigButton.Enabled = true; this.Width = BigButton.Width; this.Height = BigButton.Height; this.Left = Screen.PrimaryScreen.WorkingArea.Width - this.Width; this.Top = Screen.PrimaryScreen.WorkingArea.Height - this.Height; BigButton.Top = 0; BigButton.Left = 0; ChangeSongButton.Visible = false; DurationTimerLabel.Visible = false; } else { if (BigButton.Text.Contains("START")) { BigButton.Text = "STOP\nSHOW"; BigButton.BackColor = Color.Red; if (kCurrentPodcast.kShow.kSkill == ShowPermissions.Intermediate) { this.Left -= this.Width; this.Width *= 2; BigButton.Left = this.Width / 2; iPodButton.Left = 0; iPodButton.Top = 0; iPodButton.Height = this.Height / 2; iPodButton.Width = this.Width / 2; iPodButton.Visible = true; iPodButton.BackColor = Color.DarkRed; iPodButton.Font = OnAirFont; iPodButton.Text = "ON AIR"; DurationTimerLabel.Left = 0; DurationTimerLabel.Top = this.Height / 2; DurationTimerLabel.Width = this.Width / 2; DurationTimerLabel.Height = this.Height / 2; DurationTimerLabel.Visible = true; ChangeSongButton.Left = 0; ChangeSongButton.Top = this.Height / 2; ChangeSongButton.Visible = false; thisPauseEvent = new PauseRecording(kCurrentPodcast_OnPause); thisResumeEvent = new ResumeRecording(kCurrentPodcast_OnResume); this.kCurrentPodcast.OnPause += thisPauseEvent; this.kCurrentPodcast.OnResume += thisResumeEvent; OnAirFlashTimer.Start(); DurationTimerLabel.Clear(); DurationTimerLabel.Start(); } BigButton.Enabled = true; } /* else { // Is this even possible...? BigButton.Text = "START\nSHOW"; BigButton.BackColor = Color.DarkGreen; BigButton.Height = this.Height; iPodButton.Visible = false; BigButton.Enabled = true; } */ } }
/// <summary> /// This constructor is not available from outside the class /// </summary> private KLIKPodcast() { this.dStarted = DateTime.Now; FullShow = new PodcasterRecording("full.mp3", 44100, 2, 192, StereoMode.JointStereo); EditedShow = new PodcasterRecording("edit.mp3", 44100, 1, 64, StereoMode.Mono); onPauseEvent = new PauseRecording(Controller_OnPause); onResumeEvent = new ResumeRecording(Controller_OnResume); logSongEvent = new LogSong(Controller_OnLogSong); foreach (IController ic in CoreInstances.Controllers) { ic.OnPause += onPauseEvent; ic.OnResume += onResumeEvent; ic.OnLogSong += logSongEvent; } }