feat: rebrand to MMD PDF, single corporate theme, and remove original text under an edit

- Services/PdfRedactText.cs: strip text whose origin falls inside a CoverAnnotation
  from the page content stream at save time, hooked into PdfBurn.DrawAnnotationsIntoDoc.
  Fixes edited values staying recoverable by text extraction.
- Themes/MMD.xaml replaces all thirteen themes; picker and accent strip removed; no dark mode.
- Rename KillerPDF -> MMD PDF across code, resources, packaging and locale strings; new icon.
- Remove the upstream author credit and the in-app install button.
This commit is contained in:
2026-08-27 07:37:09 +02:00
parent 532485a830
commit 6610acfa44
230 changed files with 9362 additions and 11508 deletions
+3 -3
View File
@@ -14,7 +14,7 @@ using System.Windows.Media.Animation;
// THIS IS THE CANONICAL COPY (consolidated 2026-08-08). Every app carries a byte-identical
// copy of this file - only the namespace line differs - so a diff against this file IS the
// drift check. It replaced five copies that had each grown a different subset: the kit shipped
// no fade-out at all, so KillerNotes invented FadeOutAndClose and KillerPDF invented
// no fade-out at all, so KillerNotes invented FadeOutAndClose and MmdPdf invented
// FadeOut(element, done) independently, while KillerScan, KillerShell and Killendar closed
// every dialog with no fade. When something here needs to change, change it HERE first, then
// re-copy into every app.
@@ -34,10 +34,10 @@ using System.Windows.Media.Animation;
// - FadeOut(element, done): fades a named element and runs a callback. For a dialog that must
// hold its DialogResult until after the fade: assigning DialogResult is itself a close
// request, and WPF resets DialogResult to null whenever a close is canceled, so such a
// dialog records the result, fades, and assigns it in the callback (see KillerPDF's
// dialog records the result, fades, and assigns it in the callback (see MmdPdf's
// FileDialog.OnClosing).
// ============================================================
namespace KillerPDF.Controls
namespace MmdPdf.Controls
{
internal static class Anim
{
+3 -3
View File
@@ -9,7 +9,7 @@ using System.Windows.Data;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Shapes;
namespace KillerPDF
namespace MmdPdf
{
/// <summary>
/// A small, themed RGB color picker: saturation/value square + hue strip, RGB and HTML-hex inputs,
@@ -50,7 +50,7 @@ namespace KillerPDF
private static string L(string key) => Application.Current.TryFindResource(key) as string ?? key;
public ColorPickerDialog(Window? owner, Color initial)
{
Title = "KillerPDF - " + L("Str_Color_Name");
Title = "MmdPdf - " + L("Str_Color_Name");
Width = 300;
SizeToContent = SizeToContent.Height;
DialogChrome.Configure(this, owner);
@@ -359,7 +359,7 @@ namespace KillerPDF
box.Padding = new Thickness(4, 0, 4, 0);
return box;
}
// A crosshair/target glyph drawn in vectors, to match the KillerPDF look.
// A crosshair/target glyph drawn in vectors, to match the MmdPdf look.
private UIElement CrosshairIcon()
{
var g = new Grid { Width = 14, Height = 14 };
+6 -6
View File
@@ -5,10 +5,10 @@ using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Effects;
namespace KillerPDF
namespace MmdPdf
{
// Chrome for modal dialog windows: Configure (borderless window setup), Frame (the rounded card +
// title bar + grain), and BuildTitleBar (the KillerPDF wordmark + red close button).
// title bar + grain), and BuildTitleBar (the MmdPdf wordmark + red close button).
internal static class DialogChrome
{
// Keep generated dialog captions on the same close mark as the main window.
@@ -25,7 +25,7 @@ namespace KillerPDF
// Builds the title bar.
// win - the window being chromed (used for DragMove on the whole bar)
// owner - supplies the themed brushes + the ChromeCloseButton style (pass the window's owner)
// fullTitle - the complete title, e.g. "KillerPDF - Transform"; the "KillerPDF" part becomes the
// fullTitle - the complete title, e.g. "MmdPdf - Transform"; the "MmdPdf" part becomes the
// wordmark and the remainder (" - Transform") is rendered in the courier title font
// onClose - invoked when the red close button is clicked (e.g. set a result then Close())
public static Border BuildTitleBar(Window win, Window? owner, string? fullTitle, Action onClose)
@@ -64,7 +64,7 @@ namespace KillerPDF
Brush primary = shadow ? Brushes.Black : Brush(owner, "TextBrush", Brushes.White);
Brush logo = shadow ? Brushes.Black : Brush(owner, "AccentLogo", Brushes.LimeGreen);
Brush secondary = shadow ? Brushes.Black : Brush(owner, "MutedTextBrush", Brushes.Gray);
int kp = fullTitle?.IndexOf("KillerPDF", StringComparison.Ordinal) ?? -1;
int kp = fullTitle?.IndexOf("MmdPdf", StringComparison.Ordinal) ?? -1;
if (kp >= 0)
{
// Killer + PDF in one TextBlock so the two sizes share a baseline (cohesive wordmark).
@@ -72,7 +72,7 @@ namespace KillerPDF
logoTb.Inlines.Add(new System.Windows.Documents.Run("Killer") { FontFamily = wordmark, FontWeight = FontWeights.Normal, FontSize = 16, Foreground = primary });
logoTb.Inlines.Add(new System.Windows.Documents.Run("PDF") { FontFamily = wordmarkPdf, FontWeight = FontWeights.Bold, FontSize = 20.8, Foreground = logo });
sp.Children.Add(logoTb);
string after = fullTitle![(kp + "KillerPDF".Length)..];
string after = fullTitle![(kp + "MmdPdf".Length)..];
if (!string.IsNullOrEmpty(after))
sp.Children.Add(new TextBlock { Text = after, FontFamily = UiKit.MonoFont, FontSize = 14, Foreground = secondary, VerticalAlignment = VerticalAlignment.Center, Margin = new Thickness(4, 1, 0, 0) });
}
@@ -88,7 +88,7 @@ namespace KillerPDF
{
title.Children.Add(new TextBlock
{
Text = fullTitle ?? "KillerPDF", FontFamily = Value(owner, "ChromeFontFamily", new FontFamily("Tahoma")),
Text = fullTitle ?? "MmdPdf", FontFamily = Value(owner, "ChromeFontFamily", new FontFamily("Tahoma")),
FontSize = 11, FontWeight = FontWeights.Bold,
Foreground = Brush(owner, "ChromeTextBrush", Brushes.White), VerticalAlignment = VerticalAlignment.Center
});
+3 -3
View File
@@ -5,7 +5,7 @@ using System.Windows;
using System.Windows.Controls;
using PdfSharpCore.Pdf;
namespace KillerPDF
namespace MmdPdf
{
// Read/edit the PDF Document Info dictionary (Title, Author, Subject, Keywords, Creator). Themed via
// DialogChrome, no preview pane. Producer/dates/structure are shown read-only.
@@ -19,7 +19,7 @@ namespace KillerPDF
public DocumentInfoDialog(Window owner, PdfDocument doc, string? filePath)
{
_doc = doc;
Title = "KillerPDF - " + L("Str_DocInfo_Suffix");
Title = "MmdPdf - " + L("Str_DocInfo_Suffix");
Width = 460;
SizeToContent = SizeToContent.Height;
UseLayoutRounding = true;
@@ -56,7 +56,7 @@ namespace KillerPDF
row.Margin = new Thickness(0, 16, 0, 0);
body.Children.Add(row);
Content = DialogChrome.Frame(this, Owner, "KillerPDF - " + L("Str_DocInfo_Suffix"),
Content = DialogChrome.Frame(this, Owner, "MmdPdf - " + L("Str_DocInfo_Suffix"),
() => { DialogResult = false; Close(); }, body);
Loaded += (_, _2) => _title.Focus();
+3 -3
View File
@@ -1,7 +1,7 @@
using System.Windows;
using System.Windows.Controls;
namespace KillerPDF
namespace MmdPdf
{
// Export pages as images (#132): PNG/JPEG + DPI + page range, themed via DialogChrome like
// Document Info. The destination and base file name are picked afterwards with the standard
@@ -21,7 +21,7 @@ namespace KillerPDF
/// (#207) opens the same dialog scoped to the clicked page(s), still editable.</summary>
public ExportImagesDialog(Window owner, string presetRange = "")
{
Title = "KillerPDF - " + L("Str_ExportImg_Suffix");
Title = "MmdPdf - " + L("Str_ExportImg_Suffix");
// Width follows the caption. "Export Pages as Images" is 22 characters in en-US and
// up to 35 translated, which ran the title under the close button at a fixed 380 (#223).
MinWidth = 380;
@@ -68,7 +68,7 @@ namespace KillerPDF
row.Margin = new Thickness(0, 8, 0, 0);
body.Children.Add(row);
Content = DialogChrome.Frame(this, Owner, "KillerPDF - " + L("Str_ExportImg_Suffix"),
Content = DialogChrome.Frame(this, Owner, "MmdPdf - " + L("Str_ExportImg_Suffix"),
() => { Confirmed = false; Close(); }, body);
Loaded += (_, _2) => _dpi.Focus();
+3 -3
View File
@@ -4,11 +4,11 @@
and Open/Save behavior. The property surface deliberately mirrors the Win32 dialogs
(Title, Filter, FilterIndex, FileName, InitialDirectory, DefaultExt, ...) so a call site
changes by one word. -->
<Window x:Class="KillerPDF.Controls.FileDialog"
<Window x:Class="MmdPdf.Controls.FileDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:kui="clr-namespace:KillerPDF.Controls"
Title="KillerPDF"
xmlns:kui="clr-namespace:MmdPdf.Controls"
Title="MMD PDF"
Width="720" Height="520" MinWidth="560" MinHeight="420"
WindowStyle="None" ResizeMode="CanResize" ShowInTaskbar="False"
AllowsTransparency="True"
+3 -3
View File
@@ -11,7 +11,7 @@ using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media.Imaging;
namespace KillerPDF.Controls
namespace MmdPdf.Controls
{
/// <summary>Open or Save. Picked at construction; changes the accept button and the rules.</summary>
public enum FileDialogMode { Open, Save }
@@ -1261,14 +1261,14 @@ namespace KillerPDF.Controls
if (OverwritePrompt && File.Exists(full))
{
// Killendar asks this through its own ConfirmDialog. KillerPDF already has a
// Killendar asks this through its own ConfirmDialog. MmdPdf already has a
// themed confirm (KillerDialog) that every other prompt in the app uses, so
// this goes through that instead of importing a second one - two dialogs that
// ask the same kind of question is exactly how a UI starts to look stitched
// together. Same question, same buttons, one implementation.
var answer = KillerDialog.Show(this,
string.Format(Loc("Str_Dlg_OverwriteMsg"), Path.GetFileName(full)),
"KillerPDF", MessageBoxButton.YesNo, MessageBoxImage.Warning);
"MmdPdf", MessageBoxButton.YesNo, MessageBoxImage.Warning);
if (answer != MessageBoxResult.Yes) { FileNameBox.Focus(); return; }
}
}
+2 -2
View File
@@ -2,11 +2,11 @@ using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
namespace KillerPDF
namespace MmdPdf
{
/// <summary>
/// Where every flyout opens: the bottom corner of the content pane beside the rail.
/// (From KillerUI/Shell/FlyoutPlacement.cs - the family flyout standard.)
/// (From MmdPdfUI/Shell/FlyoutPlacement.cs - the family flyout standard.)
///
/// That rail-adjacent corner is the answer because of what bounds it, and all three matter:
/// - it is INSIDE the window, so a flyout never hangs over the desktop;
+1 -1
View File
@@ -11,7 +11,7 @@ using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Media;
namespace KillerPDF.Controls
namespace MmdPdf.Controls
{
// ═══════════════════════════════════════════════════════════
// FOLDER TREE - the file dialog's left pane, below places
+12 -12
View File
@@ -10,9 +10,9 @@ using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using KillerPDF.Services;
using MmdPdf.Services;
namespace KillerPDF
namespace MmdPdf
{
// ============================================================
// Themed dialog - replaces MessageBox for dark-UI consistency
@@ -34,7 +34,7 @@ namespace KillerPDF
public static MessageBoxResult Show(
Window? owner,
string message,
string title = "KillerPDF",
string title = "MmdPdf",
MessageBoxButton buttons = MessageBoxButton.OK,
MessageBoxImage image = MessageBoxImage.None,
bool fadeClose = true,
@@ -76,9 +76,9 @@ namespace KillerPDF
CornerRadius = new CornerRadius(5, 5, 0, 0)
};
titleBar.MouseLeftButtonDown += (_, e) => { if (e.ButtonState == MouseButtonState.Pressed) win.DragMove(); };
// When the title is just "KillerPDF", render it as the main window's wordmark - "Killer"
// When the title is just "MmdPdf", render it as the main window's wordmark - "Killer"
// in the primary text color and "PDF" in the green logo accent, bold, with a soft shadow.
if (title == "KillerPDF")
if (title == "MmdPdf")
{
var wm = new StackPanel { Orientation = Orientation.Horizontal };
var wmTb = new TextBlock { VerticalAlignment = VerticalAlignment.Center };
@@ -216,7 +216,7 @@ namespace KillerPDF
string message,
string[] labels,
int accentIndex = 0,
string title = "KillerPDF")
string title = "MmdPdf")
{
int result = -1;
@@ -238,7 +238,7 @@ namespace KillerPDF
var titleBar = new Border { Background = Application.Current.TryFindResource("UseDialogCaption") is true ? UiKit.Brush("TitleBarBrush") : Brushes.Transparent, Padding = new Thickness(16, 10, 16, 10) };
titleBar.MouseLeftButtonDown += (_, e) => { if (e.ButtonState == MouseButtonState.Pressed) win.DragMove(); };
if (title == "KillerPDF")
if (title == "MmdPdf")
{
var wmTb = new TextBlock { VerticalAlignment = VerticalAlignment.Center };
wmTb.Inlines.Add(new System.Windows.Documents.Run("Killer") { FontFamily = UiKit.WordmarkFont, FontWeight = FontWeights.Normal, FontSize = 15, Foreground = R("TextBrush") });
@@ -308,7 +308,7 @@ namespace KillerPDF
Window? owner,
string message,
string checkboxText,
string title = "KillerPDF",
string title = "MmdPdf",
MessageBoxButton buttons = MessageBoxButton.OKCancel,
MessageBoxResult? defaultResult = null)
{
@@ -358,7 +358,7 @@ namespace KillerPDF
bool closeTabs = check1Initial;
bool remember = check2Initial;
var win = new Window { Title = "KillerPDF", Width = 380, SizeToContent = SizeToContent.Height };
var win = new Window { Title = "MmdPdf", Width = 380, SizeToContent = SizeToContent.Height };
// fade:false - the app's own fade-out follows immediately on confirm; two fades
// back-to-back read as lag (same reasoning as the unsaved-changes prompt).
DialogChrome.Configure(win, owner, fade: false);
@@ -376,7 +376,7 @@ namespace KillerPDF
var root = new StackPanel();
// Title bar: the wordmark, exactly like Show()'s "KillerPDF" branch.
// Title bar: the wordmark, exactly like Show()'s "MmdPdf" branch.
var titleBar = new Border
{
Background = Application.Current.TryFindResource("UseDialogCaption") is true ? UiKit.Brush("TitleBarBrush") : Brushes.Transparent,
@@ -391,7 +391,7 @@ namespace KillerPDF
wm.Children.Add(wmTb);
titleBar.Child = wm;
if (Application.Current.TryFindResource("UseDialogCaption") is true)
titleBar = DialogChrome.BuildTitleBar(win, owner, "KillerPDF", () => win.Close());
titleBar = DialogChrome.BuildTitleBar(win, owner, "MmdPdf", () => win.Close());
titleBar.Height = Application.Current.TryFindResource("DialogTitleBarHeight") is double titleHeight ? titleHeight : double.NaN;
root.Children.Add(titleBar);
@@ -504,7 +504,7 @@ namespace KillerPDF
// Enter anywhere in the field submits.
pw.KeyDown += (_, e) => { if (e.Key == Key.Enter) { result = pw.Password; win.Close(); } };
win.Content = DialogChrome.Frame(win, owner, "KillerPDF", CloseCancel, body);
win.Content = DialogChrome.Frame(win, owner, "MmdPdf", CloseCancel, body);
win.Loaded += (_, _2) => pw.Focus();
win.ShowDialog();
return result;
+1 -1
View File
@@ -1,6 +1,6 @@
using System;
namespace KillerPDF.Controls
namespace MmdPdf.Controls
{
// Row and place models for FileDialog.
public sealed class PickerPlace(string label, string path, bool pinned = false)
+2 -2
View File
@@ -13,8 +13,8 @@
============================================================ -->
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:KillerPDF.Controls"
xmlns:kui="clr-namespace:KillerPDF.Controls">
xmlns:local="clr-namespace:MmdPdf.Controls"
xmlns:kui="clr-namespace:MmdPdf.Controls">
<Style x:Key="OutlineButton" TargetType="Button">
<!-- Transparent at rest, NOT RowSelectedBrush. Filled with RowSelectedBrush while its text
+8 -8
View File
@@ -13,10 +13,10 @@ using System.Windows.Media.Imaging;
using Docnet.Core;
using Docnet.Core.Models;
namespace KillerPDF
namespace MmdPdf
{
/// <summary>
/// KillerPDF's own print dialog with a working preview. WPF's built-in PrintDialog
/// MmdPdf's own print dialog with a working preview. WPF's built-in PrintDialog
/// reports "This app doesn't support print preview", so we render the rasterized
/// pages ourselves, expose printer / orientation / copies / page-range settings,
/// and drive the spooler via a non-UI PrintDialog when the user clicks Print.
@@ -581,7 +581,7 @@ namespace KillerPDF
};
panel.Children.Add(margins);
// Pages per sheet (N-up): KillerPDF composes the sheet itself.
// Pages per sheet (N-up): MmdPdf composes the sheet itself.
panel.Children.Add(Label(S("Str_Print_PagesPerSheet")));
var nup = new ComboBox { Margin = new Thickness(0, 4, 0, 12), Height = 26 };
ApplyComboStyle(nup);
@@ -1208,7 +1208,7 @@ namespace KillerPDF
{
if (_queue == null)
{
KillerDialog.Show(this, S("Str_Dlg_NoPrinter"), "KillerPDF",
KillerDialog.Show(this, S("Str_Dlg_NoPrinter"), "MmdPdf",
MessageBoxButton.OK, MessageBoxImage.Warning);
return;
}
@@ -1218,7 +1218,7 @@ namespace KillerPDF
var indices = SelectedIndices();
if (indices.Count == 0)
{
KillerDialog.Show(this, S("Str_Dlg_NoValidPages"), "KillerPDF",
KillerDialog.Show(this, S("Str_Dlg_NoValidPages"), "MmdPdf",
MessageBoxButton.OK, MessageBoxImage.Warning);
return;
}
@@ -1285,7 +1285,7 @@ namespace KillerPDF
if (idx < 0 || idx >= _pages.Length) continue;
using var pr = dr.GetPageReader(idx);
int w = pr.GetPageWidth(), h = pr.GetPageHeight();
var pixels = KillerPDF.Services.PdfiumInterop.RenderPageWithAnnotations(_renderPath, idx, w, h)
var pixels = MmdPdf.Services.PdfiumInterop.RenderPageWithAnnotations(_renderPath, idx, w, h)
?? pr.GetImage();
var bs = BitmapSource.Create(w, h, 96, 96, PixelFormats.Bgra32, null, pixels, w * 4); // #141
bs.Freeze();
@@ -1318,7 +1318,7 @@ namespace KillerPDF
// been retyped behind the scrim, and a range that now matches nothing must stay disabled.
UpdatePreview();
KillerDialog.Show(this, S("Str_Err_PrintFailed") + "\n" + ex.GetType().Name + ": " + ex.Message,
"KillerPDF", MessageBoxButton.OK, MessageBoxImage.Error);
"MmdPdf", MessageBoxButton.OK, MessageBoxImage.Error);
}
}
@@ -1366,7 +1366,7 @@ namespace KillerPDF
// STA: both the XPS serializer and the spooler reach apartment-bound COM underneath.
thread.SetApartmentState(System.Threading.ApartmentState.STA);
thread.IsBackground = true;
thread.Name = "KillerPDF print spool";
thread.Name = "MmdPdf print spool";
thread.Start();
return done.Task;
}
+7 -7
View File
@@ -7,16 +7,16 @@ using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Input;
using System.Windows.Media;
using KillerPDF.Services.Signing;
using MmdPdf.Services.Signing;
using Microsoft.Win32;
namespace KillerPDF
namespace MmdPdf
{
/// <summary>
/// Themed modal dialog that cryptographically signs the open PDF with a certificate (a .pfx/.p12
/// file, or one from the Windows store) and writes a NEW signed copy. This is the real digital
/// signature - distinct from the drawn "Signature" stamp tool, which only places a picture.
/// Chrome and colors mirror PrintPreviewWindow so every KillerPDF dialog looks identical.
/// Chrome and colors mirror PrintPreviewWindow so every MmdPdf dialog looks identical.
/// </summary>
internal sealed class SignDocumentDialog : Window
{
@@ -45,7 +45,7 @@ namespace KillerPDF
public SignDocumentDialog(Window? owner, string sourcePdf)
{
_sourcePdf = sourcePdf;
Title = "KillerPDF - " + L("Str_Sign_Name");
Title = "MmdPdf - " + L("Str_Sign_Name");
Width = 470;
SizeToContent = SizeToContent.Height;
UseLayoutRounding = true;
@@ -149,7 +149,7 @@ namespace KillerPDF
SyncSource();
Content = DialogChrome.Frame(this, Owner, "KillerPDF - " + L("Str_Sign_TitleSuffix"),
Content = DialogChrome.Frame(this, Owner, "MmdPdf - " + L("Str_Sign_TitleSuffix"),
() => { DialogResult = false; Close(); }, body);
}
@@ -170,14 +170,14 @@ namespace KillerPDF
private void BrowsePfx()
{
var dlg = new KillerPDF.Controls.FileDialog(KillerPDF.Controls.FileDialogMode.Open)
var dlg = new MmdPdf.Controls.FileDialog(MmdPdf.Controls.FileDialogMode.Open)
{ Filter = L("Str_Filter_Cert") + "|*.pfx;*.p12|" + L("Str_Filter_AllFiles") + "|*.*", Title = L("Str_Sign_ChooseCert") };
if (dlg.ShowDialog(this) == true) _pfxBox.Text = dlg.FileName;
}
private void BrowseOutput()
{
var dlg = new KillerPDF.Controls.FileDialog(KillerPDF.Controls.FileDialogMode.Save)
var dlg = new MmdPdf.Controls.FileDialog(MmdPdf.Controls.FileDialogMode.Save)
{ Filter = L("Str_Filter_Pdf") + "|*.pdf", Title = L("Str_Sign_SaveAs"), FileName = Path.GetFileName(_outputBox.Text) };
if (dlg.ShowDialog(this) == true) _outputBox.Text = dlg.FileName;
}
+4 -4
View File
@@ -8,7 +8,7 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using Microsoft.Win32;
namespace KillerPDF
namespace MmdPdf
{
/// <summary>
/// Combined "Stamp" tool, modeled on the Transform window: a live page preview on the left and an
@@ -94,7 +94,7 @@ namespace KillerPDF
_spec = existing?.Clone() ?? new StampSpec { NumbersEnabled = true };
Result = _spec;
Title = "KillerPDF - " + S("Str_Stamp_Suffix");
Title = "MmdPdf - " + S("Str_Stamp_Suffix");
Width = 980;
Height = 720;
MinWidth = 680;
@@ -213,7 +213,7 @@ namespace KillerPDF
// Family shadow under the content pane, like the main window (flat on 98SE).
root.Children.Add(UiKit.PaneWithShadow(previewWrap));
Content = DialogChrome.Frame(this, Owner, "KillerPDF - " + S("Str_Stamp_Suffix"), () => { Applied = false; Close(); }, root);
Content = DialogChrome.Frame(this, Owner, "MmdPdf - " + S("Str_Stamp_Suffix"), () => { Applied = false; Close(); }, root);
// Esc-to-close is wired by DialogChrome.Frame; Enter commits.
KeyDown += (_, e) => { if (e.Key == Key.Enter) CommitAndClose(); };
@@ -500,7 +500,7 @@ namespace KillerPDF
private void ChooseImage()
{
var ofd = new KillerPDF.Controls.FileDialog(KillerPDF.Controls.FileDialogMode.Open)
var ofd = new MmdPdf.Controls.FileDialog(MmdPdf.Controls.FileDialogMode.Open)
{ Filter = "Images|*.png;*.jpg;*.jpeg;*.bmp;*.gif|All files|*.*", ShowImagePreview = true };
if (ofd.ShowDialog(this) == true)
{
+1 -1
View File
@@ -4,7 +4,7 @@ using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
namespace KillerPDF
namespace MmdPdf
{
// Keeps the document scrollbar reactive (thumb sized to the visible proportion) while
// guaranteeing it never shrinks below a grabbable floor.
+4 -4
View File
@@ -6,9 +6,9 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Threading;
using KillerPDF.Services;
using MmdPdf.Services;
namespace KillerPDF
namespace MmdPdf
{
/// <summary>
/// Modal "Transform" window. Renders the current page on its own canvas (so the main view's mode is
@@ -85,7 +85,7 @@ namespace KillerPDF
_srcH = src.PixelHeight;
_pageWpt = pageWpt;
_pageHpt = pageHpt;
Title = "KillerPDF - " + S("Str_Tf_Suffix");
Title = "MmdPdf - " + S("Str_Tf_Suffix");
Width = 980;
Height = 720;
MinWidth = 640;
@@ -367,7 +367,7 @@ namespace KillerPDF
// Family shadow under the content pane, like the main window (flat on 98SE).
root.Children.Add(UiKit.PaneWithShadow(previewWrap));
Content = DialogChrome.Frame(this, Owner, "KillerPDF - " + S("Str_Tf_Suffix"), () => { Applied = false; Close(); }, root);
Content = DialogChrome.Frame(this, Owner, "MmdPdf - " + S("Str_Tf_Suffix"), () => { Applied = false; Close(); }, root);
UpdatePreview(); // populate the output-size readout at the original dimensions
// Esc-to-close is wired by DialogChrome.Frame; Enter commits.
+2 -2
View File
@@ -8,7 +8,7 @@ using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
namespace KillerPDF
namespace MmdPdf
{
// WPF has no built-in animation for GridLength, so grid columns (the sidebar) can only snap.
// This drives a pixel-unit GridLength between From and To so a column glides instead.
@@ -466,7 +466,7 @@ namespace KillerPDF
// Dialog/popup buttons. accent==true is the primary (fills solid accent on hover); false is secondary.
public static Button Make(object content, bool accent)
{
if (KillerPDF.Services.ThemeManager.Current == KillerPDF.Services.Theme.SE98)
if (MmdPdf.Services.ThemeManager.Current == MmdPdf.Services.Theme.SE98)
{
var button = Make(content, Brush("ChipFaceBrush"), Brush("ChipFaceBrush"),
Brush("TextBrush"), Brush("TextBrush"), Brushes.Transparent);
+2 -2
View File
@@ -16,10 +16,10 @@ using Microsoft.Win32;
using PdfSharpCore.Drawing;
using PdfSharpCore.Pdf;
using PdfSharpCore.Pdf.IO;
using KillerPDF.Services;
using MmdPdf.Services;
using PdfPigDoc = UglyToad.PdfPig.PdfDocument;
namespace KillerPDF.Controls
namespace MmdPdf.Controls
{
// Annotation rendering - draws the per-page annotation overlays (text, cover, highlight, ink,
// signature, image). Moved from Shell/Annotations.cs; the namespace and class line are the only
+1 -1
View File
@@ -5,7 +5,7 @@ using System.Windows.Input;
using System.Windows.Media;
using PdfSharpCore.Pdf;
namespace KillerPDF.Controls
namespace MmdPdf.Controls
{
/// <summary>
/// The viewer's outward surface: what the window still calls into.
+1 -1
View File
@@ -6,7 +6,7 @@ using System.Windows.Media;
using System.Windows.Shapes;
using PdfSharpCore.Pdf;
namespace KillerPDF.Controls
namespace MmdPdf.Controls
{
/// <summary>
/// Transitional forwards used by the moved render pipeline while the remaining bridge surface
+1 -1
View File
@@ -5,7 +5,7 @@ using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Shapes;
namespace KillerPDF.Controls
namespace MmdPdf.Controls
{
/// <summary>
/// Editing state and narrow shell-facing adapters owned by each viewer instance. Annotations,
+2 -2
View File
@@ -16,10 +16,10 @@ using Microsoft.Win32;
using PdfSharpCore.Drawing;
using PdfSharpCore.Pdf;
using PdfSharpCore.Pdf.IO;
using KillerPDF.Services;
using MmdPdf.Services;
using PdfPigDoc = UglyToad.PdfPig.PdfDocument;
namespace KillerPDF.Controls
namespace MmdPdf.Controls
{
// Moved from Shell/Crop.cs; the namespace and class line are the only changes. Window members
// spelled bare here resolve through PdfViewer.Bridge.cs.
+3 -3
View File
@@ -16,10 +16,10 @@ using Microsoft.Win32;
using PdfSharpCore.Drawing;
using PdfSharpCore.Pdf;
using PdfSharpCore.Pdf.IO;
using KillerPDF.Services;
using MmdPdf.Services;
using PdfPigDoc = UglyToad.PdfPig.PdfDocument;
namespace KillerPDF.Controls
namespace MmdPdf.Controls
{
// Moved from Shell/Forms.cs; the namespace and class line are the only changes. Window members
// spelled bare here resolve through PdfViewer.Bridge.cs.
@@ -924,7 +924,7 @@ namespace KillerPDF.Controls
// /Length, which every PDF stream must carry. Attaching the stream object directly
// (the old reflection helper) left the appearance stream with no /Length, so the saved
// file was structurally invalid - PdfSharpCore's own parser refuses it ("Cannot
// retrieve stream length"), which is why KillerPDF met its own saved form with the
// retrieve stream length"), which is why MmdPdf met its own saved form with the
// repair prompt, and strict viewers reported a damaged structure (#179). The Debug
// assert that would have caught it (PdfDictionary.WriteObject) is compiled out of
// Release builds.
+4 -4
View File
@@ -16,10 +16,10 @@ using Microsoft.Win32;
using PdfSharpCore.Drawing;
using PdfSharpCore.Pdf;
using PdfSharpCore.Pdf.IO;
using KillerPDF.Services;
using MmdPdf.Services;
using PdfPigDoc = UglyToad.PdfPig.PdfDocument;
namespace KillerPDF.Controls
namespace MmdPdf.Controls
{
// Moved from Shell/Links.cs; the namespace and class line are the only changes. Window members
// spelled bare here resolve through PdfViewer.Bridge.cs.
@@ -528,12 +528,12 @@ namespace KillerPDF.Controls
}
catch (Exception ex)
{
KillerDialog.Show(Host!.Window, $"{Loc("Str_LinkRemoveFailed")}\n{ex.Message}", "KillerPDF",
KillerDialog.Show(Host!.Window, $"{Loc("Str_LinkRemoveFailed")}\n{ex.Message}", "MmdPdf",
MessageBoxButton.OK, MessageBoxImage.Error);
}
}
// StripLinkAnnotationBorders lives in Services/PdfScrub.cs (KillerUI refactor), beside
// StripLinkAnnotationBorders lives in Services/PdfScrub.cs (MmdPdfUI refactor), beside
// the other pre-save scrubs it always runs with.
/// <summary>
+2 -2
View File
@@ -16,10 +16,10 @@ using Microsoft.Win32;
using PdfSharpCore.Drawing;
using PdfSharpCore.Pdf;
using PdfSharpCore.Pdf.IO;
using KillerPDF.Services;
using MmdPdf.Services;
using PdfPigDoc = UglyToad.PdfPig.PdfDocument;
namespace KillerPDF.Controls
namespace MmdPdf.Controls
{
// Moved from Shell/PageSelection.cs; the namespace and class line are the only changes. Window
// members spelled bare here resolve through PdfViewer.Bridge.cs.
+2 -2
View File
@@ -16,10 +16,10 @@ using Microsoft.Win32;
using PdfSharpCore.Drawing;
using PdfSharpCore.Pdf;
using PdfSharpCore.Pdf.IO;
using KillerPDF.Services;
using MmdPdf.Services;
using PdfPigDoc = UglyToad.PdfPig.PdfDocument;
namespace KillerPDF.Controls
namespace MmdPdf.Controls
{
// Moved from Shell/Selection.cs; the namespace and class line are the only changes. Window
// members spelled bare here resolve through PdfViewer.Bridge.cs.
+2 -2
View File
@@ -5,7 +5,7 @@ using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
namespace KillerPDF.Controls
namespace MmdPdf.Controls
{
// This pane's tab band: which tabs are in the strip, which of them owns an edge, what the card's
// top corners do, where the focus ring runs, and the drag that reorders them or hands one to the
@@ -413,7 +413,7 @@ namespace KillerPDF.Controls
bool firstInactiveRetro = retro && _sessions.Any(t => t.IsStripVisible && t.IsFirst && !t.IsActive);
bool lastInactiveRetro = retro && _sessions.Any(t => t.RetroLastInactive);
// The XAML declares these with NO Background - unlike KillerShell's copy, which paints
// them PrimaryBrush directly in markup, KillerPDF's accent key is only known at runtime
// them PrimaryBrush directly in markup, MmdPdf's accent key is only known at runtime
// (SelectionAccent, resolved the same way SetFocusHalo resolves the card border). Without
// this they toggle Visible and still draw nothing: a transparent Border is invisible
// whatever its Visibility says.
+4 -4
View File
@@ -6,9 +6,9 @@ using System.Windows;
using System.Windows.Controls;
using PdfSharpCore.Pdf;
namespace KillerPDF.Controls
namespace MmdPdf.Controls
{
// Tabbed document support. KillerPDF keeps one window and one live "working set" of
// Tabbed document support. MmdPdf keeps one window and one live "working set" of
// per-document fields (in MainWindow.xaml.cs). Each open PDF is a DocumentSession that
// owns its own copy of those fields. Switching tabs captures the live fields into the
// outgoing session and applies the incoming session's fields, then re-renders.
@@ -790,7 +790,7 @@ namespace KillerPDF.Controls
{
var res = KillerDialog.Show(Host!.Window,
Loc("Str_Dlg_UnsavedClose"),
"KillerPDF", MessageBoxButton.YesNo, MessageBoxImage.Warning);
"MmdPdf", MessageBoxButton.YesNo, MessageBoxImage.Warning);
if (res != MessageBoxResult.Yes) { RebuildTabStrip(); return; }
}
@@ -838,7 +838,7 @@ namespace KillerPDF.Controls
if (docTabs.Any(t => t.IsDirty))
{
var res = KillerDialog.Show(Host!.Window, Loc("Str_Dlg_UnsavedCloseAll"),
"KillerPDF", MessageBoxButton.YesNo, MessageBoxImage.Warning);
"MmdPdf", MessageBoxButton.YesNo, MessageBoxImage.Warning);
if (res != MessageBoxResult.Yes) { RebuildTabStrip(); return; }
}
+1 -1
View File
@@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace KillerPDF.Controls
namespace MmdPdf.Controls
{
/// <summary>
/// This pane's tab surface, exposed to the window. Wrappers inside the same partial class, so
+3 -3
View File
@@ -16,10 +16,10 @@ using Microsoft.Win32;
using PdfSharpCore.Drawing;
using PdfSharpCore.Pdf;
using PdfSharpCore.Pdf.IO;
using KillerPDF.Services;
using MmdPdf.Services;
using PdfPigDoc = UglyToad.PdfPig.PdfDocument;
namespace KillerPDF.Controls
namespace MmdPdf.Controls
{
// Moved from Shell/TextEditing.cs; the namespace and class line are the only changes. Window
// members spelled bare here resolve through PdfViewer.Bridge.cs.
@@ -748,7 +748,7 @@ namespace KillerPDF.Controls
string family = Services.FontCoverage.PickFamily(want, ta.Content);
string missing = Services.FontCoverage.UncoveredChars(family, ta.Content);
if (missing.Length == 0) return;
KillerDialog.Show(Host!.Window, string.Format(Loc("Str_Font_NoGlyphs"), missing), "KillerPDF",
KillerDialog.Show(Host!.Window, string.Format(Loc("Str_Font_NoGlyphs"), missing), "MmdPdf",
MessageBoxButton.OK, MessageBoxImage.Warning);
}
catch { /* the warning must never be the thing that breaks placing text */ }
+2 -2
View File
@@ -16,10 +16,10 @@ using Microsoft.Win32;
using PdfSharpCore.Drawing;
using PdfSharpCore.Pdf;
using PdfSharpCore.Pdf.IO;
using KillerPDF.Services;
using MmdPdf.Services;
using PdfPigDoc = UglyToad.PdfPig.PdfDocument;
namespace KillerPDF.Controls
namespace MmdPdf.Controls
{
// Page viewport: builds the page tiles and annotation overlays for all four view modes (single,
// continuous, two-page, grid) and handles preview scrolling.
+2 -2
View File
@@ -16,10 +16,10 @@ using Microsoft.Win32;
using PdfSharpCore.Drawing;
using PdfSharpCore.Pdf;
using PdfSharpCore.Pdf.IO;
using KillerPDF.Services;
using MmdPdf.Services;
using PdfPigDoc = UglyToad.PdfPig.PdfDocument;
namespace KillerPDF.Controls
namespace MmdPdf.Controls
{
// Wheel zoom, wheel scroll, and the pointer gestures that start on the page surface.
//
+1 -1
View File
@@ -1,4 +1,4 @@
<UserControl x:Class="KillerPDF.Controls.PdfViewer"
<UserControl x:Class="MmdPdf.Controls.PdfViewer"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- One document view: this pane's tab strip and its card.
+3 -3
View File
@@ -1,9 +1,9 @@
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using KillerPDF.Features;
using MmdPdf.Features;
namespace KillerPDF.Controls
namespace MmdPdf.Controls
{
/// <summary>
/// One document view: its tab strip, its card and everything inside. Two instances make the
@@ -52,7 +52,7 @@ namespace KillerPDF.Controls
/// SetResourceReference, not a brush snapshot, on both states: an assigned brush would not
/// follow a live theme switch.
///
/// "SelectionAccent", not "AccentBrush". KillerPDF uses the older family resource set
/// "SelectionAccent", not "AccentBrush". MmdPdf uses the older family resource set
/// (BgCanvas / AccentLogo / TextPrimary) and has no AccentBrush key in any theme.
/// SetResourceReference to a missing key does not throw, it silently leaves the property
/// unset, which blanks the border instead of accenting it.
+1 -1
View File
@@ -2,7 +2,7 @@ using System;
using System.Windows;
using System.Windows.Media.Animation;
namespace KillerPDF
namespace MmdPdf
{
// Fade a window out on close: cancel the first close, animate opacity to 0, then close for real.