UI Components/Features
• Added BtnVlcPlay WHich toggles between Vlc.Play and VLC.Stop
This commit is contained in:
32
AiQ_GUI.cs
32
AiQ_GUI.cs
@@ -1,7 +1,9 @@
|
||||
using AiQ_GUI.AiQ_Tests;
|
||||
using AiQ_GUI.Mobile_Tests;
|
||||
using DocumentFormat.OpenXml.Drawing.Diagrams;
|
||||
using LibVLCSharp.Shared;
|
||||
using LibVLCSharp.WinForms;
|
||||
using MigraDoc.DocumentObjectModel;
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
@@ -9,6 +11,7 @@ using System.Net.Http.Json;
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
using System.Windows.Forms;
|
||||
using Color = System.Drawing.Color;
|
||||
|
||||
namespace AiQ_GUI
|
||||
{
|
||||
@@ -211,7 +214,7 @@ namespace AiQ_GUI
|
||||
Logging.LogMessage("Pre Test Started");
|
||||
if (CbBxCamType.Text == "AiQ")
|
||||
{
|
||||
await AiQTests.AiQPreTest();
|
||||
await AiQTests.AiQPreTest();
|
||||
}
|
||||
else if (CbBxCamType.Text == "Mobile")
|
||||
{
|
||||
@@ -1450,12 +1453,12 @@ namespace AiQ_GUI
|
||||
//StatsExcel excelExporter = new();
|
||||
//excelExporter.ExportDatabaseToExcel();
|
||||
//await MobilePreTest.CheckFirmwareAsync();
|
||||
|
||||
VLC.Play(VidView);
|
||||
await Task.Delay(5000);
|
||||
FlexiAPI.GetVersions(CamOnTest.IP).Wait();
|
||||
//VLC.Play(VidView);
|
||||
//await Task.Delay(5000);
|
||||
//VLC.TakeSnapshot(VidView);
|
||||
|
||||
await MobileAPI.SetDayModeAsync();
|
||||
// await MobileAPI.SetDayModeAsync();
|
||||
|
||||
AddToActionsList("RunTime " + stopWatchTest.Elapsed.ToString(@"hh\:mm\:ss\.ff"), Level.LOG);
|
||||
}
|
||||
@@ -1463,7 +1466,7 @@ namespace AiQ_GUI
|
||||
{
|
||||
return new Label
|
||||
{
|
||||
Location = new Point(5, yLoc),
|
||||
Location = new System.Drawing.Point(5, yLoc),
|
||||
Height = 20,
|
||||
Width = 700,
|
||||
ForeColor = isRed ? Color.Red : Color.LightGreen,
|
||||
@@ -1483,6 +1486,23 @@ namespace AiQ_GUI
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user