Compare commits

..
2 Commits
Author SHA1 Message Date
sc 9f5ec7cb82 Merge branch 'master' of http://192.168.0.12:13000/sc/formula_manage 2023-12-27 23:08:55 +08:00
sc 2e3daa042f 添加打印机查找 2023-12-27 23:08:53 +08:00
2 changed files with 12 additions and 2 deletions

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:formula_manage.Windows" xmlns:local="clr-namespace:formula_manage.Windows"
mc:Ignorable="d" mc:Ignorable="d" Loaded="Window_Print"
Title="打印设置" Height="500" Width="500" MaxWidth="500"> Title="打印设置" Height="500" Width="500" MaxWidth="500">
<Grid> <Grid>
<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"/>
+11 -1
View File
@@ -34,8 +34,18 @@ namespace formula_manage.Windows
cbxPrinter.ItemsSource = this.GetLocalPrinters(); cbxPrinter.ItemsSource = this.GetLocalPrinters();
} }
bool Printer; 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路径选择按钮 private void Button_Click(object sender, RoutedEventArgs e) //SQL_DISPEN_bak路径选择按钮
{ {
FolderBrowserDialog Dilog = new FolderBrowserDialog(); FolderBrowserDialog Dilog = new FolderBrowserDialog();