private void ToMatchTypeChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
{
if (m_initialised)
{
var toTypeComboBox = sender as ComboBox;
if (toTypeComboBox != null && toTypeComboBox.SelectedValue != null)
{
switch ((toTypeComboBox.SelectedValue as TextBlock).Text)
{
case "Any":
ToMatchRegex.Stop();
ToMatchSpecificProvider.Stop();
ToMatchSpecificSIPAccount.Stop();
break;
case "ToSIPAccount":
ToMatchRegex.Stop();
ToMatchSpecificProvider.Stop();
ToMatchSpecificSIPAccount.Begin();
break;
case "ToSIPProvider":
ToMatchRegex.Stop();
ToMatchSpecificProvider.Begin();
ToMatchSpecificSIPAccount.Stop();
break;
case "Regex":
ToMatchRegex.Begin();
ToMatchSpecificProvider.Stop();
ToMatchSpecificSIPAccount.Stop();
break;
}
}
}
}