mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2025-12-19 07:50:29 +00:00
Prepare ConfigGenerator for localization
This commit is contained in:
@@ -27,4 +27,4 @@
|
|||||||
"UpdateChannel": 1,
|
"UpdateChannel": 1,
|
||||||
"WCFHost": "127.0.0.1",
|
"WCFHost": "127.0.0.1",
|
||||||
"WCFPort": 1242
|
"WCFPort": 1242
|
||||||
}
|
}
|
||||||
@@ -92,5 +92,7 @@ namespace ConfigGenerator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal virtual void ValidateAndFix() { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -37,14 +37,14 @@ namespace ConfigGenerator {
|
|||||||
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||||
[SuppressMessage("ReSharper", "UnusedMember.Global")]
|
[SuppressMessage("ReSharper", "UnusedMember.Global")]
|
||||||
internal sealed class BotConfig : ASFConfig {
|
internal sealed class BotConfig : ASFConfig {
|
||||||
[Category("\tAdvanced")]
|
[LocalizedCategory("Advanced")]
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public byte AcceptConfirmationsPeriod { get; set; } = 0;
|
public byte AcceptConfirmationsPeriod { get; set; } = 0;
|
||||||
|
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public bool AcceptGifts { get; set; } = false;
|
public bool AcceptGifts { get; set; } = false;
|
||||||
|
|
||||||
[Category("\tPerformance")]
|
[LocalizedCategory("Performance")]
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public bool CardDropsRestricted { get; set; } = true;
|
public bool CardDropsRestricted { get; set; } = true;
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ namespace ConfigGenerator {
|
|||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public bool DismissInventoryNotifications { get; set; } = true;
|
public bool DismissInventoryNotifications { get; set; } = true;
|
||||||
|
|
||||||
[Category("\t\tCore")]
|
[LocalizedCategory("Core")]
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public bool Enabled { get; set; } = false;
|
public bool Enabled { get; set; } = false;
|
||||||
|
|
||||||
@@ -70,15 +70,15 @@ namespace ConfigGenerator {
|
|||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public List<uint> GamesPlayedWhileIdle { get; set; } = new List<uint>();
|
public List<uint> GamesPlayedWhileIdle { get; set; } = new List<uint>();
|
||||||
|
|
||||||
[Category("\tAdvanced")]
|
[LocalizedCategory("Advanced")]
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public bool HandleOfflineMessages { get; set; } = false;
|
public bool HandleOfflineMessages { get; set; } = false;
|
||||||
|
|
||||||
[Category("\tAdvanced")]
|
[LocalizedCategory("Advanced")]
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public bool IsBotAccount { get; set; } = false;
|
public bool IsBotAccount { get; set; } = false;
|
||||||
|
|
||||||
[Category("\tAdvanced")]
|
[LocalizedCategory("Advanced")]
|
||||||
[JsonProperty(ObjectCreationHandling = ObjectCreationHandling.Replace, Required = Required.DisallowNull)]
|
[JsonProperty(ObjectCreationHandling = ObjectCreationHandling.Replace, Required = Required.DisallowNull)]
|
||||||
public List<Steam.Item.EType> LootableTypes { get; set; } = new List<Steam.Item.EType> {
|
public List<Steam.Item.EType> LootableTypes { get; set; } = new List<Steam.Item.EType> {
|
||||||
Steam.Item.EType.BoosterPack,
|
Steam.Item.EType.BoosterPack,
|
||||||
@@ -86,15 +86,15 @@ namespace ConfigGenerator {
|
|||||||
Steam.Item.EType.TradingCard
|
Steam.Item.EType.TradingCard
|
||||||
};
|
};
|
||||||
|
|
||||||
[Category("\tAccess")]
|
[LocalizedCategory("Access")]
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public ECryptoMethod PasswordFormat { get; set; } = ECryptoMethod.PlainText;
|
public ECryptoMethod PasswordFormat { get; set; } = ECryptoMethod.PlainText;
|
||||||
|
|
||||||
[Category("\tAdvanced")]
|
[LocalizedCategory("Advanced")]
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public bool Paused { get; set; } = false;
|
public bool Paused { get; set; } = false;
|
||||||
|
|
||||||
[Category("\tAdvanced")]
|
[LocalizedCategory("Advanced")]
|
||||||
[Editor(typeof(FlagEnumUiEditor), typeof(UITypeEditor))]
|
[Editor(typeof(FlagEnumUiEditor), typeof(UITypeEditor))]
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public ERedeemingPreferences RedeemingPreferences { get; set; } = ERedeemingPreferences.None;
|
public ERedeemingPreferences RedeemingPreferences { get; set; } = ERedeemingPreferences.None;
|
||||||
@@ -108,36 +108,36 @@ namespace ConfigGenerator {
|
|||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public bool ShutdownOnFarmingFinished { get; set; } = false;
|
public bool ShutdownOnFarmingFinished { get; set; } = false;
|
||||||
|
|
||||||
[Category("\tAccess")]
|
[LocalizedCategory("Access")]
|
||||||
[JsonProperty]
|
[JsonProperty]
|
||||||
public string SteamApiKey { get; set; } = null;
|
public string SteamApiKey { get; set; } = null;
|
||||||
|
|
||||||
[Category("\t\tCore")]
|
[LocalizedCategory("Core")]
|
||||||
[JsonProperty]
|
[JsonProperty]
|
||||||
public string SteamLogin { get; set; } = null;
|
public string SteamLogin { get; set; } = null;
|
||||||
|
|
||||||
[Category("\tAccess")]
|
[LocalizedCategory("Access")]
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public ulong SteamMasterClanID { get; set; } = 0;
|
public ulong SteamMasterClanID { get; set; } = 0;
|
||||||
|
|
||||||
[Category("\tAccess")]
|
[LocalizedCategory("Access")]
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public ulong SteamMasterID { get; set; } = 0;
|
public ulong SteamMasterID { get; set; } = 0;
|
||||||
|
|
||||||
[Category("\tAccess")]
|
[LocalizedCategory("Access")]
|
||||||
[JsonProperty]
|
[JsonProperty]
|
||||||
public string SteamParentalPIN { get; set; } = "0";
|
public string SteamParentalPIN { get; set; } = "0";
|
||||||
|
|
||||||
[Category("\t\tCore")]
|
[LocalizedCategory("Core")]
|
||||||
[JsonProperty]
|
[JsonProperty]
|
||||||
[PasswordPropertyText(true)]
|
[PasswordPropertyText(true)]
|
||||||
public string SteamPassword { get; set; } = null;
|
public string SteamPassword { get; set; } = null;
|
||||||
|
|
||||||
[Category("\tAccess")]
|
[LocalizedCategory("Access")]
|
||||||
[JsonProperty]
|
[JsonProperty]
|
||||||
public string SteamTradeToken { get; set; } = null;
|
public string SteamTradeToken { get; set; } = null;
|
||||||
|
|
||||||
[Category("\tAdvanced")]
|
[LocalizedCategory("Advanced")]
|
||||||
[Editor(typeof(FlagEnumUiEditor), typeof(UITypeEditor))]
|
[Editor(typeof(FlagEnumUiEditor), typeof(UITypeEditor))]
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public ETradingPreferences TradingPreferences { get; set; } = ETradingPreferences.AcceptDonations;
|
public ETradingPreferences TradingPreferences { get; set; } = ETradingPreferences.AcceptDonations;
|
||||||
|
|||||||
@@ -74,6 +74,12 @@
|
|||||||
<SubType>Component</SubType>
|
<SubType>Component</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="JSON\Steam.cs" />
|
<Compile Include="JSON\Steam.cs" />
|
||||||
|
<Compile Include="Localization\CGStrings.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<DependentUpon>CGStrings.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="LocalizedCategoryAttribute.cs" />
|
||||||
<Compile Include="Logging.cs" />
|
<Compile Include="Logging.cs" />
|
||||||
<Compile Include="MainForm.cs">
|
<Compile Include="MainForm.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
@@ -83,11 +89,15 @@
|
|||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Program.cs" />
|
<Compile Include="Program.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="RunTime.cs" />
|
<Compile Include="Runtime.cs" />
|
||||||
<Compile Include="Tutorial.cs" />
|
<Compile Include="Tutorial.cs" />
|
||||||
<EmbeddedResource Include="ConfigPage.resx">
|
<EmbeddedResource Include="ConfigPage.resx">
|
||||||
<DependentUpon>ConfigPage.cs</DependentUpon>
|
<DependentUpon>ConfigPage.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Localization\CGStrings.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>CGStrings.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="MainForm.resx">
|
<EmbeddedResource Include="MainForm.resx">
|
||||||
<DependentUpon>MainForm.cs</DependentUpon>
|
<DependentUpon>MainForm.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ namespace ConfigGenerator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
base.OnGotFocus(args);
|
base.OnGotFocus(args);
|
||||||
|
ASFConfig.ValidateAndFix();
|
||||||
ASFConfig.Save();
|
ASFConfig.Save();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,28 +61,17 @@ namespace ConfigGenerator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
base.OnPropertyValueChanged(args);
|
base.OnPropertyValueChanged(args);
|
||||||
|
ASFConfig.ValidateAndFix();
|
||||||
ASFConfig.Save();
|
ASFConfig.Save();
|
||||||
|
|
||||||
BotConfig botConfig = ASFConfig as BotConfig;
|
BotConfig botConfig = ASFConfig as BotConfig;
|
||||||
if (botConfig != null) {
|
if (botConfig?.Enabled != true) {
|
||||||
if (!botConfig.Enabled) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Tutorial.OnAction(Tutorial.EPhase.BotEnabled);
|
|
||||||
if (!string.IsNullOrEmpty(botConfig.SteamLogin) && !string.IsNullOrEmpty(botConfig.SteamPassword)) {
|
|
||||||
Tutorial.OnAction(Tutorial.EPhase.BotReady);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
GlobalConfig globalConfig = ASFConfig as GlobalConfig;
|
Tutorial.OnAction(Tutorial.EPhase.BotEnabled);
|
||||||
if (globalConfig == null) {
|
if (!string.IsNullOrEmpty(botConfig.SteamLogin) && !string.IsNullOrEmpty(botConfig.SteamPassword)) {
|
||||||
return;
|
Tutorial.OnAction(Tutorial.EPhase.BotReady);
|
||||||
}
|
|
||||||
|
|
||||||
if (globalConfig.SteamOwnerID != 0) {
|
|
||||||
Tutorial.OnAction(Tutorial.EPhase.GlobalConfigReady);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,10 +24,10 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
|
using ConfigGenerator.Localization;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace ConfigGenerator {
|
namespace ConfigGenerator {
|
||||||
@@ -45,11 +45,11 @@ namespace ConfigGenerator {
|
|||||||
// This is hardcoded blacklist which should not be possible to change
|
// This is hardcoded blacklist which should not be possible to change
|
||||||
private static readonly HashSet<uint> GlobalBlacklist = new HashSet<uint> { 267420, 303700, 335590, 368020, 425280, 480730, 566020 };
|
private static readonly HashSet<uint> GlobalBlacklist = new HashSet<uint> { 267420, 303700, 335590, 368020, 425280, 480730, 566020 };
|
||||||
|
|
||||||
[Category("\tUpdates")]
|
[LocalizedCategory("Updates")]
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public bool AutoRestart { get; set; } = true;
|
public bool AutoRestart { get; set; } = true;
|
||||||
|
|
||||||
[Category("\tUpdates")]
|
[LocalizedCategory("Updates")]
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public bool AutoUpdates { get; set; } = true;
|
public bool AutoUpdates { get; set; } = true;
|
||||||
|
|
||||||
@@ -59,39 +59,39 @@ namespace ConfigGenerator {
|
|||||||
[JsonProperty]
|
[JsonProperty]
|
||||||
public string CurrentCulture { get; set; } = null;
|
public string CurrentCulture { get; set; } = null;
|
||||||
|
|
||||||
[Category("\tDebugging")]
|
[LocalizedCategory("Debugging")]
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public bool Debug { get; set; } = false;
|
public bool Debug { get; set; } = false;
|
||||||
|
|
||||||
[Category("\tPerformance")]
|
[LocalizedCategory("Performance")]
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public byte FarmingDelay { get; set; } = DefaultFarmingDelay;
|
public byte FarmingDelay { get; set; } = DefaultFarmingDelay;
|
||||||
|
|
||||||
[Category("\tPerformance")]
|
[LocalizedCategory("Performance")]
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public byte GiftsLimiterDelay { get; set; } = 1;
|
public byte GiftsLimiterDelay { get; set; } = 1;
|
||||||
|
|
||||||
[Category("\tAdvanced")]
|
[LocalizedCategory("Advanced")]
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public bool Headless { get; set; } = false;
|
public bool Headless { get; set; } = false;
|
||||||
|
|
||||||
[Category("\tDebugging")]
|
[LocalizedCategory("Debugging")]
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public byte HttpTimeout { get; set; } = DefaultHttpTimeout;
|
public byte HttpTimeout { get; set; } = DefaultHttpTimeout;
|
||||||
|
|
||||||
[Category("\tPerformance")]
|
[LocalizedCategory("Performance")]
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public byte IdleFarmingPeriod { get; set; } = 3;
|
public byte IdleFarmingPeriod { get; set; } = 3;
|
||||||
|
|
||||||
[Category("\tPerformance")]
|
[LocalizedCategory("Performance")]
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public byte InventoryLimiterDelay { get; set; } = 3;
|
public byte InventoryLimiterDelay { get; set; } = 3;
|
||||||
|
|
||||||
[Category("\tPerformance")]
|
[LocalizedCategory("Performance")]
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public byte LoginLimiterDelay { get; set; } = 10;
|
public byte LoginLimiterDelay { get; set; } = 10;
|
||||||
|
|
||||||
[Category("\tPerformance")]
|
[LocalizedCategory("Performance")]
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public byte MaxFarmingTime { get; set; } = DefaultMaxFarmingTime;
|
public byte MaxFarmingTime { get; set; } = DefaultMaxFarmingTime;
|
||||||
|
|
||||||
@@ -101,23 +101,23 @@ namespace ConfigGenerator {
|
|||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public bool Statistics { get; set; } = true;
|
public bool Statistics { get; set; } = true;
|
||||||
|
|
||||||
[Category("\tAccess")]
|
[LocalizedCategory("Access")]
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public ulong SteamOwnerID { get; set; } = 0;
|
public ulong SteamOwnerID { get; set; } = 0;
|
||||||
|
|
||||||
[Category("\tAdvanced")]
|
[LocalizedCategory("Advanced")]
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public ProtocolType SteamProtocol { get; set; } = DefaultSteamProtocol;
|
public ProtocolType SteamProtocol { get; set; } = DefaultSteamProtocol;
|
||||||
|
|
||||||
[Category("\tUpdates")]
|
[LocalizedCategory("Updates")]
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public EUpdateChannel UpdateChannel { get; set; } = EUpdateChannel.Stable;
|
public EUpdateChannel UpdateChannel { get; set; } = EUpdateChannel.Stable;
|
||||||
|
|
||||||
[Category("\tAccess")]
|
[LocalizedCategory("Access")]
|
||||||
[JsonProperty]
|
[JsonProperty]
|
||||||
public string WCFHost { get; set; } = "127.0.0.1";
|
public string WCFHost { get; set; } = "127.0.0.1";
|
||||||
|
|
||||||
[Category("\tAccess")]
|
[LocalizedCategory("Access")]
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public ushort WCFPort { get; set; } = DefaultWCFPort;
|
public ushort WCFPort { get; set; } = DefaultWCFPort;
|
||||||
|
|
||||||
@@ -156,44 +156,55 @@ namespace ConfigGenerator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
globalConfig.FilePath = filePath;
|
globalConfig.FilePath = filePath;
|
||||||
|
globalConfig.ValidateAndFix();
|
||||||
|
return globalConfig;
|
||||||
|
}
|
||||||
|
|
||||||
// SK2 supports only TCP and UDP steam protocols
|
internal override void ValidateAndFix() {
|
||||||
// Ensure that user can't screw this up
|
base.ValidateAndFix();
|
||||||
switch (globalConfig.SteamProtocol) {
|
|
||||||
|
switch (SteamProtocol) {
|
||||||
case ProtocolType.Tcp:
|
case ProtocolType.Tcp:
|
||||||
case ProtocolType.Udp:
|
case ProtocolType.Udp:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Logging.LogGenericWarning("Configured SteamProtocol is invalid: " + globalConfig.SteamProtocol + ". Value of " + DefaultSteamProtocol + " will be used instead");
|
Logging.LogGenericWarning(string.Format(CGStrings.ErrorConfigPropertyInvalid, nameof(SteamProtocol), SteamProtocol));
|
||||||
globalConfig.SteamProtocol = DefaultSteamProtocol;
|
SteamProtocol = DefaultSteamProtocol;
|
||||||
|
Save();
|
||||||
|
Logging.LogGenericWarning(string.Format(CGStrings.WarningConfigPropertyModified, nameof(SteamProtocol), SteamProtocol));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// User might not know what he's doing
|
if (MaxFarmingTime == 0) {
|
||||||
// Ensure that he can't screw core ASF variables
|
Logging.LogGenericWarning(string.Format(CGStrings.ErrorConfigPropertyInvalid, nameof(MaxFarmingTime), MaxFarmingTime));
|
||||||
if (globalConfig.MaxFarmingTime == 0) {
|
MaxFarmingTime = DefaultMaxFarmingTime;
|
||||||
Logging.LogGenericWarning("Configured MaxFarmingTime is invalid: " + globalConfig.MaxFarmingTime + ". Value of " + DefaultMaxFarmingTime + " will be used instead");
|
Save();
|
||||||
globalConfig.MaxFarmingTime = DefaultMaxFarmingTime;
|
Logging.LogGenericWarning(string.Format(CGStrings.WarningConfigPropertyModified, nameof(MaxFarmingTime), MaxFarmingTime));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (globalConfig.FarmingDelay == 0) {
|
if (FarmingDelay == 0) {
|
||||||
Logging.LogGenericWarning("Configured FarmingDelay is invalid: " + globalConfig.FarmingDelay + ". Value of " + DefaultFarmingDelay + " will be used instead");
|
Logging.LogGenericWarning(string.Format(CGStrings.ErrorConfigPropertyInvalid, nameof(FarmingDelay), FarmingDelay));
|
||||||
globalConfig.FarmingDelay = DefaultFarmingDelay;
|
FarmingDelay = DefaultFarmingDelay;
|
||||||
|
Save();
|
||||||
|
Logging.LogGenericWarning(string.Format(CGStrings.WarningConfigPropertyModified, nameof(FarmingDelay), FarmingDelay));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (globalConfig.HttpTimeout == 0) {
|
if (HttpTimeout == 0) {
|
||||||
Logging.LogGenericWarning("Configured HttpTimeout is invalid: " + globalConfig.HttpTimeout + ". Value of " + DefaultHttpTimeout + " will be used instead");
|
Logging.LogGenericWarning(string.Format(CGStrings.ErrorConfigPropertyInvalid, nameof(HttpTimeout), HttpTimeout));
|
||||||
globalConfig.HttpTimeout = DefaultHttpTimeout;
|
HttpTimeout = DefaultHttpTimeout;
|
||||||
|
Save();
|
||||||
|
Logging.LogGenericWarning(string.Format(CGStrings.WarningConfigPropertyModified, nameof(HttpTimeout), HttpTimeout));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (globalConfig.WCFPort != 0) {
|
if (WCFPort != 0) {
|
||||||
return globalConfig;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Logging.LogGenericWarning("Configured WCFPort is invalid: " + globalConfig.WCFPort + ". Value of " + DefaultWCFPort + " will be used instead");
|
Logging.LogGenericWarning(string.Format(CGStrings.ErrorConfigPropertyInvalid, nameof(WCFPort), WCFPort));
|
||||||
globalConfig.WCFPort = DefaultWCFPort;
|
WCFPort = DefaultWCFPort;
|
||||||
|
Save();
|
||||||
return globalConfig;
|
Logging.LogGenericWarning(string.Format(CGStrings.WarningConfigPropertyModified, nameof(WCFPort), WCFPort));
|
||||||
}
|
}
|
||||||
|
|
||||||
internal enum EUpdateChannel : byte {
|
internal enum EUpdateChannel : byte {
|
||||||
|
|||||||
@@ -39,4 +39,4 @@ namespace ConfigGenerator.JSON {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
364
ConfigGenerator/Localization/CGStrings.Designer.cs
generated
Normal file
364
ConfigGenerator/Localization/CGStrings.Designer.cs
generated
Normal file
@@ -0,0 +1,364 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace ConfigGenerator.Localization {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
|
/// </summary>
|
||||||
|
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||||
|
// class via a tool like ResGen or Visual Studio.
|
||||||
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
|
// with the /str option, or rebuild your VS project.
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
internal class CGStrings {
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal CGStrings() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ConfigGenerator.Localization.CGStrings", typeof(CGStrings).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Overrides the current thread's CurrentUICulture property for all
|
||||||
|
/// resource lookups using this strongly typed resource class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Access.
|
||||||
|
/// </summary>
|
||||||
|
internal static string CategoryAccess {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("CategoryAccess", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Advanced.
|
||||||
|
/// </summary>
|
||||||
|
internal static string CategoryAdvanced {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("CategoryAdvanced", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Core.
|
||||||
|
/// </summary>
|
||||||
|
internal static string CategoryCore {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("CategoryCore", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Debugging.
|
||||||
|
/// </summary>
|
||||||
|
internal static string CategoryDebugging {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("CategoryDebugging", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Performance.
|
||||||
|
/// </summary>
|
||||||
|
internal static string CategoryPerformance {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("CategoryPerformance", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Updates.
|
||||||
|
/// </summary>
|
||||||
|
internal static string CategoryUpdates {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("CategoryUpdates", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Do you really want to remove this config?.
|
||||||
|
/// </summary>
|
||||||
|
internal static string ConfirmRemoval {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ConfirmRemoval", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Your bot name is empty!.
|
||||||
|
/// </summary>
|
||||||
|
internal static string ErrorBotNameEmpty {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ErrorBotNameEmpty", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to You can't remove global config!.
|
||||||
|
/// </summary>
|
||||||
|
internal static string ErrorCantRemoveGlobalConfig {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ErrorCantRemoveGlobalConfig", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to You can't rename global config!.
|
||||||
|
/// </summary>
|
||||||
|
internal static string ErrorCantRenameGlobalConfig {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ErrorCantRenameGlobalConfig", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Config directory could not be found!.
|
||||||
|
/// </summary>
|
||||||
|
internal static string ErrorConfigDirectoryNotFound {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ErrorConfigDirectoryNotFound", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Configured {0} property is invalid: {1}.
|
||||||
|
/// </summary>
|
||||||
|
internal static string ErrorConfigPropertyInvalid {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ErrorConfigPropertyInvalid", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to This name is already used!.
|
||||||
|
/// </summary>
|
||||||
|
internal static string ErrorNameAlreadyUsed {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ErrorNameAlreadyUsed", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to This name is reserved!.
|
||||||
|
/// </summary>
|
||||||
|
internal static string ErrorNameReserved {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ErrorNameReserved", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to {0} is null!.
|
||||||
|
/// </summary>
|
||||||
|
internal static string ErrorObjectIsNull {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ErrorObjectIsNull", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to You've attempted to use invalid ConfigGenerator version for your ASF!
|
||||||
|
///
|
||||||
|
///ASF: {0} | ConfigGenerator: {1}
|
||||||
|
///
|
||||||
|
///Please use matching ConfigGenerator version for your ASF binary. You'll be redirected to appropriate release....
|
||||||
|
/// </summary>
|
||||||
|
internal static string ErrorVersionMismatch {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ErrorVersionMismatch", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to New.
|
||||||
|
/// </summary>
|
||||||
|
internal static string New {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("New", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Removal.
|
||||||
|
/// </summary>
|
||||||
|
internal static string Removal {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Removal", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Rename.
|
||||||
|
/// </summary>
|
||||||
|
internal static string Rename {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Rename", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Excellent! Now your bot instance is enabled. In fact, that was everything you had to do in order to use this bot in ASF, but you might want to configure at least 2 more config properties: {0} and {1}. If you want to continue the tutorial, please do so. Remember to refer to the wiki if you're unsure how given property should be configured, or if you need additional help..
|
||||||
|
/// </summary>
|
||||||
|
internal static string TutorialBotFormEnabled {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("TutorialBotFormEnabled", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Your ASF is now ready! Simply launch ASF.exe binary and if you typed everything properly, you should notice that ASF is logging in and starts idling. If you have SteamGuard or two-factor authentication enabled, ASF might need to ask you for those credentials during runtime..
|
||||||
|
/// </summary>
|
||||||
|
internal static string TutorialBotFormReady {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("TutorialBotFormReady", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Congratulations! You've done everything that is needed in order to make ASF usable, that also finishes the tutorial that we prepared for you. It's highly recommended to read entire configuraton section on the wiki now, as ASF offers some really neat features for you to configure, such as offline farming or tuning ASF for using the most efficient idling algorithm for your account. All of that is optional though, and you're free to close our configurator whenever you wish. We hope that you'll enjoy the softwa [rest of string was truncated]";.
|
||||||
|
/// </summary>
|
||||||
|
internal static string TutorialFinished {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("TutorialFinished", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to At the top of the window you can notice currently loaded configs, and 3 extra buttons for removing [-], renaming [~] and adding new ones [+]..
|
||||||
|
/// </summary>
|
||||||
|
internal static string TutorialMainFormBotsManagementButtons {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("TutorialMainFormBotsManagementButtons", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Please note that all information about available config properties, including their description, purpose, and accepted values, is available on our GitHub wiki. Please use it as a reference..
|
||||||
|
/// </summary>
|
||||||
|
internal static string TutorialMainFormConfigurationWiki {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("TutorialMainFormConfigurationWiki", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to In the middle of the window you can configure all config properties that are available for you, for your currently selected config..
|
||||||
|
/// </summary>
|
||||||
|
internal static string TutorialMainFormConfigurationWindow {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("TutorialMainFormConfigurationWindow", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Alright, let's start configuring our ASF. Click on the plus [+] button in order to add your first steam account!.
|
||||||
|
/// </summary>
|
||||||
|
internal static string TutorialMainFormFinished {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("TutorialMainFormFinished", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to In the top right corner you can find help button [?] which will redirect you to ASF wiki for more information..
|
||||||
|
/// </summary>
|
||||||
|
internal static string TutorialMainFormHelpButton {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("TutorialMainFormHelpButton", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to This is the main ASF ConfigGenerator screen, it's really easy to use!.
|
||||||
|
/// </summary>
|
||||||
|
internal static string TutorialMainFormShown {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("TutorialMainFormShown", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to As you can see, your bot is now ready to be configured! First thing that you want to do is switching {0} property from false to true, try it!.
|
||||||
|
/// </summary>
|
||||||
|
internal static string TutorialNewBotFormFinished {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("TutorialNewBotFormFinished", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Good job! You'll be asked for your bot name now. A good example would be a nickname that you're using for the steam account you're about to configure, or any other name of your choice which will be easy for you to connect with the bot instance that is being configured..
|
||||||
|
/// </summary>
|
||||||
|
internal static string TutorialNewBotFormShown {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("TutorialNewBotFormShown", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Welcome! I noticed that you're using ASF ConfigGenerator for the first time, so let me help you a bit..
|
||||||
|
/// </summary>
|
||||||
|
internal static string TutorialStart {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("TutorialStart", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Please enter new bot name: .
|
||||||
|
/// </summary>
|
||||||
|
internal static string UserInputBotName {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("UserInputBotName", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to {0} has been set to: {1}.
|
||||||
|
/// </summary>
|
||||||
|
internal static string WarningConfigPropertyModified {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("WarningConfigPropertyModified", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
238
ConfigGenerator/Localization/CGStrings.resx
Normal file
238
ConfigGenerator/Localization/CGStrings.resx
Normal file
@@ -0,0 +1,238 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="CategoryAccess" xml:space="preserve">
|
||||||
|
<value>Access</value>
|
||||||
|
</data>
|
||||||
|
<data name="CategoryAdvanced" xml:space="preserve">
|
||||||
|
<value>Advanced</value>
|
||||||
|
</data>
|
||||||
|
<data name="CategoryCore" xml:space="preserve">
|
||||||
|
<value>Core</value>
|
||||||
|
</data>
|
||||||
|
<data name="CategoryDebugging" xml:space="preserve">
|
||||||
|
<value>Debugging</value>
|
||||||
|
</data>
|
||||||
|
<data name="CategoryPerformance" xml:space="preserve">
|
||||||
|
<value>Performance</value>
|
||||||
|
</data>
|
||||||
|
<data name="CategoryUpdates" xml:space="preserve">
|
||||||
|
<value>Updates</value>
|
||||||
|
</data>
|
||||||
|
<data name="ConfirmRemoval" xml:space="preserve">
|
||||||
|
<value>Do you really want to remove this config?</value>
|
||||||
|
</data>
|
||||||
|
<data name="ErrorBotNameEmpty" xml:space="preserve">
|
||||||
|
<value>Your bot name is empty!</value>
|
||||||
|
</data>
|
||||||
|
<data name="ErrorCantRemoveGlobalConfig" xml:space="preserve">
|
||||||
|
<value>You can't remove global config!</value>
|
||||||
|
</data>
|
||||||
|
<data name="ErrorCantRenameGlobalConfig" xml:space="preserve">
|
||||||
|
<value>You can't rename global config!</value>
|
||||||
|
</data>
|
||||||
|
<data name="ErrorConfigDirectoryNotFound" xml:space="preserve">
|
||||||
|
<value>Config directory could not be found!</value>
|
||||||
|
</data>
|
||||||
|
<data name="ErrorConfigPropertyInvalid" xml:space="preserve">
|
||||||
|
<value>Configured {0} property is invalid: {1}</value>
|
||||||
|
<comment>{0} will be replaced by name of the configuration property, {1} will be replaced by invalid value</comment>
|
||||||
|
</data>
|
||||||
|
<data name="ErrorNameAlreadyUsed" xml:space="preserve">
|
||||||
|
<value>This name is already used!</value>
|
||||||
|
<comment>This happens e.g. when user wants to create a bot with name that exists already</comment>
|
||||||
|
</data>
|
||||||
|
<data name="ErrorNameReserved" xml:space="preserve">
|
||||||
|
<value>This name is reserved!</value>
|
||||||
|
<comment>This happens e.g. when user wants to create a bot with reserved name, such as "ASF"</comment>
|
||||||
|
</data>
|
||||||
|
<data name="ErrorObjectIsNull" xml:space="preserve">
|
||||||
|
<value>{0} is null!</value>
|
||||||
|
<comment>{0} will be replaced by object's name</comment>
|
||||||
|
</data>
|
||||||
|
<data name="ErrorVersionMismatch" xml:space="preserve">
|
||||||
|
<value>You've attempted to use invalid ConfigGenerator version for your ASF!
|
||||||
|
|
||||||
|
ASF: {0} | ConfigGenerator: {1}
|
||||||
|
|
||||||
|
Please use matching ConfigGenerator version for your ASF binary. You'll be redirected to appropriate release...</value>
|
||||||
|
<comment>{0} will be replaced by ASF version (string), {1} will be replaced by ConfigGenerator version (string). Please note that this string should include newlines for formatting.</comment>
|
||||||
|
</data>
|
||||||
|
<data name="New" xml:space="preserve">
|
||||||
|
<value>New</value>
|
||||||
|
<comment>This is used as MessageBox title</comment>
|
||||||
|
</data>
|
||||||
|
<data name="Removal" xml:space="preserve">
|
||||||
|
<value>Removal</value>
|
||||||
|
<comment>This is used as MessageBox title</comment>
|
||||||
|
</data>
|
||||||
|
<data name="Rename" xml:space="preserve">
|
||||||
|
<value>Rename</value>
|
||||||
|
<comment>This is used as MessageBox title</comment>
|
||||||
|
</data>
|
||||||
|
<data name="TutorialBotFormEnabled" xml:space="preserve">
|
||||||
|
<value>Excellent! Now your bot instance is enabled. In fact, that was everything you had to do in order to use this bot in ASF, but you might want to configure at least 2 more config properties: {0} and {1}. If you want to continue the tutorial, please do so. Remember to refer to the wiki if you're unsure how given property should be configured, or if you need additional help.</value>
|
||||||
|
<comment>{0} will be replaced by "SteamLogin" configuration property, {1} will be replaced by "SteamPassword" configuration property</comment>
|
||||||
|
</data>
|
||||||
|
<data name="TutorialBotFormReady" xml:space="preserve">
|
||||||
|
<value>Your ASF is now ready! Simply launch ASF.exe binary and if you typed everything properly, you should notice that ASF is logging in and starts idling. If you have SteamGuard or two-factor authentication enabled, ASF might need to ask you for those credentials during runtime.</value>
|
||||||
|
</data>
|
||||||
|
<data name="TutorialFinished" xml:space="preserve">
|
||||||
|
<value>Congratulations! You've done everything that is needed in order to make ASF usable, that also finishes the tutorial that we prepared for you. It's highly recommended to read entire configuraton section on the wiki now, as ASF offers some really neat features for you to configure, such as offline farming or tuning ASF for using the most efficient idling algorithm for your account. All of that is optional though, and you're free to close our configurator whenever you wish. We hope that you'll enjoy the software that we coded for you!</value>
|
||||||
|
</data>
|
||||||
|
<data name="TutorialMainFormBotsManagementButtons" xml:space="preserve">
|
||||||
|
<value>At the top of the window you can notice currently loaded configs, and 3 extra buttons for removing [-], renaming [~] and adding new ones [+].</value>
|
||||||
|
<comment>If possible, try to keep visual representation of buttons: [-], [~] and [+]</comment>
|
||||||
|
</data>
|
||||||
|
<data name="TutorialMainFormConfigurationWiki" xml:space="preserve">
|
||||||
|
<value>Please note that all information about available config properties, including their description, purpose, and accepted values, is available on our GitHub wiki. Please use it as a reference.</value>
|
||||||
|
<comment>{0} will be replaced by URL to our wiki</comment>
|
||||||
|
</data>
|
||||||
|
<data name="TutorialMainFormConfigurationWindow" xml:space="preserve">
|
||||||
|
<value>In the middle of the window you can configure all config properties that are available for you, for your currently selected config.</value>
|
||||||
|
</data>
|
||||||
|
<data name="TutorialMainFormFinished" xml:space="preserve">
|
||||||
|
<value>Alright, let's start configuring our ASF. Click on the plus [+] button in order to add your first steam account!</value>
|
||||||
|
</data>
|
||||||
|
<data name="TutorialMainFormHelpButton" xml:space="preserve">
|
||||||
|
<value>In the top right corner you can find help button [?] which will redirect you to ASF wiki for more information.</value>
|
||||||
|
<comment>If possible, try to keep visual representation of [?] button</comment>
|
||||||
|
</data>
|
||||||
|
<data name="TutorialMainFormShown" xml:space="preserve">
|
||||||
|
<value>This is the main ASF ConfigGenerator screen, it's really easy to use!</value>
|
||||||
|
</data>
|
||||||
|
<data name="TutorialNewBotFormFinished" xml:space="preserve">
|
||||||
|
<value>As you can see, your bot is now ready to be configured! First thing that you want to do is switching {0} property from false to true, try it!</value>
|
||||||
|
<comment>{0} will be replaced by name of the configuration property ("Enabled")</comment>
|
||||||
|
</data>
|
||||||
|
<data name="TutorialNewBotFormShown" xml:space="preserve">
|
||||||
|
<value>Good job! You'll be asked for your bot name now. A good example would be a nickname that you're using for the steam account you're about to configure, or any other name of your choice which will be easy for you to connect with the bot instance that is being configured.</value>
|
||||||
|
</data>
|
||||||
|
<data name="TutorialStart" xml:space="preserve">
|
||||||
|
<value>Welcome! I noticed that you're using ASF ConfigGenerator for the first time, so let me help you a bit.</value>
|
||||||
|
</data>
|
||||||
|
<data name="UserInputBotName" xml:space="preserve">
|
||||||
|
<value>Please enter new bot name: </value>
|
||||||
|
<comment>Please note that this translation should end with space</comment>
|
||||||
|
</data>
|
||||||
|
<data name="WarningConfigPropertyModified" xml:space="preserve">
|
||||||
|
<value>{0} has been set to: {1}</value>
|
||||||
|
<comment>{0} will be replaced by name of the configuration property, {1} will be replaced by new value</comment>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
28
ConfigGenerator/LocalizedCategoryAttribute.cs
Normal file
28
ConfigGenerator/LocalizedCategoryAttribute.cs
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
using System.ComponentModel;
|
||||||
|
using ConfigGenerator.Localization;
|
||||||
|
|
||||||
|
namespace ConfigGenerator {
|
||||||
|
internal sealed class LocalizedCategoryAttribute : CategoryAttribute {
|
||||||
|
internal LocalizedCategoryAttribute(string key) : base(key) { }
|
||||||
|
|
||||||
|
protected override string GetLocalizedString(string value) {
|
||||||
|
switch (value) {
|
||||||
|
case "Access":
|
||||||
|
return CGStrings.CategoryAccess;
|
||||||
|
case "Advanced":
|
||||||
|
return CGStrings.CategoryAdvanced;
|
||||||
|
case "Core":
|
||||||
|
return '\t' + CGStrings.CategoryCore;
|
||||||
|
case "Debugging":
|
||||||
|
return CGStrings.CategoryDebugging;
|
||||||
|
case "Performance":
|
||||||
|
return CGStrings.CategoryPerformance;
|
||||||
|
case "Updates":
|
||||||
|
return CGStrings.CategoryUpdates;
|
||||||
|
default:
|
||||||
|
Logging.LogGenericWarning("Unknown value: " + value);
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -26,6 +26,7 @@ using System;
|
|||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using ConfigGenerator.Localization;
|
||||||
using ConfigGenerator.Properties;
|
using ConfigGenerator.Properties;
|
||||||
|
|
||||||
namespace ConfigGenerator {
|
namespace ConfigGenerator {
|
||||||
@@ -77,15 +78,11 @@ namespace ConfigGenerator {
|
|||||||
|
|
||||||
[SuppressMessage("ReSharper", "ExplicitCallerInfoArgument")]
|
[SuppressMessage("ReSharper", "ExplicitCallerInfoArgument")]
|
||||||
internal static void LogNullError(string nullObjectName, [CallerMemberName] string previousMethodName = null) {
|
internal static void LogNullError(string nullObjectName, [CallerMemberName] string previousMethodName = null) {
|
||||||
while (true) {
|
if (string.IsNullOrEmpty(nullObjectName)) {
|
||||||
if (string.IsNullOrEmpty(nullObjectName)) {
|
return;
|
||||||
nullObjectName = nameof(nullObjectName);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
LogGenericError(nullObjectName + " is null!", previousMethodName);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LogGenericError(string.Format(CGStrings.ErrorObjectIsNull, nullObjectName), previousMethodName);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void LogGenericError(string message, [CallerMemberName] string previousMethodName = null) {
|
private static void LogGenericError(string message, [CallerMemberName] string previousMethodName = null) {
|
||||||
|
|||||||
@@ -30,9 +30,11 @@ using System.Linq;
|
|||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using ArchiSteamFarm;
|
using ArchiSteamFarm;
|
||||||
|
using ConfigGenerator.Localization;
|
||||||
|
|
||||||
namespace ConfigGenerator {
|
namespace ConfigGenerator {
|
||||||
internal sealed partial class MainForm : Form {
|
internal sealed partial class MainForm : Form {
|
||||||
|
private const string GitHubWikiConfigurationURL = "https://github.com/" + SharedInfo.GithubRepo + "/wiki/Configuration";
|
||||||
private const byte ReservedTabs = 3;
|
private const byte ReservedTabs = 3;
|
||||||
|
|
||||||
private readonly TabPage NewTab = new TabPage { Text = @"+" };
|
private readonly TabPage NewTab = new TabPage { Text = @"+" };
|
||||||
@@ -53,9 +55,7 @@ namespace ConfigGenerator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
args.Cancel = true;
|
args.Cancel = true;
|
||||||
Tutorial.OnAction(Tutorial.EPhase.Help);
|
Process.Start(GitHubWikiConfigurationURL);
|
||||||
Process.Start("https://github.com/" + SharedInfo.GithubRepo + "/wiki/Configuration");
|
|
||||||
Tutorial.OnAction(Tutorial.EPhase.HelpFinished);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MainForm_Load(object sender, EventArgs args) {
|
private void MainForm_Load(object sender, EventArgs args) {
|
||||||
@@ -118,13 +118,13 @@ namespace ConfigGenerator {
|
|||||||
|
|
||||||
if (configPage == ASFTab) {
|
if (configPage == ASFTab) {
|
||||||
MainTab.SelectedTab = ASFTab;
|
MainTab.SelectedTab = ASFTab;
|
||||||
Logging.LogGenericErrorWithoutStacktrace("You can't remove global config!");
|
Logging.LogGenericErrorWithoutStacktrace(CGStrings.ErrorCantRemoveGlobalConfig);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MainTab.SelectedTab = configPage;
|
MainTab.SelectedTab = configPage;
|
||||||
|
|
||||||
if (DialogBox.YesNoBox("Removal", "Do you really want to remove this config?") != DialogResult.Yes) {
|
if (DialogBox.YesNoBox(CGStrings.Removal, CGStrings.ConfirmRemoval) != DialogResult.Yes) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,19 +140,19 @@ namespace ConfigGenerator {
|
|||||||
|
|
||||||
if (configPage == ASFTab) {
|
if (configPage == ASFTab) {
|
||||||
MainTab.SelectedTab = ASFTab;
|
MainTab.SelectedTab = ASFTab;
|
||||||
Logging.LogGenericErrorWithoutStacktrace("You can't rename global config!");
|
Logging.LogGenericErrorWithoutStacktrace(CGStrings.ErrorCantRenameGlobalConfig);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MainTab.SelectedTab = configPage;
|
MainTab.SelectedTab = configPage;
|
||||||
|
|
||||||
string input;
|
string input;
|
||||||
if (DialogBox.InputBox("Rename", "Your new bot name:", out input) != DialogResult.OK) {
|
if (DialogBox.InputBox(CGStrings.Rename, CGStrings.UserInputBotName, out input) != DialogResult.OK) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(input)) {
|
if (string.IsNullOrEmpty(input)) {
|
||||||
Logging.LogGenericErrorWithoutStacktrace("Your bot name is empty!");
|
Logging.LogGenericErrorWithoutStacktrace(CGStrings.ErrorBotNameEmpty);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -173,12 +173,12 @@ namespace ConfigGenerator {
|
|||||||
Tutorial.OnAction(Tutorial.EPhase.BotNickname);
|
Tutorial.OnAction(Tutorial.EPhase.BotNickname);
|
||||||
|
|
||||||
string input;
|
string input;
|
||||||
if (DialogBox.InputBox("New", "Your new bot name:", out input) != DialogResult.OK) {
|
if (DialogBox.InputBox(CGStrings.New, CGStrings.UserInputBotName, out input) != DialogResult.OK) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(input)) {
|
if (string.IsNullOrEmpty(input)) {
|
||||||
Logging.LogGenericErrorWithoutStacktrace("Your bot name is empty!");
|
Logging.LogGenericErrorWithoutStacktrace(CGStrings.ErrorBotNameEmpty);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -186,7 +186,7 @@ namespace ConfigGenerator {
|
|||||||
input = Regex.Replace(input, @"\s+", "");
|
input = Regex.Replace(input, @"\s+", "");
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(input)) {
|
if (string.IsNullOrEmpty(input)) {
|
||||||
Logging.LogGenericErrorWithoutStacktrace("Your bot name is empty!");
|
Logging.LogGenericErrorWithoutStacktrace(CGStrings.ErrorBotNameEmpty);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -194,12 +194,12 @@ namespace ConfigGenerator {
|
|||||||
case SharedInfo.ASF:
|
case SharedInfo.ASF:
|
||||||
case "example":
|
case "example":
|
||||||
case "minimal":
|
case "minimal":
|
||||||
Logging.LogGenericErrorWithoutStacktrace("This name is reserved!");
|
Logging.LogGenericErrorWithoutStacktrace(CGStrings.ErrorNameReserved);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ASFConfig.ASFConfigs.Select(config => Path.GetFileNameWithoutExtension(config.FilePath)).Any(fileNameWithoutExtension => (fileNameWithoutExtension == null) || fileNameWithoutExtension.Equals(input))) {
|
if (ASFConfig.ASFConfigs.Select(config => Path.GetFileNameWithoutExtension(config.FilePath)).Any(fileNameWithoutExtension => (fileNameWithoutExtension == null) || fileNameWithoutExtension.Equals(input))) {
|
||||||
Logging.LogGenericErrorWithoutStacktrace("Bot with such name exists already!");
|
Logging.LogGenericErrorWithoutStacktrace(CGStrings.ErrorNameAlreadyUsed);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -209,8 +209,6 @@ namespace ConfigGenerator {
|
|||||||
MainTab.TabPages.Insert(MainTab.TabPages.Count - ReservedTabs, newConfigPage);
|
MainTab.TabPages.Insert(MainTab.TabPages.Count - ReservedTabs, newConfigPage);
|
||||||
MainTab.SelectedTab = newConfigPage;
|
MainTab.SelectedTab = newConfigPage;
|
||||||
Tutorial.OnAction(Tutorial.EPhase.BotNicknameFinished);
|
Tutorial.OnAction(Tutorial.EPhase.BotNicknameFinished);
|
||||||
} else if (args.TabPage == ASFTab) {
|
|
||||||
Tutorial.OnAction(Tutorial.EPhase.GlobalConfigOpened);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ using System.Reflection;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using ArchiSteamFarm;
|
using ArchiSteamFarm;
|
||||||
|
using ConfigGenerator.Localization;
|
||||||
|
|
||||||
namespace ConfigGenerator {
|
namespace ConfigGenerator {
|
||||||
internal static class Program {
|
internal static class Program {
|
||||||
@@ -63,7 +64,7 @@ namespace ConfigGenerator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!Directory.Exists(SharedInfo.ConfigDirectory)) {
|
if (!Directory.Exists(SharedInfo.ConfigDirectory)) {
|
||||||
Logging.LogGenericErrorWithoutStacktrace("Config directory could not be found!");
|
Logging.LogGenericErrorWithoutStacktrace(CGStrings.ErrorConfigDirectoryNotFound);
|
||||||
Environment.Exit(1);
|
Environment.Exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,8 +81,7 @@ namespace ConfigGenerator {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Logging.LogGenericErrorWithoutStacktrace("Version of ASF and ConfigGenerator doesn't match!" + Environment.NewLine + "ASF version: " + asfVersion + " | ConfigGenerator version: " + cgVersion + Environment.NewLine + Environment.NewLine + "Please use ConfigGenerator from the same ASF release, I'll redirect you to appropriate ASF release...");
|
Logging.LogGenericErrorWithoutStacktrace(string.Format(CGStrings.ErrorVersionMismatch, asfVersion, cgVersion));
|
||||||
|
|
||||||
Process.Start("https://github.com/" + SharedInfo.GithubRepo + "/releases/tag/" + asfVersion);
|
Process.Start("https://github.com/" + SharedInfo.GithubRepo + "/releases/tag/" + asfVersion);
|
||||||
Environment.Exit(1);
|
Environment.Exit(1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,8 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
using ConfigGenerator.Localization;
|
||||||
|
|
||||||
namespace ConfigGenerator {
|
namespace ConfigGenerator {
|
||||||
internal static class Tutorial {
|
internal static class Tutorial {
|
||||||
internal static bool Enabled { private get; set; } = true;
|
internal static bool Enabled { private get; set; } = true;
|
||||||
@@ -35,50 +37,36 @@ namespace ConfigGenerator {
|
|||||||
|
|
||||||
switch (phase) {
|
switch (phase) {
|
||||||
case EPhase.Unknown:
|
case EPhase.Unknown:
|
||||||
|
case EPhase.Finished:
|
||||||
break;
|
break;
|
||||||
case EPhase.Start:
|
case EPhase.Start:
|
||||||
Logging.LogGenericInfoWithoutStacktrace("Hello there! I noticed that you're using ASF Config Generator for the first time, so let me help you a bit.");
|
Logging.LogGenericInfoWithoutStacktrace(CGStrings.TutorialStart);
|
||||||
break;
|
break;
|
||||||
case EPhase.Shown:
|
case EPhase.Shown:
|
||||||
Logging.LogGenericInfoWithoutStacktrace("You can now notice the main ASF Config Generator screen, it's really easy to use!");
|
Logging.LogGenericInfoWithoutStacktrace(CGStrings.TutorialMainFormShown);
|
||||||
Logging.LogGenericInfoWithoutStacktrace("At the top of the window you can notice currently loaded configs, and 3 extra buttons for removing, renaming and adding new ones.");
|
Logging.LogGenericInfoWithoutStacktrace(CGStrings.TutorialMainFormBotsManagementButtons);
|
||||||
Logging.LogGenericInfoWithoutStacktrace("In the middle of the window you will be able to configure all config properties that are available for you.");
|
Logging.LogGenericInfoWithoutStacktrace(CGStrings.TutorialMainFormConfigurationWindow);
|
||||||
|
|
||||||
if (!Runtime.IsRunningOnMono) {
|
if (!Runtime.IsRunningOnMono) {
|
||||||
Logging.LogGenericInfoWithoutStacktrace("In the top right corner you can find help button [?] which will redirect you to ASF wiki where you can find more information.");
|
Logging.LogGenericInfoWithoutStacktrace(CGStrings.TutorialMainFormHelpButton);
|
||||||
Logging.LogGenericInfoWithoutStacktrace("Please click the help button to continue.");
|
|
||||||
} else {
|
|
||||||
Logging.LogGenericInfoWithoutStacktrace("Please visit ASF wiki if you're in doubt - you can find more information there.");
|
|
||||||
Logging.LogGenericInfoWithoutStacktrace("Alright, let's start configuring our ASF. Click on the plus [+] button to add your first steam account to ASF!");
|
|
||||||
NextPhase = EPhase.HelpFinished;
|
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
case EPhase.Help:
|
Logging.LogGenericInfoWithoutStacktrace(CGStrings.TutorialMainFormConfigurationWiki);
|
||||||
Logging.LogGenericInfoWithoutStacktrace("Well done! On ASF wiki you can find detailed help about every config property you're going to configure in a moment.");
|
Logging.LogGenericInfoWithoutStacktrace(CGStrings.TutorialMainFormFinished);
|
||||||
break;
|
|
||||||
case EPhase.HelpFinished:
|
|
||||||
Logging.LogGenericInfoWithoutStacktrace("Alright, let's start configuring our ASF. Click on the plus [+] button to add your first steam account to ASF!");
|
|
||||||
break;
|
break;
|
||||||
case EPhase.BotNickname:
|
case EPhase.BotNickname:
|
||||||
Logging.LogGenericInfoWithoutStacktrace("Good job! You'll be asked for your bot name now. A good example would be a nickname that you're using for the steam account you're configuring right now, or any other name of your choice which will be easy for you to connect with bot instance that is being configured. Please don't use spaces in the name.");
|
Logging.LogGenericInfoWithoutStacktrace(CGStrings.TutorialNewBotFormShown);
|
||||||
break;
|
break;
|
||||||
case EPhase.BotNicknameFinished:
|
case EPhase.BotNicknameFinished:
|
||||||
Logging.LogGenericInfoWithoutStacktrace("As you can see your bot config is now ready to configure!");
|
Logging.LogGenericInfoWithoutStacktrace(string.Format(CGStrings.TutorialNewBotFormFinished, nameof(BotConfig.Enabled)));
|
||||||
Logging.LogGenericInfoWithoutStacktrace("First thing that you want to do is switching \"Enabled\" property from False to True, try it!");
|
|
||||||
break;
|
break;
|
||||||
case EPhase.BotEnabled:
|
case EPhase.BotEnabled:
|
||||||
Logging.LogGenericInfoWithoutStacktrace("Excellent! Now your bot instance is enabled. You need to configure at least 2 more config properties - \"SteamLogin\" and \"SteamPassword\". The tutorial will continue after you're done with it. Remember to visit ASF wiki by clicking the help icon if you're unsure how given property should be configured!");
|
Logging.LogGenericInfoWithoutStacktrace(string.Format(CGStrings.TutorialBotFormEnabled, nameof(BotConfig.SteamLogin), nameof(BotConfig.SteamPassword)));
|
||||||
break;
|
break;
|
||||||
case EPhase.BotReady:
|
case EPhase.BotReady:
|
||||||
Logging.LogGenericInfoWithoutStacktrace("If the data you put is proper, then your bot is ready to run! We need to do only one more thing now. Visit global ASF config, which is labelled as \"ASF\" on your config tab.");
|
Logging.LogGenericInfoWithoutStacktrace(CGStrings.TutorialBotFormReady);
|
||||||
break;
|
Logging.LogGenericInfoWithoutStacktrace(CGStrings.TutorialFinished);
|
||||||
case EPhase.GlobalConfigOpened:
|
|
||||||
Logging.LogGenericInfoWithoutStacktrace("While bot config affects only given bot instance you're configuring, global config affects whole ASF process, including all configured bots.");
|
|
||||||
Logging.LogGenericInfoWithoutStacktrace("In order to fully configure your ASF, I suggest to fill \"SteamOwnerID\" property. Remember, if you don't know what to put, help button is always there for you!");
|
|
||||||
break;
|
|
||||||
case EPhase.GlobalConfigReady:
|
|
||||||
Logging.LogGenericInfoWithoutStacktrace("Your ASF is now ready! Simply launch ASF process by double-clicking ASF.exe binary and if you did everything properly, you should now notice that ASF logs in on your account and starts farming. If you have SteamGuard or 2FA authorization enabled, ASF will ask you for that once");
|
|
||||||
Logging.LogGenericInfoWithoutStacktrace("Congratulations! You've done everything that is needed in order to make ASF \"work\". I highly recommend reading the wiki now, as ASF offers some really neat features for you to configure, such as offline farming or deciding upon most efficient cards farming algorithm.");
|
|
||||||
Logging.LogGenericInfoWithoutStacktrace("If you'd like to add another steam account for farming, simply click the plus [+] button and add another instance. You can also rename bots [~] and remove them [-]. Good luck!");
|
|
||||||
Enabled = false;
|
Enabled = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -90,14 +78,11 @@ namespace ConfigGenerator {
|
|||||||
Unknown,
|
Unknown,
|
||||||
Start,
|
Start,
|
||||||
Shown,
|
Shown,
|
||||||
Help,
|
|
||||||
HelpFinished,
|
|
||||||
BotNickname,
|
BotNickname,
|
||||||
BotNicknameFinished,
|
BotNicknameFinished,
|
||||||
BotEnabled,
|
BotEnabled,
|
||||||
BotReady,
|
BotReady,
|
||||||
GlobalConfigOpened,
|
Finished
|
||||||
GlobalConfigReady
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user