mirror of
https://github.com/cyanfish/naps2.git
synced 2024-09-11 15:26:55 +03:00
Use file-scoped namespaces in forms
This commit is contained in:
parent
6731df4789
commit
d1e86b18e3
@ -1,11 +1,10 @@
|
||||
namespace NAPS2.WinForms
|
||||
namespace NAPS2.WinForms;
|
||||
|
||||
public abstract class DialogHelper
|
||||
{
|
||||
public abstract class DialogHelper
|
||||
{
|
||||
public abstract bool PromptToSavePdfOrImage(string defaultPath, out string savePath);
|
||||
|
||||
public abstract bool PromptToSavePdf(string defaultPath, out string savePath);
|
||||
|
||||
public abstract bool PromptToSaveImage(string defaultPath, out string savePath);
|
||||
}
|
||||
}
|
@ -2,10 +2,10 @@
|
||||
using System.Windows.Forms;
|
||||
using NAPS2.ImportExport.Email;
|
||||
|
||||
namespace NAPS2.WinForms
|
||||
namespace NAPS2.WinForms;
|
||||
|
||||
public partial class EmailProviderWidget : Button
|
||||
{
|
||||
public partial class EmailProviderWidget : Button
|
||||
{
|
||||
public EmailProviderWidget()
|
||||
{
|
||||
InitializeComponent();
|
||||
@ -41,5 +41,4 @@ namespace NAPS2.WinForms
|
||||
{
|
||||
ClickAction?.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
@ -3,10 +3,10 @@ using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using NAPS2.ImportExport.Email.Oauth;
|
||||
|
||||
namespace NAPS2.WinForms
|
||||
namespace NAPS2.WinForms;
|
||||
|
||||
public partial class FAuthorize : FormBase
|
||||
{
|
||||
public partial class FAuthorize : FormBase
|
||||
{
|
||||
private readonly ErrorOutput _errorOutput;
|
||||
private CancellationTokenSource? _cancelTokenSource;
|
||||
|
||||
@ -58,5 +58,4 @@ namespace NAPS2.WinForms
|
||||
{
|
||||
_cancelTokenSource?.Cancel();
|
||||
}
|
||||
}
|
||||
}
|
@ -7,10 +7,10 @@ using NAPS2.Scan;
|
||||
using NAPS2.Scan.Batch;
|
||||
using NAPS2.Scan.Exceptions;
|
||||
|
||||
namespace NAPS2.WinForms
|
||||
namespace NAPS2.WinForms;
|
||||
|
||||
public partial class FBatchScan : FormBase
|
||||
{
|
||||
public partial class FBatchScan : FormBase
|
||||
{
|
||||
public const string PATCH_CODE_INFO_URL = "http://www.naps2.com/doc-batch-scan.html#patch-t";
|
||||
|
||||
private readonly IBatchScanPerformer _batchScanPerformer;
|
||||
@ -369,5 +369,4 @@ namespace NAPS2.WinForms
|
||||
txtFilePath.Text = form.FileName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -2,10 +2,10 @@ using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace NAPS2.WinForms
|
||||
namespace NAPS2.WinForms;
|
||||
|
||||
partial class FCrop : ImageForm
|
||||
{
|
||||
partial class FCrop : ImageForm
|
||||
{
|
||||
private static CropTransform _lastTransform;
|
||||
private static Size _lastSize;
|
||||
|
||||
@ -227,5 +227,4 @@ namespace NAPS2.WinForms
|
||||
y = Math.Max(Math.Min(y, _originalHeight), 0);
|
||||
return new Point((int)Math.Round(x), (int)Math.Round(y));
|
||||
}
|
||||
}
|
||||
}
|
@ -12,10 +12,10 @@ using NAPS2.ImportExport.Images;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace NAPS2.WinForms
|
||||
namespace NAPS2.WinForms;
|
||||
|
||||
public partial class FDesktop : FormBase
|
||||
{
|
||||
public partial class FDesktop : FormBase
|
||||
{
|
||||
private readonly ToolbarFormatter _toolbarFormatter;
|
||||
private readonly TesseractLanguageManager _tesseractLanguageManager;
|
||||
private readonly IScannedImagePrinter _scannedImagePrinter;
|
||||
@ -789,5 +789,4 @@ namespace NAPS2.WinForms
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -5,10 +5,10 @@ using NAPS2.ImportExport.Email.Mapi;
|
||||
using NAPS2.ImportExport.Email.Oauth;
|
||||
using NAPS2.Scan;
|
||||
|
||||
namespace NAPS2.WinForms
|
||||
namespace NAPS2.WinForms;
|
||||
|
||||
public partial class FEmailProvider : FormBase
|
||||
{
|
||||
public partial class FEmailProvider : FormBase
|
||||
{
|
||||
private readonly GmailOauthProvider _gmailOauthProvider;
|
||||
private readonly OutlookWebOauthProvider _outlookWebOauthProvider;
|
||||
private readonly SystemEmailClients _systemEmailClients;
|
||||
@ -147,5 +147,4 @@ namespace NAPS2.WinForms
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace NAPS2.WinForms
|
||||
namespace NAPS2.WinForms;
|
||||
|
||||
partial class FHueSaturation : ImageForm
|
||||
{
|
||||
partial class FHueSaturation : ImageForm
|
||||
{
|
||||
public FHueSaturation(ImageContext imageContext)
|
||||
: base(imageContext)
|
||||
{
|
||||
@ -71,5 +71,4 @@ namespace NAPS2.WinForms
|
||||
txtSaturation.Text = tbSaturation.Value.ToString("G");
|
||||
UpdateTransform();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
using System.Windows.Forms;
|
||||
using NAPS2.Ocr;
|
||||
|
||||
namespace NAPS2.WinForms
|
||||
namespace NAPS2.WinForms;
|
||||
|
||||
public partial class FOcrLanguageDownload : FormBase
|
||||
{
|
||||
public partial class FOcrLanguageDownload : FormBase
|
||||
{
|
||||
private readonly TesseractLanguageManager _tesseractLanguageManager;
|
||||
|
||||
public FOcrLanguageDownload(TesseractLanguageManager tesseractLanguageManager)
|
||||
@ -88,5 +88,4 @@ namespace NAPS2.WinForms
|
||||
Close();
|
||||
progressForm.ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace NAPS2.WinForms
|
||||
namespace NAPS2.WinForms;
|
||||
|
||||
public partial class FPdfPassword : FormBase
|
||||
{
|
||||
public partial class FPdfPassword : FormBase
|
||||
{
|
||||
public FPdfPassword()
|
||||
{
|
||||
RestoreFormState = false;
|
||||
@ -33,5 +33,4 @@ namespace NAPS2.WinForms
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace NAPS2.WinForms
|
||||
namespace NAPS2.WinForms;
|
||||
|
||||
public partial class FProgress : FormBase
|
||||
{
|
||||
public partial class FProgress : FormBase
|
||||
{
|
||||
private readonly ErrorOutput _errorOutput;
|
||||
private readonly OperationProgress _operationProgress;
|
||||
|
||||
@ -94,5 +94,4 @@ namespace NAPS2.WinForms
|
||||
_background = true;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace NAPS2.WinForms
|
||||
namespace NAPS2.WinForms;
|
||||
|
||||
public partial class FRecover : FormBase
|
||||
{
|
||||
public partial class FRecover : FormBase
|
||||
{
|
||||
public FRecover()
|
||||
{
|
||||
RestoreFormState = false;
|
||||
@ -34,5 +34,4 @@ namespace NAPS2.WinForms
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
using System.Windows.Forms;
|
||||
using NAPS2.Scan;
|
||||
|
||||
namespace NAPS2.WinForms
|
||||
namespace NAPS2.WinForms;
|
||||
|
||||
public partial class FSelectDevice : FormBase
|
||||
{
|
||||
public partial class FSelectDevice : FormBase
|
||||
{
|
||||
public FSelectDevice()
|
||||
{
|
||||
SaveFormState = false;
|
||||
@ -60,5 +60,4 @@ namespace NAPS2.WinForms
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
@ -3,10 +3,10 @@ using System.Globalization;
|
||||
using System.Windows.Forms;
|
||||
using NAPS2.Images.Gdi;
|
||||
|
||||
namespace NAPS2.WinForms
|
||||
namespace NAPS2.WinForms;
|
||||
|
||||
public class FViewer : FormBase
|
||||
{
|
||||
public class FViewer : FormBase
|
||||
{
|
||||
private readonly Container _components = null;
|
||||
private ToolStripContainer _toolStripContainer1;
|
||||
private ToolStrip _toolStrip1;
|
||||
@ -638,5 +638,4 @@ namespace NAPS2.WinForms
|
||||
_ksm.Assign(ks.SaveImages, _tsSaveImage);
|
||||
_ksm.Assign(ks.SavePDF, _tsSavePdf);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace NAPS2.WinForms
|
||||
namespace NAPS2.WinForms;
|
||||
|
||||
public partial class ILProfileIcons : Component
|
||||
{
|
||||
public partial class ILProfileIcons : Component
|
||||
{
|
||||
public ILProfileIcons()
|
||||
{
|
||||
InitializeComponent();
|
||||
@ -15,5 +15,4 @@ namespace NAPS2.WinForms
|
||||
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
@ -3,10 +3,10 @@ using System.Windows.Forms;
|
||||
using NAPS2.Images.Gdi;
|
||||
using Timer = System.Threading.Timer;
|
||||
|
||||
namespace NAPS2.WinForms
|
||||
namespace NAPS2.WinForms;
|
||||
|
||||
public partial class ImageForm : FormBase
|
||||
{
|
||||
public partial class ImageForm : FormBase
|
||||
{
|
||||
private readonly ImageContext _imageContext;
|
||||
|
||||
protected Bitmap workingImage, workingImage2;
|
||||
@ -178,5 +178,4 @@ namespace NAPS2.WinForms
|
||||
_previewTimer?.Dispose();
|
||||
_closed = true;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace NAPS2.WinForms
|
||||
namespace NAPS2.WinForms;
|
||||
|
||||
public partial class OperationProgressNotifyWidget : NotifyWidgetBase
|
||||
{
|
||||
public partial class OperationProgressNotifyWidget : NotifyWidgetBase
|
||||
{
|
||||
private readonly OperationProgress _operationProgress;
|
||||
private readonly IOperation _op;
|
||||
|
||||
@ -70,5 +70,4 @@ namespace NAPS2.WinForms
|
||||
_operationProgress.ShowModalProgress(_op);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -2,10 +2,10 @@ using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace NAPS2.WinForms
|
||||
namespace NAPS2.WinForms;
|
||||
|
||||
public class TiffViewer : UserControl
|
||||
{
|
||||
public class TiffViewer : UserControl
|
||||
{
|
||||
private readonly Container _components = null;
|
||||
|
||||
private Image _image;
|
||||
@ -170,5 +170,4 @@ namespace NAPS2.WinForms
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user