mirror of
https://github.com/cyanfish/naps2.git
synced 2024-08-16 10:40:35 +03:00
Add placeholder forms for Split/Combine
This commit is contained in:
parent
34f6e5ff75
commit
963ccab93e
@ -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,
|
||||
|
@ -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
|
||||
|
@ -7,6 +7,8 @@ public interface IDesktopSubFormController
|
||||
void ShowHueSaturationForm();
|
||||
void ShowBlackWhiteForm();
|
||||
void ShowSharpenForm();
|
||||
void ShowSplitForm();
|
||||
void ShowCombineForm();
|
||||
void ShowRotateForm();
|
||||
void ShowProfilesForm();
|
||||
void ShowOcrForm();
|
||||
|
16
NAPS2.Lib/EtoForms/Ui/CombineForm.cs
Normal file
16
NAPS2.Lib/EtoForms/Ui/CombineForm.cs
Normal 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 => [];
|
||||
}
|
@ -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; }
|
||||
|
@ -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());
|
||||
|
15
NAPS2.Lib/EtoForms/Ui/SplitForm.cs
Normal file
15
NAPS2.Lib/EtoForms/Ui/SplitForm.cs
Normal 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 => [];
|
||||
}
|
20
NAPS2.Lib/Icons.Designer.cs
generated
20
NAPS2.Lib/Icons.Designer.cs
generated
@ -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>
|
||||
|
@ -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
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
BIN
NAPS2.Lib/Icons/split.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
3551
NAPS2.Lib/Lang/Resources/UiStrings.Designer.cs
generated
3551
NAPS2.Lib/Lang/Resources/UiStrings.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@ -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>
|
Loading…
Reference in New Issue
Block a user