添加项目文件。

This commit is contained in:
2026-04-30 11:34:41 +08:00
parent a8539ccaac
commit 80635aa46e
181 changed files with 16378 additions and 0 deletions

View File

@@ -0,0 +1,78 @@
using MaterialDesignThemes.Wpf;
using Models.Models;
using SamplePreSystem.UI.ViewModel;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using static MaterialDesignThemes.Wpf.Theme.ToolBar;
namespace SamplePreSystemApp
{
/// <summary>
/// Window1.xaml 的交互逻辑
/// </summary>
public partial class Window1 : Window,INotifyPropertyChanged
{
ListCollectionView view;
public Window1()
{
InitializeComponent();
this.DataContext = this;
}
public event PropertyChangedEventHandler? PropertyChanged;
protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
private void Button_Click(object sender, RoutedEventArgs e)
{
// 读取项目设置中保存的用户名
string savedUserName = Properties.Settings.Default.UserName;
// 勾选:保存用户名到设置
Properties.Settings.Default.UserName = "aaaaaaa";
// 2. 必须调用 Save() 才能持久化保存(关键!)
Properties.Settings.Default.Save();
}
private void btnRead_Click(object sender, RoutedEventArgs e)
{
// 读取项目设置中保存的用户名
string savedUserName = Properties.Settings.Default.UserName;
//// 如果不为空,自动回填到输入框,并勾选记住选项
//if (!string.IsNullOrEmpty(savedUserName))
//{
// txtUserName.Text = savedUserName;
// chkRemember.IsChecked = true;
//}
}
}
}