From 05f99b19389c4cfa3067d75d44b0a921e8a60d56 Mon Sep 17 00:00:00 2001 From: mibcoder <21145098+m1bcodes@users.noreply.github.com> Date: Sun, 31 Mar 2024 00:24:30 +0100 Subject: [PATCH 1/5] new command "Flip every 2nd image" --- .../Properties/launchSettings.json | 7 +++++++ NAPS2.Lib.Mac/EtoForms/Ui/MacDesktopForm.cs | 1 + NAPS2.Lib.Mac/EtoForms/Ui/MacPreviewForm.cs | 1 + NAPS2.Lib/Config/InternalDefaults.cs | 1 + NAPS2.Lib/Config/KeyboardShortcuts.cs | 1 + .../Desktop/DesktopKeyboardShortcuts.cs | 2 ++ .../EtoForms/Desktop/ImageListActions.cs | 3 +++ NAPS2.Lib/EtoForms/Ui/DesktopCommands.cs | 5 +++++ NAPS2.Lib/EtoForms/Ui/DesktopForm.cs | 1 + NAPS2.Lib/EtoForms/Ui/PreviewForm.cs | 2 ++ NAPS2.Lib/Images/ImageListMutation.cs | 19 +++++++++++++++++++ .../Lang/Resources/UiStrings.Designer.cs | 12 +++++++++++- NAPS2.Lib/Lang/Resources/UiStrings.resx | 3 +++ NAPS2.Lib/NAPS2.Lib.csproj | 12 ++++++++++++ NAPS2.Setup/appsettings.xml | 1 + 15 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 NAPS2.App.WinForms/Properties/launchSettings.json diff --git a/NAPS2.App.WinForms/Properties/launchSettings.json b/NAPS2.App.WinForms/Properties/launchSettings.json new file mode 100644 index 0000000000..f187b06ca6 --- /dev/null +++ b/NAPS2.App.WinForms/Properties/launchSettings.json @@ -0,0 +1,7 @@ +{ + "profiles": { + "NAPS2.App.WinForms": { + "commandName": "Project" + } + } +} \ No newline at end of file diff --git a/NAPS2.Lib.Mac/EtoForms/Ui/MacDesktopForm.cs b/NAPS2.Lib.Mac/EtoForms/Ui/MacDesktopForm.cs index 2a5df19318..575d7e0510 100644 --- a/NAPS2.Lib.Mac/EtoForms/Ui/MacDesktopForm.cs +++ b/NAPS2.Lib.Mac/EtoForms/Ui/MacDesktopForm.cs @@ -126,6 +126,7 @@ protected override void CreateToolbarsAndMenus() Commands.RotateLeft, Commands.RotateRight, Commands.Flip, + Commands.AltFlip, Commands.Deskew, Commands.CustomRotate, new SeparatorMenuItem(), diff --git a/NAPS2.Lib.Mac/EtoForms/Ui/MacPreviewForm.cs b/NAPS2.Lib.Mac/EtoForms/Ui/MacPreviewForm.cs index 78fb0a1d7a..245a4f2756 100644 --- a/NAPS2.Lib.Mac/EtoForms/Ui/MacPreviewForm.cs +++ b/NAPS2.Lib.Mac/EtoForms/Ui/MacPreviewForm.cs @@ -58,6 +58,7 @@ protected override void UpdatePage() .Append(Commands.RotateLeft) .Append(Commands.RotateRight) .Append(Commands.Flip) + .Append(Commands.AltFlip) .Append(Commands.Deskew) .Append(Commands.CustomRotate)), MacToolbarItems.Create("crop", Commands.Crop), diff --git a/NAPS2.Lib/Config/InternalDefaults.cs b/NAPS2.Lib/Config/InternalDefaults.cs index 0911470d33..7c3cda5c8c 100644 --- a/NAPS2.Lib/Config/InternalDefaults.cs +++ b/NAPS2.Lib/Config/InternalDefaults.cs @@ -168,6 +168,7 @@ public static CommonConfig GetCommonConfig() => ImageSharpen = "", RotateLeft = "", RotateRight = "", + AltFlip = "", RotateFlip = "", RotateCustom = "", MoveUp = "Ctrl+Up", diff --git a/NAPS2.Lib/Config/KeyboardShortcuts.cs b/NAPS2.Lib/Config/KeyboardShortcuts.cs index 21a306ba24..65cc4a9524 100644 --- a/NAPS2.Lib/Config/KeyboardShortcuts.cs +++ b/NAPS2.Lib/Config/KeyboardShortcuts.cs @@ -54,6 +54,7 @@ public class KeyboardShortcuts public string? RotateLeft { get; set; } public string? RotateRight { get; set; } public string? RotateFlip { get; set; } + public string? AltFlip { get; set; } public string? RotateCustom { get; set; } public string? MoveUp { get; set; } diff --git a/NAPS2.Lib/EtoForms/Desktop/DesktopKeyboardShortcuts.cs b/NAPS2.Lib/EtoForms/Desktop/DesktopKeyboardShortcuts.cs index 9753232db6..3a3f8ceb1d 100644 --- a/NAPS2.Lib/EtoForms/Desktop/DesktopKeyboardShortcuts.cs +++ b/NAPS2.Lib/EtoForms/Desktop/DesktopKeyboardShortcuts.cs @@ -1,5 +1,6 @@ using Eto.Forms; using NAPS2.EtoForms.Ui; +using System.Runtime.InteropServices; namespace NAPS2.EtoForms.Desktop; @@ -84,6 +85,7 @@ public void Assign(DesktopCommands commands) _ksm.Assign(ks.RotateFlip, commands.Flip); _ksm.Assign(ks.RotateLeft, commands.RotateLeft); _ksm.Assign(ks.RotateRight, commands.RotateRight); + _ksm.Assign(ks.AltFlip, commands.AltFlip); _ksm.Assign(ks.SaveImages, commands.SaveImages); _ksm.Assign(ks.SaveImagesAll, commands.SaveAllImages); _ksm.Assign(ks.SaveImagesSelected, commands.SaveSelectedImages); diff --git a/NAPS2.Lib/EtoForms/Desktop/ImageListActions.cs b/NAPS2.Lib/EtoForms/Desktop/ImageListActions.cs index 3390862d36..10781cead8 100644 --- a/NAPS2.Lib/EtoForms/Desktop/ImageListActions.cs +++ b/NAPS2.Lib/EtoForms/Desktop/ImageListActions.cs @@ -70,6 +70,9 @@ public async Task RotateRight() => public async Task Flip() => await _imageList.MutateAsync(new ImageListMutation.RotateFlip(180), Selection); + public async Task AltFlip() => + await _imageList.MutateAsync(new ImageListMutation.AltFlip(), Selection); + public void DocumentCorrection() => _imageList.Mutate(new ImageListMutation.AddTransforms([new CorrectionTransform(CorrectionMode.Document)]), Selection); diff --git a/NAPS2.Lib/EtoForms/Ui/DesktopCommands.cs b/NAPS2.Lib/EtoForms/Ui/DesktopCommands.cs index fba199c430..b3878fc59b 100644 --- a/NAPS2.Lib/EtoForms/Ui/DesktopCommands.cs +++ b/NAPS2.Lib/EtoForms/Ui/DesktopCommands.cs @@ -220,6 +220,10 @@ public DesktopCommands(DesktopController desktopController, DesktopScanControlle Text = UiStrings.Flip, Image = iconProvider.GetIcon("arrow_switch_small") }; + AltFlip = new ActionCommand(imageListActions.AltFlip) + { + Text = UiStrings.AltFlip + }; Deskew = new ActionCommand(imageListActions.Deskew) { Text = UiStrings.Deskew @@ -396,6 +400,7 @@ public DesktopCommands WithSelection(Func> selectionFunc) public ActionCommand RotateLeft { get; set; } public ActionCommand RotateRight { get; set; } public ActionCommand Flip { get; set; } + public ActionCommand AltFlip { get; set; } public ActionCommand Deskew { get; set; } public ActionCommand CustomRotate { get; set; } public ActionCommand MoveUp { get; set; } diff --git a/NAPS2.Lib/EtoForms/Ui/DesktopForm.cs b/NAPS2.Lib/EtoForms/Ui/DesktopForm.cs index fc30f09cd2..139eb9cd71 100644 --- a/NAPS2.Lib/EtoForms/Ui/DesktopForm.cs +++ b/NAPS2.Lib/EtoForms/Ui/DesktopForm.cs @@ -360,6 +360,7 @@ protected MenuProvider GetRotateMenuProvider() => .Append(Commands.RotateLeft) .Append(Commands.RotateRight) .Append(Commands.Flip) + .Append(Commands.AltFlip) .Append(Commands.Deskew) .Append(Commands.CustomRotate); diff --git a/NAPS2.Lib/EtoForms/Ui/PreviewForm.cs b/NAPS2.Lib/EtoForms/Ui/PreviewForm.cs index 9572a7edbf..f6058478c5 100644 --- a/NAPS2.Lib/EtoForms/Ui/PreviewForm.cs +++ b/NAPS2.Lib/EtoForms/Ui/PreviewForm.cs @@ -214,6 +214,7 @@ protected virtual void CreateToolbar() { Commands.RotateLeft, Commands.RotateRight, + Commands.AltFlip, Commands.Flip, Commands.Deskew, Commands.CustomRotate @@ -370,6 +371,7 @@ private void AssignKeyboardShortcuts() _ksm.Assign(ks.RotateFlip, Commands.Flip); _ksm.Assign(ks.RotateLeft, Commands.RotateLeft); _ksm.Assign(ks.RotateRight, Commands.RotateRight); + _ksm.Assign(ks.AltFlip, Commands.AltFlip); _ksm.Assign(ks.SaveImages, Commands.SaveSelectedImages); _ksm.Assign(ks.SavePDF, Commands.SaveSelectedPdf); } diff --git a/NAPS2.Lib/Images/ImageListMutation.cs b/NAPS2.Lib/Images/ImageListMutation.cs index f03b408671..0d546f2cf8 100644 --- a/NAPS2.Lib/Images/ImageListMutation.cs +++ b/NAPS2.Lib/Images/ImageListMutation.cs @@ -16,6 +16,25 @@ public override void Apply(List list, ref ListSelection select } } + public class AltFlip() : ImageListMutation + { + public override void Apply(List list, ref ListSelection selection) + { + bool toggle = false; + foreach (UiImage img in selection) + { + if (toggle) + { + var transform = new RotationTransform(180); + var thumb = img.GetThumbnailClone(); + var updatedThumb = thumb?.PerformTransform(transform); + img.AddTransform(transform, updatedThumb); + } + toggle = !toggle; + } + } + } + public class AddTransforms(List transforms, Dictionary? updatedThumbnails = null) : ListMutation { diff --git a/NAPS2.Lib/Lang/Resources/UiStrings.Designer.cs b/NAPS2.Lib/Lang/Resources/UiStrings.Designer.cs index b538a6d0db..8706703184 100644 --- a/NAPS2.Lib/Lang/Resources/UiStrings.Designer.cs +++ b/NAPS2.Lib/Lang/Resources/UiStrings.Designer.cs @@ -1,6 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -18,7 +19,7 @@ namespace NAPS2.Lang.Resources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class UiStrings { @@ -176,6 +177,15 @@ internal static string AltDeinterleave { } } + /// + /// Looks up a localized string similar to Flip every 2nd image. + /// + internal static string AltFlip { + get { + return ResourceManager.GetString("AltFlip", resourceCulture); + } + } + /// /// Looks up a localized string similar to Alternate Interleave. /// diff --git a/NAPS2.Lib/Lang/Resources/UiStrings.resx b/NAPS2.Lib/Lang/Resources/UiStrings.resx index b6cc03583c..d3184da475 100644 --- a/NAPS2.Lib/Lang/Resources/UiStrings.resx +++ b/NAPS2.Lib/Lang/Resources/UiStrings.resx @@ -252,6 +252,9 @@ Flip + + Flip every 2nd image + Deskew diff --git a/NAPS2.Lib/NAPS2.Lib.csproj b/NAPS2.Lib/NAPS2.Lib.csproj index ba7f416e17..4e26896bfd 100644 --- a/NAPS2.Lib/NAPS2.Lib.csproj +++ b/NAPS2.Lib/NAPS2.Lib.csproj @@ -107,5 +107,17 @@ + + + True + True + UiStrings.resx + + + + + UiStrings.Designer.cs + + \ No newline at end of file diff --git a/NAPS2.Setup/appsettings.xml b/NAPS2.Setup/appsettings.xml index 35b58047fe..a2405ad1e8 100644 --- a/NAPS2.Setup/appsettings.xml +++ b/NAPS2.Setup/appsettings.xml @@ -125,6 +125,7 @@ + Ctrl+Up Ctrl+Down From 24ec5848a314209ac583b28889e0ae8e35ba0007 Mon Sep 17 00:00:00 2001 From: mibcoder <21145098+m1bcodes@users.noreply.github.com> Date: Sun, 31 Mar 2024 00:24:30 +0100 Subject: [PATCH 2/5] new command "Flip every 2nd image" --- NAPS2.Lib.Mac/EtoForms/Ui/MacDesktopForm.cs | 1 + NAPS2.Lib.Mac/EtoForms/Ui/MacPreviewForm.cs | 1 + NAPS2.Lib/Config/InternalDefaults.cs | 1 + NAPS2.Lib/Config/KeyboardShortcuts.cs | 1 + .../Desktop/DesktopKeyboardShortcuts.cs | 2 ++ .../EtoForms/Desktop/ImageListActions.cs | 3 +++ NAPS2.Lib/EtoForms/Ui/DesktopCommands.cs | 5 +++++ NAPS2.Lib/EtoForms/Ui/DesktopForm.cs | 1 + NAPS2.Lib/EtoForms/Ui/PreviewForm.cs | 2 ++ NAPS2.Lib/Images/ImageListMutation.cs | 19 +++++++++++++++++++ .../Lang/Resources/UiStrings.Designer.cs | 12 +++++++++++- NAPS2.Lib/Lang/Resources/UiStrings.resx | 3 +++ NAPS2.Lib/NAPS2.Lib.csproj | 12 ++++++++++++ NAPS2.Setup/appsettings.xml | 1 + 14 files changed, 63 insertions(+), 1 deletion(-) diff --git a/NAPS2.Lib.Mac/EtoForms/Ui/MacDesktopForm.cs b/NAPS2.Lib.Mac/EtoForms/Ui/MacDesktopForm.cs index 2a5df19318..575d7e0510 100644 --- a/NAPS2.Lib.Mac/EtoForms/Ui/MacDesktopForm.cs +++ b/NAPS2.Lib.Mac/EtoForms/Ui/MacDesktopForm.cs @@ -126,6 +126,7 @@ protected override void CreateToolbarsAndMenus() Commands.RotateLeft, Commands.RotateRight, Commands.Flip, + Commands.AltFlip, Commands.Deskew, Commands.CustomRotate, new SeparatorMenuItem(), diff --git a/NAPS2.Lib.Mac/EtoForms/Ui/MacPreviewForm.cs b/NAPS2.Lib.Mac/EtoForms/Ui/MacPreviewForm.cs index 78fb0a1d7a..245a4f2756 100644 --- a/NAPS2.Lib.Mac/EtoForms/Ui/MacPreviewForm.cs +++ b/NAPS2.Lib.Mac/EtoForms/Ui/MacPreviewForm.cs @@ -58,6 +58,7 @@ protected override void UpdatePage() .Append(Commands.RotateLeft) .Append(Commands.RotateRight) .Append(Commands.Flip) + .Append(Commands.AltFlip) .Append(Commands.Deskew) .Append(Commands.CustomRotate)), MacToolbarItems.Create("crop", Commands.Crop), diff --git a/NAPS2.Lib/Config/InternalDefaults.cs b/NAPS2.Lib/Config/InternalDefaults.cs index 0911470d33..7c3cda5c8c 100644 --- a/NAPS2.Lib/Config/InternalDefaults.cs +++ b/NAPS2.Lib/Config/InternalDefaults.cs @@ -168,6 +168,7 @@ public static CommonConfig GetCommonConfig() => ImageSharpen = "", RotateLeft = "", RotateRight = "", + AltFlip = "", RotateFlip = "", RotateCustom = "", MoveUp = "Ctrl+Up", diff --git a/NAPS2.Lib/Config/KeyboardShortcuts.cs b/NAPS2.Lib/Config/KeyboardShortcuts.cs index 21a306ba24..65cc4a9524 100644 --- a/NAPS2.Lib/Config/KeyboardShortcuts.cs +++ b/NAPS2.Lib/Config/KeyboardShortcuts.cs @@ -54,6 +54,7 @@ public class KeyboardShortcuts public string? RotateLeft { get; set; } public string? RotateRight { get; set; } public string? RotateFlip { get; set; } + public string? AltFlip { get; set; } public string? RotateCustom { get; set; } public string? MoveUp { get; set; } diff --git a/NAPS2.Lib/EtoForms/Desktop/DesktopKeyboardShortcuts.cs b/NAPS2.Lib/EtoForms/Desktop/DesktopKeyboardShortcuts.cs index 9753232db6..3a3f8ceb1d 100644 --- a/NAPS2.Lib/EtoForms/Desktop/DesktopKeyboardShortcuts.cs +++ b/NAPS2.Lib/EtoForms/Desktop/DesktopKeyboardShortcuts.cs @@ -1,5 +1,6 @@ using Eto.Forms; using NAPS2.EtoForms.Ui; +using System.Runtime.InteropServices; namespace NAPS2.EtoForms.Desktop; @@ -84,6 +85,7 @@ public void Assign(DesktopCommands commands) _ksm.Assign(ks.RotateFlip, commands.Flip); _ksm.Assign(ks.RotateLeft, commands.RotateLeft); _ksm.Assign(ks.RotateRight, commands.RotateRight); + _ksm.Assign(ks.AltFlip, commands.AltFlip); _ksm.Assign(ks.SaveImages, commands.SaveImages); _ksm.Assign(ks.SaveImagesAll, commands.SaveAllImages); _ksm.Assign(ks.SaveImagesSelected, commands.SaveSelectedImages); diff --git a/NAPS2.Lib/EtoForms/Desktop/ImageListActions.cs b/NAPS2.Lib/EtoForms/Desktop/ImageListActions.cs index 3390862d36..10781cead8 100644 --- a/NAPS2.Lib/EtoForms/Desktop/ImageListActions.cs +++ b/NAPS2.Lib/EtoForms/Desktop/ImageListActions.cs @@ -70,6 +70,9 @@ public async Task RotateRight() => public async Task Flip() => await _imageList.MutateAsync(new ImageListMutation.RotateFlip(180), Selection); + public async Task AltFlip() => + await _imageList.MutateAsync(new ImageListMutation.AltFlip(), Selection); + public void DocumentCorrection() => _imageList.Mutate(new ImageListMutation.AddTransforms([new CorrectionTransform(CorrectionMode.Document)]), Selection); diff --git a/NAPS2.Lib/EtoForms/Ui/DesktopCommands.cs b/NAPS2.Lib/EtoForms/Ui/DesktopCommands.cs index fba199c430..b3878fc59b 100644 --- a/NAPS2.Lib/EtoForms/Ui/DesktopCommands.cs +++ b/NAPS2.Lib/EtoForms/Ui/DesktopCommands.cs @@ -220,6 +220,10 @@ public DesktopCommands(DesktopController desktopController, DesktopScanControlle Text = UiStrings.Flip, Image = iconProvider.GetIcon("arrow_switch_small") }; + AltFlip = new ActionCommand(imageListActions.AltFlip) + { + Text = UiStrings.AltFlip + }; Deskew = new ActionCommand(imageListActions.Deskew) { Text = UiStrings.Deskew @@ -396,6 +400,7 @@ public DesktopCommands WithSelection(Func> selectionFunc) public ActionCommand RotateLeft { get; set; } public ActionCommand RotateRight { get; set; } public ActionCommand Flip { get; set; } + public ActionCommand AltFlip { get; set; } public ActionCommand Deskew { get; set; } public ActionCommand CustomRotate { get; set; } public ActionCommand MoveUp { get; set; } diff --git a/NAPS2.Lib/EtoForms/Ui/DesktopForm.cs b/NAPS2.Lib/EtoForms/Ui/DesktopForm.cs index fc30f09cd2..139eb9cd71 100644 --- a/NAPS2.Lib/EtoForms/Ui/DesktopForm.cs +++ b/NAPS2.Lib/EtoForms/Ui/DesktopForm.cs @@ -360,6 +360,7 @@ protected MenuProvider GetRotateMenuProvider() => .Append(Commands.RotateLeft) .Append(Commands.RotateRight) .Append(Commands.Flip) + .Append(Commands.AltFlip) .Append(Commands.Deskew) .Append(Commands.CustomRotate); diff --git a/NAPS2.Lib/EtoForms/Ui/PreviewForm.cs b/NAPS2.Lib/EtoForms/Ui/PreviewForm.cs index 9572a7edbf..f6058478c5 100644 --- a/NAPS2.Lib/EtoForms/Ui/PreviewForm.cs +++ b/NAPS2.Lib/EtoForms/Ui/PreviewForm.cs @@ -214,6 +214,7 @@ protected virtual void CreateToolbar() { Commands.RotateLeft, Commands.RotateRight, + Commands.AltFlip, Commands.Flip, Commands.Deskew, Commands.CustomRotate @@ -370,6 +371,7 @@ private void AssignKeyboardShortcuts() _ksm.Assign(ks.RotateFlip, Commands.Flip); _ksm.Assign(ks.RotateLeft, Commands.RotateLeft); _ksm.Assign(ks.RotateRight, Commands.RotateRight); + _ksm.Assign(ks.AltFlip, Commands.AltFlip); _ksm.Assign(ks.SaveImages, Commands.SaveSelectedImages); _ksm.Assign(ks.SavePDF, Commands.SaveSelectedPdf); } diff --git a/NAPS2.Lib/Images/ImageListMutation.cs b/NAPS2.Lib/Images/ImageListMutation.cs index f03b408671..0d546f2cf8 100644 --- a/NAPS2.Lib/Images/ImageListMutation.cs +++ b/NAPS2.Lib/Images/ImageListMutation.cs @@ -16,6 +16,25 @@ public override void Apply(List list, ref ListSelection select } } + public class AltFlip() : ImageListMutation + { + public override void Apply(List list, ref ListSelection selection) + { + bool toggle = false; + foreach (UiImage img in selection) + { + if (toggle) + { + var transform = new RotationTransform(180); + var thumb = img.GetThumbnailClone(); + var updatedThumb = thumb?.PerformTransform(transform); + img.AddTransform(transform, updatedThumb); + } + toggle = !toggle; + } + } + } + public class AddTransforms(List transforms, Dictionary? updatedThumbnails = null) : ListMutation { diff --git a/NAPS2.Lib/Lang/Resources/UiStrings.Designer.cs b/NAPS2.Lib/Lang/Resources/UiStrings.Designer.cs index b538a6d0db..8706703184 100644 --- a/NAPS2.Lib/Lang/Resources/UiStrings.Designer.cs +++ b/NAPS2.Lib/Lang/Resources/UiStrings.Designer.cs @@ -1,6 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -18,7 +19,7 @@ namespace NAPS2.Lang.Resources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class UiStrings { @@ -176,6 +177,15 @@ internal static string AltDeinterleave { } } + /// + /// Looks up a localized string similar to Flip every 2nd image. + /// + internal static string AltFlip { + get { + return ResourceManager.GetString("AltFlip", resourceCulture); + } + } + /// /// Looks up a localized string similar to Alternate Interleave. /// diff --git a/NAPS2.Lib/Lang/Resources/UiStrings.resx b/NAPS2.Lib/Lang/Resources/UiStrings.resx index b6cc03583c..d3184da475 100644 --- a/NAPS2.Lib/Lang/Resources/UiStrings.resx +++ b/NAPS2.Lib/Lang/Resources/UiStrings.resx @@ -252,6 +252,9 @@ Flip + + Flip every 2nd image + Deskew diff --git a/NAPS2.Lib/NAPS2.Lib.csproj b/NAPS2.Lib/NAPS2.Lib.csproj index ba7f416e17..4e26896bfd 100644 --- a/NAPS2.Lib/NAPS2.Lib.csproj +++ b/NAPS2.Lib/NAPS2.Lib.csproj @@ -107,5 +107,17 @@ + + + True + True + UiStrings.resx + + + + + UiStrings.Designer.cs + + \ No newline at end of file diff --git a/NAPS2.Setup/appsettings.xml b/NAPS2.Setup/appsettings.xml index 35b58047fe..a2405ad1e8 100644 --- a/NAPS2.Setup/appsettings.xml +++ b/NAPS2.Setup/appsettings.xml @@ -125,6 +125,7 @@ + Ctrl+Up Ctrl+Down From db56d914684e57863ba75f86ea3360fc7472c460 Mon Sep 17 00:00:00 2001 From: mibcoder <21145098+m1bcodes@users.noreply.github.com> Date: Sun, 31 Mar 2024 00:35:06 +0100 Subject: [PATCH 3/5] removed file launchSettings.json again --- NAPS2.App.WinForms/Properties/launchSettings.json | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 NAPS2.App.WinForms/Properties/launchSettings.json diff --git a/NAPS2.App.WinForms/Properties/launchSettings.json b/NAPS2.App.WinForms/Properties/launchSettings.json deleted file mode 100644 index f187b06ca6..0000000000 --- a/NAPS2.App.WinForms/Properties/launchSettings.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "profiles": { - "NAPS2.App.WinForms": { - "commandName": "Project" - } - } -} \ No newline at end of file From c8f6c4c340a4eebce749822692eb5ba9383c5069 Mon Sep 17 00:00:00 2001 From: mibcoder <21145098+m1bcodes@users.noreply.github.com> Date: Sun, 31 Mar 2024 00:42:48 +0100 Subject: [PATCH 4/5] reverted changes to project file --- NAPS2.Lib/NAPS2.Lib.csproj | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/NAPS2.Lib/NAPS2.Lib.csproj b/NAPS2.Lib/NAPS2.Lib.csproj index 4e26896bfd..ba7f416e17 100644 --- a/NAPS2.Lib/NAPS2.Lib.csproj +++ b/NAPS2.Lib/NAPS2.Lib.csproj @@ -107,17 +107,5 @@ - - - True - True - UiStrings.resx - - - - - UiStrings.Designer.cs - - \ No newline at end of file From 2684d94df5852f60f26af94e42c4d0ed0818ad37 Mon Sep 17 00:00:00 2001 From: mibcoder <21145098+m1bcodes@users.noreply.github.com> Date: Sun, 31 Mar 2024 00:45:35 +0100 Subject: [PATCH 5/5] reverted some unintended changes --- NAPS2.Lib/Lang/Resources/UiStrings.Designer.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/NAPS2.Lib/Lang/Resources/UiStrings.Designer.cs b/NAPS2.Lib/Lang/Resources/UiStrings.Designer.cs index 8706703184..5689a0f436 100644 --- a/NAPS2.Lib/Lang/Resources/UiStrings.Designer.cs +++ b/NAPS2.Lib/Lang/Resources/UiStrings.Designer.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -19,7 +18,7 @@ namespace NAPS2.Lang.Resources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class UiStrings {