Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grouping configuration improvement. #15

Open
gdlcf88 opened this issue Jun 16, 2020 · 0 comments
Open

Grouping configuration improvement. #15

gdlcf88 opened this issue Jun 16, 2020 · 0 comments

Comments

@gdlcf88
Copy link
Member

gdlcf88 commented Jun 16, 2020

I saw the grouping demo:

context.Add(
    new SettingDefinition(
            "Connection.Ip", // Setting name
            "127.0.0.1", // Default value
            L("DisplayName:Connection.Ip"), // Display name
            L("Description:Connection.Ip") // Description
        )
        .WithProperty(SettingUiConst.Group1, "Server")
        .WithProperty(SettingUiConst.Group2, "Connection")
);

"SettingUiConst.Group$n" cannot express the hierarchy well, maybe this is a better way:

context.Add(
    new SettingDefinition(
            "Connection.Ip", // Setting name
            "127.0.0.1", // Default value
            L("DisplayName:Connection.Ip"), // Display name
            L("Description:Connection.Ip") // Description
        )
        .WithProperty("SettingGroup", "Server:Connection")  // More then 2 levels support
        .WithProperty("SettingType", "number") // Original name is: Type
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant