Merge branch 'master' of http://192.168.0.12:13000/sc/formula_manage
This commit is contained in:
commit
84ef66268e
2 files changed
-34
No files matched your search
@@ -29,14 +29,6 @@
|
||||
x:Name="TEXT_Print3" Checked="Print_Checked3" Unchecked="Print_Checked3"/>
|
||||
<ComboBox HorizontalAlignment="Left" Height="20" Margin="110,190,0,0" VerticalAlignment="Top" Width="180"
|
||||
x:Name="cbxPrinter3" SelectedValuePath="Element[OPTIONCODE].Value" DisplayMemberPath="Element[OPTIONNAME].Value"/>
|
||||
<CheckBox HorizontalAlignment="Left" Height="15" Margin="20,220,0,0" Content="同步推送:" VerticalAlignment="Top" Width="90"
|
||||
x:Name="TEXT_Print4" Checked="Print_Checked4" Unchecked="Print_Checked4"/>
|
||||
<ComboBox HorizontalAlignment="Left" Height="20" Margin="110,215,0,0" VerticalAlignment="Top" Width="180"
|
||||
x:Name="cbxPrinter4" SelectedValuePath="Element[OPTIONCODE].Value" DisplayMemberPath="Element[OPTIONNAME].Value"/>
|
||||
<CheckBox HorizontalAlignment="Left" Height="15" Margin="20,245,0,0" Content="同步推送:" VerticalAlignment="Top" Width="90"
|
||||
x:Name="TEXT_Print5" Checked="Print_Checked5" Unchecked="Print_Checked5"/>
|
||||
<ComboBox HorizontalAlignment="Left" Height="20" Margin="110,240,0,0" VerticalAlignment="Top" Width="180"
|
||||
x:Name="cbxPrinter5" SelectedValuePath="Element[OPTIONCODE].Value" DisplayMemberPath="Element[OPTIONNAME].Value"/>
|
||||
<Button Content="预览模板" HorizontalAlignment="Left" Height="20" Margin="375,165,0,0" VerticalAlignment="Top" Width="70" Background="#FFF9F9F9" Click="Button_Click_22"/>
|
||||
<Button Content="编辑模板" HorizontalAlignment="Left" Height="20" Margin="295,165,0,0" VerticalAlignment="Top" Width="70" Background="#FFF9F9F9" Click="Button_Click_12"/>
|
||||
|
||||
|
||||
@@ -38,8 +38,6 @@ namespace formula_manage.Windows
|
||||
cbxPrinter.ItemsSource = this.GetLocalPrinters(); //打印机搜索
|
||||
cbxPrinter2.ItemsSource = this.GetLocalPrinters();
|
||||
cbxPrinter3.ItemsSource = this.GetLocalPrinters();
|
||||
cbxPrinter4.ItemsSource = this.GetLocalPrinters();
|
||||
cbxPrinter5.ItemsSource = this.GetLocalPrinters();
|
||||
this.Closing += Window_Closing; //添加窗口关闭事件
|
||||
}
|
||||
|
||||
@@ -63,12 +61,8 @@ namespace formula_manage.Windows
|
||||
Print_path.Text = Configini.IniReadvalue("PRINTER", "P3");
|
||||
Printer2 = Boolean.Parse(Configini.IniReadvalue("PRINTER", "P4"));
|
||||
Printer3 = Boolean.Parse(Configini.IniReadvalue("PRINTER", "P5"));
|
||||
Printer4 = Boolean.Parse(Configini.IniReadvalue("PRINTER", "P6"));
|
||||
Printer5 = Boolean.Parse(Configini.IniReadvalue("PRINTER", "P7"));
|
||||
cbxPrinter2.SelectedValue = Configini.IniReadvalue("PRINTER", "P8"); //读配置文件
|
||||
cbxPrinter3.SelectedValue = Configini.IniReadvalue("PRINTER", "P9"); //读配置文件
|
||||
cbxPrinter4.SelectedValue = Configini.IniReadvalue("PRINTER", "P10"); //读配置文件
|
||||
cbxPrinter5.SelectedValue = Configini.IniReadvalue("PRINTER", "P11"); //读配置文件
|
||||
Print_path2.Text = Configini.IniReadvalue("PRINTER", "P12");
|
||||
|
||||
TEXT_Print.IsChecked = Printer;
|
||||
@@ -79,12 +73,6 @@ namespace formula_manage.Windows
|
||||
|
||||
TEXT_Print3.IsChecked = Printer3;
|
||||
cbxPrinter3.IsEnabled = Printer3;
|
||||
|
||||
TEXT_Print4.IsChecked = Printer4;
|
||||
cbxPrinter4.IsEnabled = Printer4;
|
||||
|
||||
TEXT_Print5.IsChecked = Printer5;
|
||||
cbxPrinter5.IsEnabled = Printer5;
|
||||
}
|
||||
|
||||
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) //窗口关闭事件
|
||||
@@ -97,12 +85,8 @@ namespace formula_manage.Windows
|
||||
Configini.IniWritevalue("PRINTER", " P3", Print_path.Text.ToString());
|
||||
Configini.IniWritevalue("PRINTER", " P4", Printer2.ToString());
|
||||
Configini.IniWritevalue("PRINTER", " P5", Printer3.ToString());
|
||||
Configini.IniWritevalue("PRINTER", " P6", Printer4.ToString());
|
||||
Configini.IniWritevalue("PRINTER", " P7", Printer5.ToString());
|
||||
Configini.IniWritevalue("PRINTER", " P8", cbxPrinter2.SelectedValue.ToString());
|
||||
Configini.IniWritevalue("PRINTER", " P9", cbxPrinter3.SelectedValue.ToString());
|
||||
Configini.IniWritevalue("PRINTER", " P10", cbxPrinter4.SelectedValue.ToString());
|
||||
Configini.IniWritevalue("PRINTER", " P11", cbxPrinter5.SelectedValue.ToString());
|
||||
Configini.IniWritevalue("PRINTER", " P12", Print_path2.Text.ToString());
|
||||
|
||||
System.IO.DirectoryInfo log = new System.IO.DirectoryInfo(@logpath);//生成日志文件目录
|
||||
@@ -230,16 +214,6 @@ namespace formula_manage.Windows
|
||||
Printer3 = TEXT_Print3.IsChecked.GetValueOrDefault(); //打印机是否生效
|
||||
cbxPrinter3.IsEnabled = Printer3; //
|
||||
}
|
||||
private void Print_Checked4(object sender, RoutedEventArgs e) //打印机是否生效
|
||||
{
|
||||
Printer4 = TEXT_Print4.IsChecked.GetValueOrDefault(); //打印机是否生效
|
||||
cbxPrinter4.IsEnabled = Printer4; //
|
||||
}
|
||||
private void Print_Checked5(object sender, RoutedEventArgs e) //打印机是否生效
|
||||
{
|
||||
Printer5 = TEXT_Print5.IsChecked.GetValueOrDefault(); //打印机是否生效
|
||||
cbxPrinter5.IsEnabled = Printer5; //
|
||||
}
|
||||
|
||||
private List<XElement> GetLocalPrinters() //查找打印机
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user