Skip to content

Commit

Permalink
Update data bindings and add new properties to ConfigModel
Browse files Browse the repository at this point in the history
Revised data bindings for better clarity and consistency in various XAML files. Added SearchEverything and ExtractedUnitypackages properties to the ConfigModel to support new functionalities. Removed unnecessary `sealed` keyword in the ExtractedFiles class.
  • Loading branch information
HakuSystems committed Oct 8, 2024
1 parent b8624c5 commit c5c4da3
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<ui:ListView
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch"
ItemsSource="{Binding QueueList}"
ItemsSource="{Binding Path=SearchEverything}"
Margin="15"
MaxHeight="300"
x:Name="QueueListView">
Expand Down Expand Up @@ -321,7 +321,7 @@

<!-- Category level -->
<HierarchicalDataTemplate.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding Value}">
<HierarchicalDataTemplate ItemsSource="{Binding Path=Value}">
<TextBlock
FontWeight="Bold"
Margin="20,0,0,0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
Grid.Row="1"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch"
ItemsSource="{Binding HistoryList}"
ItemsSource="{Binding Path=History}"
Margin="15">
<ui:ListView.ItemTemplate>
<DataTemplate>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@
FontFamily="{DynamicResource SegoeFluentIcons}"
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
Loaded="SearchEverything_OnLoaded"
d:DataContext="{d:DesignInstance Type=configModel:ConfigModel,
IsDesignTimeCreatable=True}"
mc:Ignorable="d"
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
x:Class="EasyExtract.Controls.SearchEverything"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:configModel="clr-namespace:EasyExtract.Models"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:sys="clr-namespace:System;assembly=System.Runtime"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
Expand Down Expand Up @@ -105,7 +111,8 @@
<ui:ListView
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch"
ItemsSource="{Binding SearchEverythingList}">
ItemsSource="{Binding Path=SearchEverythingList}"
x:Name="SearchEverythingListView">
<ui:ListView.ItemTemplate>
<DataTemplate>
<ui:CardControl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,7 @@ public class ConfigModel

public ObservableCollection<HistoryModel> History { get; set; } = new();
public ObservableCollection<IgnoredPackageInventory> IgnoredUnityPackages { get; set; } = new();
public ObservableCollection<SearchEverythingModel> SearchEverything { get; set; } = new();
public ObservableCollection<ExtractedUnitypackageModel> ExtractedUnitypackages { get; set; } = new();
public BackgroundModel Backgrounds { get; set; } = new();
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace EasyExtract.Models;

public sealed class ExtractedFiles : INotifyPropertyChanged
public class ExtractedFiles : INotifyPropertyChanged
{
private readonly string? _category = "No Category Available";
private readonly string _fileName = "No Name Available";
Expand Down

0 comments on commit c5c4da3

Please sign in to comment.