SafeDispatch/MotoTrbo_GW/data.cs

51 lines
1.6 KiB
C#
Raw Permalink Normal View History

2024-02-22 16:43:59 +00:00
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using Telerik.WinControls.UI;
using System.Collections;
using Nini.Config;
using Telerik.WinControls;
using SafeMobileLib;
using MotoTRBO_XNL_Cmd;
using System.Threading;
using System.Diagnostics;
namespace MotoTrbo_GW
{
public partial class dataForm : ShapeNew
{
private int radioID;
private int radioIMEI;
private string radioIP;
private RouteManager rm;
public dataForm(int RadioID, string radioIP, int radioImei)
{
radioID = RadioID;
this.radioIP = radioIP;
this.radioIMEI = radioImei;
rm = new RouteManager();
rm.OnRadioStatusUpdate += new RouteManager.RadioStatusUpdateDEl(routeManager_OnRadioStatusUpdate);
rm.Start();
InitializeComponent();
((Telerik.WinControls.Primitives.BorderPrimitive)(this.btCollapse.GetChildAt(2))).ForeColor = System.Drawing.Color.Transparent;
((Telerik.WinControls.Primitives.BorderPrimitive)(this.ImgRad.GetChildAt(2))).ForeColor = System.Drawing.Color.Transparent;
((Telerik.WinControls.Primitives.BorderPrimitive)(this.ImgStat.GetChildAt(2))).ForeColor = System.Drawing.Color.Transparent;
this.Size = new Size(this.Size.Width, 27);
}
void routeManager_OnRadioStatusUpdate(bool status, string ip)
{
if(this.radioIP == ip)
{
ImgStat.Image = status ? Properties.Resources.green_status : Properties.Resources.red_status;
}
}
}
}