This commit is contained in:
sc committed 2023-12-24 20:40:58 +08:00
commit fb76ba2bf1
4 files changed
+19 -4

No files matched your search

+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; //返回选择的字符串
}
}
}
}