diff --git a/OTP/Form1.Designer.cs b/OTP/Form1.Designer.cs
index 6c660fb..663eb90 100644
--- a/OTP/Form1.Designer.cs
+++ b/OTP/Form1.Designer.cs
@@ -55,11 +55,9 @@
//
// label1
//
- label1.AutoSize = true;
label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
label1.Location = new System.Drawing.Point(640, 68);
label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
- label1.MinimumSize = new System.Drawing.Size(230, 43);
label1.Name = "label1";
label1.Size = new System.Drawing.Size(230, 43);
label1.TabIndex = 1;
@@ -92,14 +90,12 @@
//
// label2
//
- label2.AutoSize = true;
label2.BackColor = System.Drawing.Color.Transparent;
label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
- label2.Location = new System.Drawing.Point(681, 285);
+ label2.Location = new System.Drawing.Point(640, 285);
label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
- label2.MinimumSize = new System.Drawing.Size(144, 23);
label2.Name = "label2";
- label2.Size = new System.Drawing.Size(144, 23);
+ label2.Size = new System.Drawing.Size(230, 23);
label2.TabIndex = 5;
label2.Text = "Remaining Time";
label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@@ -147,12 +143,13 @@
//
// label3
//
- label3.AutoSize = true;
label3.Font = new System.Drawing.Font("Segoe UI", 24F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
- label3.Location = new System.Drawing.Point(702, 219);
+ label3.Location = new System.Drawing.Point(640, 219);
label3.Name = "label3";
- label3.Size = new System.Drawing.Size(0, 45);
+ label3.Size = new System.Drawing.Size(230, 45);
label3.TabIndex = 11;
+ label3.Text = "1";
+ label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// Form1
//
@@ -178,7 +175,6 @@
Load += Form1_Load;
VisibleChanged += Form1_VisibleChanged;
ResumeLayout(false);
- PerformLayout();
}
#endregion
diff --git a/OTP/Form1.cs b/OTP/Form1.cs
index a02297a..b20b1ce 100644
--- a/OTP/Form1.cs
+++ b/OTP/Form1.cs
@@ -1,9 +1,9 @@
-using System;
-using System.Windows.Forms;
-using OtpNet;
-using System.IO;
+using OtpNet;
+using System;
using System.Data.SQLite;
+using System.IO;
using System.Reflection;
+using System.Windows.Forms;
namespace OTP
{
diff --git a/OTP/Form2.cs b/OTP/Form2.cs
index ae275fb..f5e2b92 100644
--- a/OTP/Form2.cs
+++ b/OTP/Form2.cs
@@ -1,15 +1,8 @@
using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
using System.Data.SQLite;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
using System.IO;
using System.Security.Cryptography;
+using System.Windows.Forms;
namespace OTP
{
diff --git a/OTP/Form3.cs b/OTP/Form3.cs
index 2f7154d..c039310 100644
--- a/OTP/Form3.cs
+++ b/OTP/Form3.cs
@@ -7,7 +7,6 @@ using System.Drawing;
using System.IO;
using System.Linq;
using System.Threading;
-using System.Timers;
using System.Windows.Forms;
using ZXing;
@@ -20,11 +19,9 @@ namespace OTP
private bool isLocalfile = false;
private bool isScanningPaused = false;
private bool isRecording = false;
- //private Bitmap previousBitmap = null;
private SynchronizationContext synchContext;
private System.Windows.Forms.Timer timer;
- // Constructed capture device.
private CaptureDevice captureDevice;
public Form3()
@@ -38,10 +35,8 @@ namespace OTP
}
private void Timer_Tick(object sender, EventArgs e)
{
- // 检查是否有图像可用
if (pictureBox1.Image != null && isRecording)
{
- // 调用 ScanQRCode 方法,将当前图像传递给它
ScanQRCode((Bitmap)pictureBox1.Image);
}
}
@@ -49,7 +44,7 @@ namespace OTP
private async void Form3_FormClosing(object sender, FormClosingEventArgs e)
{
- StopCapturing(); // 关闭窗口时停止截图
+ StopCapturing();
if (isRecording)
{
await this.captureDevice.StopAsync();
@@ -119,7 +114,6 @@ namespace OTP
isCapturing = true; // 设置截图状态为正在截图
ScreenCapturer.StartCapture((Bitmap bitmap) =>
{
- // 进行二维码扫描
ScanQRCode(bitmap);
});
}
@@ -235,7 +229,7 @@ namespace OTP
var descriptor0 = descriptors.ElementAtOrDefault(0);
if (descriptor0 != null)
- {
+ {
var characteristics = descriptor0.Characteristics.
FirstOrDefault(c => c.PixelFormat != PixelFormats.Unknown);
if (characteristics != null)
diff --git a/OTP/Form4.cs b/OTP/Form4.cs
index 308d0cf..7b04420 100644
--- a/OTP/Form4.cs
+++ b/OTP/Form4.cs
@@ -1,14 +1,6 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using GuerrillaNtp;
+using System;
using System.Windows.Forms;
-using GuerrillaNtp;
-using static System.Windows.Forms.VisualStyles.VisualStyleElement.TaskbarClock;
namespace OTP
{
diff --git a/OTP/OTP.csproj b/OTP/OTP.csproj
index 2cf6947..dcb2bbc 100644
--- a/OTP/OTP.csproj
+++ b/OTP/OTP.csproj
@@ -23,6 +23,7 @@
true
+ none
OTP.Program
@@ -30,6 +31,14 @@
icon.ico
7.0
+ 1.0.0.1
+ 1.0.0.1
+ Chenx221
+ 1.0.0.1
+ False
+
+
+ none
@@ -69,4 +78,17 @@
+
+
+ True
+ True
+ Settings.settings
+
+
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
\ No newline at end of file
diff --git a/OTP/Program.cs b/OTP/Program.cs
index 5464fb9..cd3ee83 100644
--- a/OTP/Program.cs
+++ b/OTP/Program.cs
@@ -1,7 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
using System.Windows.Forms;
namespace OTP
diff --git a/OTP/Properties/Settings.Designer.cs b/OTP/Properties/Settings.Designer.cs
index 53b4fe2..3369b8b 100644
--- a/OTP/Properties/Settings.Designer.cs
+++ b/OTP/Properties/Settings.Designer.cs
@@ -1,28 +1,24 @@
//------------------------------------------------------------------------------
//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
+// 此代码由工具生成。
+// 运行时版本:4.0.30319.42000
//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
+// 对此文件的更改可能会导致不正确的行为,并且如果
+// 重新生成代码,这些更改将会丢失。
//
//------------------------------------------------------------------------------
-namespace OTP.Properties
-{
-
-
+namespace OTP.Properties {
+
+
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
- {
-
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.7.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default
- {
- get
- {
+
+ public static Settings Default {
+ get {
return defaultInstance;
}
}