You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.2 KiB
46 lines
1.2 KiB
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using leak_test_project.Utils;
|
|
|
|
namespace leak_test_project.Views
|
|
{
|
|
public partial class ParametersWindow : Window
|
|
{
|
|
public ParametersWindow()
|
|
{
|
|
InitializeComponent();
|
|
|
|
// 현재 설정값 로드하여 UI에 표시
|
|
var config = ConfigManager.Current;
|
|
editSpecUL.Text = config.SpecUL.ToString("F2");
|
|
editSpecLL.Text = config.SpecLL.ToString("F2");
|
|
|
|
}
|
|
|
|
private void BtnSave_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
if (double.TryParse(editSpecUL.Text, out double ul))
|
|
{
|
|
ConfigManager.Current.SpecUL = ul;
|
|
}
|
|
|
|
if (double.TryParse(editSpecLL.Text, out double ll))
|
|
{
|
|
ConfigManager.Current.SpecLL = ll;
|
|
}
|
|
|
|
|
|
|
|
ConfigManager.Save();
|
|
|
|
MessageBox.Show("파라미터 설정이 저장되었습니다.");
|
|
this.DialogResult = true;
|
|
this.Close();
|
|
}
|
|
|
|
private void BtnClose_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
this.Close();
|
|
}
|
|
}
|
|
}
|
|
|