1
0
mirror of https://github.com/Ylianst/MeshCentralRouter synced 2025-12-24 04:04:27 +00:00

Added settings for device visilibity and sorting.

This commit is contained in:
Ylian Saint-Hilaire
2020-03-25 20:26:11 -07:00
parent 6840b9018b
commit 9ecafc5af2
6 changed files with 195 additions and 132 deletions

View File

@@ -8,6 +8,13 @@ namespace MeshCentralRouter
public NodeClass node;
public MainForm parent;
public bool present;
private bool xShowDeviceGroupName = true;
public bool showDeviceGroupName
{
get { return xShowDeviceGroupName; }
set { xShowDeviceGroupName = value; }
}
public DeviceUserControl()
{
@@ -16,7 +23,7 @@ namespace MeshCentralRouter
public void UpdateInfo()
{
deviceNameLabel.Text = node.name;
if (parent.getShowGroupNames()) { deviceNameLabel.Text = mesh.name + ", " + node.name; } else { deviceNameLabel.Text = node.name; }
if (node.conn == 0) {
devicePictureBox.Image = disabledDeviceImageList.Images[node.icon - 1];
} else {
@@ -25,9 +32,10 @@ namespace MeshCentralRouter
string status = "";
if ((node.conn & 1) != 0) { if (status.Length > 0) { status += ", "; } status += "Agent"; }
if ((node.conn & 2) != 0) { if (status.Length > 0) { status += ", "; } status += "AMT"; }
if ((node.conn & 4) != 0) { if (status.Length > 0) { status += ", "; } status += "CIRA"; }
if ((node.conn & 8) != 0) { if (status.Length > 0) { status += ", "; } status += "MQTT"; }
if ((node.conn & 2) != 0) { if (status.Length > 0) { status += ", "; } status += "CIRA"; }
if ((node.conn & 4) != 0) { if (status.Length > 0) { status += ", "; } status += "AMT"; }
if ((node.conn & 8) != 0) { if (status.Length > 0) { status += ", "; } status += "Relay"; }
if ((node.conn & 16) != 0) { if (status.Length > 0) { status += ", "; } status += "MQTT"; }
if (status == "") { status = "Offline"; }
deviceStatusLabel.Text = status;