mirror of
https://github.com/cyanfish/naps2.git
synced 2024-10-04 19:37:15 +03:00
Remove TWAIN-only condition for Patch-T use
This commit is contained in:
parent
bbb63623e5
commit
33d85a8944
@ -24,12 +24,7 @@ using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using NAPS2.ImportExport;
|
||||
using NAPS2.Lang.Resources;
|
||||
using NAPS2.Scan;
|
||||
using NAPS2.Scan.Exceptions;
|
||||
using NAPS2.Scan.Twain;
|
||||
using NAPS2.Scan.Wia;
|
||||
using NAPS2.Util;
|
||||
|
||||
namespace NAPS2.WinForms
|
||||
{
|
||||
@ -55,8 +50,7 @@ namespace NAPS2.WinForms
|
||||
{
|
||||
rdFilePerScan.Checked = true;
|
||||
}
|
||||
else if (ScanProfile.AutoSaveSettings.Separator == SaveSeparator.PatchT &&
|
||||
ScanProfile.DriverName == TwainScanDriver.DRIVER_NAME)
|
||||
else if (ScanProfile.AutoSaveSettings.Separator == SaveSeparator.PatchT)
|
||||
{
|
||||
rdSeparateByPatchT.Checked = true;
|
||||
}
|
||||
@ -66,11 +60,6 @@ namespace NAPS2.WinForms
|
||||
}
|
||||
}
|
||||
|
||||
if (ScanProfile.DriverName != TwainScanDriver.DRIVER_NAME)
|
||||
{
|
||||
rdSeparateByPatchT.Enabled = false;
|
||||
}
|
||||
|
||||
new LayoutManager(this)
|
||||
.Bind(txtFilePath)
|
||||
.WidthToForm()
|
||||
|
@ -217,13 +217,13 @@
|
||||
<value>11, 116</value>
|
||||
</data>
|
||||
<data name="rdSeparateByPatchT.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>211, 17</value>
|
||||
<value>144, 17</value>
|
||||
</data>
|
||||
<data name="rdSeparateByPatchT.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>22</value>
|
||||
</data>
|
||||
<data name="rdSeparateByPatchT.Text" xml:space="preserve">
|
||||
<value>Separate files by Patch-T (TWAIN only)</value>
|
||||
<value>Separate files by Patch-T</value>
|
||||
</data>
|
||||
<data name=">>rdSeparateByPatchT.Name" xml:space="preserve">
|
||||
<value>rdSeparateByPatchT</value>
|
||||
@ -481,12 +481,12 @@
|
||||
<value>ilProfileIcons</value>
|
||||
</data>
|
||||
<data name=">>ilProfileIcons.Type" xml:space="preserve">
|
||||
<value>NAPS2.WinForms.ILProfileIcons, NAPS2.Core, Version=4.6.1.31733, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>NAPS2.WinForms.ILProfileIcons, NAPS2.Core, Version=5.2.1.29171, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>FAutoSaveSettings</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>NAPS2.WinForms.FormBase, NAPS2.Core, Version=4.6.1.31733, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>NAPS2.WinForms.FormBase, NAPS2.Core, Version=5.2.1.29171, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
</root>
|
1
NAPS2.Core/WinForms/FBatchScan.Designer.cs
generated
1
NAPS2.Core/WinForms/FBatchScan.Designer.cs
generated
@ -196,7 +196,6 @@ namespace NAPS2.WinForms
|
||||
this.comboProfile.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.comboProfile, "comboProfile");
|
||||
this.comboProfile.Name = "comboProfile";
|
||||
this.comboProfile.SelectedIndexChanged += new System.EventHandler(this.comboProfile_SelectedIndexChanged);
|
||||
this.comboProfile.Format += new System.Windows.Forms.ListControlConvertEventHandler(this.comboProfile_Format);
|
||||
//
|
||||
// lblProfile
|
||||
|
@ -189,22 +189,6 @@ namespace NAPS2.WinForms
|
||||
{
|
||||
comboProfile.Text = "";
|
||||
}
|
||||
ProfileChanged();
|
||||
}
|
||||
|
||||
private bool ProfileIsTwain()
|
||||
{
|
||||
var profile = (ScanProfile)comboProfile.SelectedItem;
|
||||
if (profile != null)
|
||||
{
|
||||
return profile.DriverName == TwainScanDriver.DRIVER_NAME;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void ProfileChanged()
|
||||
{
|
||||
rdSeparateByPatchT.Enabled = ProfileIsTwain();
|
||||
}
|
||||
|
||||
private void rdSingleScan_CheckedChanged(object sender, EventArgs e)
|
||||
@ -323,7 +307,6 @@ namespace NAPS2.WinForms
|
||||
{
|
||||
EnableDisable(groupboxScanConfig, enabled);
|
||||
EnableDisable(groupboxOutput, enabled);
|
||||
rdSeparateByPatchT.Enabled = enabled && ProfileIsTwain();
|
||||
}
|
||||
|
||||
private void EnableDisable(Control root, bool enabled)
|
||||
@ -430,10 +413,5 @@ namespace NAPS2.WinForms
|
||||
txtFilePath.Text = form.FileName;
|
||||
}
|
||||
}
|
||||
|
||||
private void comboProfile_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
ProfileChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -580,13 +580,13 @@
|
||||
<value>39, 46</value>
|
||||
</data>
|
||||
<data name="rdSeparateByPatchT.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>211, 17</value>
|
||||
<value>144, 17</value>
|
||||
</data>
|
||||
<data name="rdSeparateByPatchT.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="rdSeparateByPatchT.Text" xml:space="preserve">
|
||||
<value>Separate files by Patch-T (TWAIN only)</value>
|
||||
<value>Separate files by Patch-T</value>
|
||||
</data>
|
||||
<data name=">>rdSeparateByPatchT.Name" xml:space="preserve">
|
||||
<value>rdSeparateByPatchT</value>
|
||||
@ -997,7 +997,7 @@
|
||||
<value>ilProfileIcons</value>
|
||||
</data>
|
||||
<data name=">>ilProfileIcons.Type" xml:space="preserve">
|
||||
<value>NAPS2.WinForms.ILProfileIcons, NAPS2.Core, Version=4.6.1.31733, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>NAPS2.WinForms.ILProfileIcons, NAPS2.Core, Version=5.2.1.29171, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>folderBrowserDialog1.Name" xml:space="preserve">
|
||||
<value>folderBrowserDialog1</value>
|
||||
@ -1009,6 +1009,6 @@
|
||||
<value>FBatchScan</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>NAPS2.WinForms.FormBase, NAPS2.Core, Version=4.6.1.31733, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>NAPS2.WinForms.FormBase, NAPS2.Core, Version=5.2.1.29171, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
</root>
|
Loading…
Reference in New Issue
Block a user