From f89b9824be9d5ff1cba5e5984cf6321f65d20d0c Mon Sep 17 00:00:00 2001 From: Jason Dove Date: Sun, 31 May 2020 11:36:29 -0700 Subject: [PATCH 1/2] add telegram cooldown time --- src/UI/Camera.cs | 20 ++- src/UI/Shell.Designer.cs | 362 +++++++++++++++++++++++---------------- src/UI/Shell.cs | 35 ++-- 3 files changed, 253 insertions(+), 164 deletions(-) diff --git a/src/UI/Camera.cs b/src/UI/Camera.cs index dd613f97..f8513592 100644 --- a/src/UI/Camera.cs +++ b/src/UI/Camera.cs @@ -19,7 +19,9 @@ class Camera public bool telegram_enabled; public bool enabled; public DateTime last_trigger_time; + public DateTime last_telegram_time; public double cooldown_time; + public double telegram_cooldown_time; public int threshold_lower; public int threshold_upper; @@ -34,7 +36,7 @@ class Camera public int stats_irrelevant_alerts; //alert image contained irrelevant object counter //write config to file - public void WriteConfig(string _name, string _prefix, string _triggering_objects_as_string, string _trigger_urls_as_string, bool _telegram_enabled, bool _enabled, double _cooldown_time, int _threshold_lower, int _threshold_upper) + public void WriteConfig(string _name, string _prefix, string _triggering_objects_as_string, string _trigger_urls_as_string, bool _telegram_enabled, bool _enabled, double _cooldown_time, double _telegram_cooldown_time, int _threshold_lower, int _threshold_upper) { //if camera name (= settings file name) changed, the old settings file must be deleted if(name != _name) @@ -52,6 +54,7 @@ public void WriteConfig(string _name, string _prefix, string _triggering_objects telegram_enabled = _telegram_enabled; enabled = _enabled; cooldown_time = _cooldown_time; + telegram_cooldown_time = _telegram_cooldown_time; threshold_lower = _threshold_lower; threshold_upper = _threshold_upper; @@ -97,8 +100,7 @@ public void WriteConfig(string _name, string _prefix, string _triggering_objects sw.WriteLine($"Cooldown time: \"{cooldown_time}\" minutes (How many minutes must have passed since the last detection. Used to separate event to ensure that every event only causes one alert.)"); sw.WriteLine($"Certainty threshold: \"{threshold_lower},{threshold_upper}\" (format: \"lower % limit, upper % limit\")"); sw.WriteLine($"STATS: alerts,irrelevant alerts,false alerts: \"{stats_alerts.ToString()}, {stats_irrelevant_alerts.ToString()}, {stats_false_alerts.ToString()}\" "); - - + sw.WriteLine($"Telegram cooldown time: \"{telegram_cooldown_time}\" minutes (How many minutes must have passed since the last detection. Used to separate event to ensure that every event only causes one telegram message.)"); } } @@ -180,6 +182,12 @@ public void ReadConfig(string config_path) Int32.TryParse(content[7].Split('"')[1].Split(',')[0], out stats_alerts); //bedeutet: Zeile 7 (6+1), aufgetrennt an ", 2tes (1+1) Resultat, aufgeteilt an ',', davon 1. Resultat Int32.TryParse(content[7].Split('"')[1].Split(',')[1], out stats_irrelevant_alerts); Int32.TryParse(content[7].Split('"')[1].Split(',')[2], out stats_false_alerts); + + //read telegram cooldown time + if (content.Length >= 9) + { + Double.TryParse(content[8].Split('"')[1], out telegram_cooldown_time); + } } @@ -187,21 +195,21 @@ public void ReadConfig(string config_path) public void IncrementAlerts() { stats_alerts++; - WriteConfig(name, prefix, triggering_objects_as_string, trigger_urls_as_string, telegram_enabled, enabled, cooldown_time, threshold_lower, threshold_upper); + WriteConfig(name, prefix, triggering_objects_as_string, trigger_urls_as_string, telegram_enabled, enabled, cooldown_time, telegram_cooldown_time, threshold_lower, threshold_upper); } //one alarm that contained no objects counter public void IncrementFalseAlerts() { stats_false_alerts++; - WriteConfig(name, prefix, triggering_objects_as_string, trigger_urls_as_string, telegram_enabled, enabled, cooldown_time, threshold_lower, threshold_upper); + WriteConfig(name, prefix, triggering_objects_as_string, trigger_urls_as_string, telegram_enabled, enabled, cooldown_time, telegram_cooldown_time, threshold_lower, threshold_upper); } //one alarm that contained irrelevant objects counter public void IncrementIrrelevantAlerts() { stats_irrelevant_alerts++; - WriteConfig(name, prefix, triggering_objects_as_string, trigger_urls_as_string, telegram_enabled, enabled, cooldown_time, threshold_lower, threshold_upper); + WriteConfig(name, prefix, triggering_objects_as_string, trigger_urls_as_string, telegram_enabled, enabled, cooldown_time, telegram_cooldown_time, threshold_lower, threshold_upper); } diff --git a/src/UI/Shell.Designer.cs b/src/UI/Shell.Designer.cs index f298b856..7f20c0ec 100644 --- a/src/UI/Shell.Designer.cs +++ b/src/UI/Shell.Designer.cs @@ -110,6 +110,10 @@ private void InitializeComponent() this.cb_car = new System.Windows.Forms.CheckBox(); this.label1 = new System.Windows.Forms.Label(); this.tableLayoutPanel9 = new System.Windows.Forms.TableLayoutPanel(); + this.tableLayoutPanel26 = new System.Windows.Forms.TableLayoutPanel(); + this.label11 = new System.Windows.Forms.Label(); + this.tb_telegram_cooldown = new System.Windows.Forms.TextBox(); + this.label13 = new System.Windows.Forms.Label(); this.tableLayoutPanel10 = new System.Windows.Forms.TableLayoutPanel(); this.lblTriggerUrl = new System.Windows.Forms.Label(); this.tbTriggerUrl = new System.Windows.Forms.TextBox(); @@ -189,6 +193,7 @@ private void InitializeComponent() this.tableLayoutPanel7.SuspendLayout(); this.tableLayoutPanel8.SuspendLayout(); this.tableLayoutPanel9.SuspendLayout(); + this.tableLayoutPanel26.SuspendLayout(); this.tableLayoutPanel10.SuspendLayout(); this.tableLayoutPanel20.SuspendLayout(); this.tableLayoutPanel12.SuspendLayout(); @@ -222,7 +227,7 @@ private void InitializeComponent() this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 1; this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 90F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(940, 430); + this.tableLayoutPanel1.Size = new System.Drawing.Size(940, 487); this.tableLayoutPanel1.TabIndex = 3; // // tableLayoutPanel21 @@ -239,16 +244,16 @@ private void InitializeComponent() this.tableLayoutPanel21.RowCount = 2; this.tableLayoutPanel21.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); this.tableLayoutPanel21.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 90F)); - this.tableLayoutPanel21.Size = new System.Drawing.Size(652, 424); + this.tableLayoutPanel21.Size = new System.Drawing.Size(652, 481); this.tableLayoutPanel21.TabIndex = 5; // // pictureBox1 // this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill; - this.pictureBox1.Location = new System.Drawing.Point(3, 45); + this.pictureBox1.Location = new System.Drawing.Point(3, 51); this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(646, 376); + this.pictureBox1.Size = new System.Drawing.Size(646, 427); this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBox1.TabIndex = 6; this.pictureBox1.TabStop = false; @@ -271,7 +276,7 @@ private void InitializeComponent() this.tableLayoutPanel22.Name = "tableLayoutPanel22"; this.tableLayoutPanel22.RowCount = 1; this.tableLayoutPanel22.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel22.Size = new System.Drawing.Size(646, 36); + this.tableLayoutPanel22.Size = new System.Drawing.Size(646, 42); this.tableLayoutPanel22.TabIndex = 7; // // cb_showObjects @@ -282,7 +287,7 @@ private void InitializeComponent() this.cb_showObjects.Checked = true; this.cb_showObjects.CheckState = System.Windows.Forms.CheckState.Checked; this.cb_showObjects.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cb_showObjects.Location = new System.Drawing.Point(132, 4); + this.cb_showObjects.Location = new System.Drawing.Point(132, 7); this.cb_showObjects.Name = "cb_showObjects"; this.cb_showObjects.Size = new System.Drawing.Size(123, 27); this.cb_showObjects.TabIndex = 9; @@ -297,7 +302,7 @@ private void InitializeComponent() this.cb_showMask.Appearance = System.Windows.Forms.Appearance.Button; this.cb_showMask.AutoSize = true; this.cb_showMask.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cb_showMask.Location = new System.Drawing.Point(3, 4); + this.cb_showMask.Location = new System.Drawing.Point(3, 7); this.cb_showMask.Name = "cb_showMask"; this.cb_showMask.Size = new System.Drawing.Size(123, 27); this.cb_showMask.TabIndex = 8; @@ -311,7 +316,7 @@ private void InitializeComponent() this.lbl_objects.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.lbl_objects.AutoSize = true; this.lbl_objects.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbl_objects.Location = new System.Drawing.Point(261, 9); + this.lbl_objects.Location = new System.Drawing.Point(261, 12); this.lbl_objects.Name = "lbl_objects"; this.lbl_objects.Padding = new System.Windows.Forms.Padding(5, 0, 0, 0); this.lbl_objects.Size = new System.Drawing.Size(382, 17); @@ -333,8 +338,8 @@ private void InitializeComponent() this.splitContainer1.Panel2.BackColor = System.Drawing.Color.Transparent; this.splitContainer1.Panel2.Controls.Add(this.panel1); this.splitContainer1.Panel2.Padding = new System.Windows.Forms.Padding(3); - this.splitContainer1.Size = new System.Drawing.Size(276, 424); - this.splitContainer1.SplitterDistance = 316; + this.splitContainer1.Size = new System.Drawing.Size(276, 481); + this.splitContainer1.SplitterDistance = 358; this.splitContainer1.TabIndex = 6; // // tableLayoutPanel19 @@ -349,7 +354,7 @@ private void InitializeComponent() this.tableLayoutPanel19.RowCount = 2; this.tableLayoutPanel19.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel19.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); - this.tableLayoutPanel19.Size = new System.Drawing.Size(276, 316); + this.tableLayoutPanel19.Size = new System.Drawing.Size(276, 358); this.tableLayoutPanel19.TabIndex = 0; // // cb_showFilters @@ -357,7 +362,7 @@ private void InitializeComponent() this.cb_showFilters.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.cb_showFilters.Appearance = System.Windows.Forms.Appearance.Button; this.cb_showFilters.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cb_showFilters.Location = new System.Drawing.Point(3, 289); + this.cb_showFilters.Location = new System.Drawing.Point(3, 331); this.cb_showFilters.MinimumSize = new System.Drawing.Size(0, 27); this.cb_showFilters.Name = "cb_showFilters"; this.cb_showFilters.Size = new System.Drawing.Size(270, 27); @@ -378,7 +383,7 @@ private void InitializeComponent() this.list1.HideSelection = false; this.list1.Location = new System.Drawing.Point(3, 3); this.list1.Name = "list1"; - this.list1.Size = new System.Drawing.Size(270, 280); + this.list1.Size = new System.Drawing.Size(270, 322); this.list1.TabIndex = 3; this.list1.UseCompatibleStateImageBehavior = false; this.list1.View = System.Windows.Forms.View.Details; @@ -396,7 +401,7 @@ private void InitializeComponent() this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Location = new System.Drawing.Point(3, 3); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(270, 98); + this.panel1.Size = new System.Drawing.Size(270, 113); this.panel1.TabIndex = 2; // // comboBox_filter_camera @@ -411,18 +416,6 @@ private void InitializeComponent() this.comboBox_filter_camera.TabIndex = 2; this.comboBox_filter_camera.SelectedIndexChanged += new System.EventHandler(this.comboBox_filter_camera_SelectedIndexChanged); // - // cb_filter_success - // - this.cb_filter_success.AutoSize = true; - this.cb_filter_success.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cb_filter_success.Location = new System.Drawing.Point(6, 37); - this.cb_filter_success.Name = "cb_filter_success"; - this.cb_filter_success.Size = new System.Drawing.Size(137, 21); - this.cb_filter_success.TabIndex = 0; - this.cb_filter_success.Text = "only relevant alerts"; - this.cb_filter_success.UseVisualStyleBackColor = true; - this.cb_filter_success.CheckedChanged += new System.EventHandler(this.cb_filter_success_CheckedChanged); - // // cb_filter_nosuccess // this.cb_filter_nosuccess.AutoSize = true; @@ -435,13 +428,25 @@ private void InitializeComponent() this.cb_filter_nosuccess.UseVisualStyleBackColor = true; this.cb_filter_nosuccess.CheckedChanged += new System.EventHandler(this.cb_filter_nosuccess_CheckedChanged); // + // cb_filter_success + // + this.cb_filter_success.AutoSize = true; + this.cb_filter_success.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cb_filter_success.Location = new System.Drawing.Point(6, 37); + this.cb_filter_success.Name = "cb_filter_success"; + this.cb_filter_success.Size = new System.Drawing.Size(137, 21); + this.cb_filter_success.TabIndex = 0; + this.cb_filter_success.Text = "only relevant alerts"; + this.cb_filter_success.UseVisualStyleBackColor = true; + this.cb_filter_success.CheckedChanged += new System.EventHandler(this.cb_filter_success_CheckedChanged); + // // cb_filter_person // this.cb_filter_person.AutoSize = true; this.cb_filter_person.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.cb_filter_person.Location = new System.Drawing.Point(6, 91); this.cb_filter_person.Name = "cb_filter_person"; - this.cb_filter_person.Size = new System.Drawing.Size(137, 21); + this.cb_filter_person.Size = new System.Drawing.Size(159, 21); this.cb_filter_person.TabIndex = 0; this.cb_filter_person.Text = "only alerts with people"; this.cb_filter_person.UseVisualStyleBackColor = true; @@ -453,7 +458,7 @@ private void InitializeComponent() this.cb_filter_vehicle.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.cb_filter_vehicle.Location = new System.Drawing.Point(6, 118); this.cb_filter_vehicle.Name = "cb_filter_vehicle"; - this.cb_filter_vehicle.Size = new System.Drawing.Size(137, 21); + this.cb_filter_vehicle.Size = new System.Drawing.Size(163, 21); this.cb_filter_vehicle.TabIndex = 0; this.cb_filter_vehicle.Text = "only alerts with vehicles"; this.cb_filter_vehicle.UseVisualStyleBackColor = true; @@ -465,7 +470,7 @@ private void InitializeComponent() this.cb_filter_animal.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.cb_filter_animal.Location = new System.Drawing.Point(6, 145); this.cb_filter_animal.Name = "cb_filter_animal"; - this.cb_filter_animal.Size = new System.Drawing.Size(137, 21); + this.cb_filter_animal.Size = new System.Drawing.Size(162, 21); this.cb_filter_animal.TabIndex = 0; this.cb_filter_animal.Text = "only alerts with animals"; this.cb_filter_animal.UseVisualStyleBackColor = true; @@ -482,7 +487,7 @@ private void InitializeComponent() this.tabControl1.Location = new System.Drawing.Point(0, 0); this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; - this.tabControl1.Size = new System.Drawing.Size(954, 462); + this.tabControl1.Size = new System.Drawing.Size(954, 519); this.tabControl1.TabIndex = 4; this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged); this.tabControl1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.tabControl1_MouseDown); @@ -492,7 +497,7 @@ private void InitializeComponent() this.tabOverview.Controls.Add(this.tableLayoutPanel14); this.tabOverview.Location = new System.Drawing.Point(4, 22); this.tabOverview.Name = "tabOverview"; - this.tabOverview.Size = new System.Drawing.Size(946, 436); + this.tabOverview.Size = new System.Drawing.Size(946, 493); this.tabOverview.TabIndex = 4; this.tabOverview.Text = "Overview"; this.tabOverview.UseVisualStyleBackColor = true; @@ -510,7 +515,7 @@ private void InitializeComponent() this.tableLayoutPanel14.Name = "tableLayoutPanel14"; this.tableLayoutPanel14.RowCount = 1; this.tableLayoutPanel14.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel14.Size = new System.Drawing.Size(946, 436); + this.tableLayoutPanel14.Size = new System.Drawing.Size(946, 493); this.tableLayoutPanel14.TabIndex = 3; // // tableLayoutPanel15 @@ -532,7 +537,7 @@ private void InitializeComponent() this.tableLayoutPanel15.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.5F)); this.tableLayoutPanel15.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 5F)); this.tableLayoutPanel15.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel15.Size = new System.Drawing.Size(938, 428); + this.tableLayoutPanel15.Size = new System.Drawing.Size(938, 485); this.tableLayoutPanel15.TabIndex = 0; // // pictureBox2 @@ -541,7 +546,7 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); this.pictureBox2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.pictureBox2.Image = global::WindowsFormsApp2.Properties.Resources.logo; - this.pictureBox2.Location = new System.Drawing.Point(3, 84); + this.pictureBox2.Location = new System.Drawing.Point(3, 113); this.pictureBox2.Name = "pictureBox2"; this.pictureBox2.Size = new System.Drawing.Size(932, 124); this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; @@ -554,7 +559,7 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); this.label2.Font = new System.Drawing.Font("Segoe UI", 48F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label2.ForeColor = System.Drawing.Color.Green; - this.label2.Location = new System.Drawing.Point(3, 215); + this.label2.Location = new System.Drawing.Point(3, 244); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(932, 92); this.label2.TabIndex = 3; @@ -566,7 +571,7 @@ private void InitializeComponent() this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.label3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.label3.Location = new System.Drawing.Point(60, 211); + this.label3.Location = new System.Drawing.Point(60, 240); this.label3.Margin = new System.Windows.Forms.Padding(60, 0, 60, 0); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(818, 2); @@ -579,9 +584,9 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.lbl_version.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbl_version.Location = new System.Drawing.Point(3, 405); + this.lbl_version.Location = new System.Drawing.Point(3, 459); this.lbl_version.Name = "lbl_version"; - this.lbl_version.Size = new System.Drawing.Size(932, 23); + this.lbl_version.Size = new System.Drawing.Size(932, 26); this.lbl_version.TabIndex = 6; this.lbl_version.Text = "Version 1.66"; this.lbl_version.TextAlign = System.Drawing.ContentAlignment.BottomCenter; @@ -593,9 +598,9 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); this.lbl_errors.Font = new System.Drawing.Font("Segoe UI Semibold", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lbl_errors.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.lbl_errors.Location = new System.Drawing.Point(3, 343); + this.lbl_errors.Location = new System.Drawing.Point(3, 389); this.lbl_errors.Name = "lbl_errors"; - this.lbl_errors.Size = new System.Drawing.Size(932, 62); + this.lbl_errors.Size = new System.Drawing.Size(932, 70); this.lbl_errors.TabIndex = 7; this.lbl_errors.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lbl_errors.Visible = false; @@ -606,7 +611,7 @@ private void InitializeComponent() this.tabStats.Controls.Add(this.tableLayoutPanel16); this.tabStats.Location = new System.Drawing.Point(4, 22); this.tabStats.Name = "tabStats"; - this.tabStats.Size = new System.Drawing.Size(946, 436); + this.tabStats.Size = new System.Drawing.Size(946, 493); this.tabStats.TabIndex = 5; this.tabStats.Text = "Stats"; this.tabStats.UseVisualStyleBackColor = true; @@ -623,7 +628,7 @@ private void InitializeComponent() this.tableLayoutPanel16.Name = "tableLayoutPanel16"; this.tableLayoutPanel16.RowCount = 1; this.tableLayoutPanel16.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel16.Size = new System.Drawing.Size(946, 436); + this.tableLayoutPanel16.Size = new System.Drawing.Size(946, 493); this.tableLayoutPanel16.TabIndex = 0; // // tableLayoutPanel23 @@ -643,7 +648,7 @@ private void InitializeComponent() this.tableLayoutPanel23.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 33F)); this.tableLayoutPanel23.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); this.tableLayoutPanel23.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel23.Size = new System.Drawing.Size(657, 430); + this.tableLayoutPanel23.Size = new System.Drawing.Size(657, 487); this.tableLayoutPanel23.TabIndex = 7; // // label8 @@ -651,7 +656,7 @@ private void InitializeComponent() this.label8.AutoSize = true; this.label8.Dock = System.Windows.Forms.DockStyle.Top; this.label8.Font = new System.Drawing.Font("Segoe UI", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label8.Location = new System.Drawing.Point(3, 218); + this.label8.Location = new System.Drawing.Point(3, 246); this.label8.Margin = new System.Windows.Forms.Padding(3); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(651, 27); @@ -680,7 +685,7 @@ private void InitializeComponent() chartArea1.Name = "ChartArea1"; this.chart_confidence.ChartAreas.Add(chartArea1); this.chart_confidence.Dock = System.Windows.Forms.DockStyle.Fill; - this.chart_confidence.Location = new System.Drawing.Point(3, 251); + this.chart_confidence.Location = new System.Drawing.Point(3, 279); this.chart_confidence.Name = "chart_confidence"; series1.BorderWidth = 4; series1.ChartArea = "ChartArea1"; @@ -695,7 +700,7 @@ private void InitializeComponent() series2.Name = "alert"; this.chart_confidence.Series.Add(series1); this.chart_confidence.Series.Add(series2); - this.chart_confidence.Size = new System.Drawing.Size(651, 176); + this.chart_confidence.Size = new System.Drawing.Size(651, 205); this.chart_confidence.TabIndex = 8; // // timeline @@ -747,7 +752,7 @@ private void InitializeComponent() this.timeline.Series.Add(series4); this.timeline.Series.Add(series5); this.timeline.Series.Add(series6); - this.timeline.Size = new System.Drawing.Size(651, 176); + this.timeline.Size = new System.Drawing.Size(651, 204); this.timeline.TabIndex = 6; // // label7 @@ -776,7 +781,7 @@ private void InitializeComponent() this.tableLayoutPanel17.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 33F)); this.tableLayoutPanel17.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel17.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel17.Size = new System.Drawing.Size(277, 430); + this.tableLayoutPanel17.Size = new System.Drawing.Size(277, 487); this.tableLayoutPanel17.TabIndex = 3; // // chart1 @@ -811,7 +816,7 @@ private void InitializeComponent() series7.Points.Add(dataPoint2); series7.Points.Add(dataPoint3); this.chart1.Series.Add(series7); - this.chart1.Size = new System.Drawing.Size(271, 391); + this.chart1.Size = new System.Drawing.Size(271, 448); this.chart1.TabIndex = 2; this.chart1.Text = "chart1"; title1.Font = new System.Drawing.Font("Segoe UI", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); @@ -839,7 +844,7 @@ private void InitializeComponent() this.tabHistory.Location = new System.Drawing.Point(4, 22); this.tabHistory.Name = "tabHistory"; this.tabHistory.Padding = new System.Windows.Forms.Padding(3); - this.tabHistory.Size = new System.Drawing.Size(946, 436); + this.tabHistory.Size = new System.Drawing.Size(946, 493); this.tabHistory.TabIndex = 0; this.tabHistory.Text = "History"; this.tabHistory.UseVisualStyleBackColor = true; @@ -850,7 +855,7 @@ private void InitializeComponent() this.tabCameras.Location = new System.Drawing.Point(4, 22); this.tabCameras.Name = "tabCameras"; this.tabCameras.Padding = new System.Windows.Forms.Padding(3); - this.tabCameras.Size = new System.Drawing.Size(946, 436); + this.tabCameras.Size = new System.Drawing.Size(946, 493); this.tabCameras.TabIndex = 2; this.tabCameras.Text = "Cameras"; this.tabCameras.UseVisualStyleBackColor = true; @@ -867,7 +872,7 @@ private void InitializeComponent() this.tableLayoutPanel2.Name = "tableLayoutPanel2"; this.tableLayoutPanel2.RowCount = 1; this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel2.Size = new System.Drawing.Size(940, 430); + this.tableLayoutPanel2.Size = new System.Drawing.Size(940, 487); this.tableLayoutPanel2.TabIndex = 0; // // tableLayoutPanel3 @@ -882,7 +887,7 @@ private void InitializeComponent() this.tableLayoutPanel3.RowCount = 2; this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 80F)); this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); - this.tableLayoutPanel3.Size = new System.Drawing.Size(135, 424); + this.tableLayoutPanel3.Size = new System.Drawing.Size(135, 481); this.tableLayoutPanel3.TabIndex = 0; // // list2 @@ -893,7 +898,7 @@ private void InitializeComponent() this.list2.HideSelection = false; this.list2.Location = new System.Drawing.Point(3, 3); this.list2.Name = "list2"; - this.list2.Size = new System.Drawing.Size(129, 370); + this.list2.Size = new System.Drawing.Size(129, 421); this.list2.TabIndex = 1; this.list2.UseCompatibleStateImageBehavior = false; this.list2.View = System.Windows.Forms.View.Details; @@ -904,9 +909,9 @@ private void InitializeComponent() // this.btnCameraAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); this.btnCameraAdd.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnCameraAdd.Location = new System.Drawing.Point(20, 379); + this.btnCameraAdd.Location = new System.Drawing.Point(20, 430); this.btnCameraAdd.Name = "btnCameraAdd"; - this.btnCameraAdd.Size = new System.Drawing.Size(94, 42); + this.btnCameraAdd.Size = new System.Drawing.Size(94, 48); this.btnCameraAdd.TabIndex = 4; this.btnCameraAdd.Text = "Add Camera"; this.btnCameraAdd.UseVisualStyleBackColor = true; @@ -923,10 +928,10 @@ private void InitializeComponent() this.tableLayoutPanel6.Location = new System.Drawing.Point(144, 3); this.tableLayoutPanel6.Name = "tableLayoutPanel6"; this.tableLayoutPanel6.RowCount = 3; + this.tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 8.108109F)); + this.tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 81.70478F)); this.tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); - this.tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 80F)); - this.tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); - this.tableLayoutPanel6.Size = new System.Drawing.Size(793, 424); + this.tableLayoutPanel6.Size = new System.Drawing.Size(793, 481); this.tableLayoutPanel6.TabIndex = 1; // // tableLayoutPanel7 @@ -946,15 +951,15 @@ private void InitializeComponent() this.tableLayoutPanel7.Controls.Add(this.lbl_threshold, 0, 3); this.tableLayoutPanel7.Controls.Add(this.tableLayoutPanel24, 1, 3); this.tableLayoutPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel7.Location = new System.Drawing.Point(3, 45); + this.tableLayoutPanel7.Location = new System.Drawing.Point(3, 42); this.tableLayoutPanel7.Name = "tableLayoutPanel7"; this.tableLayoutPanel7.RowCount = 5; this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11F)); this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11F)); this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 32F)); - this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11F)); - this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 35F)); - this.tableLayoutPanel7.Size = new System.Drawing.Size(787, 333); + this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 9.814323F)); + this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 36.87003F)); + this.tableLayoutPanel7.Size = new System.Drawing.Size(787, 387); this.tableLayoutPanel7.TabIndex = 2; // // tableLayoutPanel8 @@ -981,14 +986,14 @@ private void InitializeComponent() this.tableLayoutPanel8.Controls.Add(this.cb_truck, 1, 1); this.tableLayoutPanel8.Controls.Add(this.cb_car, 1, 0); this.tableLayoutPanel8.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel8.Location = new System.Drawing.Point(146, 76); + this.tableLayoutPanel8.Location = new System.Drawing.Point(146, 88); this.tableLayoutPanel8.Name = "tableLayoutPanel8"; this.tableLayoutPanel8.RowCount = 3; this.tableLayoutPanel8.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); this.tableLayoutPanel8.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); this.tableLayoutPanel8.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); this.tableLayoutPanel8.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel8.Size = new System.Drawing.Size(637, 98); + this.tableLayoutPanel8.Size = new System.Drawing.Size(637, 115); this.tableLayoutPanel8.TabIndex = 14; // // cb_person @@ -996,7 +1001,7 @@ private void InitializeComponent() this.cb_person.Anchor = System.Windows.Forms.AnchorStyles.Left; this.cb_person.AutoSize = true; this.cb_person.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cb_person.Location = new System.Drawing.Point(20, 5); + this.cb_person.Location = new System.Drawing.Point(20, 8); this.cb_person.Margin = new System.Windows.Forms.Padding(20, 3, 3, 3); this.cb_person.Name = "cb_person"; this.cb_person.Size = new System.Drawing.Size(67, 21); @@ -1009,7 +1014,7 @@ private void InitializeComponent() this.cb_bicycle.Anchor = System.Windows.Forms.AnchorStyles.Left; this.cb_bicycle.AutoSize = true; this.cb_bicycle.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cb_bicycle.Location = new System.Drawing.Point(20, 37); + this.cb_bicycle.Location = new System.Drawing.Point(20, 46); this.cb_bicycle.Margin = new System.Windows.Forms.Padding(20, 3, 3, 3); this.cb_bicycle.Name = "cb_bicycle"; this.cb_bicycle.Size = new System.Drawing.Size(65, 21); @@ -1022,7 +1027,7 @@ private void InitializeComponent() this.cb_motorcycle.Anchor = System.Windows.Forms.AnchorStyles.Left; this.cb_motorcycle.AutoSize = true; this.cb_motorcycle.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cb_motorcycle.Location = new System.Drawing.Point(20, 70); + this.cb_motorcycle.Location = new System.Drawing.Point(20, 85); this.cb_motorcycle.Margin = new System.Windows.Forms.Padding(20, 3, 3, 3); this.cb_motorcycle.Name = "cb_motorcycle"; this.cb_motorcycle.Size = new System.Drawing.Size(92, 21); @@ -1035,7 +1040,7 @@ private void InitializeComponent() this.cb_bear.Anchor = System.Windows.Forms.AnchorStyles.Left; this.cb_bear.AutoSize = true; this.cb_bear.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cb_bear.Location = new System.Drawing.Point(528, 70); + this.cb_bear.Location = new System.Drawing.Point(528, 85); this.cb_bear.Margin = new System.Windows.Forms.Padding(20, 3, 3, 3); this.cb_bear.Name = "cb_bear"; this.cb_bear.Size = new System.Drawing.Size(53, 21); @@ -1048,7 +1053,7 @@ private void InitializeComponent() this.cb_cow.Anchor = System.Windows.Forms.AnchorStyles.Left; this.cb_cow.AutoSize = true; this.cb_cow.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cb_cow.Location = new System.Drawing.Point(528, 37); + this.cb_cow.Location = new System.Drawing.Point(528, 46); this.cb_cow.Margin = new System.Windows.Forms.Padding(20, 3, 3, 3); this.cb_cow.Name = "cb_cow"; this.cb_cow.Size = new System.Drawing.Size(52, 21); @@ -1061,7 +1066,7 @@ private void InitializeComponent() this.cb_sheep.Anchor = System.Windows.Forms.AnchorStyles.Left; this.cb_sheep.AutoSize = true; this.cb_sheep.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cb_sheep.Location = new System.Drawing.Point(528, 5); + this.cb_sheep.Location = new System.Drawing.Point(528, 8); this.cb_sheep.Margin = new System.Windows.Forms.Padding(20, 3, 3, 3); this.cb_sheep.Name = "cb_sheep"; this.cb_sheep.Size = new System.Drawing.Size(63, 21); @@ -1074,7 +1079,7 @@ private void InitializeComponent() this.cb_horse.Anchor = System.Windows.Forms.AnchorStyles.Left; this.cb_horse.AutoSize = true; this.cb_horse.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cb_horse.Location = new System.Drawing.Point(401, 70); + this.cb_horse.Location = new System.Drawing.Point(401, 85); this.cb_horse.Margin = new System.Windows.Forms.Padding(20, 3, 3, 3); this.cb_horse.Name = "cb_horse"; this.cb_horse.Size = new System.Drawing.Size(62, 21); @@ -1087,7 +1092,7 @@ private void InitializeComponent() this.cb_bird.Anchor = System.Windows.Forms.AnchorStyles.Left; this.cb_bird.AutoSize = true; this.cb_bird.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cb_bird.Location = new System.Drawing.Point(401, 37); + this.cb_bird.Location = new System.Drawing.Point(401, 46); this.cb_bird.Margin = new System.Windows.Forms.Padding(20, 3, 3, 3); this.cb_bird.Name = "cb_bird"; this.cb_bird.Size = new System.Drawing.Size(50, 21); @@ -1100,7 +1105,7 @@ private void InitializeComponent() this.cb_dog.Anchor = System.Windows.Forms.AnchorStyles.Left; this.cb_dog.AutoSize = true; this.cb_dog.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cb_dog.Location = new System.Drawing.Point(401, 5); + this.cb_dog.Location = new System.Drawing.Point(401, 8); this.cb_dog.Margin = new System.Windows.Forms.Padding(20, 3, 3, 3); this.cb_dog.Name = "cb_dog"; this.cb_dog.Size = new System.Drawing.Size(52, 21); @@ -1113,7 +1118,7 @@ private void InitializeComponent() this.cb_cat.Anchor = System.Windows.Forms.AnchorStyles.Left; this.cb_cat.AutoSize = true; this.cb_cat.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cb_cat.Location = new System.Drawing.Point(274, 70); + this.cb_cat.Location = new System.Drawing.Point(274, 85); this.cb_cat.Margin = new System.Windows.Forms.Padding(20, 3, 3, 3); this.cb_cat.Name = "cb_cat"; this.cb_cat.Size = new System.Drawing.Size(46, 21); @@ -1126,7 +1131,7 @@ private void InitializeComponent() this.cb_airplane.Anchor = System.Windows.Forms.AnchorStyles.Left; this.cb_airplane.AutoSize = true; this.cb_airplane.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cb_airplane.Location = new System.Drawing.Point(274, 37); + this.cb_airplane.Location = new System.Drawing.Point(274, 46); this.cb_airplane.Margin = new System.Windows.Forms.Padding(20, 3, 3, 3); this.cb_airplane.Name = "cb_airplane"; this.cb_airplane.Size = new System.Drawing.Size(75, 21); @@ -1139,7 +1144,7 @@ private void InitializeComponent() this.cb_boat.Anchor = System.Windows.Forms.AnchorStyles.Left; this.cb_boat.AutoSize = true; this.cb_boat.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cb_boat.Location = new System.Drawing.Point(274, 5); + this.cb_boat.Location = new System.Drawing.Point(274, 8); this.cb_boat.Margin = new System.Windows.Forms.Padding(20, 3, 3, 3); this.cb_boat.Name = "cb_boat"; this.cb_boat.Size = new System.Drawing.Size(53, 21); @@ -1152,7 +1157,7 @@ private void InitializeComponent() this.cb_bus.Anchor = System.Windows.Forms.AnchorStyles.Left; this.cb_bus.AutoSize = true; this.cb_bus.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cb_bus.Location = new System.Drawing.Point(147, 70); + this.cb_bus.Location = new System.Drawing.Point(147, 85); this.cb_bus.Margin = new System.Windows.Forms.Padding(20, 3, 3, 3); this.cb_bus.Name = "cb_bus"; this.cb_bus.Size = new System.Drawing.Size(47, 21); @@ -1165,7 +1170,7 @@ private void InitializeComponent() this.cb_truck.Anchor = System.Windows.Forms.AnchorStyles.Left; this.cb_truck.AutoSize = true; this.cb_truck.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cb_truck.Location = new System.Drawing.Point(147, 37); + this.cb_truck.Location = new System.Drawing.Point(147, 46); this.cb_truck.Margin = new System.Windows.Forms.Padding(20, 3, 3, 3); this.cb_truck.Name = "cb_truck"; this.cb_truck.Size = new System.Drawing.Size(57, 21); @@ -1178,7 +1183,7 @@ private void InitializeComponent() this.cb_car.Anchor = System.Windows.Forms.AnchorStyles.Left; this.cb_car.AutoSize = true; this.cb_car.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cb_car.Location = new System.Drawing.Point(147, 5); + this.cb_car.Location = new System.Drawing.Point(147, 8); this.cb_car.Margin = new System.Windows.Forms.Padding(20, 3, 3, 3); this.cb_car.Name = "cb_car"; this.cb_car.Size = new System.Drawing.Size(47, 21); @@ -1191,7 +1196,7 @@ private void InitializeComponent() this.label1.Anchor = System.Windows.Forms.AnchorStyles.Left; this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label1.Location = new System.Drawing.Point(4, 264); + this.label1.Location = new System.Drawing.Point(4, 307); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(50, 17); this.label1.TabIndex = 9; @@ -1201,19 +1206,75 @@ private void InitializeComponent() // this.tableLayoutPanel9.ColumnCount = 1; this.tableLayoutPanel9.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel9.Controls.Add(this.tableLayoutPanel26, 0, 3); this.tableLayoutPanel9.Controls.Add(this.tableLayoutPanel10, 0, 1); this.tableLayoutPanel9.Controls.Add(this.cb_telegram, 0, 2); this.tableLayoutPanel9.Controls.Add(this.tableLayoutPanel20, 0, 0); this.tableLayoutPanel9.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel9.Location = new System.Drawing.Point(146, 217); + this.tableLayoutPanel9.Location = new System.Drawing.Point(146, 248); this.tableLayoutPanel9.Name = "tableLayoutPanel9"; - this.tableLayoutPanel9.RowCount = 3; - this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); - this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); - this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); - this.tableLayoutPanel9.Size = new System.Drawing.Size(637, 112); + this.tableLayoutPanel9.RowCount = 4; + this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 35F)); + this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 38F)); + this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 27F)); + this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 34F)); + this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel9.Size = new System.Drawing.Size(637, 135); this.tableLayoutPanel9.TabIndex = 8; // + // tableLayoutPanel26 + // + this.tableLayoutPanel26.ColumnCount = 3; + this.tableLayoutPanel26.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 28.52615F)); + this.tableLayoutPanel26.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 16.64025F)); + this.tableLayoutPanel26.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 54.8336F)); + this.tableLayoutPanel26.Controls.Add(this.label11, 0, 0); + this.tableLayoutPanel26.Controls.Add(this.tb_telegram_cooldown, 1, 0); + this.tableLayoutPanel26.Controls.Add(this.label13, 2, 0); + this.tableLayoutPanel26.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel26.Location = new System.Drawing.Point(3, 103); + this.tableLayoutPanel26.Name = "tableLayoutPanel26"; + this.tableLayoutPanel26.RowCount = 1; + this.tableLayoutPanel26.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel26.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); + this.tableLayoutPanel26.Size = new System.Drawing.Size(631, 29); + this.tableLayoutPanel26.TabIndex = 9; + // + // label11 + // + this.label11.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.label11.AutoSize = true; + this.label11.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label11.Location = new System.Drawing.Point(20, 6); + this.label11.Margin = new System.Windows.Forms.Padding(20, 0, 3, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(157, 17); + this.label11.TabIndex = 0; + this.label11.Text = "Telegram Cooldown Time"; + // + // tb_telegram_cooldown + // + this.tb_telegram_cooldown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.tb_telegram_cooldown.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tb_telegram_cooldown.Location = new System.Drawing.Point(180, 3); + this.tb_telegram_cooldown.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); + this.tb_telegram_cooldown.Name = "tb_telegram_cooldown"; + this.tb_telegram_cooldown.Size = new System.Drawing.Size(101, 25); + this.tb_telegram_cooldown.TabIndex = 1; + // + // label13 + // + this.label13.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.label13.AutoSize = true; + this.label13.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label13.Location = new System.Drawing.Point(287, 6); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(54, 17); + this.label13.TabIndex = 2; + this.label13.Text = "Minutes"; + // // tableLayoutPanel10 // this.tableLayoutPanel10.ColumnCount = 2; @@ -1222,11 +1283,11 @@ private void InitializeComponent() this.tableLayoutPanel10.Controls.Add(this.lblTriggerUrl, 0, 0); this.tableLayoutPanel10.Controls.Add(this.tbTriggerUrl, 1, 0); this.tableLayoutPanel10.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel10.Location = new System.Drawing.Point(3, 40); + this.tableLayoutPanel10.Location = new System.Drawing.Point(3, 38); this.tableLayoutPanel10.Name = "tableLayoutPanel10"; this.tableLayoutPanel10.RowCount = 1; this.tableLayoutPanel10.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel10.Size = new System.Drawing.Size(631, 31); + this.tableLayoutPanel10.Size = new System.Drawing.Size(631, 32); this.tableLayoutPanel10.TabIndex = 0; // // lblTriggerUrl @@ -1259,10 +1320,10 @@ private void InitializeComponent() this.cb_telegram.AutoSize = true; this.cb_telegram.Dock = System.Windows.Forms.DockStyle.Fill; this.cb_telegram.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cb_telegram.Location = new System.Drawing.Point(20, 77); + this.cb_telegram.Location = new System.Drawing.Point(20, 76); this.cb_telegram.Margin = new System.Windows.Forms.Padding(20, 3, 3, 3); this.cb_telegram.Name = "cb_telegram"; - this.cb_telegram.Size = new System.Drawing.Size(614, 32); + this.cb_telegram.Size = new System.Drawing.Size(614, 21); this.cb_telegram.TabIndex = 7; this.cb_telegram.Text = "Send alert images to Telegram"; this.cb_telegram.UseVisualStyleBackColor = false; @@ -1270,9 +1331,9 @@ private void InitializeComponent() // tableLayoutPanel20 // this.tableLayoutPanel20.ColumnCount = 3; - this.tableLayoutPanel20.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F)); - this.tableLayoutPanel20.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 15F)); - this.tableLayoutPanel20.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 65F)); + this.tableLayoutPanel20.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 28.52615F)); + this.tableLayoutPanel20.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 16.64025F)); + this.tableLayoutPanel20.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 54.8336F)); this.tableLayoutPanel20.Controls.Add(this.label5, 0, 0); this.tableLayoutPanel20.Controls.Add(this.tb_cooldown, 1, 0); this.tableLayoutPanel20.Controls.Add(this.label6, 2, 0); @@ -1281,7 +1342,8 @@ private void InitializeComponent() this.tableLayoutPanel20.Name = "tableLayoutPanel20"; this.tableLayoutPanel20.RowCount = 1; this.tableLayoutPanel20.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel20.Size = new System.Drawing.Size(631, 31); + this.tableLayoutPanel20.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); + this.tableLayoutPanel20.Size = new System.Drawing.Size(631, 29); this.tableLayoutPanel20.TabIndex = 8; // // label5 @@ -1289,21 +1351,21 @@ private void InitializeComponent() this.label5.Anchor = System.Windows.Forms.AnchorStyles.Left; this.label5.AutoSize = true; this.label5.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label5.Location = new System.Drawing.Point(20, 7); + this.label5.Location = new System.Drawing.Point(20, 6); this.label5.Margin = new System.Windows.Forms.Padding(20, 0, 3, 0); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(99, 17); + this.label5.Size = new System.Drawing.Size(145, 17); this.label5.TabIndex = 0; - this.label5.Text = "Cooldown Time"; + this.label5.Text = "Trigger Cooldown Time"; // // tb_cooldown // this.tb_cooldown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.tb_cooldown.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tb_cooldown.Location = new System.Drawing.Point(126, 3); + this.tb_cooldown.Location = new System.Drawing.Point(180, 3); this.tb_cooldown.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.tb_cooldown.Name = "tb_cooldown"; - this.tb_cooldown.Size = new System.Drawing.Size(91, 25); + this.tb_cooldown.Size = new System.Drawing.Size(101, 25); this.tb_cooldown.TabIndex = 1; // // label6 @@ -1311,7 +1373,7 @@ private void InitializeComponent() this.label6.Anchor = System.Windows.Forms.AnchorStyles.Left; this.label6.AutoSize = true; this.label6.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label6.Location = new System.Drawing.Point(223, 7); + this.label6.Location = new System.Drawing.Point(287, 6); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(54, 17); this.label6.TabIndex = 2; @@ -1322,7 +1384,7 @@ private void InitializeComponent() this.lblPrefix.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblPrefix.AutoSize = true; this.lblPrefix.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblPrefix.Location = new System.Drawing.Point(4, 46); + this.lblPrefix.Location = new System.Drawing.Point(4, 55); this.lblPrefix.Name = "lblPrefix"; this.lblPrefix.Size = new System.Drawing.Size(128, 17); this.lblPrefix.TabIndex = 2; @@ -1333,7 +1395,7 @@ private void InitializeComponent() this.lblName.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblName.AutoSize = true; this.lblName.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblName.Location = new System.Drawing.Point(4, 10); + this.lblName.Location = new System.Drawing.Point(4, 13); this.lblName.Name = "lblName"; this.lblName.Size = new System.Drawing.Size(43, 17); this.lblName.TabIndex = 10; @@ -1347,18 +1409,18 @@ private void InitializeComponent() this.tableLayoutPanel12.Controls.Add(this.tbPrefix, 0, 0); this.tableLayoutPanel12.Controls.Add(this.lbl_prefix, 1, 0); this.tableLayoutPanel12.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel12.Location = new System.Drawing.Point(146, 40); + this.tableLayoutPanel12.Location = new System.Drawing.Point(146, 46); this.tableLayoutPanel12.Name = "tableLayoutPanel12"; this.tableLayoutPanel12.RowCount = 1; this.tableLayoutPanel12.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel12.Size = new System.Drawing.Size(637, 29); + this.tableLayoutPanel12.Size = new System.Drawing.Size(637, 35); this.tableLayoutPanel12.TabIndex = 12; // // tbPrefix // this.tbPrefix.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.tbPrefix.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tbPrefix.Location = new System.Drawing.Point(20, 3); + this.tbPrefix.Location = new System.Drawing.Point(20, 5); this.tbPrefix.Margin = new System.Windows.Forms.Padding(20, 3, 20, 3); this.tbPrefix.Name = "tbPrefix"; this.tbPrefix.Size = new System.Drawing.Size(278, 25); @@ -1369,7 +1431,7 @@ private void InitializeComponent() // this.lbl_prefix.Anchor = System.Windows.Forms.AnchorStyles.None; this.lbl_prefix.AutoSize = true; - this.lbl_prefix.Location = new System.Drawing.Point(477, 8); + this.lbl_prefix.Location = new System.Drawing.Point(477, 11); this.lbl_prefix.Name = "lbl_prefix"; this.lbl_prefix.Size = new System.Drawing.Size(0, 13); this.lbl_prefix.TabIndex = 6; @@ -1386,14 +1448,14 @@ private void InitializeComponent() this.tableLayoutPanel13.Name = "tableLayoutPanel13"; this.tableLayoutPanel13.RowCount = 1; this.tableLayoutPanel13.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel13.Size = new System.Drawing.Size(637, 29); + this.tableLayoutPanel13.Size = new System.Drawing.Size(637, 35); this.tableLayoutPanel13.TabIndex = 13; // // tbName // this.tbName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.tbName.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tbName.Location = new System.Drawing.Point(20, 3); + this.tbName.Location = new System.Drawing.Point(20, 5); this.tbName.Margin = new System.Windows.Forms.Padding(20, 3, 20, 3); this.tbName.Name = "tbName"; this.tbName.Size = new System.Drawing.Size(278, 25); @@ -1404,7 +1466,7 @@ private void InitializeComponent() this.cb_enabled.Anchor = System.Windows.Forms.AnchorStyles.Left; this.cb_enabled.AutoSize = true; this.cb_enabled.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cb_enabled.Location = new System.Drawing.Point(338, 4); + this.cb_enabled.Location = new System.Drawing.Point(338, 7); this.cb_enabled.Margin = new System.Windows.Forms.Padding(20, 3, 3, 3); this.cb_enabled.Name = "cb_enabled"; this.cb_enabled.Size = new System.Drawing.Size(232, 21); @@ -1417,7 +1479,7 @@ private void InitializeComponent() this.lblRelevantObjects.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblRelevantObjects.AutoSize = true; this.lblRelevantObjects.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblRelevantObjects.Location = new System.Drawing.Point(4, 116); + this.lblRelevantObjects.Location = new System.Drawing.Point(4, 137); this.lblRelevantObjects.Name = "lblRelevantObjects"; this.lblRelevantObjects.Size = new System.Drawing.Size(105, 17); this.lblRelevantObjects.TabIndex = 1; @@ -1428,7 +1490,7 @@ private void InitializeComponent() this.lbl_threshold.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lbl_threshold.AutoSize = true; this.lbl_threshold.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbl_threshold.Location = new System.Drawing.Point(4, 187); + this.lbl_threshold.Location = new System.Drawing.Point(4, 217); this.lbl_threshold.Name = "lbl_threshold"; this.lbl_threshold.Size = new System.Drawing.Size(107, 17); this.lbl_threshold.TabIndex = 15; @@ -1450,11 +1512,11 @@ private void InitializeComponent() this.tableLayoutPanel24.Controls.Add(this.label9, 5, 0); this.tableLayoutPanel24.Controls.Add(this.label10, 2, 0); this.tableLayoutPanel24.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel24.Location = new System.Drawing.Point(146, 181); + this.tableLayoutPanel24.Location = new System.Drawing.Point(146, 210); this.tableLayoutPanel24.Name = "tableLayoutPanel24"; this.tableLayoutPanel24.RowCount = 1; this.tableLayoutPanel24.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel24.Size = new System.Drawing.Size(637, 29); + this.tableLayoutPanel24.Size = new System.Drawing.Size(637, 31); this.tableLayoutPanel24.TabIndex = 16; // // lbl_threshold_lower @@ -1462,7 +1524,7 @@ private void InitializeComponent() this.lbl_threshold_lower.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lbl_threshold_lower.AutoSize = true; this.lbl_threshold_lower.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbl_threshold_lower.Location = new System.Drawing.Point(3, 6); + this.lbl_threshold_lower.Location = new System.Drawing.Point(3, 7); this.lbl_threshold_lower.Name = "lbl_threshold_lower"; this.lbl_threshold_lower.Size = new System.Drawing.Size(71, 17); this.lbl_threshold_lower.TabIndex = 19; @@ -1485,7 +1547,7 @@ private void InitializeComponent() this.lbl_threshold_upper.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lbl_threshold_upper.AutoSize = true; this.lbl_threshold_upper.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbl_threshold_upper.Location = new System.Drawing.Point(320, 6); + this.lbl_threshold_upper.Location = new System.Drawing.Point(320, 7); this.lbl_threshold_upper.Name = "lbl_threshold_upper"; this.lbl_threshold_upper.Size = new System.Drawing.Size(73, 17); this.lbl_threshold_upper.TabIndex = 21; @@ -1508,7 +1570,7 @@ private void InitializeComponent() this.label9.Anchor = System.Windows.Forms.AnchorStyles.Left; this.label9.AutoSize = true; this.label9.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label9.Location = new System.Drawing.Point(510, 6); + this.label9.Location = new System.Drawing.Point(510, 7); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(19, 17); this.label9.TabIndex = 22; @@ -1519,7 +1581,7 @@ private void InitializeComponent() this.label10.Anchor = System.Windows.Forms.AnchorStyles.Left; this.label10.AutoSize = true; this.label10.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label10.Location = new System.Drawing.Point(193, 6); + this.label10.Location = new System.Drawing.Point(193, 7); this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(19, 17); this.label10.TabIndex = 23; @@ -1533,11 +1595,11 @@ private void InitializeComponent() this.tableLayoutPanel11.Controls.Add(this.btnCameraSave, 0, 0); this.tableLayoutPanel11.Controls.Add(this.btnCameraDel, 1, 0); this.tableLayoutPanel11.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel11.Location = new System.Drawing.Point(3, 384); + this.tableLayoutPanel11.Location = new System.Drawing.Point(3, 435); this.tableLayoutPanel11.Name = "tableLayoutPanel11"; this.tableLayoutPanel11.RowCount = 1; this.tableLayoutPanel11.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel11.Size = new System.Drawing.Size(787, 37); + this.tableLayoutPanel11.Size = new System.Drawing.Size(787, 43); this.tableLayoutPanel11.TabIndex = 3; // // btnCameraSave @@ -1547,7 +1609,7 @@ private void InitializeComponent() this.btnCameraSave.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnCameraSave.Location = new System.Drawing.Point(153, 3); this.btnCameraSave.Name = "btnCameraSave"; - this.btnCameraSave.Size = new System.Drawing.Size(86, 31); + this.btnCameraSave.Size = new System.Drawing.Size(86, 37); this.btnCameraSave.TabIndex = 4; this.btnCameraSave.Text = "Save"; this.btnCameraSave.UseVisualStyleBackColor = false; @@ -1559,7 +1621,7 @@ private void InitializeComponent() this.btnCameraDel.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnCameraDel.Location = new System.Drawing.Point(532, 3); this.btnCameraDel.Name = "btnCameraDel"; - this.btnCameraDel.Size = new System.Drawing.Size(116, 31); + this.btnCameraDel.Size = new System.Drawing.Size(116, 37); this.btnCameraDel.TabIndex = 5; this.btnCameraDel.Text = " Delete Camera "; this.btnCameraDel.UseVisualStyleBackColor = true; @@ -1570,7 +1632,7 @@ private void InitializeComponent() this.lbl_camstats.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lbl_camstats.AutoSize = true; this.lbl_camstats.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbl_camstats.Location = new System.Drawing.Point(3, 12); + this.lbl_camstats.Location = new System.Drawing.Point(3, 11); this.lbl_camstats.Name = "lbl_camstats"; this.lbl_camstats.Size = new System.Drawing.Size(36, 17); this.lbl_camstats.TabIndex = 4; @@ -1581,7 +1643,7 @@ private void InitializeComponent() this.tabSettings.Controls.Add(this.tableLayoutPanel4); this.tabSettings.Location = new System.Drawing.Point(4, 22); this.tabSettings.Name = "tabSettings"; - this.tabSettings.Size = new System.Drawing.Size(946, 436); + this.tabSettings.Size = new System.Drawing.Size(946, 493); this.tabSettings.TabIndex = 3; this.tabSettings.Text = "Settings"; this.tabSettings.UseVisualStyleBackColor = true; @@ -1598,7 +1660,7 @@ private void InitializeComponent() this.tableLayoutPanel4.RowCount = 2; this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 85.65022F)); this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.34978F)); - this.tableLayoutPanel4.Size = new System.Drawing.Size(946, 436); + this.tableLayoutPanel4.Size = new System.Drawing.Size(946, 493); this.tableLayoutPanel4.TabIndex = 5; // // tableLayoutPanel5 @@ -1630,7 +1692,7 @@ private void InitializeComponent() this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667F)); this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667F)); this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667F)); - this.tableLayoutPanel5.Size = new System.Drawing.Size(940, 367); + this.tableLayoutPanel5.Size = new System.Drawing.Size(940, 416); this.tableLayoutPanel5.TabIndex = 3; // // label4 @@ -1638,7 +1700,7 @@ private void InitializeComponent() this.label4.Anchor = System.Windows.Forms.AnchorStyles.Left; this.label4.AutoSize = true; this.label4.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label4.Location = new System.Drawing.Point(4, 262); + this.label4.Location = new System.Drawing.Point(4, 302); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(30, 17); this.label4.TabIndex = 15; @@ -1652,18 +1714,18 @@ private void InitializeComponent() this.tableLayoutPanel25.Controls.Add(this.btn_open_log, 1, 0); this.tableLayoutPanel25.Controls.Add(this.cb_log, 0, 0); this.tableLayoutPanel25.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel25.Location = new System.Drawing.Point(145, 244); + this.tableLayoutPanel25.Location = new System.Drawing.Point(145, 280); this.tableLayoutPanel25.Name = "tableLayoutPanel25"; this.tableLayoutPanel25.RowCount = 1; this.tableLayoutPanel25.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel25.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 53F)); - this.tableLayoutPanel25.Size = new System.Drawing.Size(791, 53); + this.tableLayoutPanel25.Size = new System.Drawing.Size(791, 62); this.tableLayoutPanel25.TabIndex = 14; // // btn_open_log // this.btn_open_log.Anchor = System.Windows.Forms.AnchorStyles.None; - this.btn_open_log.Location = new System.Drawing.Point(714, 15); + this.btn_open_log.Location = new System.Drawing.Point(714, 19); this.btn_open_log.Name = "btn_open_log"; this.btn_open_log.Size = new System.Drawing.Size(74, 23); this.btn_open_log.TabIndex = 2; @@ -1678,7 +1740,7 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); this.cb_log.Location = new System.Drawing.Point(3, 3); this.cb_log.Name = "cb_log"; - this.cb_log.Size = new System.Drawing.Size(705, 47); + this.cb_log.Size = new System.Drawing.Size(705, 56); this.cb_log.TabIndex = 11; this.cb_log.Text = "Log everything"; this.cb_log.UseVisualStyleBackColor = true; @@ -1688,7 +1750,7 @@ private void InitializeComponent() this.label12.Anchor = System.Windows.Forms.AnchorStyles.Left; this.label12.AutoSize = true; this.label12.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label12.Location = new System.Drawing.Point(4, 325); + this.label12.Location = new System.Drawing.Point(4, 372); this.label12.Name = "label12"; this.label12.Size = new System.Drawing.Size(77, 17); this.label12.TabIndex = 13; @@ -1699,9 +1761,9 @@ private void InitializeComponent() this.cb_send_errors.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.cb_send_errors.Location = new System.Drawing.Point(145, 304); + this.cb_send_errors.Location = new System.Drawing.Point(145, 349); this.cb_send_errors.Name = "cb_send_errors"; - this.cb_send_errors.Size = new System.Drawing.Size(791, 59); + this.cb_send_errors.Size = new System.Drawing.Size(791, 63); this.cb_send_errors.TabIndex = 12; this.cb_send_errors.Text = "Send Errors and Warnings to Telegram"; this.cb_send_errors.UseVisualStyleBackColor = true; @@ -1711,7 +1773,7 @@ private void InitializeComponent() this.lbl_deepstackurl.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lbl_deepstackurl.AutoSize = true; this.lbl_deepstackurl.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbl_deepstackurl.Location = new System.Drawing.Point(4, 82); + this.lbl_deepstackurl.Location = new System.Drawing.Point(4, 95); this.lbl_deepstackurl.Name = "lbl_deepstackurl"; this.lbl_deepstackurl.Size = new System.Drawing.Size(95, 17); this.lbl_deepstackurl.TabIndex = 4; @@ -1722,7 +1784,7 @@ private void InitializeComponent() this.lbl_input.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lbl_input.AutoSize = true; this.lbl_input.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbl_input.Location = new System.Drawing.Point(4, 22); + this.lbl_input.Location = new System.Drawing.Point(4, 26); this.lbl_input.Name = "lbl_input"; this.lbl_input.Size = new System.Drawing.Size(66, 17); this.lbl_input.TabIndex = 1; @@ -1732,7 +1794,7 @@ private void InitializeComponent() // this.tbDeepstackUrl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.tbDeepstackUrl.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tbDeepstackUrl.Location = new System.Drawing.Point(145, 78); + this.tbDeepstackUrl.Location = new System.Drawing.Point(145, 91); this.tbDeepstackUrl.Name = "tbDeepstackUrl"; this.tbDeepstackUrl.Size = new System.Drawing.Size(791, 25); this.tbDeepstackUrl.TabIndex = 5; @@ -1742,7 +1804,7 @@ private void InitializeComponent() this.lbl_telegram_token.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lbl_telegram_token.AutoSize = true; this.lbl_telegram_token.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbl_telegram_token.Location = new System.Drawing.Point(4, 142); + this.lbl_telegram_token.Location = new System.Drawing.Point(4, 164); this.lbl_telegram_token.Name = "lbl_telegram_token"; this.lbl_telegram_token.Size = new System.Drawing.Size(100, 17); this.lbl_telegram_token.TabIndex = 6; @@ -1753,7 +1815,7 @@ private void InitializeComponent() this.lbl_telegram_chatid.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lbl_telegram_chatid.AutoSize = true; this.lbl_telegram_chatid.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbl_telegram_chatid.Location = new System.Drawing.Point(4, 202); + this.lbl_telegram_chatid.Location = new System.Drawing.Point(4, 233); this.lbl_telegram_chatid.Name = "lbl_telegram_chatid"; this.lbl_telegram_chatid.Size = new System.Drawing.Size(108, 17); this.lbl_telegram_chatid.TabIndex = 7; @@ -1763,7 +1825,7 @@ private void InitializeComponent() // this.tb_telegram_token.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.tb_telegram_token.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tb_telegram_token.Location = new System.Drawing.Point(145, 138); + this.tb_telegram_token.Location = new System.Drawing.Point(145, 160); this.tb_telegram_token.Name = "tb_telegram_token"; this.tb_telegram_token.Size = new System.Drawing.Size(791, 25); this.tb_telegram_token.TabIndex = 8; @@ -1772,7 +1834,7 @@ private void InitializeComponent() // this.tb_telegram_chatid.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.tb_telegram_chatid.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tb_telegram_chatid.Location = new System.Drawing.Point(145, 198); + this.tb_telegram_chatid.Location = new System.Drawing.Point(145, 229); this.tb_telegram_chatid.Name = "tb_telegram_chatid"; this.tb_telegram_chatid.Size = new System.Drawing.Size(791, 25); this.tb_telegram_chatid.TabIndex = 9; @@ -1790,14 +1852,14 @@ private void InitializeComponent() this.tableLayoutPanel18.RowCount = 1; this.tableLayoutPanel18.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel18.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 53F)); - this.tableLayoutPanel18.Size = new System.Drawing.Size(791, 53); + this.tableLayoutPanel18.Size = new System.Drawing.Size(791, 62); this.tableLayoutPanel18.TabIndex = 12; // // tbInput // this.tbInput.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.tbInput.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tbInput.Location = new System.Drawing.Point(3, 14); + this.tbInput.Location = new System.Drawing.Point(3, 18); this.tbInput.Name = "tbInput"; this.tbInput.Size = new System.Drawing.Size(705, 25); this.tbInput.TabIndex = 1; @@ -1805,7 +1867,7 @@ private void InitializeComponent() // btn_input_path // this.btn_input_path.Anchor = System.Windows.Forms.AnchorStyles.None; - this.btn_input_path.Location = new System.Drawing.Point(721, 15); + this.btn_input_path.Location = new System.Drawing.Point(721, 19); this.btn_input_path.Name = "btn_input_path"; this.btn_input_path.Size = new System.Drawing.Size(59, 23); this.btn_input_path.TabIndex = 2; @@ -1817,9 +1879,9 @@ private void InitializeComponent() // this.BtnSettingsSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); this.BtnSettingsSave.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.BtnSettingsSave.Location = new System.Drawing.Point(405, 376); + this.BtnSettingsSave.Location = new System.Drawing.Point(405, 425); this.BtnSettingsSave.Name = "BtnSettingsSave"; - this.BtnSettingsSave.Size = new System.Drawing.Size(136, 57); + this.BtnSettingsSave.Size = new System.Drawing.Size(136, 65); this.BtnSettingsSave.TabIndex = 2; this.BtnSettingsSave.Text = "Save"; this.BtnSettingsSave.UseVisualStyleBackColor = true; @@ -1830,7 +1892,7 @@ private void InitializeComponent() this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoSize = true; - this.ClientSize = new System.Drawing.Size(954, 462); + this.ClientSize = new System.Drawing.Size(954, 519); this.Controls.Add(this.tabControl1); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MinimumSize = new System.Drawing.Size(970, 500); @@ -1875,6 +1937,8 @@ private void InitializeComponent() this.tableLayoutPanel8.PerformLayout(); this.tableLayoutPanel9.ResumeLayout(false); this.tableLayoutPanel9.PerformLayout(); + this.tableLayoutPanel26.ResumeLayout(false); + this.tableLayoutPanel26.PerformLayout(); this.tableLayoutPanel10.ResumeLayout(false); this.tableLayoutPanel10.PerformLayout(); this.tableLayoutPanel20.ResumeLayout(false); @@ -2012,6 +2076,10 @@ private void InitializeComponent() private System.Windows.Forms.Label label4; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel25; private System.Windows.Forms.Button btn_open_log; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel26; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.TextBox tb_telegram_cooldown; + private System.Windows.Forms.Label label13; } } diff --git a/src/UI/Shell.cs b/src/UI/Shell.cs index 15550ab4..fb43fa9e 100644 --- a/src/UI/Shell.cs +++ b/src/UI/Shell.cs @@ -651,8 +651,16 @@ public async Task Trigger(int index, string image_path) CallTriggerURLs(urls); } - - + } + else + { + //log that nothing was done + Log($" Camera {CameraList[index].name} is still in trigger cooldown. Trigger URL wasn't called. and no image will be uploaded to Telegram."); + } + + //only telegram if cameras cooldown time since last detection has passed + if ((DateTime.Now - CameraList[index].last_telegram_time).TotalMinutes >= CameraList[index].telegram_cooldown_time) + { //upload to telegram if (CameraList[index].telegram_enabled) { @@ -664,11 +672,12 @@ public async Task Trigger(int index, string image_path) else { //log that nothing was done - Log($" Camera {CameraList[index].name} is still in cooldown. Trigger URL wasn't called and no image will be uploaded to Telegram."); + Log($" Camera {CameraList[index].name} is still in telegram cooldown. No image will be uploaded to Telegram."); } - CameraList[index].last_trigger_time = DateTime.Now; //reset cooldown time every time an image contains something, even if no trigger was called (still in cooldown time) - + //reset cooldown time every time an image contains something, even if no trigger was called (still in cooldown time) + CameraList[index].last_trigger_time = DateTime.Now; + CameraList[index].last_telegram_time = DateTime.Now; } @@ -1834,7 +1843,7 @@ private string LoadCamera(string config_path) } //add camera - private string AddCamera(string name, string prefix, string trigger_urls_as_string, string triggering_objects_as_string, bool telegram_enabled, bool enabled, double cooldown_time, int threshold_lower, int threshold_upper) + private string AddCamera(string name, string prefix, string trigger_urls_as_string, string triggering_objects_as_string, bool telegram_enabled, bool enabled, double cooldown_time, double telegram_cooldown_time, int threshold_lower, int threshold_upper) { //check if camera with specified name already exists. If yes, then abort. foreach (Camera c in CameraList) @@ -1854,7 +1863,7 @@ private string AddCamera(string name, string prefix, string trigger_urls_as_stri } Camera cam = new Camera(); //create new camera object - cam.WriteConfig(name, prefix, triggering_objects_as_string, trigger_urls_as_string, telegram_enabled, enabled, cooldown_time, threshold_lower, threshold_upper); //set parameters + cam.WriteConfig(name, prefix, triggering_objects_as_string, trigger_urls_as_string, telegram_enabled, enabled, cooldown_time, telegram_cooldown_time, threshold_lower, threshold_upper); //set parameters CameraList.Add(cam); //add created camera object to CameraList //add camera to list2 @@ -1876,7 +1885,7 @@ private string AddCamera(string name, string prefix, string trigger_urls_as_stri } //change settings of camera - private string UpdateCamera(string oldname, string name, string prefix, string trigger_urls_as_string, string triggering_objects_as_string, bool telegram_enabled, bool enabled, double cooldown_time, int threshold_lower, int threshold_upper) + private string UpdateCamera(string oldname, string name, string prefix, string trigger_urls_as_string, string triggering_objects_as_string, bool telegram_enabled, bool enabled, double cooldown_time, double telegram_cooldown_time, int threshold_lower, int threshold_upper) { //1. CHECK NEW VALUES //check if name is empty @@ -1912,7 +1921,7 @@ private string UpdateCamera(string oldname, string name, string prefix, string t } //2. WRITE CONFIG - CameraList[index].WriteConfig(name, prefix, triggering_objects_as_string, trigger_urls_as_string, telegram_enabled, enabled, cooldown_time, threshold_lower, threshold_upper); //set parameters + CameraList[index].WriteConfig(name, prefix, triggering_objects_as_string, trigger_urls_as_string, telegram_enabled, enabled, cooldown_time, telegram_cooldown_time, threshold_lower, threshold_upper); //set parameters //3. UPDATE LIST2 //update list2 entry @@ -2033,6 +2042,7 @@ private void DisplayCameraSettings() lbl_prefix.Text = tbPrefix.Text + ".××××××.jpg"; //prefix live preview tbTriggerUrl.Text = CameraList[i].trigger_urls_as_string; //load trigger url tb_cooldown.Text = CameraList[i].cooldown_time.ToString(); //load cooldown time + tb_telegram_cooldown.Text = CameraList[i].telegram_cooldown_time.ToString(); //load telegram cooldown time tb_threshold_lower.Text = CameraList[i].threshold_lower.ToString(); //load lower threshold value tb_threshold_upper.Text = CameraList[i].threshold_upper.ToString(); // load upper threshold value @@ -2116,7 +2126,7 @@ private void btnCameraAdd_Click(object sender, EventArgs e) if (result == DialogResult.OK) { string name = form.text; - AddCamera(name, name, "", "person", false, true, 0, 0, 100); + AddCamera(name, name, "", "person", false, true, 0, 0, 0, 100); } } } @@ -2145,6 +2155,9 @@ private void btnCameraSave_Click_1(object sender, EventArgs e) //get cooldown time from textbox Double.TryParse(tb_cooldown.Text, out double cooldown_time); + //get telegram cooldown time from textbox + Double.TryParse(tb_telegram_cooldown.Text, out double telegram_cooldown_time); + //get lower and upper threshold values from textboxes Int32.TryParse(tb_threshold_lower.Text, out int threshold_lower); Int32.TryParse(tb_threshold_upper.Text, out int threshold_upper); @@ -2152,7 +2165,7 @@ private void btnCameraSave_Click_1(object sender, EventArgs e) //2. UPDATE SETTINGS // save new camera settings, display result in MessageBox - string result = UpdateCamera(list2.SelectedItems[0].Text, tbName.Text, tbPrefix.Text, tbTriggerUrl.Text, triggering_objects_as_string, cb_telegram.Checked, cb_enabled.Checked, cooldown_time, threshold_lower, threshold_upper); + string result = UpdateCamera(list2.SelectedItems[0].Text, tbName.Text, tbPrefix.Text, tbTriggerUrl.Text, triggering_objects_as_string, cb_telegram.Checked, cb_enabled.Checked, cooldown_time, telegram_cooldown_time, threshold_lower, threshold_upper); } DisplayCameraSettings(); From 5f23a925b54565e01a951769ad5779a77aa328ec Mon Sep 17 00:00:00 2001 From: Avalanche Date: Fri, 5 Jun 2020 10:49:00 -0600 Subject: [PATCH 2/2] Fixed indexing error in shell.cs line 643, need to figure out why it was set to 1 when my detects only have index 0 --- src/UI/Shell.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/UI/Shell.cs b/src/UI/Shell.cs index 390b79f1..a0ef6315 100644 --- a/src/UI/Shell.cs +++ b/src/UI/Shell.cs @@ -641,9 +641,9 @@ public async Task Trigger(int index, string image_path) foreach (string url in CameraList[index].trigger_urls) { urls[c] = url.Replace("[camera]", CameraList[index].name) - .Replace("[detection]", CameraList[index].last_detections.ElementAt(1)) - .Replace("[position]", CameraList[index].last_positions.ElementAt(1)) - .Replace("[confidence]", CameraList[index].last_confidences.ElementAt(1).ToString()) + .Replace("[detection]", CameraList[index].last_detections.ElementAt(0)) + .Replace("[position]", CameraList[index].last_positions.ElementAt(0)) + .Replace("[confidence]", CameraList[index].last_confidences.ElementAt(0).ToString()) .Replace("[detections]", string.Join(",", CameraList[index].last_detections)) .Replace("[confidences]", string.Join(",", CameraList[index].last_confidences.ToString())); c++;