From 000b902ced36828a972d0c06eb46beaa5a43d36c Mon Sep 17 00:00:00 2001 From: JustArchi Date: Wed, 10 Aug 2016 18:03:14 +0200 Subject: [PATCH] Categorize options in ConfigGenerator Preview: http://i.imgur.com/Noc8qbf.png --- ConfigGenerator/BotConfig.cs | 15 +++++++++++++++ ConfigGenerator/GlobalConfig.cs | 18 ++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/ConfigGenerator/BotConfig.cs b/ConfigGenerator/BotConfig.cs index 8055611fb..4e281bc4c 100644 --- a/ConfigGenerator/BotConfig.cs +++ b/ConfigGenerator/BotConfig.cs @@ -53,34 +53,44 @@ namespace ConfigGenerator { NamesDescending } + [Category("\t\tCore")] [JsonProperty(Required = Required.DisallowNull)] public bool Enabled { get; set; } = false; + [Category("\tAdvanced")] [JsonProperty(Required = Required.DisallowNull)] public bool StartOnLaunch { get; set; } = true; + [Category("\t\tCore")] [JsonProperty] public string SteamLogin { get; set; } = null; + [Category("\t\tCore")] [JsonProperty] [PasswordPropertyText(true)] public string SteamPassword { get; set; } = null; + [Category("\tAccess")] [JsonProperty(Required = Required.DisallowNull)] public ECryptoMethod PasswordFormat { get; set; } = ECryptoMethod.PlainText; + [Category("\tAccess")] [JsonProperty] public string SteamParentalPIN { get; set; } = "0"; + [Category("\tAccess")] [JsonProperty] public string SteamApiKey { get; set; } = null; + [Category("\tAccess")] [JsonProperty(Required = Required.DisallowNull)] public ulong SteamMasterID { get; set; } = 0; + [Category("\tAccess")] [JsonProperty(Required = Required.DisallowNull)] public ulong SteamMasterClanID { get; set; } = 0; + [Category("\tPerformance")] [JsonProperty(Required = Required.DisallowNull)] public bool CardDropsRestricted { get; set; } = true; @@ -93,15 +103,18 @@ namespace ConfigGenerator { [JsonProperty(Required = Required.DisallowNull)] public bool FarmOffline { get; set; } = false; + [Category("\tAdvanced")] [JsonProperty(Required = Required.DisallowNull)] public bool HandleOfflineMessages { get; set; } = false; [JsonProperty(Required = Required.DisallowNull)] public bool AcceptGifts { get; set; } = false; + [Category("\tAdvanced")] [JsonProperty(Required = Required.DisallowNull)] public bool IsBotAccount { get; set; } = false; + [Category("\tAdvanced")] [JsonProperty(Required = Required.DisallowNull)] public bool SteamTradeMatcher { get; set; } = false; @@ -117,12 +130,14 @@ namespace ConfigGenerator { [JsonProperty(Required = Required.DisallowNull)] public bool SendOnFarmingFinished { get; set; } = false; + [Category("\tAccess")] [JsonProperty] public string SteamTradeToken { get; set; } = null; [JsonProperty(Required = Required.DisallowNull)] public byte SendTradePeriod { get; set; } = 0; + [Category("\tAdvanced")] [JsonProperty(Required = Required.DisallowNull)] public byte AcceptConfirmationsPeriod { get; set; } = 0; diff --git a/ConfigGenerator/GlobalConfig.cs b/ConfigGenerator/GlobalConfig.cs index 04625fa16..dd03b75ff 100644 --- a/ConfigGenerator/GlobalConfig.cs +++ b/ConfigGenerator/GlobalConfig.cs @@ -25,6 +25,7 @@ using Newtonsoft.Json; using System; using System.Collections.Generic; +using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Net.Sockets; @@ -50,57 +51,74 @@ namespace ConfigGenerator { // This is hardcoded blacklist which should not be possible to change private static readonly HashSet GlobalBlacklist = new HashSet { 267420, 303700, 335590, 368020, 425280, 480730 }; + [Category("\tDebugging")] [JsonProperty(Required = Required.DisallowNull)] public bool Debug { get; set; } = false; + [Category("\tAdvanced")] [JsonProperty(Required = Required.DisallowNull)] public bool Headless { get; set; } = false; + [Category("\tUpdates")] [JsonProperty(Required = Required.DisallowNull)] public bool AutoUpdates { get; set; } = true; + [Category("\tUpdates")] [JsonProperty(Required = Required.DisallowNull)] public bool AutoRestart { get; set; } = true; + [Category("\tUpdates")] [JsonProperty(Required = Required.DisallowNull)] public EUpdateChannel UpdateChannel { get; set; } = EUpdateChannel.Stable; + [Category("\tAdvanced")] [JsonProperty(Required = Required.DisallowNull)] public ProtocolType SteamProtocol { get; set; } = DefaultSteamProtocol; + [Category("\tAccess")] [JsonProperty(Required = Required.DisallowNull)] public ulong SteamOwnerID { get; set; } = 0; + [Category("\tPerformance")] [JsonProperty(Required = Required.DisallowNull)] public byte MaxFarmingTime { get; set; } = DefaultMaxFarmingTime; + [Category("\tPerformance")] [JsonProperty(Required = Required.DisallowNull)] public byte IdleFarmingPeriod { get; set; } = 3; + [Category("\tPerformance")] [JsonProperty(Required = Required.DisallowNull)] public byte FarmingDelay { get; set; } = DefaultFarmingDelay; + [Category("\tPerformance")] [JsonProperty(Required = Required.DisallowNull)] public byte LoginLimiterDelay { get; set; } = 10; + [Category("\tPerformance")] [JsonProperty(Required = Required.DisallowNull)] public byte InventoryLimiterDelay { get; set; } = 3; + [Category("\tPerformance")] [JsonProperty(Required = Required.DisallowNull)] public byte GiftsLimiterDelay { get; set; } = 1; [JsonProperty(Required = Required.DisallowNull)] public byte MaxTradeHoldDuration { get; set; } = 15; + [Category("\tDebugging")] [JsonProperty(Required = Required.DisallowNull)] public bool ForceHttp { get; set; } = false; + [Category("\tDebugging")] [JsonProperty(Required = Required.DisallowNull)] public byte HttpTimeout { get; set; } = DefaultHttpTimeout; + [Category("\tAccess")] [JsonProperty] public string WCFHostname { get; set; } = "localhost"; + [Category("\tAccess")] [JsonProperty(Required = Required.DisallowNull)] public ushort WCFPort { get; set; } = DefaultWCFPort;