Documents: restructure Documents/ directory
This commit is contained in:
@ -12,6 +12,7 @@ using System.Globalization;
|
||||
using System.Threading;
|
||||
using System.Windows.Markup;
|
||||
using System.Reflection;
|
||||
using Elwig.Helpers.Printing;
|
||||
|
||||
namespace Elwig {
|
||||
public partial class App : Application {
|
||||
@ -45,7 +46,7 @@ namespace Elwig {
|
||||
public static IList<IScale> Scales { get; private set; }
|
||||
public static ClientParameters Client { get; private set; }
|
||||
|
||||
public static bool IsPrintingReady => Documents.Html.IsReady && Documents.Pdf.IsReady;
|
||||
public static bool IsPrintingReady => Html.IsReady && Pdf.IsReady;
|
||||
public static Dispatcher MainDispatcher { get; private set; }
|
||||
|
||||
public App() : base() {
|
||||
@ -92,8 +93,8 @@ namespace Elwig {
|
||||
}
|
||||
}
|
||||
|
||||
Utils.RunBackground("HTML Initialization", () => Documents.Html.Init(PrintingReadyChanged));
|
||||
Utils.RunBackground("PDF Initialization", () => Documents.Pdf.Init(PrintingReadyChanged));
|
||||
Utils.RunBackground("HTML Initialization", () => Html.Init(PrintingReadyChanged));
|
||||
Utils.RunBackground("PDF Initialization", () => Pdf.Init(PrintingReadyChanged));
|
||||
|
||||
var list = new List<IScale>();
|
||||
foreach (var s in Config.Scales) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
@inherits TemplatePage<Elwig.Documents.BusinessDocument>
|
||||
@model Elwig.Documents.BusinessDocument
|
||||
@{ Layout = "Document"; }
|
||||
<link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\style-businessdocument.css" />
|
||||
<link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\BusinessDocument.css"/>
|
||||
<div class="info-wrapper">
|
||||
<div class="address-wrapper">
|
||||
<div class="sender">
|
||||
|
@ -2,7 +2,7 @@
|
||||
@inherits TemplatePage<Elwig.Documents.CreditNote>
|
||||
@model Elwig.Documents.CreditNote
|
||||
@{ Layout = "BusinessDocument"; }
|
||||
<link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\style-creditnote.css"/>
|
||||
<link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\CreditNote.css"/>
|
||||
@{
|
||||
var binNum = Model.BinNames.Length;
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
@inherits TemplatePage<Elwig.Documents.DeliveryConfirmation>
|
||||
@model Elwig.Documents.DeliveryConfirmation
|
||||
@{ Layout = "BusinessDocument"; }
|
||||
<link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\style-deliveryconfirmation.css"/>
|
||||
<link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\DeliveryConfirmation.css"/>
|
||||
<main>
|
||||
<h1>@Model.Title</h1>
|
||||
<table class="delivery-confirmation">
|
||||
|
@ -2,7 +2,7 @@
|
||||
@inherits TemplatePage<Elwig.Documents.DeliveryJournal>
|
||||
@model Elwig.Documents.DeliveryJournal
|
||||
@{ Layout = "Document"; }
|
||||
<link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\style-deliveryjournal.css"/>
|
||||
<link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\DeliveryJournal.css"/>
|
||||
<main>
|
||||
<h1>Lieferjournal</h1>
|
||||
<h2>@Model.Filter</h2>
|
||||
|
@ -2,7 +2,7 @@
|
||||
@inherits TemplatePage<Elwig.Documents.DeliveryNote>
|
||||
@model Elwig.Documents.DeliveryNote
|
||||
@{ Layout = "BusinessDocument"; }
|
||||
<link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\style-deliverynote.css" />
|
||||
<link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\DeliveryNote.css" />
|
||||
<main>
|
||||
<h1>@Model.Title</h1>
|
||||
<table class="delivery">
|
||||
|
@ -4,6 +4,7 @@ using System.IO;
|
||||
using Elwig.Helpers;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Elwig.Helpers.Printing;
|
||||
|
||||
namespace Elwig.Documents {
|
||||
public abstract partial class Document : IDisposable {
|
@ -7,8 +7,8 @@
|
||||
<title>@Model.Title</title>
|
||||
<meta name="author" value="@Model.Author"/>
|
||||
<meta charset="UTF-8"/>
|
||||
<link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\style.css"/>
|
||||
<link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\style-page.css"/>
|
||||
<link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\Document.css"/>
|
||||
<link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\Document.Page.css"/>
|
||||
@if (Model.DoubleSided) {
|
||||
<style>
|
||||
@@page :left {
|
||||
|
@ -2,7 +2,7 @@ using RazorLight;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Elwig.Documents {
|
||||
namespace Elwig.Helpers.Printing {
|
||||
public static class Html {
|
||||
|
||||
private static RazorLightEngine? Engine = null;
|
@ -1,5 +1,4 @@
|
||||
using System.Threading.Tasks;
|
||||
using Elwig.Helpers;
|
||||
using Elwig.Windows;
|
||||
using System.Diagnostics;
|
||||
using System;
|
||||
@ -9,7 +8,7 @@ using System.Windows;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Linq;
|
||||
|
||||
namespace Elwig.Documents {
|
||||
namespace Elwig.Helpers.Printing {
|
||||
public static class Pdf {
|
||||
|
||||
private static readonly string PdfToPrinter = App.ExePath + "PDFtoPrinter.exe";
|
Reference in New Issue
Block a user