添加打印机查找
This commit is contained in:
commit
2e3daa042f
2 files changed
+12
-2
No files matched your search
+1
-1
@@ -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">
|
||||
<Grid>
|
||||
<TextBlock HorizontalAlignment="Left" Height="20" Margin="20,35,0,0" TextWrapping="Wrap" Text="打印模板:" VerticalAlignment="Top" Width="70" FontSize="16"/>
|
||||
|
||||
+11
-1
@@ -34,8 +34,18 @@ namespace formula_manage.Windows
|
||||
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路径选择按钮
|
||||
{
|
||||
FolderBrowserDialog Dilog = new FolderBrowserDialog();
|
||||
|
||||
Reference in new issue
Block a user