diff --git a/src/UI/Camera.cs b/src/UI/Camera.cs index 0373e0fc..83850bfe 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; @@ -35,7 +37,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) @@ -53,6 +55,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; @@ -98,8 +101,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.)"); } } @@ -181,6 +183,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); + } } @@ -188,21 +196,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 2293a05b..edbd6601 100644 --- a/src/UI/Shell.Designer.cs +++ b/src/UI/Shell.Designer.cs @@ -110,8 +110,15 @@ private void InitializeComponent() this.cb_truck = new System.Windows.Forms.CheckBox(); this.cb_car = new System.Windows.Forms.CheckBox(); this.label1 = new System.Windows.Forms.Label(); + this.tableLayoutPanel9 = new WindowsFormsApp2.DBLayoutPanel(this.components); + 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 WindowsFormsApp2.DBLayoutPanel(this.components); + + this.lblTriggerUrl = new System.Windows.Forms.Label(); this.tbTriggerUrl = new System.Windows.Forms.TextBox(); this.cb_telegram = new System.Windows.Forms.CheckBox(); @@ -190,6 +197,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(); @@ -213,6 +221,7 @@ private void InitializeComponent() // // tabControl1 // + this.tabControl1.Controls.Add(this.tabOverview); this.tabControl1.Controls.Add(this.tabStats); this.tabControl1.Controls.Add(this.tabHistory); @@ -226,9 +235,11 @@ private void InitializeComponent() this.tabControl1.TabIndex = 4; this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged); this.tabControl1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.tabControl1_MouseDown); + // // tabOverview // + this.tabOverview.Controls.Add(this.tableLayoutPanel14); this.tabOverview.Location = new System.Drawing.Point(4, 22); this.tabOverview.Name = "tabOverview"; @@ -236,9 +247,11 @@ private void InitializeComponent() this.tabOverview.TabIndex = 4; this.tabOverview.Text = "Overview"; this.tabOverview.UseVisualStyleBackColor = true; + // // tableLayoutPanel14 // + this.tableLayoutPanel14.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single; this.tableLayoutPanel14.ColumnCount = 1; this.tableLayoutPanel14.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); @@ -252,6 +265,7 @@ private void InitializeComponent() 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.TabIndex = 3; + // // tableLayoutPanel15 // @@ -280,6 +294,7 @@ private void InitializeComponent() // this.pictureBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | 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, 74); @@ -288,9 +303,11 @@ private void InitializeComponent() this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBox2.TabIndex = 4; this.pictureBox2.TabStop = false; + // // label2 // + this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | 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))); @@ -301,9 +318,11 @@ private void InitializeComponent() this.label2.TabIndex = 3; this.label2.Text = "Running"; this.label2.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // // label3 // + 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; @@ -313,9 +332,11 @@ private void InitializeComponent() this.label3.Size = new System.Drawing.Size(818, 2); this.label3.TabIndex = 5; this.label3.Text = "label3"; + // // lbl_version // + this.lbl_version.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))); @@ -326,6 +347,7 @@ private void InitializeComponent() this.lbl_version.TabIndex = 6; this.lbl_version.Text = "Version 1.67 preview 7"; this.lbl_version.TextAlign = System.Drawing.ContentAlignment.BottomCenter; + // // lbl_errors // @@ -356,6 +378,7 @@ private void InitializeComponent() // // tabStats // + this.tabStats.Controls.Add(this.tableLayoutPanel16); this.tabStats.Location = new System.Drawing.Point(4, 22); this.tabStats.Name = "tabStats"; @@ -363,9 +386,11 @@ private void InitializeComponent() this.tabStats.TabIndex = 5; this.tabStats.Text = "Stats"; this.tabStats.UseVisualStyleBackColor = true; + // // tableLayoutPanel16 // + this.tableLayoutPanel16.ColumnCount = 2; this.tableLayoutPanel16.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 30F)); this.tableLayoutPanel16.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 70F)); @@ -378,9 +403,11 @@ private void InitializeComponent() 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.TabIndex = 0; + // // tableLayoutPanel23 // + this.tableLayoutPanel23.ColumnCount = 1; this.tableLayoutPanel23.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel23.Controls.Add(this.label8, 0, 2); @@ -398,9 +425,11 @@ private void InitializeComponent() 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.TabIndex = 7; + // // label8 // + 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))); @@ -411,9 +440,11 @@ private void InitializeComponent() this.label8.TabIndex = 9; this.label8.Text = "Frequencies of alert result confidences"; this.label8.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // // chart_confidence // + this.chart_confidence.BackColor = System.Drawing.Color.Transparent; this.chart_confidence.BorderlineColor = System.Drawing.Color.Transparent; chartArea1.AxisX.Interval = 10D; @@ -450,9 +481,11 @@ private void InitializeComponent() this.chart_confidence.Series.Add(series2); this.chart_confidence.Size = new System.Drawing.Size(651, 176); this.chart_confidence.TabIndex = 8; + // // timeline // + this.timeline.BackColor = System.Drawing.Color.Transparent; this.timeline.BorderlineColor = System.Drawing.Color.Transparent; chartArea2.AxisX.Interval = 3D; @@ -502,9 +535,11 @@ private void InitializeComponent() this.timeline.Series.Add(series6); this.timeline.Size = new System.Drawing.Size(651, 176); this.timeline.TabIndex = 6; + // // label7 // + this.label7.AutoSize = true; this.label7.Dock = System.Windows.Forms.DockStyle.Top; this.label7.Font = new System.Drawing.Font("Segoe UI", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); @@ -515,9 +550,11 @@ private void InitializeComponent() this.label7.TabIndex = 0; this.label7.Text = "Timeline"; this.label7.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // // tableLayoutPanel17 // + this.tableLayoutPanel17.ColumnCount = 1; this.tableLayoutPanel17.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel17.Controls.Add(this.chart1, 0, 1); @@ -531,9 +568,11 @@ private void InitializeComponent() 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.TabIndex = 3; + // // chart1 // + this.chart1.BackColor = System.Drawing.Color.Transparent; this.chart1.BorderlineColor = System.Drawing.Color.Transparent; chartArea3.Area3DStyle.Enable3D = true; @@ -571,12 +610,14 @@ private void InitializeComponent() title1.Name = "Title1"; title1.Text = "Input Rates"; this.chart1.Titles.Add(title1); + // // comboBox1 // this.comboBox1.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.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBox1.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.comboBox1.FormattingEnabled = true; @@ -585,9 +626,11 @@ private void InitializeComponent() this.comboBox1.Size = new System.Drawing.Size(271, 25); this.comboBox1.TabIndex = 3; this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged_1); + // // tabHistory // + this.tabHistory.Controls.Add(this.tableLayoutPanel1); this.tabHistory.Location = new System.Drawing.Point(4, 22); this.tabHistory.Name = "tabHistory"; @@ -596,6 +639,7 @@ private void InitializeComponent() this.tabHistory.TabIndex = 0; this.tabHistory.Text = "History"; this.tabHistory.UseVisualStyleBackColor = true; + // // tableLayoutPanel1 // @@ -617,6 +661,7 @@ private void InitializeComponent() this.tableLayoutPanel21.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.tableLayoutPanel21.ColumnCount = 1; this.tableLayoutPanel21.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel21.Controls.Add(this.pictureBox1, 0, 1); @@ -628,6 +673,7 @@ private void InitializeComponent() this.tableLayoutPanel21.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 80F)); this.tableLayoutPanel21.Size = new System.Drawing.Size(652, 424); this.tableLayoutPanel21.TabIndex = 5; + // // pictureBox1 // @@ -646,6 +692,7 @@ private void InitializeComponent() this.tableLayoutPanel22.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.tableLayoutPanel22.ColumnCount = 3; this.tableLayoutPanel22.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F)); this.tableLayoutPanel22.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F)); @@ -660,9 +707,11 @@ private void InitializeComponent() this.tableLayoutPanel22.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel22.Size = new System.Drawing.Size(646, 41); this.tableLayoutPanel22.TabIndex = 9; + // // cb_showObjects // + this.cb_showObjects.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.cb_showObjects.Appearance = System.Windows.Forms.Appearance.Button; this.cb_showObjects.AutoSize = true; @@ -677,9 +726,11 @@ private void InitializeComponent() this.cb_showObjects.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.cb_showObjects.UseVisualStyleBackColor = true; this.cb_showObjects.MouseUp += new System.Windows.Forms.MouseEventHandler(this.cb_showObjects_MouseUp); + // // cb_showMask // + this.cb_showMask.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.cb_showMask.Appearance = System.Windows.Forms.Appearance.Button; this.cb_showMask.AutoSize = true; @@ -692,9 +743,11 @@ private void InitializeComponent() this.cb_showMask.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.cb_showMask.UseVisualStyleBackColor = true; this.cb_showMask.CheckedChanged += new System.EventHandler(this.cb_showMask_CheckedChanged); + // // lbl_objects // + this.lbl_objects.AutoSize = true; this.lbl_objects.Dock = System.Windows.Forms.DockStyle.Fill; this.lbl_objects.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); @@ -704,16 +757,20 @@ private void InitializeComponent() this.lbl_objects.Size = new System.Drawing.Size(382, 41); this.lbl_objects.TabIndex = 14; this.lbl_objects.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // // splitContainer1 // + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; this.splitContainer1.Location = new System.Drawing.Point(3, 3); this.splitContainer1.Name = "splitContainer1"; this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; + // // splitContainer1.Panel1 // + this.splitContainer1.Panel1.Controls.Add(this.tableLayoutPanel19); // // splitContainer1.Panel2 @@ -754,9 +811,11 @@ private void InitializeComponent() this.cb_showFilters.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.cb_showFilters.UseVisualStyleBackColor = true; this.cb_showFilters.CheckedChanged += new System.EventHandler(this.cb_showFilters_CheckedChanged); + // // list1 // + this.list1.AllowColumnReorder = true; this.list1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.list1.Dock = System.Windows.Forms.DockStyle.Fill; @@ -771,6 +830,7 @@ private void InitializeComponent() this.list1.UseCompatibleStateImageBehavior = false; this.list1.View = System.Windows.Forms.View.Details; this.list1.SelectedIndexChanged += new System.EventHandler(this.list1_SelectedIndexChanged); + // // panel1 // @@ -789,6 +849,7 @@ private void InitializeComponent() // // comboBox_filter_camera // + this.comboBox_filter_camera.Dock = System.Windows.Forms.DockStyle.Top; this.comboBox_filter_camera.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBox_filter_camera.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); @@ -798,9 +859,11 @@ private void InitializeComponent() this.comboBox_filter_camera.Size = new System.Drawing.Size(268, 25); this.comboBox_filter_camera.TabIndex = 2; this.comboBox_filter_camera.SelectedIndexChanged += new System.EventHandler(this.comboBox_filter_camera_SelectedIndexChanged); + // // cb_filter_nosuccess // + this.cb_filter_nosuccess.AutoSize = true; this.cb_filter_nosuccess.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.cb_filter_nosuccess.Location = new System.Drawing.Point(6, 64); @@ -810,6 +873,7 @@ private void InitializeComponent() this.cb_filter_nosuccess.Text = "only false / irrelevant alerts"; this.cb_filter_nosuccess.UseVisualStyleBackColor = true; this.cb_filter_nosuccess.CheckedChanged += new System.EventHandler(this.cb_filter_nosuccess_CheckedChanged); + // // cb_filter_success // @@ -825,6 +889,7 @@ private void InitializeComponent() // // 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); @@ -858,6 +923,7 @@ private void InitializeComponent() this.cb_filter_animal.Text = "only alerts with animals"; this.cb_filter_animal.UseVisualStyleBackColor = true; this.cb_filter_animal.CheckedChanged += new System.EventHandler(this.cb_filter_animal_CheckedChanged); + // // tabCameras // @@ -865,7 +931,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; @@ -882,7 +948,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 @@ -897,7 +963,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 @@ -908,7 +974,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; @@ -919,9 +985,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; @@ -938,10 +1004,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 @@ -961,15 +1027,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 @@ -996,14 +1062,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 @@ -1011,7 +1077,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); @@ -1024,7 +1090,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); @@ -1037,7 +1103,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); @@ -1050,7 +1116,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); @@ -1063,7 +1129,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); @@ -1076,7 +1142,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); @@ -1089,7 +1155,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); @@ -1102,7 +1168,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); @@ -1115,7 +1181,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); @@ -1128,7 +1194,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); @@ -1141,7 +1207,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); @@ -1154,7 +1220,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); @@ -1167,7 +1233,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); @@ -1180,7 +1246,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); @@ -1193,7 +1259,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); @@ -1206,7 +1272,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; @@ -1216,19 +1282,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; @@ -1237,11 +1359,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 @@ -1274,10 +1396,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; @@ -1285,9 +1407,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); @@ -1296,7 +1418,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 @@ -1304,21 +1427,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 @@ -1326,7 +1449,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; @@ -1337,7 +1460,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; @@ -1348,7 +1471,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; @@ -1362,18 +1485,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); @@ -1384,7 +1507,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; @@ -1401,14 +1524,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); @@ -1419,7 +1542,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); @@ -1432,7 +1555,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; @@ -1443,7 +1566,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; @@ -1465,11 +1588,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 @@ -1477,7 +1600,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; @@ -1500,7 +1623,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; @@ -1523,7 +1646,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; @@ -1534,7 +1657,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; @@ -1548,11 +1671,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 @@ -1562,7 +1685,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; @@ -1574,7 +1697,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; @@ -1585,7 +1708,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; @@ -1596,7 +1719,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; @@ -1613,7 +1736,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 @@ -1645,7 +1768,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 @@ -1653,7 +1776,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; @@ -1667,18 +1790,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; @@ -1693,7 +1816,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; @@ -1703,7 +1826,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; @@ -1714,9 +1837,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; @@ -1726,7 +1849,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; @@ -1737,7 +1860,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; @@ -1747,7 +1870,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; @@ -1757,7 +1880,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; @@ -1768,7 +1891,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; @@ -1778,7 +1901,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; @@ -1787,7 +1910,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; @@ -1805,14 +1928,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; @@ -1820,7 +1943,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; @@ -1832,9 +1955,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; @@ -1845,7 +1968,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); @@ -1892,6 +2015,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); @@ -2024,12 +2149,19 @@ private void InitializeComponent() private System.Windows.Forms.Label label4; private DBLayoutPanel 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; + private DBLayoutPanel tableLayoutPanel22; private System.Windows.Forms.CheckBox cb_showObjects; private System.Windows.Forms.CheckBox cb_showMask; private System.Windows.Forms.Label lbl_objects; private DBLayoutPanel tableLayoutPanel6; private DBLayoutPanel tableLayoutPanel14; + } } diff --git a/src/UI/Shell.cs b/src/UI/Shell.cs index 3f398015..e20f1d7b 100644 --- a/src/UI/Shell.cs +++ b/src/UI/Shell.cs @@ -670,6 +670,7 @@ public async Task Trigger(int index, string image_path) { urls[c] = url.Replace("[camera]", CameraList[index].name) .Replace("[detection]", CameraList[index].last_detections.ElementAt(0)) //only gives first detection (maybe not most relevant one) + .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)) @@ -688,8 +689,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) { @@ -701,13 +710,15 @@ 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) - Task ignoredAwaitableResult = this.LastTriggerInfo(index, CameraList[index].cooldown_time); //write info to label + //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; + Task ignoredAwaitableResult = this.LastTriggerInfo(index, CameraList[index].cooldown_time); //write info to label } @@ -1927,7 +1938,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) @@ -1947,7 +1958,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 @@ -1969,7 +1980,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 @@ -2004,10 +2015,12 @@ private string UpdateCamera(string oldname, string name, string prefix, string t return ($"WARNING: Every camera must have a unique prefix ('Input file begins with'), but the prefix of {name} already exists."); } - //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 - //3. UPDATE LIST2 + //2. WRITE CONFIG + 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 var item = list2.FindItemWithText(oldname); list2.Items[list2.Items.IndexOf(item)].Text = name; @@ -2126,6 +2139,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 @@ -2209,7 +2223,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); } } } @@ -2238,6 +2252,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); @@ -2245,7 +2262,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();