Browse Source

Renamed InstalledPackages and set on load

pull/5/head
Ionite 2 years ago
parent
commit
03c42e62b1
No known key found for this signature in database
  1. 2
      StabilityMatrix/LaunchPage.xaml
  2. 1
      StabilityMatrix/LaunchPage.xaml.cs
  3. 4
      StabilityMatrix/ViewModels/LaunchViewModel.cs

2
StabilityMatrix/LaunchPage.xaml

@ -34,7 +34,7 @@
Margin="10,10,0,0"/> Margin="10,10,0,0"/>
<ComboBox <ComboBox
x:Name="SelectPackageComboBox" x:Name="SelectPackageComboBox"
ItemsSource="{Binding Packages}" ItemsSource="{Binding InstalledPackages}"
SelectedValue="{Binding SelectedPackage}" SelectedValue="{Binding SelectedPackage}"
Grid.Row="0" Grid.Column="1" Grid.Row="0" Grid.Column="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"

1
StabilityMatrix/LaunchPage.xaml.cs

@ -18,5 +18,6 @@ public sealed partial class LaunchPage : Page
private void LaunchPage_OnLoaded(object sender, RoutedEventArgs e) private void LaunchPage_OnLoaded(object sender, RoutedEventArgs e)
{ {
viewModel.OnLoaded(); viewModel.OnLoaded();
SelectPackageComboBox.ItemsSource = viewModel.InstalledPackages;
} }
} }

4
StabilityMatrix/ViewModels/LaunchViewModel.cs

@ -41,7 +41,7 @@ public partial class LaunchViewModel : ObservableObject
} }
} }
public ObservableCollection<InstalledPackage> Packages => new(); public ObservableCollection<InstalledPackage> InstalledPackages = new();
public LaunchViewModel(ISettingsManager settingsManager) public LaunchViewModel(ISettingsManager settingsManager)
{ {
@ -109,7 +109,7 @@ public partial class LaunchViewModel : ObservableObject
foreach (var package in packages) foreach (var package in packages)
{ {
Packages.Add(package); InstalledPackages.Add(package);
} }
} }
} }

Loading…
Cancel
Save