Compare commits

..
2 Commits
3 changed files with 18 additions and 3 deletions

No files matched your search

+2 -1
View File
@@ -317,7 +317,8 @@ namespace formula_manage
}
private void PRINT_SET(object sender, RoutedEventArgs e)
{
Windows.Print print = new Windows.Print();
print.ShowDialog();//实例化并置顶打开打印窗口
}
private void HELP(object sender, RoutedEventArgs e)
{
+4 -2
View File
@@ -5,8 +5,10 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:formula_manage.Windows"
mc:Ignorable="d"
Title="打印预览窗口" Height="450" Width="800">
Title="打印设置" Height="450" Width="800">
<Grid>
<DocumentViewer Name="docViewer"></DocumentViewer>
<TextBox x:Name="Print_path" HorizontalAlignment="Left" Height="20" Margin="90,35,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="285"/>
<Button x:Name="Print_path_select" Content="浏览路径" HorizontalAlignment="Left" Height="20" Margin="375,35,0,0" VerticalAlignment="Top" Width="70" Background="#FFF9F9F9" Click="Button_Click"/>
</Grid>
</Window>
+12
View File
@@ -7,6 +7,7 @@ using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Forms;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
@@ -24,5 +25,16 @@ namespace formula_manage.Windows
InitializeComponent();
}
private void Button_Click(object sender, RoutedEventArgs e) //SQL_DISPEN_bak路径选择按钮
{
FolderBrowserDialog Dilog = new FolderBrowserDialog();
Dilog.SelectedPath = Print_path.Text; //打开目录
Dilog.ShowNewFolderButton = false; //不显示新建文件夹按钮
//
if (Dilog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
Print_path.Text = Dilog.SelectedPath; //返回选择的字符串
}
}
}
}