private void cbPlaybackDevices2_SelectedIndexChanged(object sender, EventArgs e) { stopPlayback(); initAudioPlaybackEngine(); XMLSettings.soundboardSettings.LastPlaybackDevice2 = (string)cbPlaybackDevices2.SelectedItem; XMLSettings.SaveSoundboardSettingsXML(); }
private void cbLoopbackDevices_SelectedIndexChanged(object sender, EventArgs e) { stopLoopback(); if (cbLoopbackDevices.SelectedIndex > 0) { startLoopback(); } XMLSettings.soundboardSettings.LastLoopbackDevice = (string)cbLoopbackDevices.SelectedItem; XMLSettings.SaveSoundboardSettingsXML(); }
private void CbAudioOverdrive_CheckedChanged(object sender, EventArgs e) { if (cbAudioOverdrive.Checked) { labelVolume.Text = (trackbarVolume.Value * 3).ToString() + " dB"; } else { labelVolume.Text = trackbarVolume.Value.ToString() + " dB"; } XMLSettings.soundboardSettings.GoEvenFurtherBeyond = cbAudioOverdrive.Checked; XMLSettings.SaveSoundboardSettingsXML(); }
private void TrackBar1_Scroll(object sender, EventArgs e) { if (cbAudioOverdrive.Checked) { labelVolume.Text = (trackbarVolume.Value * 3).ToString() + " dB"; } else { labelVolume.Text = trackbarVolume.Value.ToString() + " dB"; } XMLSettings.soundboardSettings.GainValue = trackbarVolume.Value; XMLSettings.SaveSoundboardSettingsXML(); }
private void btnOK_Click(object sender, EventArgs e) { Keys[] keysArr = null; Keys[] keysArr2 = null; string error = ""; if ((string.IsNullOrWhiteSpace(tbStopSoundKeys.Text) || Helper.keysArrayFromString(tbStopSoundKeys.Text, out keysArr, out error)) && (string.IsNullOrWhiteSpace(tbPlaySelectionKeys.Text) || Helper.keysArrayFromString(tbPlaySelectionKeys.Text, out keysArr2, out error))) { if (loadXMLFilesList.Count == 0 || loadXMLFilesList.All(x => x.Keys.Length > 0 && !string.IsNullOrWhiteSpace(x.XMLLocation) && File.Exists(x.XMLLocation))) { XMLSettings.soundboardSettings.StopSoundKeys = (keysArr == null ? new Keys[] { } : keysArr); XMLSettings.soundboardSettings.PlaySelectionKeys = (keysArr2 == null ? new Keys[] { } : keysArr2); XMLSettings.soundboardSettings.LoadXMLFiles = loadXMLFilesList.ToArray(); XMLSettings.soundboardSettings.MinimizeToTray = cbMinimizeToTray.Checked; XMLSettings.soundboardSettings.PlaySoundsOverEachOther = cbPlaySoundsOverEachOther.Checked; XMLSettings.soundboardSettings.RememberGainControl = cbRememberGainControl.Checked; XMLSettings.soundboardSettings.GainValue = MainForm.Instance.trackbarVolume.Value; XMLSettings.soundboardSettings.GoEvenFurtherBeyond = MainForm.Instance.cbAudioOverdrive.Checked; XMLSettings.SaveSoundboardSettingsXML(); this.Close(); } else { MessageBox.Show("One or more entries either have no keys added, the location is empty, or the file the location points to does not exist"); } } else if (error != "") { MessageBox.Show(error); } }