private void addButton_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         parameters = new List <RevitParameter>();
         parameters = channel.Parameters(familyComboBox.SelectedItem as RevitObject, typeComboBox.SelectedItem as string);
         SelectParameterForm parameterForm = new SelectParameterForm(this, parameters, usedParameters);
         parameterForm.ShowDialog();
     }
     catch (Exception ex)
     {
         System.Windows.Forms.MessageBox.Show("Error\n\n" + ex.Message);
     }
     // Regenerate list view with parameters.
 }
 private void addButton_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         parameters = new List<RevitParameter>();
         parameters = channel.Parameters(familyComboBox.SelectedItem as RevitObject, typeComboBox.SelectedItem as string);
         SelectParameterForm parameterForm = new SelectParameterForm(this, parameters, usedParameters);
         parameterForm.ShowDialog();
     }
     catch (Exception ex)
     {
         System.Windows.Forms.MessageBox.Show("Error\n\n" + ex.Message);
     }
     // Regenerate list view with parameters.
 }