mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-05-17 09:26:50 +08:00
about page #317
This commit is contained in:
@@ -501,7 +501,7 @@ public partial class AutoWoodTask : ISoloTask
|
||||
|
||||
Sleep(500, _ct);
|
||||
|
||||
// 点击确认
|
||||
// 点击退出到主界面确认
|
||||
using var contentRegion = CaptureToRectArea();
|
||||
contentRegion.Find(_assets.ConfirmRo, ra =>
|
||||
{
|
||||
|
||||
17
BetterGenshinImpact/Helpers/Base64Helper.cs
Normal file
17
BetterGenshinImpact/Helpers/Base64Helper.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
|
||||
namespace BetterGenshinImpact.Helpers;
|
||||
|
||||
public static class Base64Helper
|
||||
{
|
||||
public static string DecodeToString(string base64String)
|
||||
{
|
||||
byte[] bytes = Convert.FromBase64String(base64String);
|
||||
return System.Text.Encoding.UTF8.GetString(bytes);
|
||||
}
|
||||
|
||||
public static byte[] DecodeToBytes(string base64String)
|
||||
{
|
||||
return Convert.FromBase64String(base64String);
|
||||
}
|
||||
}
|
||||
@@ -915,7 +915,11 @@
|
||||
Margin="0,0,36,0"
|
||||
IsChecked="{Binding Config.MaskWindowConfig.ShowLogBox, Mode=TwoWay}"/>
|
||||
</ui:CardControl>-->
|
||||
|
||||
<!-- About Option -->
|
||||
<ui:TextBlock Margin="0,0,0,8"
|
||||
FontTypography="BodyStrong"
|
||||
Text="帮助" />
|
||||
<ui:CardControl Margin="0,0,0,12" Icon="{ui:SymbolIcon Info24}">
|
||||
<ui:CardControl.Header>
|
||||
<Grid>
|
||||
@@ -926,12 +930,12 @@
|
||||
<ui:TextBlock Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
FontTypography="Body"
|
||||
Text="关于"
|
||||
Text="关于 BetterGI"
|
||||
TextWrapping="Wrap" />
|
||||
<ui:TextBlock Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Foreground="{ui:ThemeResource TextFillColorTertiaryBrush}"
|
||||
Text="查看项目相关信息"
|
||||
Text="查看项目相、文档等信息"
|
||||
TextWrapping="Wrap" />
|
||||
</Grid>
|
||||
</ui:CardControl.Header>
|
||||
|
||||
@@ -14,23 +14,4 @@ public partial class CommonSettingsPage : Page
|
||||
DataContext = ViewModel = viewModel;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private ICommand _openAboutWindowCommand;
|
||||
public ICommand OpenAboutWindowCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_openAboutWindowCommand == null)
|
||||
{
|
||||
_openAboutWindowCommand = new RelayCommand(OpenAboutWindow);
|
||||
}
|
||||
return _openAboutWindowCommand;
|
||||
}
|
||||
}
|
||||
|
||||
private void OpenAboutWindow()
|
||||
{
|
||||
var aboutWindow = new AboutWindow();
|
||||
aboutWindow.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,19 +15,46 @@
|
||||
mc:Ignorable="d">
|
||||
<Grid>
|
||||
<ui:Grid Margin="0,48,0,0" RowDefinitions="Auto,*,Auto">
|
||||
<ui:TextBlock Grid.Row="0" Margin="16,0,16,0" FontSize="16" FontWeight="Bold" Text="Better Genshin Impact" />
|
||||
<ui:TextBlock Grid.Row="0" Margin="16,0,16,0" FontSize="16" FontWeight="Bold" Text="BetterGI 更好的原神" />
|
||||
<ui:TextBlock Grid.Row="1" Margin="16,0,16,0" TextWrapping="Wrap">
|
||||
<Run Text="开源地址: " />
|
||||
<Hyperlink NavigateUri="https://github.com/babalae/better-genshin-impact" RequestNavigate="Hyperlink_RequestNavigate">https://github.com/babalae/better-genshin-impact</Hyperlink>
|
||||
<Hyperlink NavigateUri="https://github.com/babalae/better-genshin-impact"
|
||||
RequestNavigate="Hyperlink_RequestNavigate">
|
||||
https://github.com/babalae/better-genshin-impact
|
||||
</Hyperlink>
|
||||
<LineBreak />
|
||||
<Run Text="协议: GPLv3" />
|
||||
<LineBreak />
|
||||
<Run Text="作者: huiyadanli" />
|
||||
<Run Text="作者: " />
|
||||
<Hyperlink NavigateUri="https://github.com/huiyadanli"
|
||||
RequestNavigate="Hyperlink_RequestNavigate">
|
||||
辉鸭蛋
|
||||
</Hyperlink>
|
||||
<LineBreak />
|
||||
<Run Text="捐赠: " />
|
||||
<Hyperlink NavigateUri="https://github.com/babalae/better-genshin-impact#捐赠" RequestNavigate="Hyperlink_RequestNavigate">https://github.com/babalae/better-genshin-impact#捐赠</Hyperlink>
|
||||
<Run Text="文档: " />
|
||||
<Hyperlink NavigateUri="https://bettergi.com"
|
||||
RequestNavigate="Hyperlink_RequestNavigate">
|
||||
https://bettergi.com
|
||||
</Hyperlink>
|
||||
<LineBreak />
|
||||
<Run Text="B站账号(视频教程): " />
|
||||
<Hyperlink NavigateUri="https://space.bilibili.com/3546777483479879"
|
||||
RequestNavigate="Hyperlink_RequestNavigate">
|
||||
BetterGI
|
||||
</Hyperlink>
|
||||
<LineBreak />
|
||||
|
||||
<ui:TextBlock Margin="0,8,0,0" TextWrapping="Wrap" Name="RzTextBlock" Visibility="Collapsed">
|
||||
<ui:TextBlock FontSize="16" FontWeight="Bold" Name="Line1" />
|
||||
<LineBreak />
|
||||
<Run Name="Line2" />
|
||||
<LineBreak />
|
||||
<Run Name="Line3" />
|
||||
<LineBreak />
|
||||
</ui:TextBlock>
|
||||
</ui:TextBlock>
|
||||
<ui:Button Grid.Row="2" Margin="16" HorizontalAlignment="Right" Width="80" Content="关闭" Click="CloseButton_Click" />
|
||||
<ui:Button Grid.Row="2" Margin="16" HorizontalAlignment="Right" Width="80" Content="关闭"
|
||||
Click="CloseButton_Click" />
|
||||
</ui:Grid>
|
||||
<ui:TitleBar Title="关于">
|
||||
<ui:TitleBar.Icon>
|
||||
@@ -35,4 +62,4 @@
|
||||
</ui:TitleBar.Icon>
|
||||
</ui:TitleBar>
|
||||
</Grid>
|
||||
</ui:FluentWindow>
|
||||
</ui:FluentWindow>
|
||||
@@ -1,25 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Navigation;
|
||||
using BetterGenshinImpact.Helpers;
|
||||
|
||||
namespace BetterGenshinImpact.View.Windows
|
||||
namespace BetterGenshinImpact.View.Windows;
|
||||
|
||||
public partial class AboutWindow
|
||||
{
|
||||
public partial class AboutWindow : Window
|
||||
private int _clickCount;
|
||||
private DateTime _lastClickTime;
|
||||
private const int RequiredClicks = 5;
|
||||
private const int MaxIntervalMs = 200;
|
||||
|
||||
public AboutWindow()
|
||||
{
|
||||
public AboutWindow()
|
||||
InitializeComponent();
|
||||
MouseDown += Window_MouseDown;
|
||||
}
|
||||
|
||||
private void Window_MouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
var now = DateTime.Now;
|
||||
if ((now - _lastClickTime).TotalMilliseconds <= MaxIntervalMs)
|
||||
{
|
||||
InitializeComponent();
|
||||
_clickCount++;
|
||||
}
|
||||
else
|
||||
{
|
||||
_clickCount = 1;
|
||||
}
|
||||
|
||||
private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
|
||||
{
|
||||
Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri) { UseShellExecute = true });
|
||||
e.Handled = true;
|
||||
}
|
||||
_lastClickTime = now;
|
||||
|
||||
private void CloseButton_Click(object sender, RoutedEventArgs e)
|
||||
if (_clickCount >= RequiredClicks)
|
||||
{
|
||||
Close();
|
||||
Line1.Text = Base64Helper.DecodeToString("54mI5p2D5L+h5oGv");
|
||||
Line2.Text = Base64Helper.DecodeToString("6K+B5Lmm5Y+377yaIOi9r+iRl+eZu+Wtl+esrDE1MTU2OTUw5Y+3");
|
||||
Line3.Text = Base64Helper.DecodeToString("55m76K6w5Y+377yaIDIwMjVTUjA1MDA3NTI=");
|
||||
RzTextBlock.Visibility = Visibility.Visible;
|
||||
|
||||
_clickCount = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
|
||||
{
|
||||
Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri) { UseShellExecute = true });
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void CloseButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using BetterGenshinImpact.Core.Config;
|
||||
using BetterGenshinImpact.Core.Script;
|
||||
using BetterGenshinImpact.GameTask;
|
||||
@@ -12,6 +13,7 @@ using BetterGenshinImpact.Helpers;
|
||||
using BetterGenshinImpact.Service.Interface;
|
||||
using BetterGenshinImpact.Service.Notification;
|
||||
using BetterGenshinImpact.View.Pages;
|
||||
using BetterGenshinImpact.View.Windows;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using CommunityToolkit.Mvvm.Messaging.Messages;
|
||||
@@ -214,4 +216,12 @@ public partial class CommonSettingsPageViewModel : ViewModel
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void OpenAboutWindow()
|
||||
{
|
||||
var aboutWindow = new AboutWindow();
|
||||
aboutWindow.Owner = Application.Current.MainWindow;
|
||||
aboutWindow.ShowDialog();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user