mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 14:07:46 +08:00
Add Color property to Language.Designer.cs and add inheritance tests
Co-authored-by: Kvarkas <3611964+Kvarkas@users.noreply.github.com>
This commit is contained in:
18
mRemoteNG/Language/Language.Designer.cs
generated
18
mRemoteNG/Language/Language.Designer.cs
generated
@@ -609,6 +609,15 @@ namespace mRemoteNG.Resources.Language {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Color.
|
||||
/// </summary>
|
||||
internal static string Color {
|
||||
get {
|
||||
return ResourceManager.GetString("Color", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Cannot start Port Scan, incorrect IP format!.
|
||||
/// </summary>
|
||||
@@ -3774,6 +3783,15 @@ namespace mRemoteNG.Resources.Language {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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..
|
||||
/// </summary>
|
||||
internal static string PropertyDescriptionColor {
|
||||
get {
|
||||
return ResourceManager.GetString("PropertyDescriptionColor", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Select the color quality to be used..
|
||||
/// </summary>
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user