private void enableEntity_CheckedChanged(object sender, EventArgs e) { if (enableEntity.Checked) { if ((AudioTypeMethod.Parse(AudioReactor.getInstance(arEntity).audioType) != -1) && (DataTypeMethod.Parse(AudioReactor.getInstance(arEntity).dataType) != -1)) { AudioReactor.getInstance(arEntity).start(); } else { enableEntity.Checked = false; } } else { AudioReactor.getInstance(arEntity).stop(); } }
private void deviceTypeBox_SelectedIndexChanged(object sender, EventArgs e) { deviceSelectorBox.Items.Clear(); deviceSelectorBox.Enabled = false; AudioReactor.getInstance(arEntity).audioDeviceNumber = 0; AudioReactor.getInstance(arEntity).audioType = AudioTypeMethod.Parse(deviceTypeBox.SelectedIndex); if (AudioTypeMethod.Parse(deviceTypeBox.SelectedIndex) == AudioType.MICROPHONE) { deviceSelectorBox.Enabled = true; Dictionary <int, string> d = AudioReactor.getInputDeviceDict(); int i = 0; foreach (KeyValuePair <int, string> entry in d) { deviceSelectorBox.Items.Add(entry.Key + " >-> " + entry.Value); i++; } } }