From bbe1fa8416da1420acc0b21962dd4107644e0a57 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 7 Oct 2025 19:49:21 +0000
Subject: [PATCH] Add Color property to Language.Designer.cs and add
inheritance tests
Co-authored-by: Kvarkas <3611964+Kvarkas@users.noreply.github.com>
---
mRemoteNG/Language/Language.Designer.cs | 18 ++++++++++++++
.../ConnectionInheritanceIntegrationTests.cs | 24 +++++++++++++++++++
2 files changed, 42 insertions(+)
diff --git a/mRemoteNG/Language/Language.Designer.cs b/mRemoteNG/Language/Language.Designer.cs
index ca13aaa6..8b75827c 100644
--- a/mRemoteNG/Language/Language.Designer.cs
+++ b/mRemoteNG/Language/Language.Designer.cs
@@ -609,6 +609,15 @@ namespace mRemoteNG.Resources.Language {
}
}
+ ///
+ /// Looks up a localized string similar to Color.
+ ///
+ internal static string Color {
+ get {
+ return ResourceManager.GetString("Color", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Cannot start Port Scan, incorrect IP format!.
///
@@ -3774,6 +3783,15 @@ namespace mRemoteNG.Resources.Language {
}
}
+ ///
+ /// Looks up a localized string similar to Sets the color for the connection or folder in the connections tree. Connections inherit this color from their parent folder..
+ ///
+ internal static string PropertyDescriptionColor {
+ get {
+ return ResourceManager.GetString("PropertyDescriptionColor", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Select the color quality to be used..
///
diff --git a/mRemoteNGTests/IntegrationTests/ConnectionInheritanceIntegrationTests.cs b/mRemoteNGTests/IntegrationTests/ConnectionInheritanceIntegrationTests.cs
index ec9c865c..6accecac 100644
--- a/mRemoteNGTests/IntegrationTests/ConnectionInheritanceIntegrationTests.cs
+++ b/mRemoteNGTests/IntegrationTests/ConnectionInheritanceIntegrationTests.cs
@@ -68,5 +68,29 @@ namespace mRemoteNGTests.IntegrationTests
folder3.AddChild(connection);
Assert.That(connection.Icon, Is.EqualTo(folder1.Icon));
}
+
+ [Test]
+ public void ConnectionInheritsColorFromFolder()
+ {
+ var folder = new ContainerInfo { Color = "Red" };
+ var connection = new ConnectionInfo { Inheritance = { Color = true } };
+ _rootNode.AddChild(folder);
+ folder.AddChild(connection);
+ Assert.That(connection.Color, Is.EqualTo(folder.Color));
+ }
+
+ [Test]
+ public void CanInheritColorThroughMultipleFolderLevels()
+ {
+ var folder1 = new ContainerInfo { Color = "Blue" };
+ var folder2 = new ContainerInfo { Inheritance = { Color = true } };
+ var folder3 = new ContainerInfo { Inheritance = { Color = true } };
+ var connection = new ConnectionInfo { Inheritance = { Color = true } };
+ _rootNode.AddChild(folder1);
+ folder1.AddChild(folder2);
+ folder2.AddChild(folder3);
+ folder3.AddChild(connection);
+ Assert.That(connection.Color, Is.EqualTo(folder1.Color));
+ }
}
}
\ No newline at end of file