Skip to content

Commit

Permalink
Finish task and publish 1.1.126.0 version
Browse files Browse the repository at this point in the history
Finish task and publish 1.1.126.0 version
  • Loading branch information
Gaoyifei1011 committed Jan 26, 2023
1 parent d40728b commit fd175f0
Show file tree
Hide file tree
Showing 12 changed files with 68 additions and 49 deletions.
5 changes: 4 additions & 1 deletion Description/README_EN-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,13 @@ All the content of the program has been developed

> * [Aira2](https://aria2.github.io) 
> * [Microsoft.Data.Sqlite.Core](https://docs.microsoft.com/dotnet/standard/data/sqlite) 
> * [Microsoft.Windows.SDK.BuildTools*](https://aka.ms/WinSDKProjectURL) 
> * [Microsoft.WindowsAppSDK](https://github.com/microsoft/windowsappsdk) 
> * [SQLitePCLRaw.core](https://github.com/ericsink/SQLitePCL.raw) 
> * [SQLitePCLRaw.provider.winsqlite3](https://github.com/ericsink/SQLitePCL.raw) 
> * [System.Memory*](https://dot.net) 
The "*" marked is the content referenced by the third-party library
[Code referenced or used during the learning process](https://github.com/Gaoyifei1011/GetStoreApp/blob/master/Description/StudyReferenceCode.md) 

------
Expand All @@ -64,7 +67,7 @@ All the content of the program has been developed

> * The program is built using the Windows Apps SDK, and it is recommended that your system version be Windows 11 (codename 21H2 / build 22000) or later, and the minimum version is Windows 10 (codename 1809 / build 17763) or later.
> * If your system is Windows 10, there are some limitations to app functionality:
Setting the mica/mica alt/acrylic background color is not supported at this time
Setting the mica/mica alt background color is not supported
> * [Release](https://github.com/Gaoyifei1011/GetStoreApp/releases) The binary installation file for the page has been packaged into a compressed package. Unzip the package and run the install.ps1 file in Powershell admin mode (if necessary) for a quick installation.
> * Download and compile the project source code yourself. (Please read the project compilation steps below carefully)
Expand Down
5 changes: 4 additions & 1 deletion Description/README_ZH-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,13 @@

> * [Aira2](https://aria2.github.io) 
> * [Microsoft.Data.Sqlite.Core](https://docs.microsoft.com/dotnet/standard/data/sqlite) 
> * [Microsoft.Windows.SDK.BuildTools*](https://aka.ms/WinSDKProjectURL) 
> * [Microsoft.WindowsAppSDK](https://github.com/microsoft/windowsappsdk) 
> * [SQLitePCLRaw.core](https://github.com/ericsink/SQLitePCL.raw) 
> * [SQLitePCLRaw.provider.winsqlite3](https://github.com/ericsink/SQLitePCL.raw) 
> * [System.Memory*](https://dot.net) 
标记"*"的是第三方库引用的内容
[学习过程中参考或使用的代码](https://github.com/Gaoyifei1011/GetStoreApp/blob/master/Description/StudyReferenceCode.md) 

------
Expand All @@ -64,7 +67,7 @@

> * 该程序使用的是Windows 应用 SDK构建的,建议您的系统版本为Windows 11(代号 21H2 / 内部版本号 22000)或更高版本,最低版本为Windows 10(代号1809 / 内部版本号17763)或更高版本。
> * 如果您的系统是Windows 10,应用功能存在一些限制:
暂不支持设置云母/云母Alt/亚克力背景色
不支持设置云母/云母Alt背景色
> * [Release](https://github.com/Gaoyifei1011/GetStoreApp/releases)页面的二进制安装文件已经打包成压缩包。请解压压缩包并使用Powershell管理员模式(必要情况下)运行install.ps1文件方可实现快速安装。
> * 自行下载项目源代码并编译。(请仔细阅读下面的项目编译步骤)
Expand Down
1 change: 1 addition & 0 deletions Description/StudyReferenceCode.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
> * [Null.ConsoleEx](https://github.com/SlimeNull/Null.ConsoleEx) 
> * [P/Invoke](https://github.com/dotnet/pinvoke) 
> * [TaskbarManager](https://blog.csdn.net/weixin_30521161/article/details/96964128) 
> * [UWP InAppNotification(Popup)](https://www.cnblogs.com/MzwCat/p/7748033.html) 
> * [YDKK.Windows.NotifyIcon](https://github.com/YDKK/YDKK.Windows.NotifyIcon) 
10 changes: 6 additions & 4 deletions GetStoreApp/GetStoreApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<EnableMsixTooling>false</EnableMsixTooling>
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
<FileAlignment>512</FileAlignment>
<FileVersion>1.1.122.0</FileVersion>
<FileVersion>1.1.126.0</FileVersion>
<GenerateTestArtifacts>True</GenerateTestArtifacts>
<HttpActivityPropagationSupport>false</HttpActivityPropagationSupport>
<IncludeSymbols>False</IncludeSymbols>
Expand All @@ -28,7 +28,7 @@
<PublishProtocol>FileSystem</PublishProtocol>
<PublishReadyToRun>True</PublishReadyToRun>
<!--调试时需要设置该选项为false-->
<!--<PublishSingleFile>true</PublishSingleFile>-->
<PublishSingleFile>true</PublishSingleFile>
<PublishTrimmed>true</PublishTrimmed>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<RootNamespace>GetStoreApp</RootNamespace>
Expand All @@ -40,7 +40,7 @@
<TargetFramework>net7.0-windows10.0.22621.0</TargetFramework>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<TrimMode>partial</TrimMode>
<Version>1.1.122.0</Version>
<Version>1.1.126.0</Version>
<UseWindowsForms>False</UseWindowsForms>
<UseWinUI>true</UseWinUI>
<UseWPF>False</UseWPF>
Expand Down Expand Up @@ -264,9 +264,11 @@
<None Remove="Views\Window\MainWindow.xaml" />

<PackageReference Include="Microsoft.Data.Sqlite.Core" Version="7.0.2" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.2.221209.1" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.755" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.2.230118.102" />
<PackageReference Include="SQLitePCLRaw.core" Version="2.1.4" />
<PackageReference Include="SQLitePCLRaw.provider.winsqlite3" Version="2.1.4" />
<PackageReference Include="System.Memory" Version="4.5.5" />

<Page Update="Styles\Button.xaml">
<Generator>MSBuild:Compile</Generator>
Expand Down
17 changes: 13 additions & 4 deletions GetStoreApp/Services/Root/DesktopLaunchService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Microsoft.Windows.AppNotifications;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Threading.Tasks;
using Windows.ApplicationModel.Activation;
Expand Down Expand Up @@ -150,11 +151,19 @@ private static async Task RunSingleInstanceAppAsync()
copyDataStruct.lpData = string.Format("{0} {1} {2}", LaunchArgs["TypeName"], LaunchArgs["ChannelName"], LaunchArgs["Link"] is null ? "PlaceHolderText" : LaunchArgs["Link"]);
copyDataStruct.cbData = Encoding.Default.GetBytes(copyDataStruct.lpData).Length + 1;

// 向主进程发送消息
User32Library.SendMessage(User32Library.FindWindow(null, ResourceService.GetLocalized("Resources/AppDisplayName")), WindowMessage.WM_COPYDATA, 0, ref copyDataStruct);
Process[] GetStoreAppProcess = Process.GetProcessesByName("GetStoreApp");

// 然后退出实例并停止
Environment.Exit(Convert.ToInt32(AppExitCode.Successfully));
foreach (Process process in GetStoreAppProcess)
{
if (process.MainWindowHandle != IntPtr.Zero)
{
// 向主进程发送消息
User32Library.SendMessage(process.MainWindowHandle, WindowMessage.WM_COPYDATA, 0, ref copyDataStruct);

// 然后退出实例并停止
Environment.Exit(Convert.ToInt32(AppExitCode.Successfully));
}
}
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions GetStoreApp/Strings/en-us/About.resw
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,9 @@
<data name="Reference" xml:space="preserve">
<value>Project references (Sort by alphabetical order)</value>
</data>
<data name="ReferenceTip" xml:space="preserve">
<value>The "*" marked is the content referenced by the third-party library</value>
</data>
<data name="ReferenceToolTip" xml:space="preserve">
<value>Click to learn about the referenced open source project</value>
</data>
Expand Down
3 changes: 3 additions & 0 deletions GetStoreApp/Strings/zh-hans/About.resw
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,9 @@
<data name="Reference" xml:space="preserve">
<value>项目引用(按英文首字母排序)</value>
</data>
<data name="ReferenceTip" xml:space="preserve">
<value>标记"*"的是第三方库引用的内容</value>
</data>
<data name="ReferenceToolTip" xml:space="preserve">
<value>单击了解被引用开源项目的信息</value>
</data>
Expand Down
49 changes: 26 additions & 23 deletions GetStoreApp/UI/Controls/About/ReferenceControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,32 @@
<TextBlock Style="{StaticResource ExpanderHeaderStyle}" Text="{x:Bind root:ResourceService.GetLocalized('About/Reference')}" />
</Expander.Header>
<Expander.Content>
<controls:AdaptiveGridView
Margin="9,0"
Padding="0"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch"
DesiredWidth="280"
ItemContainerStyle="{StaticResource GridViewItemStyle}"
ItemsSource="{x:Bind ViewModel.ReferenceDict}"
OneRowModeEnabled="False"
SelectionMode="None"
StretchContentForSingleRow="True">
<controls:AdaptiveGridView.ItemTemplate>
<DataTemplate>
<HyperlinkButton
Padding="5,8"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Left"
Content="{Binding Key, Mode=OneTime}"
NavigateUri="{Binding Value, Mode=OneTime}"
ToolTipService.ToolTip="{Binding Key, Converter={StaticResource AboutToolTipFormatConverter}, ConverterParameter=Reference, Mode=OneTime}" />
</DataTemplate>
</controls:AdaptiveGridView.ItemTemplate>
</controls:AdaptiveGridView>
<StackPanel>
<controls:AdaptiveGridView
Margin="9,0"
Padding="0"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch"
DesiredWidth="280"
ItemContainerStyle="{StaticResource GridViewItemStyle}"
ItemsSource="{x:Bind ViewModel.ReferenceDict}"
OneRowModeEnabled="False"
SelectionMode="None"
StretchContentForSingleRow="True">
<controls:AdaptiveGridView.ItemTemplate>
<DataTemplate>
<HyperlinkButton
Padding="5,8"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Left"
Content="{Binding Key, Mode=OneTime}"
NavigateUri="{Binding Value, Mode=OneTime}"
ToolTipService.ToolTip="{Binding Key, Converter={StaticResource AboutToolTipFormatConverter}, ConverterParameter=Reference, Mode=OneTime}" />
</DataTemplate>
</controls:AdaptiveGridView.ItemTemplate>
</controls:AdaptiveGridView>
<TextBlock Margin="14,5,0,5" Text="{x:Bind root:ResourceService.GetLocalized('About/ReferenceTip')}" />
</StackPanel>
</Expander.Content>
</Expander>
</UserControl>
2 changes: 2 additions & 0 deletions GetStoreApp/ViewModels/Controls/About/ReferenceViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ public sealed class ReferenceViewModel
{
{"Aira2","https://aria2.github.io" },
{"Microsoft.Data.Sqlite.Core","https://docs.microsoft.com/dotnet/standard/data/sqlite" },
{"Microsoft.Windows.SDK.BuildTools*","https://aka.ms/WinSDKProjectURL" },
{"Microsoft.WindowsAppSDK","https://github.com/microsoft/windowsappsdk" },
{"SQLitePCLRaw.core","https://github.com/ericsink/SQLitePCL.raw" },
{"SQLitePCLRaw.provider.winsqlite3","https://github.com/ericsink/SQLitePCL.raw" },
{"System.Memory*","https://dot.net" },
};
}
}
13 changes: 0 additions & 13 deletions GetStoreApp/WindowsAPI/PInvoke/User32/User32Library.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,19 +143,6 @@ public static extern IntPtr CreateWindowEx(
[DllImport(User32, CharSet = CharSet.Ansi, EntryPoint = "GetCursorPos", SetLastError = false)]
public static extern bool GetCursorPos(out POINT lpPoint);

/// <summary>
/// 检索顶级窗口的句柄,该窗口的类名称和窗口名称与指定的字符串匹配。 此函数不搜索子窗口。 此函数不执行区分大小写的搜索。
/// </summary>
/// <param name="lpClassName">
/// 类名或上一次对 RegisterClass 或 RegisterClassEx 函数的调用创建的类名或类原子。原子必须位于 lpClassName 的低序单词中;高阶单词必须为零。
/// 如果 lpClassName 指向字符串,则指定窗口类名。 类名可以是向 RegisterClass 或 RegisterClassEx 注册的任何名称,也可以是预定义控件类名称中的任何名称。
/// 如果 lpClassName 为 NULL,它将查找其标题与 lpWindowName 参数匹配的任何窗口。
/// </param>
/// <param name="lpWindowName">窗口名称 (窗口的标题) 。 如果此参数为 NULL,则所有窗口名称都匹配。</param>
/// <returns>如果函数成功,则返回值是具有指定类名和窗口名称的窗口的句柄。 如果函数失败,则返回值为 NULL。 </returns>
[DllImport(User32, CharSet = CharSet.Ansi, EntryPoint = "FindWindow", SetLastError = false)]
public static extern int FindWindow(string lpClassName, string lpWindowName);

/// <summary>检索前台窗口的句柄, (用户当前正在使用的窗口) 。 系统向创建前台窗口的线程分配略高于其他线程的优先级。</summary>
/// <returns>返回值是前台窗口的句柄。 在某些情况下,前台窗口可以为 NULL ,例如窗口丢失激活时。</returns>
[DllImport(User32, CharSet = CharSet.Unicode, EntryPoint = "GetForegroundWindow", SetLastError = true)]
Expand Down
2 changes: 1 addition & 1 deletion GetStoreAppPackage/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<Identity
Name="Gaoyifei1011.GetStoreApp"
Publisher="CN=高怡飞"
Version="1.1.122.0" />
Version="1.1.126.0" />

<Properties>
<DisplayName>ms-resource:PackageDisplayName</DisplayName>
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,22 @@

> * [Aira2](https://aria2.github.io)&emsp;
> * [Microsoft.Data.Sqlite.Core](https://docs.microsoft.com/dotnet/standard/data/sqlite)&emsp;
> * [Microsoft.Windows.SDK.BuildTools*](https://aka.ms/WinSDKProjectURL)&emsp;
> * [Microsoft.WindowsAppSDK](https://github.com/microsoft/windowsappsdk)&emsp;
> * [SQLitePCLRaw.core](https://github.com/ericsink/SQLitePCL.raw)&emsp;
> * [SQLitePCLRaw.provider.winsqlite3](https://github.com/ericsink/SQLitePCL.raw)&emsp;
> * [System.Memory*](https://dot.net)&emsp;
标记"*"的是第三方库引用的内容
[学习过程中参考或使用的代码](https://github.com/Gaoyifei1011/GetStoreApp/blob/master/Description/StudyReferenceCode.md)&emsp;

------

### 下载与安装注意事项

> * 该程序使用的是Windows 应用 SDK构建的,建议您的系统版本为Windows 11(代号 21H2 / 内部版本号 22000)或更高版本,最低版本为Windows 10(代号1803 / 内部版本号18362)或更高版本。
> * 该程序使用的是Windows 应用 SDK构建的,建议您的系统版本为Windows 11(代号 21H2 / 内部版本号 22000)或更高版本,最低版本为Windows 10(代号1809 / 内部版本号17763)或更高版本。
> * 如果您的系统是Windows 10,应用功能存在一些限制:
暂不支持设置云母/云母Alt/亚克力背景色
不支持设置云母/云母Alt背景色
> * [Release](https://github.com/Gaoyifei1011/GetStoreApp/releases)页面的二进制安装文件已经打包成压缩包。请解压压缩包并使用Powershell管理员模式(必要情况下)运行install.ps1文件方可实现快速安装。
> * 自行下载项目源代码并编译。(请仔细阅读下面的项目编译步骤)
Expand Down

0 comments on commit fd175f0

Please sign in to comment.