void Network_Hide() { if (this.InvokeRequired) { Network.SimpleEvent d = new Network.SimpleEvent(Network_Hide); this.Invoke(d); } else { this.Visible = false; } }
void Network_VolumeUp() { if (this.InvokeRequired) { Network.SimpleEvent d = new Network.SimpleEvent(Network_VolumeUp); this.Invoke(d); } else { if (audio_mixer != null) { audio_mixer.put_Volume(volume + 500); audio_mixer.get_Volume(out volume); Network.SendStatus(channel, volume, (this.currentState == PlayState.Running)); } } }
void Network_TurnOff() { if (this.InvokeRequired) { Network.SimpleEvent d = new Network.SimpleEvent(Network_TurnOff); this.Invoke(d); } else { switch (this.currentState) { case PlayState.Running: int hr = this.mediaControl.Stop(); DsError.ThrowExceptionForHR(hr); currentState = PlayState.TurnedOff; break; } } }
void Network_ChannelUp() { if (this.InvokeRequired) { Network.SimpleEvent d = new Network.SimpleEvent(Network_ChannelUp); this.Invoke(d); } else { if (channel == max_channel) { channel = min_channel; } else { channel = channel + 1; } tuner.put_Channel(channel, AMTunerSubChannel.Default, AMTunerSubChannel.Default); tuner.get_Channel(out channel, out sub_channel, out sub_channel2); Network.SendStatus(channel, volume, (this.currentState == PlayState.Running)); } }