Renamed Print/ to Documents/

This commit is contained in:
2023-03-05 14:58:31 +01:00
parent 7416c03b92
commit a6264d7a64
10 changed files with 104 additions and 49 deletions

View File

@ -19,9 +19,6 @@ using WGneu.Models;
namespace WGneu.Windows {
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window {
private readonly WgContext _context = new WgContext();
private CollectionViewSource countryViewSource;
@ -32,7 +29,7 @@ namespace WGneu.Windows {
private void Window_Loaded(object sender, RoutedEventArgs e) {
_context.Countries.Load();
Print.Pdf.Init();
Documents.Pdf.Init();
countryViewSource.Source = _context.Countries.Local.ToObservableCollection();
}
@ -47,7 +44,7 @@ namespace WGneu.Windows {
}
private void Button3_Click(object sender, EventArgs e) {
Print.Template.Test();
Documents.Template.Test();
}
private void Button_Click(object sender, RoutedEventArgs e) {

View File

@ -0,0 +1,14 @@
<Window x:Class="WGneu.Windows.PdfViewerWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:wv2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
xmlns:local="clr-namespace:WGneu.Windows"
mc:Ignorable="d"
Title="PDF Ansicht"
MinHeight="600" MinWidth="420" Height="600" Width="420">
<Grid>
<wv2:WebView2 Name="WebView"/>
</Grid>
</Window>

View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
namespace WGneu.Windows {
public partial class PdfViewerWindow : Window {
public PdfViewerWindow(string title, string path) {
InitializeComponent();
Title = Title + " - " + title;
WebView.Source = new("file://" + path);
}
}
}