mirror of
https://github.com/SpaceTimee/Sheas-Cealer.git
synced 2025-07-13 04:42:09 +08:00
41 lines
1.3 KiB
C#
41 lines
1.3 KiB
C#
using System;
|
|
using System.Diagnostics;
|
|
using System.Reflection;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Input;
|
|
|
|
namespace Sheas_Cealer
|
|
{
|
|
public partial class AboutWindow : Window
|
|
{
|
|
public AboutWindow()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
private void AboutWin_Loaded(object sender, RoutedEventArgs e)
|
|
{
|
|
try { UpdateButton.Content = "版本号: " + Assembly.GetExecutingAssembly().GetName().Version!.ToString()[0..^2]; }
|
|
catch (Exception ex) { MessageBox.Show("Error: " + ex.Message); return; }
|
|
}
|
|
|
|
private void AboutButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
try
|
|
{
|
|
if (sender == UpdateButton)
|
|
MessageBox.Show("密码: 3wnj");
|
|
|
|
ProcessStartInfo processStartInfo = new(sender == EmailButton ? "mailto:" : string.Empty + ((Button)sender).ToolTip) { UseShellExecute = true };
|
|
Process.Start(processStartInfo);
|
|
}
|
|
catch (Exception ex) { MessageBox.Show("Error: " + ex.Message); return; }
|
|
}
|
|
|
|
private void AboutWin_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
|
|
{
|
|
if (e.Key == Key.Escape)
|
|
Close();
|
|
}
|
|
}
|
|
} |