diff --git a/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/.vs/ZTTMS_Manage_yibayiyi_20230320/FileContentIndex/19e72c6c-d0df-4fe0-94e0-ad7f768fd465.vsidx b/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/.vs/ZTTMS_Manage_yibayiyi_20230320/FileContentIndex/19e72c6c-d0df-4fe0-94e0-ad7f768fd465.vsidx
new file mode 100644
index 0000000..bc19461
Binary files /dev/null and b/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/.vs/ZTTMS_Manage_yibayiyi_20230320/FileContentIndex/19e72c6c-d0df-4fe0-94e0-ad7f768fd465.vsidx differ
diff --git a/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/.vs/ZTTMS_Manage_yibayiyi_20230320/FileContentIndex/16d431de-4375-4641-9d98-e2d8060dfa0d.vsidx b/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/.vs/ZTTMS_Manage_yibayiyi_20230320/FileContentIndex/a9117b2d-ffed-4549-9226-5e4a298d8264.vsidx
similarity index 70%
rename from ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/.vs/ZTTMS_Manage_yibayiyi_20230320/FileContentIndex/16d431de-4375-4641-9d98-e2d8060dfa0d.vsidx
rename to ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/.vs/ZTTMS_Manage_yibayiyi_20230320/FileContentIndex/a9117b2d-ffed-4549-9226-5e4a298d8264.vsidx
index e891dbe..b7e883a 100644
Binary files a/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/.vs/ZTTMS_Manage_yibayiyi_20230320/FileContentIndex/16d431de-4375-4641-9d98-e2d8060dfa0d.vsidx and b/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/.vs/ZTTMS_Manage_yibayiyi_20230320/FileContentIndex/a9117b2d-ffed-4549-9226-5e4a298d8264.vsidx differ
diff --git a/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/.vs/ZTTMS_Manage_yibayiyi_20230320/FileContentIndex/fe97b5a4-643f-490f-b9bf-5b4feab44db8.vsidx b/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/.vs/ZTTMS_Manage_yibayiyi_20230320/FileContentIndex/fe97b5a4-643f-490f-b9bf-5b4feab44db8.vsidx
deleted file mode 100644
index c286a6e..0000000
Binary files a/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/.vs/ZTTMS_Manage_yibayiyi_20230320/FileContentIndex/fe97b5a4-643f-490f-b9bf-5b4feab44db8.vsidx and /dev/null differ
diff --git a/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/.vs/ZTTMS_Manage_yibayiyi_20230320/v17/.suo b/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/.vs/ZTTMS_Manage_yibayiyi_20230320/v17/.suo
index 36c111d..edb8e1b 100644
Binary files a/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/.vs/ZTTMS_Manage_yibayiyi_20230320/v17/.suo and b/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/.vs/ZTTMS_Manage_yibayiyi_20230320/v17/.suo differ
diff --git a/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/MySQL.cs b/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/MySQL.cs
index f0a1a68..fca973e 100644
--- a/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/MySQL.cs
+++ b/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/MySQL.cs
@@ -13,8 +13,8 @@ namespace ZTTMS_Manage_yibayiyi_20230320
{
class MySQL
{
- //public static string connectionString = @"server=41.244.68.54;port=3306;user=root;password=zttZTT123!;database=daojiao;sslMode=none;charset=utf8;pooling=true;max pool size=1024;connect timeout = 20;AllowPublicKeyRetrieval=true;";
- public static string connectionString = @"server=127.0.0.1;port=3306;user=root;password=ztt12345;database=daojiao;sslMode=none;charset=utf8;pooling=true;max pool size=1024;connect timeout = 20;";
+ public static string connectionString = @"server=41.244.68.54;port=3306;user=root;password=zttZTT123!;database=daojiao;sslMode=none;charset=utf8;pooling=true;max pool size=1024;connect timeout = 20;AllowPublicKeyRetrieval=true;";
+ //public static string connectionString = @"server=127.0.0.1;port=3306;user=root;password=ztt12345;database=daojiao;sslMode=none;charset=utf8;pooling=true;max pool size=1024;connect timeout = 20;";
#region 公用方法
diff --git a/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/Others.cs b/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/Others.cs
index b5615cc..333fdbd 100644
--- a/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/Others.cs
+++ b/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/Others.cs
@@ -108,17 +108,17 @@ namespace ZTTMS_Manage_yibayiyi_20230320
public static string ftpCTDDataPath = @"/File/SensorData/CTDData";
public static string ftpRecordData = @"/File/RecordData";
- //public static string totalPath = @"E:\Output\";
- //public static string FFmpegPath = Environment.CurrentDirectory + @"\FFmpeg\bin\x86\ffmpeg.exe";
- //public static string picPath = @"E:\Output\Image\Image_01\";
- //public static string picPathShow = @"E:\Output\Image\Image_01";
- //public static string vidPathShow = @"E:\Output\Video\Video_01";
-
- public static string picPathShow = @"F:\Code\text\daojiao\Image\Image_01";
- public static string vidPathShow = @"F:\Code\text\daojiao\Video\Video_01";
- public static string picPath = @"F:\Code\text\daojiao\Image\Image_01\";
- public static string totalPath = @"F:\Code\text\daojiao\";
+ public static string totalPath = @"E:\Output\";
public static string FFmpegPath = Environment.CurrentDirectory + @"\FFmpeg\bin\x86\ffmpeg.exe";
+ public static string picPath = @"E:\Output\Image\Image_01\";
+ public static string picPathShow = @"E:\Output\Image\Image_01";
+ public static string vidPathShow = @"E:\Output\Video\Video_01";
+
+ //public static string picPathShow = @"F:\Code\text\daojiao\Image\Image_01";
+ //public static string vidPathShow = @"F:\Code\text\daojiao\Video\Video_01";
+ //public static string picPath = @"F:\Code\text\daojiao\Image\Image_01\";
+ //public static string totalPath = @"F:\Code\text\daojiao\";
+ //public static string FFmpegPath = Environment.CurrentDirectory + @"\FFmpeg\bin\x86\ffmpeg.exe";
//标记设备是否使能
diff --git a/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/PictureTakeForm.Designer.cs b/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/PictureTakeForm.Designer.cs
index 444fa2c..3b01d40 100644
--- a/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/PictureTakeForm.Designer.cs
+++ b/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/PictureTakeForm.Designer.cs
@@ -66,6 +66,8 @@
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.timerSendHeart = new System.Windows.Forms.Timer(this.components);
this.timerChangeConnectState = new System.Windows.Forms.Timer(this.components);
+ this.timerLight = new System.Windows.Forms.Timer(this.components);
+ this.timerNight = new System.Windows.Forms.Timer(this.components);
this.pnlPicture.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picOpenCamera)).BeginInit();
this.panel1.SuspendLayout();
@@ -478,6 +480,14 @@
//
this.timerChangeConnectState.Tick += new System.EventHandler(this.timerChangeConnectState_Tick);
//
+ // timerLight
+ //
+ this.timerLight.Tick += new System.EventHandler(this.timerLight_Tick);
+ //
+ // timerNight
+ //
+ this.timerNight.Tick += new System.EventHandler(this.timerNight_Tick);
+ //
// PictureTakeForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(16F, 31F);
@@ -559,5 +569,7 @@
public System.Windows.Forms.TextBox txtLight;
public System.Windows.Forms.Label label5;
private System.Windows.Forms.Timer timerChangeConnectState;
+ private System.Windows.Forms.Timer timerLight;
+ private System.Windows.Forms.Timer timerNight;
}
}
\ No newline at end of file
diff --git a/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/PictureTakeForm.cs b/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/PictureTakeForm.cs
index 4b51bbb..963d43d 100644
--- a/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/PictureTakeForm.cs
+++ b/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/PictureTakeForm.cs
@@ -192,6 +192,14 @@ namespace ZTTMS_Manage_yibayiyi_20230320
g_timerSetLight.Interval = 20000;
g_timerSetLight.AutoReset = false;
g_timerSetLight.Elapsed += new System.Timers.ElapsedEventHandler(methodSetLight);
+
+ timerLight.Enabled = true;
+ timerLight.Interval = 50000;
+ timerLight.Start();
+
+ timerNight.Enabled = true;
+ timerNight.Interval = 50000;
+ timerNight.Start();
}
@@ -2767,6 +2775,84 @@ namespace ZTTMS_Manage_yibayiyi_20230320
timerChangeConnectState.Stop();
}
}
+
+ private void timerLight_Tick(object sender, EventArgs e)
+ {
+ Thread thSetParamLight = new Thread(SetParamLight);
+ thSetParamLight.IsBackground = true;
+ thSetParamLight.Start();
+ }
+
+ private void SetParamLight()
+ {
+ try
+ {
+ DateTime NowDate = DateTime.Now;
+ if (NowDate.Hour == 6 && NowDate.Minute == 0)
+ {
+ EveryDayLog.WriteADCP("照相机将在2min后设置白天参数!");
+ Console.WriteLine("照相机将在2min后设置白天参数!");
+
+ timerLight.Enabled = false;
+ timerLight.Stop();
+ Thread.Sleep(2 * 1000);
+ timerLight.Enabled = true;
+ timerLight.Start();
+ }
+ else
+ return;
+
+ txtExposure.Text = "";
+ txtFrameRate.Text = "";
+ txtGain.Text = "";
+
+ SetParam();
+ }
+ catch(Exception ex)
+ {
+ EveryDayLog.WriteErrorCamAndVid("SetParamLightError:" + ex.Message);
+ Console.WriteLine("SetParamLightError:" + ex.Message);
+ }
+ }
+
+ private void timerNight_Tick(object sender, EventArgs e)
+ {
+ Thread thSetParamNight = new Thread(SetParamNight);
+ thSetParamNight.IsBackground = true;
+ thSetParamNight.Start();
+ }
+
+ private void SetParamNight()
+ {
+ try
+ {
+ DateTime NowDate = DateTime.Now;
+ if (NowDate.Hour == 19 && NowDate.Minute == 0)
+ {
+ EveryDayLog.WriteADCP("照相机将在2min后设置晚上参数!");
+ Console.WriteLine("照相机将在2min后设置晚上参数!");
+
+ timerNight.Enabled = false;
+ timerNight.Stop();
+ Thread.Sleep(2 * 1000);
+ timerNight.Enabled = true;
+ timerNight.Start();
+ }
+ else
+ return;
+
+ txtExposure.Text = "";
+ txtFrameRate.Text = "";
+ txtGain.Text = "";
+
+ SetParam();
+ }
+ catch (Exception ex)
+ {
+ EveryDayLog.WriteErrorCamAndVid("SetParamNightError:" + ex.Message);
+ Console.WriteLine("SetParamNightError:" + ex.Message);
+ }
+ }
}
}
diff --git a/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/PictureTakeForm.resx b/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/PictureTakeForm.resx
index 42087e9..cac5f82 100644
--- a/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/PictureTakeForm.resx
+++ b/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/PictureTakeForm.resx
@@ -123,10 +123,19 @@
17, 17
+
+ 152, 17
+
253, 17
398, 17
+
+ 605, 17
+
+
+ 717, 17
+
\ No newline at end of file
diff --git a/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/bin/Debug/ZTTMS_Manage_yibayiyi_20230320.exe b/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/bin/Debug/ZTTMS_Manage_yibayiyi_20230320.exe
index 94ea381..d4254ae 100644
Binary files a/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/bin/Debug/ZTTMS_Manage_yibayiyi_20230320.exe and b/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/bin/Debug/ZTTMS_Manage_yibayiyi_20230320.exe differ
diff --git a/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/bin/Debug/ZTTMS_Manage_yibayiyi_20230320.pdb b/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/bin/Debug/ZTTMS_Manage_yibayiyi_20230320.pdb
index 1003112..c6991df 100644
Binary files a/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/bin/Debug/ZTTMS_Manage_yibayiyi_20230320.pdb and b/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/bin/Debug/ZTTMS_Manage_yibayiyi_20230320.pdb differ
diff --git a/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/obj/Debug/ZTTMS_Manage_yibayiyi_20230320.csproj.GenerateResource.cache b/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/obj/Debug/ZTTMS_Manage_yibayiyi_20230320.csproj.GenerateResource.cache
index baf2734..6e56b1b 100644
Binary files a/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/obj/Debug/ZTTMS_Manage_yibayiyi_20230320.csproj.GenerateResource.cache and b/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/obj/Debug/ZTTMS_Manage_yibayiyi_20230320.csproj.GenerateResource.cache differ
diff --git a/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/obj/Debug/ZTTMS_Manage_yibayiyi_20230320.exe b/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/obj/Debug/ZTTMS_Manage_yibayiyi_20230320.exe
index 94ea381..d4254ae 100644
Binary files a/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/obj/Debug/ZTTMS_Manage_yibayiyi_20230320.exe and b/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/obj/Debug/ZTTMS_Manage_yibayiyi_20230320.exe differ
diff --git a/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/obj/Debug/ZTTMS_Manage_yibayiyi_20230320.pdb b/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/obj/Debug/ZTTMS_Manage_yibayiyi_20230320.pdb
index 1003112..c6991df 100644
Binary files a/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/obj/Debug/ZTTMS_Manage_yibayiyi_20230320.pdb and b/ZTTMS_Manage_yibayiyi_KeepaliveTest3_GKJ_V1.1/ZTTMS_Manage_yibayiyi_20230320/obj/Debug/ZTTMS_Manage_yibayiyi_20230320.pdb differ