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

Commit

Permalink
Rename property
Browse files Browse the repository at this point in the history
  • Loading branch information
StrangeRanger committed Mar 10, 2024
1 parent dfc8f0d commit a610511
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 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> _possibleParameterListList = new();
private ObservableCollection<string> _possibleParameters = 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)
{
PossibleParameterList = possibleParameters ?? throw new ArgumentNullException(nameof(possibleParameters));
PossibleParameters = 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> PossibleParameterList
public ObservableCollection<string> PossibleParameters
{
get => _possibleParameterListList;
get => _possibleParameters;
set {
if (value is null)
{
throw new ArgumentNullException(nameof(value));
}

if (_possibleParameterListList != value)
if (_possibleParameters != value)
{
_possibleParameterListList = value;
OnPropertyChanged(nameof(PossibleParameterList));
_possibleParameters = value;
OnPropertyChanged(nameof(PossibleParameters));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion ActiveDirectoryQuerier/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
HorizontalAlignment="Left"
VerticalAlignment="Center"
Margin="5"
ItemsSource="{Binding PossibleParameterList}"
ItemsSource="{Binding PossibleParameters}"
SelectedItem="{Binding SelectedParameter}"
Grid.Row="0"
Grid.Column="1"/>
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.PossibleParameterList = PossibleCommandParametersList;
comboBoxParameterViewModel.PossibleParameters = PossibleCommandParametersList;
}
}

Expand Down

0 comments on commit a610511

Please sign in to comment.