Remove TWAIN-only condition for Patch-T use

This commit is contained in:
Ben Olden-Cooligan 2016-05-28 17:25:53 -04:00
parent bbb63623e5
commit 33d85a8944
5 changed files with 9 additions and 43 deletions

View File

@ -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()

View File

@ -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="&gt;&gt;rdSeparateByPatchT.Name" xml:space="preserve">
<value>rdSeparateByPatchT</value>
@ -481,12 +481,12 @@
<value>ilProfileIcons</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;$this.Name" xml:space="preserve">
<value>FAutoSaveSettings</value>
</data>
<data name="&gt;&gt;$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>

View File

@ -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

View File

@ -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();
}
}
}

View File

@ -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="&gt;&gt;rdSeparateByPatchT.Name" xml:space="preserve">
<value>rdSeparateByPatchT</value>
@ -997,7 +997,7 @@
<value>ilProfileIcons</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;folderBrowserDialog1.Name" xml:space="preserve">
<value>folderBrowserDialog1</value>
@ -1009,6 +1009,6 @@
<value>FBatchScan</value>
</data>
<data name="&gt;&gt;$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>