SIPSorcery.SimpleWizardInRuleControl.RuleCommandTypeSelectionChanged C# (CSharp) Method

RuleCommandTypeSelectionChanged() private method

private RuleCommandTypeSelectionChanged ( object sender, System e ) : void
sender object
e System
return void
        private void RuleCommandTypeSelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
        {
            var ruleCommandComboBox = sender as ComboBox;

            if (ruleCommandComboBox != null && m_ruleCommandLabel != null && ruleCommandComboBox.SelectedValue != null)
            {
                var command = (SimpleWizardCommandTypes)Enum.Parse(typeof(SimpleWizardCommandTypes), ((TextBlock)ruleCommandComboBox.SelectedValue).Text, true);

                switch (command)
                {
                    case SimpleWizardCommandTypes.Dial:
                        AdvancedDialCommandSB.Stop();
                        RejectCommandSB.Stop();
                        HighriseLookupSB.Stop();
                        DialCommandSB.Begin();
                        break;

                    case SimpleWizardCommandTypes.DialAdvanced:
                        DialCommandSB.Stop();
                        RejectCommandSB.Stop();
                        HighriseLookupSB.Stop();
                        AdvancedDialCommandSB.Begin();
                        break;

                    case SimpleWizardCommandTypes.Reject:
                        DialCommandSB.Stop();
                        AdvancedDialCommandSB.Stop();
                        HighriseLookupSB.Stop();
                        RejectCommandSB.Begin();
                        break;

                    case SimpleWizardCommandTypes.HighriseLookup:
                        DialCommandSB.Stop();
                        AdvancedDialCommandSB.Stop();
                        RejectCommandSB.Stop();
                        HighriseLookupSB.Begin();
                        break;
                }
            }
        }