Renamed Print/ to Documents/
This commit is contained in:
@ -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) {
|
||||
|
14
WGneu/Windows/PdfViewerWindow.xaml
Normal file
14
WGneu/Windows/PdfViewerWindow.xaml
Normal 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>
|
23
WGneu/Windows/PdfViewerWindow.xaml.cs
Normal file
23
WGneu/Windows/PdfViewerWindow.xaml.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user