diff --git a/Windows/SQL_BAK.xaml b/Windows/SQL_BAK.xaml index c241c13..6ed244b 100644 --- a/Windows/SQL_BAK.xaml +++ b/Windows/SQL_BAK.xaml @@ -4,9 +4,10 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:formula_manage.Windows" - mc:Ignorable="d" + mc:Ignorable="d" Loaded="Window_SQLBAK" Title="SQL_BAK" Height="450" Width="500"> - + + diff --git a/Windows/SQL_BAK.xaml.cs b/Windows/SQL_BAK.xaml.cs index e309991..0f77b07 100644 --- a/Windows/SQL_BAK.xaml.cs +++ b/Windows/SQL_BAK.xaml.cs @@ -21,7 +21,24 @@ namespace formula_manage.Windows { public SQL_BAK() { + WindowStartupLocation = WindowStartupLocation.CenterScreen; InitializeComponent(); } + + public string INIPath = Convert.ToString(System.AppDomain.CurrentDomain.BaseDirectory) + "formula.ini"; + + private void Window_SQLBAK(object sender, RoutedEventArgs e) + { + UserClass.IniFile.IniFiles Configini = new UserClass.IniFile.IniFiles(INIPath); + SQL_bak.IsChecked = Boolean.Parse(Configini.IniReadvalue("SQL_BAK", "S1")); + } + + private void SQLBAK_Checked(object sender, RoutedEventArgs e) + { + UserClass.IniFile.IniFiles Configini = new UserClass.IniFile.IniFiles(INIPath); //配置文件 + Configini.IniWritevalue("SQL_BAK", "S1", SQL_bak.IsChecked.GetValueOrDefault().ToString()); //保存的配置 + } + + } }