添加项目文件。

This commit is contained in:
ShrlAlgo
2025-09-16 16:06:41 +08:00
parent 0e7807b826
commit 98c65ceb3d
922 changed files with 1009489 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Windows;
using CommunityToolkit.Mvvm.ComponentModel;
namespace Szmedi.RvKits.Common
{
/// <summary>
/// TimerSetterWin.xaml 的交互逻辑
/// </summary>
[ObservableObject]
public partial class TimerSetterWin
{
private int intervalTime;
public TimerSetterWin()
{
DataContext = this;
InitializeComponent();
AutoSave = Properties.Settings.Default.AutoSave;
IntervalTime = Properties.Settings.Default.AutoSaveIntervalTime;
}
private void Button_Click(object sender, RoutedEventArgs e)
{
Properties.Settings.Default.AutoSave = AutoSave;
Properties.Settings.Default.AutoSaveIntervalTime = IntervalTime;
Properties.Settings.Default.Save();
DialogResult = true;
}
[ObservableProperty]
private bool autoSave;
[Required]
[DefaultValue(15)]
[Range(1, 30)]
public int IntervalTime
{
get => intervalTime;
set => SetProperty(ref intervalTime, value);
}
}
}