Add placeholder forms for Split/Combine

This commit is contained in:
Ben Olden-Cooligan 2024-03-04 21:40:16 -08:00
parent 34f6e5ff75
commit 963ccab93e
13 changed files with 2263 additions and 1374 deletions

View File

@ -120,6 +120,9 @@ public class MacDesktopForm : DesktopForm
Commands.Sharpen,
Commands.DocumentCorrection,
new SeparatorMenuItem(),
Commands.Split,
Commands.Combine,
new SeparatorMenuItem(),
Commands.RotateLeft,
Commands.RotateRight,
Commands.Flip,

View File

@ -25,6 +25,9 @@ public class DesktopSubFormController : IDesktopSubFormController
public void ShowHueSaturationForm() => ShowImageForm<HueSatForm>();
public void ShowBlackWhiteForm() => ShowImageForm<BlackWhiteForm>();
public void ShowSharpenForm() => ShowImageForm<SharpenForm>();
public void ShowSplitForm() => ShowImageForm<SplitForm>();
public void ShowCombineForm() => ShowImageForm<CombineForm>();
public void ShowRotateForm() => ShowImageForm<RotateForm>();
private void ShowImageForm<T>() where T : ImageFormBase

View File

@ -7,6 +7,8 @@ public interface IDesktopSubFormController
void ShowHueSaturationForm();
void ShowBlackWhiteForm();
void ShowSharpenForm();
void ShowSplitForm();
void ShowCombineForm();
void ShowRotateForm();
void ShowProfilesForm();
void ShowOcrForm();

View File

@ -0,0 +1,16 @@
using Eto.Drawing;
using NAPS2.EtoForms.Widgets;
namespace NAPS2.EtoForms.Ui;
public class CombineForm : ImageFormBase
{
public CombineForm(Naps2Config config, UiImageList imageList, ThumbnailController thumbnailController) :
base(config, imageList, thumbnailController)
{
Icon = new Icon(1f, Icons.combine.ToEtoImage());
Title = UiStrings.Combine;
}
protected override List<Transform> Transforms => [];
}

View File

@ -186,6 +186,16 @@ public class DesktopCommands
Text = UiStrings.DocumentCorrection,
Image = iconProvider.GetIcon("document")
};
Split = new ActionCommand(desktopSubFormController.ShowSplitForm)
{
Text = UiStrings.Split,
Image = iconProvider.GetIcon("split")
};
Combine = new ActionCommand(desktopSubFormController.ShowCombineForm)
{
Text = UiStrings.Combine,
Image = iconProvider.GetIcon("combine")
};
ResetImage = new ActionCommand(desktopController.ResetImage)
{
Text = UiStrings.Reset
@ -379,6 +389,8 @@ public class DesktopCommands
public ActionCommand BlackWhite { get; set; }
public ActionCommand Sharpen { get; set; }
public ActionCommand DocumentCorrection { get; set; }
public ActionCommand Split { get; set; }
public ActionCommand Combine { get; set; }
public ActionCommand ResetImage { get; set; }
public ActionCommand RotateMenu { get; set; }
public ActionCommand RotateLeft { get; set; }

View File

@ -303,6 +303,9 @@ public abstract class DesktopForm : EtoFormBase
.Append(Commands.Sharpen)
.Append(Commands.DocumentCorrection)
.Separator()
.Append(Commands.Split)
.Append(Commands.Combine)
.Separator()
.Append(Commands.ResetImage));
if (!hiddenButtons.HasFlag(ToolbarButtons.Rotate))
CreateToolbarMenu(Commands.RotateMenu, GetRotateMenuProvider());

View File

@ -0,0 +1,15 @@
using Eto.Drawing;
namespace NAPS2.EtoForms.Ui;
public class SplitForm : ImageFormBase
{
public SplitForm(Naps2Config config, UiImageList imageList, ThumbnailController thumbnailController) :
base(config, imageList, thumbnailController)
{
Icon = new Icon(1f, Icons.split.ToEtoImage());
Title = UiStrings.Split;
}
protected override List<Transform> Transforms => [];
}

View File

@ -369,6 +369,16 @@ namespace NAPS2 {
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
internal static byte[] combine {
get {
object obj = ResourceManager.GetObject("combine", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
@ -849,6 +859,16 @@ namespace NAPS2 {
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
internal static byte[] split {
get {
object obj = ResourceManager.GetObject("split", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>

View File

@ -403,4 +403,10 @@
<data name="document" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Icons\document.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="split" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Icons\split.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="combine" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Icons\combine.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

BIN
NAPS2.Lib/Icons/combine.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
NAPS2.Lib/Icons/split.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

File diff suppressed because it is too large Load Diff

View File

@ -888,4 +888,10 @@
<data name="ShowNativeTwainProgress" xml:space="preserve">
<value>Show native TWAIN progress</value>
</data>
<data name="Split" xml:space="preserve">
<value>Split</value>
</data>
<data name="Combine" xml:space="preserve">
<value>Combine</value>
</data>
</root>