提交初始文件

This commit is contained in:
CJK_mkp
2025-05-25 09:29:48 +08:00
parent 73a3138b8f
commit b790c7893e
674 changed files with 203959 additions and 0 deletions
@@ -0,0 +1,46 @@
using Ink_Canvas.Helpers;
using System.IO;
using System.Windows;
namespace Ink_Canvas
{
/// <summary>
/// Interaction logic for NamesInputWindow.xaml
/// </summary>
public partial class NamesInputWindow : Window
{
public NamesInputWindow()
{
InitializeComponent();
AnimationsHelper.ShowWithSlideFromBottomAndFade(this, 0.25);
}
string originText = "";
private void Window_Loaded(object sender, RoutedEventArgs e)
{
if (File.Exists(App.RootPath + "Names.txt"))
{
TextBoxNames.Text = File.ReadAllText(App.RootPath + "Names.txt");
originText = TextBoxNames.Text;
}
}
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
if (originText != TextBoxNames.Text)
{
var result = MessageBox.Show("是否保存?", "名单导入", MessageBoxButton.YesNo);
if (result == MessageBoxResult.Yes)
{
File.WriteAllText(App.RootPath + "Names.txt", TextBoxNames.Text);
}
}
}
private void Button_Click(object sender, RoutedEventArgs e)
{
Close();
}
}
}