public override void Execute() { if (isCustomTone) { if (null != customTalkpointTone) { VSOperations.PlaySound(customTalkpointTone); } } else { VSOperations.PlaySound(talkpointTone); } }
private void ToneSelectComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (!(sender is ComboBox)) { return; } if ((sender as ComboBox).SelectedIndex < 0) { return; } if ((sender as ComboBox).SelectedItem is Tones tone) { VSOperations.PlaySound(tone); } else { VSOperations.PlaySound((sender as ComboBox).SelectedItem as CustomTone); } }