UI Components/Features
• Added BtnVlcPlay WHich toggles between Vlc.Play and VLC.Stop
This commit is contained in:
21
AiQ_GUI.Designer.cs
generated
21
AiQ_GUI.Designer.cs
generated
@@ -131,6 +131,7 @@ namespace AiQ_GUI
|
|||||||
BtnFirewall = new Button();
|
BtnFirewall = new Button();
|
||||||
TabImages = new TabPage();
|
TabImages = new TabPage();
|
||||||
Video = new TabPage();
|
Video = new TabPage();
|
||||||
|
BtnPlayVLC = new Button();
|
||||||
VLCVideo = new Label();
|
VLCVideo = new Label();
|
||||||
NightImgPcbx = new PictureBox();
|
NightImgPcbx = new PictureBox();
|
||||||
NightImage = new Label();
|
NightImage = new Label();
|
||||||
@@ -1662,6 +1663,7 @@ namespace AiQ_GUI
|
|||||||
// Video
|
// Video
|
||||||
//
|
//
|
||||||
Video.BackColor = Color.FromArgb(39, 37, 55);
|
Video.BackColor = Color.FromArgb(39, 37, 55);
|
||||||
|
Video.Controls.Add(BtnPlayVLC);
|
||||||
Video.Controls.Add(VidView);
|
Video.Controls.Add(VidView);
|
||||||
Video.Controls.Add(VLCVideo);
|
Video.Controls.Add(VLCVideo);
|
||||||
Video.Controls.Add(NightImgPcbx);
|
Video.Controls.Add(NightImgPcbx);
|
||||||
@@ -1675,13 +1677,29 @@ namespace AiQ_GUI
|
|||||||
Video.TabIndex = 5;
|
Video.TabIndex = 5;
|
||||||
Video.Text = "Video";
|
Video.Text = "Video";
|
||||||
//
|
//
|
||||||
|
// BtnPlayVLC
|
||||||
|
//
|
||||||
|
BtnPlayVLC.BackColor = Color.FromArgb(70, 65, 80);
|
||||||
|
BtnPlayVLC.FlatAppearance.BorderSize = 0;
|
||||||
|
BtnPlayVLC.FlatStyle = FlatStyle.Flat;
|
||||||
|
BtnPlayVLC.Font = new Font("Segoe UI Semibold", 10F, FontStyle.Bold);
|
||||||
|
BtnPlayVLC.ForeColor = SystemColors.Control;
|
||||||
|
BtnPlayVLC.Location = new Point(286, 536);
|
||||||
|
BtnPlayVLC.Margin = new Padding(4, 3, 4, 3);
|
||||||
|
BtnPlayVLC.Name = "BtnPlayVLC";
|
||||||
|
BtnPlayVLC.Size = new Size(113, 37);
|
||||||
|
BtnPlayVLC.TabIndex = 239;
|
||||||
|
BtnPlayVLC.Text = "Play Video";
|
||||||
|
BtnPlayVLC.UseVisualStyleBackColor = false;
|
||||||
|
BtnPlayVLC.Click += BtnPlayVLC_Click;
|
||||||
|
//
|
||||||
// VLCVideo
|
// VLCVideo
|
||||||
//
|
//
|
||||||
VLCVideo.AutoSize = true;
|
VLCVideo.AutoSize = true;
|
||||||
VLCVideo.BackColor = Color.Transparent;
|
VLCVideo.BackColor = Color.Transparent;
|
||||||
VLCVideo.Font = new Font("Segoe UI Semibold", 12F, FontStyle.Bold);
|
VLCVideo.Font = new Font("Segoe UI Semibold", 12F, FontStyle.Bold);
|
||||||
VLCVideo.ForeColor = SystemColors.Control;
|
VLCVideo.ForeColor = SystemColors.Control;
|
||||||
VLCVideo.Location = new Point(12, 545);
|
VLCVideo.Location = new Point(12, 555);
|
||||||
VLCVideo.Margin = new Padding(4, 0, 4, 0);
|
VLCVideo.Margin = new Padding(4, 0, 4, 0);
|
||||||
VLCVideo.Name = "VLCVideo";
|
VLCVideo.Name = "VLCVideo";
|
||||||
VLCVideo.Size = new Size(86, 21);
|
VLCVideo.Size = new Size(86, 21);
|
||||||
@@ -2129,5 +2147,6 @@ namespace AiQ_GUI
|
|||||||
public Label VLCVideo;
|
public Label VLCVideo;
|
||||||
public PictureBox NightImgPcbx;
|
public PictureBox NightImgPcbx;
|
||||||
public PictureBox DayImgPcbx;
|
public PictureBox DayImgPcbx;
|
||||||
|
private Button BtnPlayVLC;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
32
AiQ_GUI.cs
32
AiQ_GUI.cs
@@ -1,7 +1,9 @@
|
|||||||
using AiQ_GUI.AiQ_Tests;
|
using AiQ_GUI.AiQ_Tests;
|
||||||
using AiQ_GUI.Mobile_Tests;
|
using AiQ_GUI.Mobile_Tests;
|
||||||
|
using DocumentFormat.OpenXml.Drawing.Diagrams;
|
||||||
using LibVLCSharp.Shared;
|
using LibVLCSharp.Shared;
|
||||||
using LibVLCSharp.WinForms;
|
using LibVLCSharp.WinForms;
|
||||||
|
using MigraDoc.DocumentObjectModel;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
@@ -9,6 +11,7 @@ using System.Net.Http.Json;
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using Color = System.Drawing.Color;
|
||||||
|
|
||||||
namespace AiQ_GUI
|
namespace AiQ_GUI
|
||||||
{
|
{
|
||||||
@@ -211,7 +214,7 @@ namespace AiQ_GUI
|
|||||||
Logging.LogMessage("Pre Test Started");
|
Logging.LogMessage("Pre Test Started");
|
||||||
if (CbBxCamType.Text == "AiQ")
|
if (CbBxCamType.Text == "AiQ")
|
||||||
{
|
{
|
||||||
await AiQTests.AiQPreTest();
|
await AiQTests.AiQPreTest();
|
||||||
}
|
}
|
||||||
else if (CbBxCamType.Text == "Mobile")
|
else if (CbBxCamType.Text == "Mobile")
|
||||||
{
|
{
|
||||||
@@ -1450,12 +1453,12 @@ namespace AiQ_GUI
|
|||||||
//StatsExcel excelExporter = new();
|
//StatsExcel excelExporter = new();
|
||||||
//excelExporter.ExportDatabaseToExcel();
|
//excelExporter.ExportDatabaseToExcel();
|
||||||
//await MobilePreTest.CheckFirmwareAsync();
|
//await MobilePreTest.CheckFirmwareAsync();
|
||||||
|
FlexiAPI.GetVersions(CamOnTest.IP).Wait();
|
||||||
VLC.Play(VidView);
|
//VLC.Play(VidView);
|
||||||
await Task.Delay(5000);
|
//await Task.Delay(5000);
|
||||||
//VLC.TakeSnapshot(VidView);
|
//VLC.TakeSnapshot(VidView);
|
||||||
|
|
||||||
await MobileAPI.SetDayModeAsync();
|
// await MobileAPI.SetDayModeAsync();
|
||||||
|
|
||||||
AddToActionsList("RunTime " + stopWatchTest.Elapsed.ToString(@"hh\:mm\:ss\.ff"), Level.LOG);
|
AddToActionsList("RunTime " + stopWatchTest.Elapsed.ToString(@"hh\:mm\:ss\.ff"), Level.LOG);
|
||||||
}
|
}
|
||||||
@@ -1463,7 +1466,7 @@ namespace AiQ_GUI
|
|||||||
{
|
{
|
||||||
return new Label
|
return new Label
|
||||||
{
|
{
|
||||||
Location = new Point(5, yLoc),
|
Location = new System.Drawing.Point(5, yLoc),
|
||||||
Height = 20,
|
Height = 20,
|
||||||
Width = 700,
|
Width = 700,
|
||||||
ForeColor = isRed ? Color.Red : Color.LightGreen,
|
ForeColor = isRed ? Color.Red : Color.LightGreen,
|
||||||
@@ -1483,6 +1486,23 @@ namespace AiQ_GUI
|
|||||||
PnlLbls.Controls.Add(lbl);
|
PnlLbls.Controls.Add(lbl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void BtnPlayVLC_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(CamOnTest.IP))
|
||||||
|
{
|
||||||
|
AddToActionsList("No Camera Has Been Selected, Please Select A Camera.", Level.WARNING);
|
||||||
|
}
|
||||||
|
else if (VLC.IsPLaying(VidView))
|
||||||
|
{
|
||||||
|
BtnPlayVLC.Text = "Play Video";
|
||||||
|
VLC.Stop(VidView);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
BtnPlayVLC.Text = "Stop Video";
|
||||||
|
VLC.Play(VidView);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,11 @@ namespace AiQ_GUI.Mobile_Tests
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public static async Task RunFinalTestAsync()
|
||||||
|
{
|
||||||
|
// Placeholder for any final tests if needed in the future
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private static async Task TestDayNightMode()
|
private static async Task TestDayNightMode()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user