Skip to content

Commit

Permalink
Fixed an issue that left a lot of white space after a listview contro…
Browse files Browse the repository at this point in the history
…l search

Fixed an issue that left a lot of white space after a listview control search
  • Loading branch information
Gaoyifei1011 committed Jun 26, 2024
1 parent 2a96a63 commit 91c41ab
Show file tree
Hide file tree
Showing 16 changed files with 917 additions and 52 deletions.
90 changes: 90 additions & 0 deletions WindowsTools/Models/LoopbackModel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
using System;
using System.ComponentModel;
using Windows.UI.Xaml;

namespace WindowsTools.Models
{
/// <summary>
/// 网络回环数据模型
/// </summary>
public class LoopbackModel : INotifyPropertyChanged
{
private Visibility _isVisible;

public Visibility IsVisible
{
get { return _isVisible; }

set
{
if (!Equals(_isVisible, value))
{
_isVisible = value;
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsVisible)));
}
}
}

private bool _isChecked;

public bool IsChecked
{
get { return _isChecked; }

set
{
if (!Equals(_isChecked, value))
{
_isChecked = value;
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsChecked)));
}
}
}

public bool IsOldChecked { get; set; }

/// <summary>
/// 应用程序运行的二进制路径
/// </summary>
public string[] StringBinaries { get; set; }

/// <summary>
/// 应用容器的全局唯一名称
/// </summary>
public string AppContainerName { get; set; }

/// <summary>
/// 应用容器的友好名称
/// </summary>
public string DisplayName { get; set; }

/// <summary>
/// 应用容器其用途的说明、使用该容器的应用程序的目标等
/// </summary>
public string Description { get; set; }

public string PackageFullName { get; set; }

/// <summary>
/// 应用容器的工作目录
/// </summary>
public string WorkingDirectory { get; set; }

/// <summary>
/// 应用容器所属用户的名称
/// </summary>
public string UserAccountSIDName { get; set; }

/// <summary>
/// 应用容器的包标识符
/// </summary>
public IntPtr AppContainerSID { get; set; }

/// <summary>
/// 应用容器的包标识符名称
/// </summary>
public string AppContainerSIDName { get; set; }

public event PropertyChangedEventHandler PropertyChanged;
}
}
6 changes: 3 additions & 3 deletions WindowsTools/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
[assembly: AssemblyCompany("高怡飞")]
[assembly: AssemblyCopyright("Copyright ©2024 高怡飞, All Rights Reserved.")]
[assembly: AssemblyDescription("Windows 工具箱")]
[assembly: AssemblyFileVersion("2.6.625.0")]
[assembly: AssemblyInformationalVersion("2.6.625.0")]
[assembly: AssemblyFileVersion("2.6.626.0")]
[assembly: AssemblyInformationalVersion("2.6.626.0")]
[assembly: AssemblyProduct("Windows 工具箱")]
[assembly: AssemblyTitle("Windows 工具箱")]
[assembly: AssemblyVersion("2.6.625.0")]
[assembly: AssemblyVersion("2.6.626.0")]
72 changes: 72 additions & 0 deletions WindowsTools/Strings/LoopbackManager.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions WindowsTools/Strings/LoopbackManager.en-us.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,30 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="EmptyDescription" xml:space="preserve">
<value>The device has no application</value>
</data>
<data name="Refresh" xml:space="preserve">
<value>Refresh</value>
</data>
<data name="Reset" xml:space="preserve">
<value>Reset</value>
</data>
<data name="Save" xml:space="preserve">
<value>Save</value>
</data>
<data name="SearchAppNamePHText" xml:space="preserve">
<value>Search app name</value>
</data>
<data name="SearchEmptyDescription" xml:space="preserve">
<value>No apps found</value>
</data>
<data name="SelectAll" xml:space="preserve">
<value>Select all</value>
</data>
<data name="SelectNone" xml:space="preserve">
<value>Select none</value>
</data>
<data name="Title" xml:space="preserve">
<value>Loop back manager</value>
</data>
Expand Down
24 changes: 24 additions & 0 deletions WindowsTools/Strings/LoopbackManager.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,30 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="EmptyDescription" xml:space="preserve">
<value>The device has no application</value>
</data>
<data name="Refresh" xml:space="preserve">
<value>Refresh</value>
</data>
<data name="Reset" xml:space="preserve">
<value>Reset</value>
</data>
<data name="Save" xml:space="preserve">
<value>Save</value>
</data>
<data name="SearchAppNamePHText" xml:space="preserve">
<value>Search app name</value>
</data>
<data name="SearchEmptyDescription" xml:space="preserve">
<value>No apps found</value>
</data>
<data name="SelectAll" xml:space="preserve">
<value>Select all</value>
</data>
<data name="SelectNone" xml:space="preserve">
<value>Select none</value>
</data>
<data name="Title" xml:space="preserve">
<value>Loop back manager</value>
</data>
Expand Down
24 changes: 24 additions & 0 deletions WindowsTools/Strings/LoopbackManager.zh-hans.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,30 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="EmptyDescription" xml:space="preserve">
<value>该设备没有任何应用</value>
</data>
<data name="Refresh" xml:space="preserve">
<value>刷新</value>
</data>
<data name="Reset" xml:space="preserve">
<value>重置</value>
</data>
<data name="Save" xml:space="preserve">
<value>保存</value>
</data>
<data name="SearchAppNamePHText" xml:space="preserve">
<value>搜索应用名称</value>
</data>
<data name="SearchEmptyDescription" xml:space="preserve">
<value>没有搜索到任何应用</value>
</data>
<data name="SelectAll" xml:space="preserve">
<value>全选</value>
</data>
<data name="SelectNone" xml:space="preserve">
<value>全部不选</value>
</data>
<data name="Title" xml:space="preserve">
<value>网络回环管理</value>
</data>
Expand Down
3 changes: 2 additions & 1 deletion WindowsTools/Styles/ListView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
<Setter Property="Background" Value="Transparent" />
<Setter Property="TabNavigation" Value="Local" />
<Setter Property="IsHoldingEnabled" Value="False" />
<Setter Property="Margin" Value="0,0,0,1" />
<Setter Property="Margin" Value="0" />
<Setter Property="MinHeight" Value="0" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Top" />
<Setter Property="Template">
Expand Down
17 changes: 9 additions & 8 deletions WindowsTools/Views/Pages/DownloadManagerPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
VerticalAlignment="Center"
PlaceholderText="{x:Bind string:DownloadManager.SearchDownloadPHText}"
QuerySubmitted="{x:Bind OnSearchDownloadQuerySubmitted}"
Text="{x:Bind SearchDownload, Mode=OneWay}"
Text="{x:Bind SearchDownloadText, Mode=OneWay}"
TextChanged="{x:Bind OnSearchDownloadTextChanged}" />

