Skip to content

Commit

Permalink
添加关于
Browse files Browse the repository at this point in the history
  • Loading branch information
wherewhere committed Feb 18, 2022
1 parent e177126 commit e01b96b
Show file tree
Hide file tree
Showing 8 changed files with 153 additions and 69 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using CommunityToolkit.WinUI.UI.Controls;
using Microsoft.UI.Xaml.Controls;
using System;
using System.ComponentModel;
Expand Down Expand Up @@ -70,9 +71,6 @@ private void RaisePropertyChangedEvent([System.Runtime.CompilerServices.CallerMe

public MarkdownDialog() => InitializeComponent();

private void MarkdownText_LinkClicked(object sender, CommunityToolkit.WinUI.UI.Controls.LinkClickedEventArgs e)
{
_ = Launcher.LaunchUriAsync(new Uri(e.Link));
}
private void MarkdownText_LinkClicked(object sender, LinkClickedEventArgs e) => _ = Launcher.LaunchUriAsync(new Uri(e.Link));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@
<Setter Property="Padding" Value="{StaticResource ExpanderSettingMargin}" />
</Style>

<Style x:Key="ExpanderContentGridStyle" TargetType="Grid">
<Setter Property="CornerRadius" Value="0" />
<Setter Property="BorderThickness" Value="0,1,0,0" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="BorderBrush" Value="{ThemeResource CardBorderBrush}" />
<Setter Property="Padding" Value="{StaticResource ExpanderSettingMargin}" />
</Style>

<!-- Setting expander style -->
<Style x:Key="SettingExpanderStyle" TargetType="Expander">
<Setter Property="HorizontalAlignment" Value="Stretch" />
Expand Down
114 changes: 66 additions & 48 deletions APKInstaller/APKInstaller/Pages/SettingsPages/SettingsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:APKInstaller.Controls"
xmlns:cwuc="using:CommunityToolkit.WinUI.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:helper="using:APKInstaller.Helpers"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Expand Down Expand Up @@ -125,54 +126,71 @@
</controls:SettingButton>
</controls:SettingsGroup>
<controls:SettingsGroup x:Uid="/SettingsPage/AboutSettingsHeader" Margin="0,-32,0,0">
<controls:Setting Header="{Binding VersionTextBlockText}" Icon="&#xE117;">
<controls:Setting.Description>
<StackPanel Orientation="Vertical">
<TextBlock Style="{StaticResource SecondaryTextStyle}">
<Run x:Uid="/SettingsPage/LastChecked" />
<Run Text="{Binding UpdateDate, Mode=OneWay}" />
</TextBlock>
<StackPanel Margin="0,2,0,0" Orientation="Horizontal">
<HyperlinkButton
x:Uid="/SettingsPage/FeedbackLink"
Margin="0,0,2,0"
NavigateUri="https://github.com/Paving-Base/APK-Installer/issues" />
<HyperlinkButton
x:Uid="/SettingsPage/ReleaseNotes"
Margin="2,0"
NavigateUri="https://github.com/Paving-Base/APK-Installer/releases/latest" />
<HyperlinkButton
x:Uid="/SettingsPage/EULA"
Margin="2,0"
NavigateUri="https://github.com/Paving-Base/APK-Installer/blob/main/Privacy.md" />
</StackPanel>
</StackPanel>
</controls:Setting.Description>
<controls:Setting.ActionContent>
<StackPanel
VerticalAlignment="Center"
Orientation="Horizontal"
Spacing="18">
<ProgressRing
Width="24"
Height="24"
Visibility="{Binding CheckingUpdate, Mode=OneWay}" />
<TextBlock
x:Uid="/SettingsPage/CheckingUpdates"
VerticalAlignment="Center"
FontWeight="SemiBold"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
Visibility="{Binding CheckingUpdate, Mode=OneWay}" />
<Button
x:Name="Update"
x:Uid="/SettingsPage/CheckUpdates"
HorizontalAlignment="Right"
Click="Button_Click"
Tag="CheckUpdate"
Visibility="{Binding CheckingUpdate, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}, ConverterParameter='true'}" />
</StackPanel>
</controls:Setting.ActionContent>
</controls:Setting>
<controls:SettingExpander>
<controls:SettingExpander.Header>
<controls:Setting Header="{Binding VersionTextBlockText}" Icon="&#xE117;">
<controls:Setting.Description>
<StackPanel Orientation="Vertical">
<TextBlock Style="{StaticResource SecondaryTextStyle}">
<Run x:Uid="/SettingsPage/LastChecked" />
<Run Text="{Binding UpdateDate, Mode=OneWay}" />
</TextBlock>
<StackPanel Margin="0,2,0,0" Orientation="Horizontal">
<HyperlinkButton
x:Uid="/SettingsPage/FeedbackLink"
Margin="0,0,2,0"
NavigateUri="https://github.com/Paving-Base/APK-Installer/issues" />
<HyperlinkButton
x:Uid="/SettingsPage/TranslateLink"
Margin="2,0"
NavigateUri="https://crowdin.com/project/APKInstaller" />
<HyperlinkButton
x:Uid="/SettingsPage/ReleaseNotes"
Margin="2,0"
NavigateUri="https://github.com/Paving-Base/APK-Installer/releases/latest" />
<HyperlinkButton
x:Uid="/SettingsPage/EULA"
Margin="2,0"
NavigateUri="https://github.com/Paving-Base/APK-Installer/blob/main/Privacy.md" />
</StackPanel>
</StackPanel>
</controls:Setting.Description>
<controls:Setting.ActionContent>
<StackPanel
VerticalAlignment="Center"
Orientation="Horizontal"
Spacing="18">
<ProgressRing
Width="24"
Height="24"
Visibility="{Binding CheckingUpdate, Mode=OneWay}" />
<TextBlock
x:Uid="/SettingsPage/CheckingUpdates"
VerticalAlignment="Center"
FontWeight="SemiBold"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
Visibility="{Binding CheckingUpdate, Mode=OneWay}" />
<Button
x:Name="Update"
x:Uid="/SettingsPage/CheckUpdates"
HorizontalAlignment="Right"
Click="Button_Click"
Tag="CheckUpdate"
Visibility="{Binding CheckingUpdate, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}, ConverterParameter='true'}" />
</StackPanel>
</controls:Setting.ActionContent>
</controls:Setting>
</controls:SettingExpander.Header>
<controls:SettingExpander.Content>
<Grid Style="{StaticResource ExpanderContentGridStyle}">
<cwuc:MarkdownTextBlock
x:Uid="/MarkDown/About"
HorizontalAlignment="Left"
Background="Transparent"
LinkClicked="MarkdownText_LinkClicked" />
</Grid>
</controls:SettingExpander.Content>
</controls:SettingExpander>
<InfoBar
x:Name="UpdateState"
Title="{Binding UpdateStateTitle}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using AdvancedSharpAdbClient;
using APKInstaller.Helpers;
using APKInstaller.ViewModels.SettingsPages;
using CommunityToolkit.WinUI.UI.Controls;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Navigation;
Expand Down Expand Up @@ -92,5 +93,7 @@ private void SelectDeviceBox_SelectionChanged(object sender, SelectionChangedEve
}

private void GotoUpdate_Click(object sender, RoutedEventArgs e) => _ = Launcher.LaunchUriAsync(new Uri((sender as FrameworkElement).Tag.ToString()));

private void MarkdownText_LinkClicked(object sender, LinkClickedEventArgs e) => _ = Launcher.LaunchUriAsync(new Uri(e.Link));
}
}
61 changes: 44 additions & 17 deletions APKInstaller/APKInstaller/String/en-US/MarkDown.resw
Original file line number Diff line number Diff line change
Expand Up @@ -59,46 +59,46 @@
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="root">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0"/>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string"/>
<xsd:attribute name="type" type="xsd:string"/>
<xsd:attribute name="mimetype" type="xsd:string"/>
<xsd:attribute ref="xml:space"/>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string"/>
<xsd:attribute name="name" type="xsd:string"/>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2"/>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1"/>
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3"/>
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4"/>
<xsd:attribute ref="xml:space"/>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required"/>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
Expand All @@ -117,4 +117,31 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="About.Text" xml:space="preserve">
<value>#### Welcome to the APK Installer!

