diff --git a/Windows/Print.xaml b/Windows/Print.xaml index aa17708..ef5a7af 100644 --- a/Windows/Print.xaml +++ b/Windows/Print.xaml @@ -4,7 +4,7 @@ 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_Print" Title="打印设置" Height="500" Width="500" MaxWidth="500"> diff --git a/Windows/Print.xaml.cs b/Windows/Print.xaml.cs index 8c7b91c..2b2400a 100644 --- a/Windows/Print.xaml.cs +++ b/Windows/Print.xaml.cs @@ -34,8 +34,18 @@ namespace formula_manage.Windows cbxPrinter.ItemsSource = this.GetLocalPrinters(); } + public string INIPath = Convert.ToString(System.AppDomain.CurrentDomain.BaseDirectory) + "formula.ini"; + bool Printer; + string Printer_NAME; + + private void Window_Print(object sender, RoutedEventArgs e) + { + UserClass.IniFile.IniFiles Configini = new UserClass.IniFile.IniFiles(INIPath); + Printer = Boolean.Parse(Configini.IniReadvalue("PRINTER", "P1")); + Printer_NAME = Configini.IniReadvalue("PRINTER", "P2"); //读配置文件 + } private void Button_Click(object sender, RoutedEventArgs e) //SQL_DISPEN_bak路径选择按钮 { FolderBrowserDialog Dilog = new FolderBrowserDialog();