增加6点和19点对照相机的参数进行设置的功能
This commit is contained in:
parent
85c12aa994
commit
602eda76ff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -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 公用方法
|
||||
|
||||
@ -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";
|
||||
|
||||
|
||||
//标记设备是否使能
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -123,10 +123,19 @@
|
||||
<metadata name="timerCycleGet.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>152, 17</value>
|
||||
</metadata>
|
||||
<metadata name="timerSendHeart.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>253, 17</value>
|
||||
</metadata>
|
||||
<metadata name="timerChangeConnectState.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>398, 17</value>
|
||||
</metadata>
|
||||
<metadata name="timerLight.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>605, 17</value>
|
||||
</metadata>
|
||||
<metadata name="timerNight.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>717, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user