##### Declaration
1. Please follow the [APK Installer End User License Agreement and Privacy Policy](https://github.com/Paving-Base/APK-Installer/blob/main/Privacy.md).
2. This program is open source software, so please make sure that the program is from [this Github repository](https://github.com/Paving-Base/APK-Installer) or [this application]( https://www.microsoft.com/store/apps/9P2JFQ43FPPG) to keep your data safe.
3. If the source of the program is not abnormal, all your data will only be used to run with the program or stored locally during the program running, and the developer will not steal any of your data. But even so, please pay attention to the security of the use environment.
4. The translation of the text of this application comes from the [Crowdin](https://crowdin.com/project/APKInstaller "Crowdin") community, and all texts except Chinese and English do not represent the author's views.

##### Translate
Thanks to [Crowdin](https://crowdin.com/project/APKInstaller "Crowdin") translators for their support. If there is any problem with the translation, please come and correct it.

##### Contributors
- [wherewhere](https://github.com/wherewhere)
- [Void48](https://github.com/Void48)
- [EP012014](https://github.com/EP012014)
- [A Big Salty Fish](https://github.com/bigsaltyfishes)
- [sam1357](https://github.com/sam1357)

##### Citations and References
- [WinUI](https://github.com/microsoft/microsoft-ui-xaml "WinUI")
- [AAPTForNet](https://github.com/canheo136/QuickLook.Plugin.ApkViewer "AAPTForNet")
- [Sharp Compress](https://github.com/adamhathcock/sharpcompress "Sharp Compress")
- [Portable Downloader](https://github.com/madnik7/PortableDownloader "Portable Downloader")
- [Advanced Sharp Adb Client](https://github.com/yungd1plomat/AdvancedSharpAdbClient "Advanced Sharp Adb Client")
- [Windows Community Toolkit](https://github.com/CommunityToolkit/WindowsCommunityToolkit "Windows Community Toolkit")</value>
</data>
</root>
3 changes: 3 additions & 0 deletions APKInstaller/APKInstaller/String/en-US/SettingsPage.resw
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@
<data name="TitleBar.Title" xml:space="preserve">
<value>Settings</value>
</data>
<data name="TranslateLink.Content" xml:space="preserve">
<value>Translate</value>
</data>
<data name="UpdateSettingsHeader.Header" xml:space="preserve">
<value>Version</value>
</data>
Expand Down
23 changes: 23 additions & 0 deletions About.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#### 欢迎使用 APK 安装程序!

##### 声明
1. 请遵守 [APK Installer 最终用户许可协议与隐私条款](https://github.com/Paving-Base/APK-Installer/blob/main/Privacy.md)
2. 本程序是开源软件,因此,在使用时请确保程序是来自[本 Github 仓库](https://github.com/Paving-Base/APK-Installer)或应用商店中的[本应用](https://www.microsoft.com/store/apps/9P2JFQ43FPPG),以确保您的数据安全。
3. 若程序来源无异常,程序运行过程中您的所有数据都仅用于与程序运行或储存于本地,开发者不会窃取您的任何数据。但即便如此,也请注意使用环境的安全性。
4. 本应用文本翻译来自 [Crowdin](https://crowdin.com/project/APKInstaller "Crowdin") 社区,除中文与英文以外的所有文本均不代表作者观点。

##### 翻译
感谢 [Crowdin](https://crowdin.com/project/APKInstaller "Crowdin") 翻译者的支持,如果翻译出现了什么问题,欢迎前来纠正。

已翻译:[![Crowdin](https://badges.crowdin.net/APKInstaller/localized.svg)](https://crowdin.com/project/APKInstaller "Crowdin")

##### 参与人员
[![Contributors](https://contrib.rocks/image?repo=Paving-Base/APK-Installer)](https://github.com/Paving-Base/APK-Installer/graphs/contributors)

##### 引用及参考
- [WinUI](https://github.com/microsoft/microsoft-ui-xaml "WinUI")
- [AAPTForNet](https://github.com/canheo136/QuickLook.Plugin.ApkViewer "AAPTForNet")
- [Sharp Compress](https://github.com/adamhathcock/sharpcompress "Sharp Compress")
- [Portable Downloader](https://github.com/madnik7/PortableDownloader "Portable Downloader")
- [Advanced Sharp Adb Client](https://github.com/yungd1plomat/AdvancedSharpAdbClient "Advanced Sharp Adb Client")
- [Windows Community Toolkit](https://github.com/CommunityToolkit/WindowsCommunityToolkit "Windows Community Toolkit")
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ An Android Application Installer for Windows
- [更新应用](#更新应用)
- [屏幕截图](#屏幕截图)
- [使用到的模块](#使用到的模块)
- [参与人员](#参与人员)
- [鸣谢](#鸣谢)
- [Star 数量统计](#star-数量统计)

Expand Down Expand Up @@ -68,6 +69,8 @@ An Android Application Installer for Windows
## 使用到的模块
- [WinUI](https://github.com/microsoft/microsoft-ui-xaml "WinUI")
- [AAPTForNet](https://github.com/canheo136/QuickLook.Plugin.ApkViewer "AAPTForNet")
- [Sharp Compress](https://github.com/adamhathcock/sharpcompress "Sharp Compress")
- [Portable Downloader](https://github.com/madnik7/PortableDownloader "Portable Downloader")
- [Advanced Sharp Adb Client](https://github.com/yungd1plomat/AdvancedSharpAdbClient "Advanced Sharp Adb Client")
- [Windows Community Toolkit](https://github.com/CommunityToolkit/WindowsCommunityToolkit "Windows Community Toolkit")

Expand Down

0 comments on commit e01b96b

Please sign in to comment.