Merge branch 'master' of http://192.168.0.12:13000/sc/formula_manage
This commit is contained in:
commit
d73d6ceed9
2 files changed
+18
-24
No files matched your search
@@ -10,13 +10,13 @@
|
|||||||
<CheckBox x:Name="SQL_bak" Height="15" Margin="230,15,145,0" VerticalAlignment="Top" Content="自定义备份地址" IsTabStop="False" Checked="SQLBAK_Checked" Unchecked="SQLBAK_Checked"/>
|
<CheckBox x:Name="SQL_bak" Height="15" Margin="230,15,145,0" VerticalAlignment="Top" Content="自定义备份地址" IsTabStop="False" Checked="SQLBAK_Checked" Unchecked="SQLBAK_Checked"/>
|
||||||
<TextBlock HorizontalAlignment="Left" Height="20" Margin="20,35,0,0" TextWrapping="Wrap" Text="备份地址:" VerticalAlignment="Top" Width="70" FontSize="16"/>
|
<TextBlock HorizontalAlignment="Left" Height="20" Margin="20,35,0,0" TextWrapping="Wrap" Text="备份地址:" VerticalAlignment="Top" Width="70" FontSize="16"/>
|
||||||
<TextBlock HorizontalAlignment="Left" Height="20" Margin="20,10,0,0" TextWrapping="Wrap" Text="数据库(Dispensing):" VerticalAlignment="Top" Width="175" FontSize="16"/>
|
<TextBlock HorizontalAlignment="Left" Height="20" Margin="20,10,0,0" TextWrapping="Wrap" Text="数据库(Dispensing):" VerticalAlignment="Top" Width="175" FontSize="16"/>
|
||||||
<TextBox x:Name="SQL_DISPEN_bak" HorizontalAlignment="Left" Height="20" Margin="90,35,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="285" TextChanged="SQL_DISPEN_bak_TextChanged"/>
|
<TextBox x:Name="SQL_DISPEN_bak" HorizontalAlignment="Left" Height="20" Margin="90,35,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="285"/>
|
||||||
<Button x:Name="SQL_DISPEN_BUT" Content="浏览路径" HorizontalAlignment="Left" Height="20" Margin="375,35,0,0" VerticalAlignment="Top" Width="70" Background="#FFF9F9F9" Click="Button_Click"/>
|
<Button x:Name="SQL_DISPEN_BUT" Content="浏览路径" HorizontalAlignment="Left" Height="20" Margin="375,35,0,0" VerticalAlignment="Top" Width="70" Background="#FFF9F9F9" Click="Button_Click"/>
|
||||||
<Button Content="备份" HorizontalAlignment="Right" Height="20" Margin="0,60,150,0" VerticalAlignment="Top" Width="85" Background="#FFF3F3F3" Click="Button_Click_1"/>
|
<Button Content="备份" HorizontalAlignment="Right" Height="20" Margin="0,60,150,0" VerticalAlignment="Top" Width="85" Background="#FFF3F3F3" Click="Button_Click_1"/>
|
||||||
<Button Content="还原" HorizontalAlignment="Right" Height="20" Margin="0,60,50,0" VerticalAlignment="Top" Width="85" Background="#FFF3F3F3" Click="Button_Click_2"/>
|
<Button Content="还原" HorizontalAlignment="Right" Height="20" Margin="0,60,50,0" VerticalAlignment="Top" Width="85" Background="#FFF3F3F3" Click="Button_Click_2"/>
|
||||||
<CheckBox x:Name="SQL_bak_time" Height="15" Margin="365,15,40,0" VerticalAlignment="Top" Content="自动备份" IsTabStop="False" Checked="SQL_bak_time_Checked" Unchecked="SQL_bak_time_Checked"/>
|
<CheckBox x:Name="SQL_bak_time" Height="15" Margin="365,15,40,0" VerticalAlignment="Top" Content="自动备份" IsTabStop="False" Checked="SQL_bak_time_Checked" Unchecked="SQL_bak_time_Checked"/>
|
||||||
<TextBlock HorizontalAlignment="Left" Height="20" Margin="20,60,0,0" TextWrapping="Wrap" Text="备份周期:" VerticalAlignment="Top" Width="70" FontSize="16"/>
|
<TextBlock HorizontalAlignment="Left" Height="20" Margin="20,60,0,0" TextWrapping="Wrap" Text="备份周期:" VerticalAlignment="Top" Width="70" FontSize="16"/>
|
||||||
<ComboBox x:Name="SQL_TIME" Height="20" Margin="90,60,335,0" VerticalAlignment="Top" SelectionChanged="SQL_TIME_SelectionChanged" >
|
<ComboBox x:Name="SQL_TIME" Height="20" Margin="90,60,335,0" VerticalAlignment="Top">
|
||||||
<ComboBoxItem Content="日"/>
|
<ComboBoxItem Content="日"/>
|
||||||
<ComboBoxItem Content="周"/>
|
<ComboBoxItem Content="周"/>
|
||||||
<ComboBoxItem Content="月"/>
|
<ComboBoxItem Content="月"/>
|
||||||
|
|||||||
+16
-22
@@ -26,6 +26,7 @@ namespace formula_manage.Windows
|
|||||||
{
|
{
|
||||||
WindowStartupLocation = WindowStartupLocation.CenterScreen;
|
WindowStartupLocation = WindowStartupLocation.CenterScreen;
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
this.Closing += Window_Closing; //添加窗口关闭事件
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SQLBAK;
|
bool SQLBAK;
|
||||||
@@ -56,39 +57,17 @@ namespace formula_manage.Windows
|
|||||||
|
|
||||||
private void SQLBAK_Checked(object sender, RoutedEventArgs e) //自定义备份地址状态
|
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()); //保存自定义备份地址配置
|
|
||||||
SQLBAK = SQL_bak.IsChecked.GetValueOrDefault();
|
SQLBAK = SQL_bak.IsChecked.GetValueOrDefault();
|
||||||
SQL_DISPEN_bak.IsEnabled = SQLBAK;
|
SQL_DISPEN_bak.IsEnabled = SQLBAK;
|
||||||
SQL_DISPEN_BUT.IsEnabled = SQLBAK;
|
SQL_DISPEN_BUT.IsEnabled = SQLBAK;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SQL_DISPEN_bak_TextChanged(object sender, TextChangedEventArgs e) //备份地址
|
|
||||||
{
|
|
||||||
UserClass.IniFile.IniFiles Configini = new UserClass.IniFile.IniFiles(INIPath);
|
|
||||||
Configini.IniWritevalue("SQL_BAK", "S2", SQL_DISPEN_bak.Text); //保存的配置
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SQL_bak_time_Checked(object sender, RoutedEventArgs e) //自动保存
|
private void SQL_bak_time_Checked(object sender, RoutedEventArgs e) //自动保存
|
||||||
{
|
{
|
||||||
UserClass.IniFile.IniFiles Configini = new UserClass.IniFile.IniFiles(INIPath);
|
|
||||||
Configini.IniWritevalue("SQL_BAK", "S3", SQL_bak_time.IsChecked.GetValueOrDefault().ToString()); //保存自动备份配置
|
|
||||||
SQLTIME = SQL_bak_time.IsChecked.GetValueOrDefault();
|
SQLTIME = SQL_bak_time.IsChecked.GetValueOrDefault();
|
||||||
SQL_TIME.IsEnabled = SQLTIME;
|
SQL_TIME.IsEnabled = SQLTIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SQL_TIME_SelectionChanged(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
UserClass.IniFile.IniFiles Configini = new UserClass.IniFile.IniFiles(INIPath);
|
|
||||||
if (SQL_TIME.Text == "日") Time = 0;
|
|
||||||
else if (SQL_TIME.Text == "周") Time = 1;
|
|
||||||
else if (SQL_TIME.Text == "月") Time = 2;
|
|
||||||
else if (SQL_TIME.Text == "季") Time = 3;
|
|
||||||
else if (SQL_TIME.Text == "年") Time = 4;
|
|
||||||
|
|
||||||
Configini.IniWritevalue("SQL_BAK", "S4", Time.ToString()); //保存的配置
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Button_Click(object sender, RoutedEventArgs e) //SQL_DISPEN_bak路径选择按钮
|
private void Button_Click(object sender, RoutedEventArgs e) //SQL_DISPEN_bak路径选择按钮
|
||||||
{
|
{
|
||||||
FolderBrowserDialog Dilog = new FolderBrowserDialog();
|
FolderBrowserDialog Dilog = new FolderBrowserDialog();
|
||||||
@@ -101,6 +80,21 @@ namespace formula_manage.Windows
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) //窗口关闭事件
|
||||||
|
{
|
||||||
|
UserClass.IniFile.IniFiles Configini = new UserClass.IniFile.IniFiles(INIPath);
|
||||||
|
Configini.IniWritevalue("SQL_BAK", "S1", SQL_bak.IsChecked.GetValueOrDefault().ToString()); //保存自定义备份地址配置
|
||||||
|
Configini.IniWritevalue("SQL_BAK", "S2", SQL_DISPEN_bak.Text); //保存备份地址
|
||||||
|
Configini.IniWritevalue("SQL_BAK", "S3", SQL_bak_time.IsChecked.GetValueOrDefault().ToString()); //保存自动备份配置
|
||||||
|
if (SQL_TIME.Text == "日") Time = 0;
|
||||||
|
else if (SQL_TIME.Text == "周") Time = 1;
|
||||||
|
else if (SQL_TIME.Text == "月") Time = 2;
|
||||||
|
else if (SQL_TIME.Text == "季") Time = 3;
|
||||||
|
else if (SQL_TIME.Text == "年") Time = 4;
|
||||||
|
|
||||||
|
Configini.IniWritevalue("SQL_BAK", "S4", Time.ToString()); //保存自动备份周期
|
||||||
|
}
|
||||||
|
|
||||||
private void Button_Click_1(object sender, RoutedEventArgs e)
|
private void Button_Click_1(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user