Es wird nun der standard PDF viewer angezeigt

This commit is contained in:
HuskyTeufel
2022-04-20 15:33:53 +02:00
parent f035f447bc
commit 177e87da7c
5 changed files with 1 additions and 270 deletions

View File

@@ -91,9 +91,7 @@ namespace BerichtGen
Process process = new Process(); Process process = new Process();
process.StartInfo.FileName = "explorer"; process.StartInfo.FileName = "explorer";
process.StartInfo.Arguments = pfad; process.StartInfo.Arguments = pfad;
//** Verbuggt process.Start();
FrmPDFViewer frmPDFViewer = new FrmPDFViewer(pfad);
frmPDFViewer.ShowDialog();
} }
} }

View File

@@ -1,97 +0,0 @@
namespace BerichtGen
{
partial class FrmPDFViewer
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
Syncfusion.Windows.Forms.PdfViewer.MessageBoxSettings messageBoxSettings1 = new Syncfusion.Windows.Forms.PdfViewer.MessageBoxSettings();
Syncfusion.Windows.PdfViewer.PdfViewerPrinterSettings pdfViewerPrinterSettings1 = new Syncfusion.Windows.PdfViewer.PdfViewerPrinterSettings();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmPDFViewer));
Syncfusion.Windows.Forms.PdfViewer.TextSearchSettings textSearchSettings1 = new Syncfusion.Windows.Forms.PdfViewer.TextSearchSettings();
this.pdfViewerControl = new Syncfusion.Windows.Forms.PdfViewer.PdfViewerControl();
this.SuspendLayout();
//
// pdfViewerControl
//
this.pdfViewerControl.CursorMode = Syncfusion.Windows.Forms.PdfViewer.PdfViewerCursorMode.SelectTool;
this.pdfViewerControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.pdfViewerControl.EnableContextMenu = true;
this.pdfViewerControl.EnableNotificationBar = true;
this.pdfViewerControl.HorizontalScrollOffset = 0;
this.pdfViewerControl.IsBookmarkEnabled = false;
this.pdfViewerControl.IsTextSearchEnabled = false;
this.pdfViewerControl.IsTextSelectionEnabled = false;
this.pdfViewerControl.Location = new System.Drawing.Point(0, 0);
this.pdfViewerControl.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
messageBoxSettings1.EnableNotification = true;
this.pdfViewerControl.MessageBoxSettings = messageBoxSettings1;
this.pdfViewerControl.MinimumZoomPercentage = 50;
this.pdfViewerControl.Name = "pdfViewerControl";
this.pdfViewerControl.PageBorderThickness = 1;
pdfViewerPrinterSettings1.PageOrientation = Syncfusion.Windows.PdfViewer.PdfViewerPrintOrientation.Auto;
pdfViewerPrinterSettings1.PageSize = Syncfusion.Windows.PdfViewer.PdfViewerPrintSize.ActualSize;
pdfViewerPrinterSettings1.PrintLocation = ((System.Drawing.PointF)(resources.GetObject("pdfViewerPrinterSettings1.PrintLocation")));
pdfViewerPrinterSettings1.ShowPrintStatusDialog = true;
this.pdfViewerControl.PrinterSettings = pdfViewerPrinterSettings1;
this.pdfViewerControl.ReferencePath = null;
this.pdfViewerControl.ScrollDisplacementValue = 0;
this.pdfViewerControl.ShowHorizontalScrollBar = true;
this.pdfViewerControl.ShowToolBar = true;
this.pdfViewerControl.ShowVerticalScrollBar = true;
this.pdfViewerControl.Size = new System.Drawing.Size(851, 922);
this.pdfViewerControl.SpaceBetweenPages = 8;
this.pdfViewerControl.TabIndex = 0;
this.pdfViewerControl.Text = "pdfViewerControl1";
textSearchSettings1.CurrentInstanceColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(255)))), ((int)(((byte)(171)))), ((int)(((byte)(64)))));
textSearchSettings1.HighlightAllInstance = true;
textSearchSettings1.OtherInstanceColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(254)))), ((int)(((byte)(255)))), ((int)(((byte)(0)))));
this.pdfViewerControl.TextSearchSettings = textSearchSettings1;
this.pdfViewerControl.VerticalScrollOffset = 0;
this.pdfViewerControl.VisualStyle = Syncfusion.Windows.Forms.PdfViewer.VisualStyle.Default;
this.pdfViewerControl.ZoomMode = Syncfusion.Windows.Forms.PdfViewer.ZoomMode.FitPage;
//
// FrmPDFViewer
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoSize = true;
this.ClientSize = new System.Drawing.Size(851, 922);
this.Controls.Add(this.pdfViewerControl);
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.Name = "FrmPDFViewer";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "FrmPDFViewer";
this.Load += new System.EventHandler(this.FrmPDFViewer_Load);
this.ResumeLayout(false);
}
#endregion
private Syncfusion.Windows.Forms.PdfViewer.PdfViewerControl pdfViewerControl;
}
}

View File

@@ -1,34 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace BerichtGen
{
/// <summary>
///
/// </summary>
public partial class FrmPDFViewer : Form
{
string pfad;
/// <summary>
///
/// </summary>
/// <param name="pfad"></param>
public FrmPDFViewer(string pfad)
{
InitializeComponent();
this.pfad = pfad;
}
private void FrmPDFViewer_Load(object sender, EventArgs e)
{
pdfViewerControl.Load(pfad);
}
}
}

View File

@@ -1,127 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="pdfViewerPrinterSettings1.PrintLocation" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0
dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABVTeXN0ZW0uRHJh
d2luZy5Qb2ludEYCAAAAAXgBeQAACwsCAAAAAAAAAAAAAAAL
</value>
</data>
</root>

View File

@@ -145,12 +145,6 @@
<Compile Include="BerichtGen\FrmOptions.Designer.cs"> <Compile Include="BerichtGen\FrmOptions.Designer.cs">
<DependentUpon>FrmOptions.cs</DependentUpon> <DependentUpon>FrmOptions.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="BerichtGen\FrmPDFViewer.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="BerichtGen\FrmPDFViewer.Designer.cs">
<DependentUpon>FrmPDFViewer.cs</DependentUpon>
</Compile>
<Compile Include="BerichtGen\makeGraphic.cs" /> <Compile Include="BerichtGen\makeGraphic.cs" />
<Compile Include="BüroExporter.cs" /> <Compile Include="BüroExporter.cs" />
<Compile Include="CSVParser\AcceptedCSVFormats.cs" /> <Compile Include="CSVParser\AcceptedCSVFormats.cs" />
@@ -392,9 +386,6 @@
<EmbeddedResource Include="BerichtGen\FrmOptions.resx"> <EmbeddedResource Include="BerichtGen\FrmOptions.resx">
<DependentUpon>FrmOptions.cs</DependentUpon> <DependentUpon>FrmOptions.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="BerichtGen\FrmPDFViewer.resx">
<DependentUpon>FrmPDFViewer.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmAktuelleBesatzung.resx"> <EmbeddedResource Include="FrmAktuelleBesatzung.resx">
<DependentUpon>FrmAktuelleBesatzung.cs</DependentUpon> <DependentUpon>FrmAktuelleBesatzung.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>