Skip to content

Commit

Permalink
a new ui of setting page #509
Browse files Browse the repository at this point in the history
  • Loading branch information
Scighost committed Dec 28, 2023
1 parent 7f55ed3 commit 88a5594
Show file tree
Hide file tree
Showing 16 changed files with 1,295 additions and 1,116 deletions.
72 changes: 72 additions & 0 deletions src/Starward.Language/Lang.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 src/Starward.Language/Lang.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1177,4 +1177,28 @@ Do you accept the risk and continue to use it?</value>
<data name="LauncherPage_StartupCount" xml:space="preserve">
<value>Startup Count</value>
</data>
<data name="FileSettingPage_DataFolder" xml:space="preserve">
<value>Data Folder</value>
</data>
<data name="FileSettingPage_Location" xml:space="preserve">
<value>Location:</value>
</data>
<data name="FileSettingPage_OpenLogFile" xml:space="preserve">
<value>Open Log File</value>
</data>
<data name="SettingPage_Appearance" xml:space="preserve">
<value>Appearance</value>
</data>
<data name="SettingPage_FileManagement" xml:space="preserve">
<value>File Management</value>
</data>
<data name="SettingPage_Completed" xml:space="preserve">
<value>Completed</value>
</data>
<data name="AboutSettingPage_Links" xml:space="preserve">
<value>Links</value>
</data>
<data name="SettingPage_Advanced" xml:space="preserve">
<value>Advanced</value>
</data>
</root>
59 changes: 43 additions & 16 deletions src/Starward.Language/Lang.zh-CN.resx
Original file line number Diff line number Diff line change
Expand Up @@ -60,45 +60,45 @@
: 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: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 Down Expand Up @@ -1174,4 +1174,31 @@
<data name="Common_Open" xml:space="preserve">
<value>打开</value>
</data>
<data name="SettingPage_Advanced" xml:space="preserve">
<value>高级</value>
</data>
<data name="AboutSettingPage_Links" xml:space="preserve">
<value>相关链接</value>
</data>
<data name="SettingPage_Completed" xml:space="preserve">
<value>完成</value>
</data>
<data name="SettingPage_FileManagement" xml:space="preserve">
<value>文件管理</value>
</data>
<data name="SettingPage_Appearance" xml:space="preserve">
<value>外观</value>
</data>
<data name="FileSettingPage_OpenLogFile" xml:space="preserve">
<value>打开日志文件</value>
</data>
<data name="FileSettingPage_Location" xml:space="preserve">
<value>位置:</value>
</data>
<data name="FileSettingPage_DataFolder" xml:space="preserve">
<value>数据文件夹</value>
</data>
<data name="LauncherPage_StartupCount" xml:space="preserve">
<value>启动次数</value>
</data>
</root>
12 changes: 9 additions & 3 deletions src/Starward/Pages/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
using Starward.Core;
using Starward.Helpers;
using Starward.Pages.HoyolabToolbox;
using Starward.Pages.Setting;
using Starward.Services;
using System;
using System.ComponentModel;
Expand Down Expand Up @@ -768,6 +769,13 @@ private async void NavigationView_ItemInvoked(NavigationView sender, NavigationV
sender.SelectedItem = null;
return;
}
if (item.Tag is nameof(SettingPage))
{
MainWindow.Current.OverlayFrameNavigateTo(typeof(Setting.SettingPage), null, new SuppressNavigationTransitionInfo());
await Task.Delay(1);
sender.SelectedItem = null;
return;
}
var type = item.Tag switch
{
nameof(LauncherPage) => typeof(LauncherPage),
Expand All @@ -776,7 +784,6 @@ private async void NavigationView_ItemInvoked(NavigationView sender, NavigationV
nameof(ScreenshotPage) => typeof(ScreenshotPage),
nameof(GachaLogPage) => typeof(GachaLogPage),
nameof(HoyolabToolboxPage) => typeof(HoyolabToolboxPage),
nameof(SettingPage) => typeof(SettingPage),
nameof(SelfQueryPage) => typeof(SelfQueryPage),
_ => null,
};
Expand Down Expand Up @@ -944,8 +951,7 @@ private void ShortcutNavigate(int num)
{
if (num == 0)
{
NavigationViewItem_Setting.IsSelected = true;
NavigateTo(typeof(SettingPage));
MainWindow.Current.OverlayFrameNavigateTo(typeof(Setting.SettingPage), null, new SuppressNavigationTransitionInfo());
}
if (CurrentGameBiz.ToGame() == GameBiz.None)
{
Expand Down
Loading

0 comments on commit 88a5594

Please sign in to comment.