Skip to content
This repository has been archived by the owner on Dec 21, 2024. It is now read-only.

Commit

Permalink
Fix problem where possible parameters were not showing
Browse files Browse the repository at this point in the history
  • Loading branch information
StrangeRanger committed Mar 10, 2024
1 parent ca56a71 commit dfc8f0d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions ActiveDirectoryQuerier/ComboBoxParameterViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace ActiveDirectoryQuerier;
public sealed class ComboBoxParameterViewModel : INotifyPropertyChanged
{
public event PropertyChangedEventHandler? PropertyChanged;
private ObservableCollection<string> _possibleParameters = new();
private ObservableCollection<string> _possibleParameterListList = new();
private string _selectedParameter = string.Empty;

/// <summary>
Expand All @@ -19,7 +19,7 @@ public sealed class ComboBoxParameterViewModel : INotifyPropertyChanged
/// <param name="possibleParameters">Initial list of possible parameters for the ComboBox.</param>
public ComboBoxParameterViewModel(ObservableCollection<string> possibleParameters)
{
PossibleParameters = possibleParameters ?? throw new ArgumentNullException(nameof(possibleParameters));
PossibleParameterList = possibleParameters ?? throw new ArgumentNullException(nameof(possibleParameters));
}

/// <summary>
Expand All @@ -40,19 +40,19 @@ public string SelectedParameter
/// <summary>
/// Gets or sets the list of possible parameters that can be selected for a command.
/// </summary>
public ObservableCollection<string> PossibleParameters
public ObservableCollection<string> PossibleParameterList
{
get => _possibleParameters;
get => _possibleParameterListList;
set {
if (value is null)
{
throw new ArgumentNullException(nameof(value));
}

if (_possibleParameters != value)
if (_possibleParameterListList != value)
{
_possibleParameters = value;
OnPropertyChanged(nameof(PossibleParameters));
_possibleParameterListList = value;
OnPropertyChanged(nameof(PossibleParameterList));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion ActiveDirectoryQuerier/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ private async Task LoadCommandParametersAsync(Command? selectedCommand)
// Update the possible properties of the ComboBoxParameterViewModels.
foreach (ComboBoxParameterViewModel comboBoxParameterViewModel in DynamicParametersCollection)
{
comboBoxParameterViewModel.PossibleParameters = PossibleCommandParametersList;
comboBoxParameterViewModel.PossibleParameterList = PossibleCommandParametersList;
}
}

Expand Down

0 comments on commit dfc8f0d

Please sign in to comment.