private void btnMp3File_Click(object sender, EventArgs e) { SoundSinkInfo info = new SoundSinkInfo(); info.Page = new SinkTab("MP3"); info.Sink = new SoundFileSink(eFileType.MP3, info.Page.splitContainer.Panel2); PrepareSinkTab(info); DemodState.AddSink(info); }
private void btnShmem_Click(object sender, EventArgs e) { SoundSinkInfo info = new SoundSinkInfo(); info.Page = new SinkTab("Shared Mem"); info.Sink = new SharedMemSink(info.Page.splitContainer.Panel2); PrepareSinkTab(info); DemodState.AddSink(info); }
private void btnMp3_Click(object sender, EventArgs e) { SoundSinkInfo info = new SoundSinkInfo(); info.Page = new SinkTab("Stream"); info.Sink = new ShoutcastSink(info.Page.splitContainer.Panel2); PrepareSinkTab(info); DemodState.AddSink(info); }
private void PrepareSinkTab(SoundSinkInfo info) { tabSoundOut.Controls.Add(info.Page); info.Page.closeLabel.MouseClick += (object s, MouseEventArgs a) => { if (a.Button == MouseButtons.Left) { tabSoundOut.Controls.Remove(info.Page); DemodState.RemoveSink(info); } }; info.Page.closeLabel.MouseEnter += (object s, EventArgs a) => { info.Page.closeLabel.ForeColor = Color.Gray; }; info.Page.closeLabel.MouseLeave += (object s, EventArgs a) => { info.Page.closeLabel.ForeColor = Color.Black; }; tabSoundOut.SelectedTab = info.Page; }