<Button
Expand All @@ -223,7 +223,7 @@
Padding="0"
Click="{x:Bind OnAddTaskClicked}"
CornerRadius="{StaticResource ControlCornerRadius}"
IsEnabled="{x:Bind sys:String.IsNullOrEmpty(SearchDownload), Mode=OneWay}"
IsEnabled="{x:Bind sys:String.IsNullOrEmpty(SearchDownloadText), Mode=OneWay}"
ToolTipService.ToolTip="{x:Bind string:DownloadManager.AddTaskToolTip}">

<Button.Content>
Expand All @@ -239,7 +239,7 @@
Padding="0"
Click="{x:Bind OnStartDownloadClicked}"
CornerRadius="{StaticResource ControlCornerRadius}"
IsEnabled="{x:Bind sys:String.IsNullOrEmpty(SearchDownload), Mode=OneWay}"
IsEnabled="{x:Bind sys:String.IsNullOrEmpty(SearchDownloadText), Mode=OneWay}"
ToolTipService.ToolTip="{x:Bind string:DownloadManager.StartDownloadToolTip}">

<Button.Content>
Expand All @@ -255,7 +255,7 @@
Padding="0"
Click="{x:Bind OnPauseDownloadClicked}"
CornerRadius="{StaticResource ControlCornerRadius}"
IsEnabled="{x:Bind sys:String.IsNullOrEmpty(SearchDownload), Mode=OneWay}"
IsEnabled="{x:Bind sys:String.IsNullOrEmpty(SearchDownloadText), Mode=OneWay}"
ToolTipService.ToolTip="{x:Bind string:DownloadManager.PauseDownloadToolTip}">

<Button.Content>
Expand All @@ -271,7 +271,7 @@
Padding="0"
Click="{x:Bind OnDeleteDownloadClicked}"
CornerRadius="{StaticResource ControlCornerRadius}"
IsEnabled="{x:Bind sys:String.IsNullOrEmpty(SearchDownload), Mode=OneWay}"
IsEnabled="{x:Bind sys:String.IsNullOrEmpty(SearchDownloadText), Mode=OneWay}"
ToolTipService.ToolTip="{x:Bind string:DownloadManager.DeleteDownloadToolTip}">

<Button.Content>
Expand Down Expand Up @@ -344,7 +344,7 @@

<Grid
Grid.Row="2"
Margin="30,3,30,0"
Margin="30,0,30,0"
Padding="16,12"
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
Expand All @@ -367,7 +367,7 @@

<Grid
Grid.Row="0"
Margin="30,3,30,0"
Margin="30,0,30,0"
Padding="16,12"
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
Expand All @@ -384,7 +384,7 @@

<ListView
Grid.Row="1"
Padding="30,3,30,30"
Padding="30,0,30,30"
ItemContainerStyle="{StaticResource CardListViewItemContainerStyle}"
ItemsSource="{x:Bind DownloadCollection, Mode=OneWay}"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
Expand All @@ -398,6 +398,7 @@
<DataTemplate x:DataType="model:DownloadModel">
<Grid
Height="66"
Margin="0,0,0,2"
Padding="16,12"
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
Expand Down
Loading

0 comments on commit 91c41ab

Please sign in to comment.