diff --git a/Windows/Print.xaml b/Windows/Print.xaml
index a460029..8786329 100644
--- a/Windows/Print.xaml
+++ b/Windows/Print.xaml
@@ -39,5 +39,9 @@
+
+
+
+
diff --git a/Windows/Print.xaml.cs b/Windows/Print.xaml.cs
index df80f6b..6bb2f84 100644
--- a/Windows/Print.xaml.cs
+++ b/Windows/Print.xaml.cs
@@ -55,9 +55,10 @@ namespace formula_manage.Windows
bool Printer4;
bool Printer5;
+ string Temp_M, Temp_S;
private void Window_Print(object sender, RoutedEventArgs e)
{
- string Temp_M, Temp_S;
+
UserClass.IniFile.IniFiles Configini = new UserClass.IniFile.IniFiles(INIPath);
Printer = Boolean.Parse(Configini.IniReadvalue("PRINTER", "P1"));
@@ -80,6 +81,11 @@ namespace formula_manage.Windows
TEXT_Print3.IsChecked = Printer3;
cbxPrinter3.IsEnabled = Printer3;
+ PRINT_file();
+ }
+
+ private void PRINT_file()//建立模板列表
+ {
DirectoryInfo di_M = new DirectoryInfo(Print_path.Text); //new文件夹
FileInfo[] files_M = di_M.GetFiles("*.frx");//生成文件夹中的文件名合集
Template_M.ItemsSource = files_M;//加载合集
@@ -231,17 +237,22 @@ namespace formula_manage.Windows
private void Button_Click_3(object sender, RoutedEventArgs e)//新建模板文件
{
+
+ Prompt.Visibility = Visibility.Visible; //开启页面遮罩
+
string Template_path = Print_path.Text + "/" + Template.Text;
string Template_DATA = "\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n";
if (File.Exists(Template_path)) //判断文件是否存在
{
System.Windows.MessageBox.Show("模板已存在");
+ Prompt.Visibility = Visibility.Hidden;//去页面遮罩
return;
}
if (string.IsNullOrEmpty(Template.Text))
{
System.Windows.MessageBox.Show("模板名不能为空");
+ Prompt.Visibility = Visibility.Hidden;//去页面遮罩
return;
}
@@ -250,7 +261,14 @@ namespace formula_manage.Windows
if (!tuple.Item1)
{
System.Windows.MessageBox.Show($"打开设计器失败:{tuple.Item2}");
+ Prompt.Visibility = Visibility.Hidden;
+ return;
}
+
+ PRINT_file(); ;//刷新模板列表
+ Template.Text = null;//清空输入
+
+ Prompt.Visibility = Visibility.Hidden;//去页面遮罩
}
private void Button_Click_4(object sender, RoutedEventArgs e)//删除指定模板