1
0
mirror of https://github.com/Ylianst/MeshCentralRouter synced 2026-01-05 01:33:16 +00:00

Merge branch 'master' into Bugfix/systemtray

This commit is contained in:
Ylian Saint-Hilaire
2022-07-01 14:34:50 -07:00
committed by GitHub
3 changed files with 40 additions and 5 deletions

View File

@@ -13,7 +13,7 @@
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<StartupObject>MeshCentralRouter.Program</StartupObject>
<ApplicationIcon>src\MeshServer.ico</ApplicationIcon>
<ApplicationIcon>MeshServer.ico</ApplicationIcon>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
@@ -58,6 +58,7 @@
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup />
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
@@ -415,6 +416,7 @@
<None Include="app.config" />
</ItemGroup>
<ItemGroup>
<Content Include="MeshServer.ico" />
<Content Include="src\MeshServer.ico" />
<None Include="readme.md" />
<None Include="Resources\icon-monitor1.png" />

BIN
MeshServer.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

View File

@@ -762,6 +762,7 @@ namespace MeshCentralRouter
{
foreach (NodeClass node in meshcentral.nodes.Values)
{
if (node.agentid == -1) { continue; }
ListViewItem device;
if (node.listitem == null)
@@ -779,9 +780,11 @@ namespace MeshCentralRouter
}
if ((node.meshid != null) && meshcentral.meshes.ContainsKey(node.meshid)) { node.mesh = (MeshClass)meshcentral.meshes[node.meshid]; }
string meshName = (node.mesh != null) ? node.mesh.name : Properties.Resources.IndividualDevices;
if ((showGroupNamesToolStripMenuItem.Checked) && (node.mesh != null))
{
device.SubItems[0].Text = node.mesh.name + " - " + node.name;
device.SubItems[0].Text = meshName + " - " + node.name;
}
else
{
@@ -791,12 +794,16 @@ namespace MeshCentralRouter
// *** Flynn Grouping start
bool bGroupExisting = false;
for (int i = 0; i < devicesListView.Groups.Count; i++)
if ((node.mesh != null && devicesListView.Groups[i].Header == node.mesh.name) || (node.mesh == null && devicesListView.Groups[i].Header == ""))
{
// if ((node.mesh != null && devicesListView.Groups[i].Header == node.mesh.name) || (node.mesh == null && devicesListView.Groups[i].Header == ""))
if (devicesListView.Groups[i].Header == meshName)
{
bGroupExisting = true;
node.listitem.Group = devicesListView.Groups[i];
break;
}
}
if (!bGroupExisting)
{
ListViewGroup grp = devicesListView.Groups.Add(devicesListView.Groups.Count.ToString(), ((node.mesh == null) ? "" : node.mesh.name));
@@ -821,7 +828,33 @@ namespace MeshCentralRouter
ListViewExtended.setGrpState(lvg, ListViewGroupState.Collapsible | ListViewGroupState.Collapsed);
}
}
// *** Flynn Groupng end
if (!bGroupExisting)
{
ListViewGroup grp = devicesListView.Groups.Add(devicesListView.Groups.Count.ToString(), meshName);
node.listitem.Group = grp;
ListViewGroup[] groups = new ListViewGroup[this.devicesListView.Groups.Count];
this.devicesListView.Groups.CopyTo(groups, 0);
Array.Sort(groups, new GroupComparer());
this.devicesListView.BeginUpdate();
this.devicesListView.Groups.Clear();
this.devicesListView.Groups.AddRange(groups);
this.devicesListView.EndUpdate();
foreach (ListViewGroup lvg in devicesListView.Groups)
{
if (lvg.Header == "Repos")
{
ListViewExtended.setGrpState(lvg, ListViewGroupState.Collapsible | ListViewGroupState.Normal);
}
else
{
ListViewExtended.setGrpState(lvg, ListViewGroupState.Collapsible | ListViewGroupState.Collapsed);
}
}
}
// *** Flynn Grouping end
bool connVisible = ((showOfflineDevicesToolStripMenuItem.Checked) || ((node.conn & 1) != 0)) || (node.mtype == 3);
int imageIndex = (node.icon - 1) * 2;
@@ -2256,7 +2289,7 @@ namespace MeshCentralRouter
private void button1_Click(object sender, EventArgs e)
{
ConnectionSettings form = new ConnectionSettings();
if (form.ShowDialog(this) == DialogResult.OK) { }
if (form.ShowDialog(this) == DialogResult.OK) { }
}
private void customAppsToolStripMenuItem_Click(object sender, EventArgs e)