Compare commits

..

42 Commits

Author SHA1 Message Date
Łukasz Domeradzki
92d5b99e36 Merge pull request #446 from JustArchi/l10n
New Crowdin translations
2017-01-31 09:29:02 +01:00
JustArchi
a61a70c27e Misc 2017-01-31 09:08:53 +01:00
JustArchi
b148c41147 Another portion of pointless fixes for network issue debugging 2017-01-31 09:04:40 +01:00
Łukasz Domeradzki
25a5f76bac Translated 2017-01-31 04:52:39 +01:00
Łukasz Domeradzki
618cdb0fd1 Translated 2017-01-31 04:43:05 +01:00
Łukasz Domeradzki
cbfe1623e1 Translated 2017-01-31 04:32:44 +01:00
Łukasz Domeradzki
fe6ac73095 Translated 2017-01-31 04:22:34 +01:00
Łukasz Domeradzki
d559dc1fa2 Approved. Step name: Proofread 2017-01-31 04:22:29 +01:00
Łukasz Domeradzki
1ad7ff008d Translated 2017-01-31 04:12:51 +01:00
Łukasz Domeradzki
4bce3d4b19 Translated 2017-01-31 04:01:58 +01:00
Łukasz Domeradzki
5570a00a29 Translated 2017-01-31 03:52:15 +01:00
Łukasz Domeradzki
0f6546d56b Translated 2017-01-31 03:42:19 +01:00
Łukasz Domeradzki
3662a0b3de Translated 2017-01-31 03:33:00 +01:00
Łukasz Domeradzki
8cd6ae4b43 Translated 2017-01-31 03:32:54 +01:00
JustArchi
d183ec567a Bump 2017-01-31 03:30:54 +01:00
Łukasz Domeradzki
793c844416 Translated 2017-01-31 03:22:27 +01:00
Łukasz Domeradzki
61f1f25e24 Merge pull request #444 from JustArchi/l10n
New Crowdin translations
2017-01-31 03:14:47 +01:00
Łukasz Domeradzki
1d5c319359 Translated 2017-01-31 03:13:30 +01:00
JustArchi
372e71dcfd Closes #339
We should finally start using latest SK2 enhancements, some of which I added myself to official SK2 repo.
I hope this solves various network quirks that suddenly arrived either with Steam network, or ASF code changes regarding HeartBeats.
The .dll bin is self-compiled from latest SK2 repo, I hope I can drop it when SK2 arrives on nuget, but when it happens - not sure, while I want to test if this fixes particular issues that are happening lately.
2017-01-31 03:12:02 +01:00
Łukasz Domeradzki
2ce5428e94 Translated 2017-01-31 02:55:46 +01:00
Łukasz Domeradzki
17d999faba Translated 2017-01-31 02:47:51 +01:00
Łukasz Domeradzki
4842421fbc Translated 2017-01-31 02:39:19 +01:00
Łukasz Domeradzki
b1fa7d7d56 Translated 2017-01-31 02:34:30 +01:00
JustArchi
4f994792f8 Various small enhancements 2017-01-31 02:13:47 +01:00
Łukasz Domeradzki
e78412d9f2 Translated 2017-01-31 02:06:04 +01:00
JustArchi
64d3146ab2 Skip initial ASF check for debug builds 2017-01-31 02:05:08 +01:00
JustArchi
a31f734711 Fix logging to steam group chats 2017-01-31 02:00:46 +01:00
JustArchi
fc4574d143 Closes #445
Review https://github.com/JustArchi/ArchiSteamFarm/wiki/Logging for examples once I'm done updating the wiki
2017-01-31 01:10:01 +01:00
Łukasz Domeradzki
eb60cd9553 Translated 2017-01-30 23:07:31 +01:00
Łukasz Domeradzki
bd605abf00 Translated 2017-01-30 22:57:16 +01:00
Łukasz Domeradzki
53aa032df9 Translated 2017-01-30 22:57:07 +01:00
Łukasz Domeradzki
716d6a47c1 Translated 2017-01-30 22:47:18 +01:00
JustArchi
e4f4859eb4 Closes #445
ASF doesn't really make use of Balanced profile (as opposed to ArchiBoT), remove it leaving only MaxPerformance/MinMemoryUsage
2017-01-30 22:42:05 +01:00
Łukasz Domeradzki
0481ba3123 Translated 2017-01-30 22:37:24 +01:00
Łukasz Domeradzki
52079ec15b Translated 2017-01-30 22:37:19 +01:00
Łukasz Domeradzki
65e2d97434 Translated 2017-01-30 22:28:00 +01:00
Łukasz Domeradzki
b2720e112c New translations 2017-01-30 22:27:55 +01:00
Łukasz Domeradzki
04773c48c1 Translated 2017-01-30 22:27:52 +01:00
JustArchi
8691050ed7 Closes #412
!*all commands are out - since we already have reserved 'ASF' botName, use this for targetting all bots in the process.
Also first parts of #445
2017-01-30 22:17:25 +01:00
Łukasz Domeradzki
da4a595e58 Translated 2017-01-30 21:49:26 +01:00
Łukasz Domeradzki
218883c45c Translated 2017-01-30 20:04:24 +01:00
JustArchi
5253528551 Bump 2017-01-30 18:20:55 +01:00
36 changed files with 9320 additions and 467 deletions

View File

@@ -37,15 +37,21 @@ namespace ArchiSteamFarm {
internal static class ASF {
private const byte AutoUpdatePeriodInHours = 24;
internal static readonly ArchiLogger ArchiLogger = new ArchiLogger(SharedInfo.ASF);
private static readonly ConcurrentDictionary<Bot, DateTime> LastWriteTimes = new ConcurrentDictionary<Bot, DateTime>();
private static Timer AutoUpdatesTimer;
private static FileSystemWatcher FileSystemWatcher;
internal static async Task CheckForUpdate(bool updateOverride = false) {
if (Debugging.IsDebugBuild && !updateOverride) {
return;
}
string exeFile = Assembly.GetEntryAssembly().Location;
if (string.IsNullOrEmpty(exeFile)) {
Program.ArchiLogger.LogNullError(nameof(exeFile));
ArchiLogger.LogNullError(nameof(exeFile));
return;
}
@@ -59,8 +65,8 @@ namespace ArchiSteamFarm {
try {
File.Delete(oldExeFile);
} catch (Exception e) {
Program.ArchiLogger.LogGenericException(e);
Program.ArchiLogger.LogGenericError(string.Format(Strings.ErrorRemovingOldBinary, oldExeFile));
ArchiLogger.LogGenericException(e);
ArchiLogger.LogGenericError(string.Format(Strings.ErrorRemovingOldBinary, oldExeFile));
}
}
@@ -76,7 +82,7 @@ namespace ArchiSteamFarm {
TimeSpan.FromHours(AutoUpdatePeriodInHours) // Period
);
Program.ArchiLogger.LogGenericInfo(string.Format(Strings.AutoUpdateCheckInfo, AutoUpdatePeriodInHours));
ArchiLogger.LogGenericInfo(string.Format(Strings.AutoUpdateCheckInfo, AutoUpdatePeriodInHours));
}
string releaseURL = SharedInfo.GithubReleaseURL;
@@ -84,20 +90,20 @@ namespace ArchiSteamFarm {
releaseURL += "/latest";
}
Program.ArchiLogger.LogGenericInfo(Strings.UpdateCheckingNewVersion);
ArchiLogger.LogGenericInfo(Strings.UpdateCheckingNewVersion);
GitHub.ReleaseResponse releaseResponse;
if (Program.GlobalConfig.UpdateChannel == GlobalConfig.EUpdateChannel.Stable) {
releaseResponse = await Program.WebBrowser.UrlGetToJsonResultRetry<GitHub.ReleaseResponse>(releaseURL).ConfigureAwait(false);
if (releaseResponse == null) {
Program.ArchiLogger.LogGenericWarning(Strings.ErrorUpdateCheckFailed);
ArchiLogger.LogGenericWarning(Strings.ErrorUpdateCheckFailed);
return;
}
} else {
List<GitHub.ReleaseResponse> releases = await Program.WebBrowser.UrlGetToJsonResultRetry<List<GitHub.ReleaseResponse>>(releaseURL).ConfigureAwait(false);
if ((releases == null) || (releases.Count == 0)) {
Program.ArchiLogger.LogGenericWarning(Strings.ErrorUpdateCheckFailed);
ArchiLogger.LogGenericWarning(Strings.ErrorUpdateCheckFailed);
return;
}
@@ -105,32 +111,32 @@ namespace ArchiSteamFarm {
}
if (string.IsNullOrEmpty(releaseResponse.Tag)) {
Program.ArchiLogger.LogGenericWarning(Strings.ErrorUpdateCheckFailed);
ArchiLogger.LogGenericWarning(Strings.ErrorUpdateCheckFailed);
return;
}
Version newVersion = new Version(releaseResponse.Tag);
Program.ArchiLogger.LogGenericInfo(string.Format(Strings.UpdateVersionInfo, SharedInfo.Version, newVersion));
ArchiLogger.LogGenericInfo(string.Format(Strings.UpdateVersionInfo, SharedInfo.Version, newVersion));
if (SharedInfo.Version.CompareTo(newVersion) >= 0) { // If local version is the same or newer than remote version
return;
}
if (!updateOverride && !Program.GlobalConfig.AutoUpdates) {
Program.ArchiLogger.LogGenericInfo(Strings.UpdateNewVersionAvailable);
ArchiLogger.LogGenericInfo(Strings.UpdateNewVersionAvailable);
await Task.Delay(5000).ConfigureAwait(false);
return;
}
if (File.Exists(oldExeFile)) {
Program.ArchiLogger.LogGenericError(string.Format(Strings.ErrorRemovingOldBinary, oldExeFile));
ArchiLogger.LogGenericError(string.Format(Strings.ErrorRemovingOldBinary, oldExeFile));
return;
}
// Auto update logic starts here
if (releaseResponse.Assets == null) {
Program.ArchiLogger.LogGenericWarning(Strings.ErrorUpdateNoAssets);
ArchiLogger.LogGenericWarning(Strings.ErrorUpdateNoAssets);
return;
}
@@ -138,16 +144,16 @@ namespace ArchiSteamFarm {
GitHub.ReleaseResponse.Asset binaryAsset = releaseResponse.Assets.FirstOrDefault(asset => !string.IsNullOrEmpty(asset.Name) && asset.Name.Equals(exeFileName, StringComparison.OrdinalIgnoreCase));
if (binaryAsset == null) {
Program.ArchiLogger.LogGenericWarning(Strings.ErrorUpdateNoAssetForThisBinary);
ArchiLogger.LogGenericWarning(Strings.ErrorUpdateNoAssetForThisBinary);
return;
}
if (string.IsNullOrEmpty(binaryAsset.DownloadURL)) {
Program.ArchiLogger.LogNullError(nameof(binaryAsset.DownloadURL));
ArchiLogger.LogNullError(nameof(binaryAsset.DownloadURL));
return;
}
Program.ArchiLogger.LogGenericInfo(Strings.UpdateDownloadingNewVersion);
ArchiLogger.LogGenericInfo(Strings.UpdateDownloadingNewVersion);
byte[] result = await Program.WebBrowser.UrlGetToBytesRetry(binaryAsset.DownloadURL).ConfigureAwait(false);
if (result == null) {
@@ -160,7 +166,7 @@ namespace ArchiSteamFarm {
try {
File.WriteAllBytes(newExeFile, result);
} catch (Exception e) {
Program.ArchiLogger.LogGenericException(e);
ArchiLogger.LogGenericException(e);
return;
}
@@ -168,7 +174,7 @@ namespace ArchiSteamFarm {
try {
File.Move(exeFile, oldExeFile);
} catch (Exception e) {
Program.ArchiLogger.LogGenericException(e);
ArchiLogger.LogGenericException(e);
try {
// Cleanup
File.Delete(newExeFile);
@@ -182,7 +188,7 @@ namespace ArchiSteamFarm {
try {
File.Move(newExeFile, exeFile);
} catch (Exception e) {
Program.ArchiLogger.LogGenericException(e);
ArchiLogger.LogGenericException(e);
try {
// Cleanup
File.Move(oldExeFile, exeFile);
@@ -193,7 +199,7 @@ namespace ArchiSteamFarm {
return;
}
Program.ArchiLogger.LogGenericInfo(Strings.UpdateFinished);
ArchiLogger.LogGenericInfo(Strings.UpdateFinished);
await RestartOrExit().ConfigureAwait(false);
}
@@ -217,7 +223,7 @@ namespace ArchiSteamFarm {
}
if (Bot.Bots.Count == 0) {
Program.ArchiLogger.LogGenericWarning(Strings.ErrorNoBotsDefined);
ArchiLogger.LogGenericWarning(Strings.ErrorNoBotsDefined);
}
}
@@ -240,7 +246,7 @@ namespace ArchiSteamFarm {
private static async Task CreateBot(string botName) {
if (string.IsNullOrEmpty(botName)) {
Program.ArchiLogger.LogNullError(nameof(botName));
ArchiLogger.LogNullError(nameof(botName));
return;
}
@@ -260,7 +266,7 @@ namespace ArchiSteamFarm {
private static async void OnChanged(object sender, FileSystemEventArgs e) {
if ((sender == null) || (e == null)) {
Program.ArchiLogger.LogNullError(nameof(sender) + " || " + nameof(e));
ArchiLogger.LogNullError(nameof(sender) + " || " + nameof(e));
return;
}
@@ -270,7 +276,7 @@ namespace ArchiSteamFarm {
}
if (botName.Equals(SharedInfo.ASF)) {
Program.ArchiLogger.LogGenericInfo(Strings.GlobalConfigChanged);
ArchiLogger.LogGenericInfo(Strings.GlobalConfigChanged);
await RestartOrExit().ConfigureAwait(false);
return;
}
@@ -312,7 +318,7 @@ namespace ArchiSteamFarm {
private static void OnCreated(object sender, FileSystemEventArgs e) {
if ((sender == null) || (e == null)) {
Program.ArchiLogger.LogNullError(nameof(sender) + " || " + nameof(e));
ArchiLogger.LogNullError(nameof(sender) + " || " + nameof(e));
return;
}
@@ -326,7 +332,7 @@ namespace ArchiSteamFarm {
private static void OnDeleted(object sender, FileSystemEventArgs e) {
if ((sender == null) || (e == null)) {
Program.ArchiLogger.LogNullError(nameof(sender) + " || " + nameof(e));
ArchiLogger.LogNullError(nameof(sender) + " || " + nameof(e));
return;
}
@@ -336,7 +342,7 @@ namespace ArchiSteamFarm {
}
if (botName.Equals(SharedInfo.ASF)) {
Program.ArchiLogger.LogGenericError(Strings.ErrorGlobalConfigRemoved);
ArchiLogger.LogGenericError(Strings.ErrorGlobalConfigRemoved);
Program.Exit(1);
return;
}
@@ -349,7 +355,7 @@ namespace ArchiSteamFarm {
private static void OnRenamed(object sender, RenamedEventArgs e) {
if ((sender == null) || (e == null)) {
Program.ArchiLogger.LogNullError(nameof(sender) + " || " + nameof(e));
ArchiLogger.LogNullError(nameof(sender) + " || " + nameof(e));
return;
}
@@ -359,7 +365,7 @@ namespace ArchiSteamFarm {
}
if (oldBotName.Equals(SharedInfo.ASF)) {
Program.ArchiLogger.LogGenericError(Strings.ErrorGlobalConfigRemoved);
ArchiLogger.LogGenericError(Strings.ErrorGlobalConfigRemoved);
Program.Exit(1);
return;
}
@@ -379,11 +385,11 @@ namespace ArchiSteamFarm {
private static async Task RestartOrExit() {
if (Program.GlobalConfig.AutoRestart) {
Program.ArchiLogger.LogGenericInfo(Strings.Restarting);
ArchiLogger.LogGenericInfo(Strings.Restarting);
await Task.Delay(5000).ConfigureAwait(false);
Program.Restart();
} else {
Program.ArchiLogger.LogGenericInfo(Strings.Exiting);
ArchiLogger.LogGenericInfo(Strings.Exiting);
await Task.Delay(5000).ConfigureAwait(false);
Program.Exit();
}

View File

@@ -395,14 +395,14 @@ namespace ArchiSteamFarm {
PurchaseResult = (EPurchaseResult) msg.purchase_result_details;
if (msg.purchase_receipt_info == null) {
Program.ArchiLogger.LogNullError(nameof(msg.purchase_receipt_info));
ASF.ArchiLogger.LogNullError(nameof(msg.purchase_receipt_info));
return;
}
KeyValue receiptInfo = new KeyValue();
using (MemoryStream ms = new MemoryStream(msg.purchase_receipt_info)) {
if (!receiptInfo.TryReadAsBinary(ms)) {
Program.ArchiLogger.LogNullError(nameof(ms));
ASF.ArchiLogger.LogNullError(nameof(ms));
return;
}
}
@@ -420,14 +420,14 @@ namespace ArchiSteamFarm {
// We'll use ItemAppID in this case
packageID = lineItem["ItemAppID"].AsUnsignedInteger();
if (packageID == 0) {
Program.ArchiLogger.LogNullError(nameof(packageID));
ASF.ArchiLogger.LogNullError(nameof(packageID));
return;
}
}
string gameName = lineItem["ItemDescription"].Value;
if (string.IsNullOrEmpty(gameName)) {
Program.ArchiLogger.LogNullError(nameof(gameName));
ASF.ArchiLogger.LogNullError(nameof(gameName));
return;
}

View File

@@ -92,8 +92,8 @@
<Private>True</Private>
</Reference>
<Reference Include="SteamKit2, Version=1.8.0.26737, Culture=neutral, PublicKeyToken=ed3ce47ed5aad940, processorArchitecture=MSIL">
<HintPath>..\packages\SteamKit2.1.8.0\lib\net45\SteamKit2.dll</HintPath>
<Private>True</Private>
<SpecificVersion>False</SpecificVersion>
<HintPath>lib\SteamKit2.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration.Install" />
@@ -144,6 +144,7 @@
<Compile Include="SharedInfo.cs" />
<Compile Include="Statistics.cs" />
<Compile Include="SteamSaleEvent.cs" />
<Compile Include="SteamTarget.cs" />
<Compile Include="Trading.cs" />
<Compile Include="Utilities.cs" />
<Compile Include="WCF.cs" />

View File

@@ -1142,7 +1142,7 @@ namespace ArchiSteamFarm {
private static uint GetAppIDFromMarketHashName(string hashName) {
if (string.IsNullOrEmpty(hashName)) {
Program.ArchiLogger.LogNullError(nameof(hashName));
ASF.ArchiLogger.LogNullError(nameof(hashName));
return 0;
}
@@ -1157,7 +1157,7 @@ namespace ArchiSteamFarm {
private static Steam.Item.EType GetItemType(string name) {
if (string.IsNullOrEmpty(name)) {
Program.ArchiLogger.LogNullError(nameof(name));
ASF.ArchiLogger.LogNullError(nameof(name));
return Steam.Item.EType.Unknown;
}
@@ -1194,32 +1194,32 @@ namespace ArchiSteamFarm {
private static bool ParseItems(Dictionary<ulong, Tuple<uint, Steam.Item.EType>> descriptions, List<KeyValue> input, HashSet<Steam.Item> output) {
if ((descriptions == null) || (input == null) || (input.Count == 0) || (output == null)) {
Program.ArchiLogger.LogNullError(nameof(descriptions) + " || " + nameof(input) + " || " + nameof(output));
ASF.ArchiLogger.LogNullError(nameof(descriptions) + " || " + nameof(input) + " || " + nameof(output));
return false;
}
foreach (KeyValue item in input) {
uint appID = item["appid"].AsUnsignedInteger();
if (appID == 0) {
Program.ArchiLogger.LogNullError(nameof(appID));
ASF.ArchiLogger.LogNullError(nameof(appID));
return false;
}
ulong contextID = item["contextid"].AsUnsignedLong();
if (contextID == 0) {
Program.ArchiLogger.LogNullError(nameof(contextID));
ASF.ArchiLogger.LogNullError(nameof(contextID));
return false;
}
ulong classID = item["classid"].AsUnsignedLong();
if (classID == 0) {
Program.ArchiLogger.LogNullError(nameof(classID));
ASF.ArchiLogger.LogNullError(nameof(classID));
return false;
}
uint amount = item["amount"].AsUnsignedInteger();
if (amount == 0) {
Program.ArchiLogger.LogNullError(nameof(amount));
ASF.ArchiLogger.LogNullError(nameof(amount));
return false;
}

File diff suppressed because it is too large Load Diff

View File

@@ -124,7 +124,7 @@ namespace ArchiSteamFarm {
internal static BotConfig Load(string filePath) {
if (string.IsNullOrEmpty(filePath)) {
Program.ArchiLogger.LogNullError(nameof(filePath));
ASF.ArchiLogger.LogNullError(nameof(filePath));
return null;
}
@@ -137,12 +137,12 @@ namespace ArchiSteamFarm {
try {
botConfig = JsonConvert.DeserializeObject<BotConfig>(File.ReadAllText(filePath));
} catch (Exception e) {
Program.ArchiLogger.LogGenericException(e);
ASF.ArchiLogger.LogGenericException(e);
return null;
}
if (botConfig == null) {
Program.ArchiLogger.LogNullError(nameof(botConfig));
ASF.ArchiLogger.LogNullError(nameof(botConfig));
return null;
}
@@ -158,7 +158,7 @@ namespace ArchiSteamFarm {
return botConfig;
}
Program.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningTooManyGamesToPlay, ArchiHandler.MaxGamesPlayedConcurrently, nameof(botConfig.GamesPlayedWhileIdle)));
ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningTooManyGamesToPlay, ArchiHandler.MaxGamesPlayedConcurrently, nameof(botConfig.GamesPlayedWhileIdle)));
HashSet<uint> validGames = new HashSet<uint>(botConfig.GamesPlayedWhileIdle.Take(ArchiHandler.MaxGamesPlayedConcurrently));
botConfig.GamesPlayedWhileIdle.IntersectWith(validGames);

View File

@@ -82,7 +82,7 @@ namespace ArchiSteamFarm {
internal static BotDatabase Load(string filePath) {
if (string.IsNullOrEmpty(filePath)) {
Program.ArchiLogger.LogNullError(nameof(filePath));
ASF.ArchiLogger.LogNullError(nameof(filePath));
return null;
}
@@ -95,12 +95,12 @@ namespace ArchiSteamFarm {
try {
botDatabase = JsonConvert.DeserializeObject<BotDatabase>(File.ReadAllText(filePath));
} catch (Exception e) {
Program.ArchiLogger.LogGenericException(e);
ASF.ArchiLogger.LogGenericException(e);
return null;
}
if (botDatabase == null) {
Program.ArchiLogger.LogNullError(nameof(botDatabase));
ASF.ArchiLogger.LogNullError(nameof(botDatabase));
return null;
}
@@ -111,7 +111,7 @@ namespace ArchiSteamFarm {
internal void Save() {
string json = JsonConvert.SerializeObject(this);
if (string.IsNullOrEmpty(json)) {
Program.ArchiLogger.LogNullError(nameof(json));
ASF.ArchiLogger.LogNullError(nameof(json));
return;
}
@@ -121,7 +121,7 @@ namespace ArchiSteamFarm {
File.WriteAllText(FilePath, json);
break;
} catch (Exception e) {
Program.ArchiLogger.LogGenericException(e);
ASF.ArchiLogger.LogGenericException(e);
}
Thread.Sleep(1000);

View File

@@ -33,7 +33,7 @@ namespace ArchiSteamFarm.CMsgs {
void ISteamSerializable.Deserialize(Stream stream) {
if (stream == null) {
Program.ArchiLogger.LogNullError(nameof(stream));
ASF.ArchiLogger.LogNullError(nameof(stream));
return;
}
@@ -46,7 +46,7 @@ namespace ArchiSteamFarm.CMsgs {
void ISteamSerializable.Serialize(Stream stream) {
if (stream == null) {
Program.ArchiLogger.LogNullError(nameof(stream));
ASF.ArchiLogger.LogNullError(nameof(stream));
return;
}

View File

@@ -320,7 +320,7 @@ namespace ArchiSteamFarm {
return;
}
HashSet<Task> extraTasks = new HashSet<Task>();
HashSet<Task> backgroundTasks = new HashSet<Task>();
foreach (HtmlNode htmlNode in htmlNodes) {
HtmlNode appIDNode = htmlNode.SelectSingleNode(".//div[@class='card_drop_info_dialog']");
@@ -488,12 +488,22 @@ namespace ArchiSteamFarm {
if (cardsRemaining > 0) {
GamesToFarm.Add(new Game(appID, name, hours, cardsRemaining));
} else {
extraTasks.Add(CheckGame(appID, name, hours));
Task task = CheckGame(appID, name, hours);
switch (Program.GlobalConfig.OptimizationMode) {
case GlobalConfig.EOptimizationMode.MinMemoryUsage:
await task.ConfigureAwait(false);
break;
default:
backgroundTasks.Add(task);
break;
}
}
}
// If we have any pending tasks, wait for them
await Task.WhenAll(extraTasks).ConfigureAwait(false);
// If we have any background tasks, wait for them
if (backgroundTasks.Count > 0) {
await Task.WhenAll(backgroundTasks).ConfigureAwait(false);
}
}
private async Task CheckPage(byte page) {
@@ -689,18 +699,43 @@ namespace ArchiSteamFarm {
GamesToFarm.ClearAndTrim();
List<Task> tasks = new List<Task>(maxPages - 1) { CheckPage(htmlDocument) };
List<Task> backgroundTasks = new List<Task>();
Task task = CheckPage(htmlDocument);
switch (Program.GlobalConfig.OptimizationMode) {
case GlobalConfig.EOptimizationMode.MinMemoryUsage:
await task.ConfigureAwait(false);
break;
default:
backgroundTasks.Add(task);
break;
}
if (maxPages > 1) {
Bot.ArchiLogger.LogGenericInfo(Strings.CheckingOtherBadgePages);
for (byte page = 2; page <= maxPages; page++) {
byte currentPage = page; // We need a copy of variable being passed when in for loops, as loop will proceed before task is launched
tasks.Add(CheckPage(currentPage));
switch (Program.GlobalConfig.OptimizationMode) {
case GlobalConfig.EOptimizationMode.MinMemoryUsage:
for (byte page = 2; page <= maxPages; page++) {
await CheckPage(page).ConfigureAwait(false);
}
break;
default:
for (byte page = 2; page <= maxPages; page++) {
// We need a copy of variable being passed when in for loops, as loop will proceed before our task is launched
byte currentPage = page;
backgroundTasks.Add(CheckPage(currentPage));
}
break;
}
}
await Task.WhenAll(tasks).ConfigureAwait(false);
if (backgroundTasks.Count > 0) {
await Task.WhenAll(backgroundTasks).ConfigureAwait(false);
}
SortGamesToFarm();
return GamesToFarm.Count > 0;
}

View File

@@ -32,7 +32,7 @@ namespace ArchiSteamFarm {
internal static string Decrypt(ECryptoMethod cryptoMethod, string encrypted) {
if (string.IsNullOrEmpty(encrypted)) {
Program.ArchiLogger.LogNullError(nameof(encrypted));
ASF.ArchiLogger.LogNullError(nameof(encrypted));
return null;
}
@@ -50,7 +50,7 @@ namespace ArchiSteamFarm {
internal static string Encrypt(ECryptoMethod cryptoMethod, string decrypted) {
if (string.IsNullOrEmpty(decrypted)) {
Program.ArchiLogger.LogNullError(nameof(decrypted));
ASF.ArchiLogger.LogNullError(nameof(decrypted));
return null;
}
@@ -68,7 +68,7 @@ namespace ArchiSteamFarm {
internal static void SetEncryptionKey(string key) {
if (string.IsNullOrEmpty(key)) {
Program.ArchiLogger.LogNullError(nameof(key));
ASF.ArchiLogger.LogNullError(nameof(key));
return;
}
@@ -77,7 +77,7 @@ namespace ArchiSteamFarm {
private static string DecryptAES(string encrypted) {
if (string.IsNullOrEmpty(encrypted)) {
Program.ArchiLogger.LogNullError(nameof(encrypted));
ASF.ArchiLogger.LogNullError(nameof(encrypted));
return null;
}
@@ -91,14 +91,14 @@ namespace ArchiSteamFarm {
decryptedData = SteamKit2.CryptoHelper.SymmetricDecrypt(decryptedData, key);
return Encoding.UTF8.GetString(decryptedData);
} catch (Exception e) {
Program.ArchiLogger.LogGenericException(e);
ASF.ArchiLogger.LogGenericException(e);
return null;
}
}
private static string DecryptProtectedDataForCurrentUser(string encrypted) {
if (string.IsNullOrEmpty(encrypted)) {
Program.ArchiLogger.LogNullError(nameof(encrypted));
ASF.ArchiLogger.LogNullError(nameof(encrypted));
return null;
}
@@ -111,14 +111,14 @@ namespace ArchiSteamFarm {
return Encoding.UTF8.GetString(decryptedData);
} catch (Exception e) {
Program.ArchiLogger.LogGenericException(e);
ASF.ArchiLogger.LogGenericException(e);
return null;
}
}
private static string EncryptAES(string decrypted) {
if (string.IsNullOrEmpty(decrypted)) {
Program.ArchiLogger.LogNullError(nameof(decrypted));
ASF.ArchiLogger.LogNullError(nameof(decrypted));
return null;
}
@@ -132,14 +132,14 @@ namespace ArchiSteamFarm {
encryptedData = SteamKit2.CryptoHelper.SymmetricEncrypt(encryptedData, key);
return Convert.ToBase64String(encryptedData);
} catch (Exception e) {
Program.ArchiLogger.LogGenericException(e);
ASF.ArchiLogger.LogGenericException(e);
return null;
}
}
private static string EncryptProtectedDataForCurrentUser(string decrypted) {
if (string.IsNullOrEmpty(decrypted)) {
Program.ArchiLogger.LogNullError(nameof(decrypted));
ASF.ArchiLogger.LogNullError(nameof(decrypted));
return null;
}
@@ -152,7 +152,7 @@ namespace ArchiSteamFarm {
return Convert.ToBase64String(encryptedData);
} catch (Exception e) {
Program.ArchiLogger.LogGenericException(e);
ASF.ArchiLogger.LogGenericException(e);
return null;
}
}

View File

@@ -35,14 +35,16 @@ namespace ArchiSteamFarm {
internal static readonly bool IsDebugBuild = false;
#endif
internal static bool IsUserDebugging => IsDebugBuild || Program.GlobalConfig.Debug;
internal sealed class DebugListener : IDebugListener {
public void WriteLine(string category, string msg) {
if (string.IsNullOrEmpty(category) && string.IsNullOrEmpty(msg)) {
Program.ArchiLogger.LogNullError(nameof(category) + " && " + nameof(msg));
ASF.ArchiLogger.LogNullError(nameof(category) + " && " + nameof(msg));
return;
}
Program.ArchiLogger.LogGenericDebug(category + " | " + msg);
ASF.ArchiLogger.LogGenericDebug(category + " | " + msg);
}
}
}

View File

@@ -34,7 +34,7 @@ namespace ArchiSteamFarm {
return;
}
Program.ArchiLogger.LogGenericInfo(Strings.NoBotsAreRunning);
ASF.ArchiLogger.LogGenericInfo(Strings.NoBotsAreRunning);
await Task.Delay(5000).ConfigureAwait(false);
Program.Exit();
}

View File

@@ -87,6 +87,9 @@ namespace ArchiSteamFarm {
[JsonProperty(Required = Required.DisallowNull)]
internal readonly byte MaxTradeHoldDuration = 15;
[JsonProperty(Required = Required.DisallowNull)]
internal readonly EOptimizationMode OptimizationMode = EOptimizationMode.MaxPerformance;
[JsonProperty(Required = Required.DisallowNull)]
internal readonly bool Statistics = true;
@@ -110,7 +113,7 @@ namespace ArchiSteamFarm {
internal static GlobalConfig Load(string filePath) {
if (string.IsNullOrEmpty(filePath)) {
Program.ArchiLogger.LogNullError(nameof(filePath));
ASF.ArchiLogger.LogNullError(nameof(filePath));
return null;
}
@@ -123,12 +126,12 @@ namespace ArchiSteamFarm {
try {
globalConfig = JsonConvert.DeserializeObject<GlobalConfig>(File.ReadAllText(filePath));
} catch (Exception e) {
Program.ArchiLogger.LogGenericException(e);
ASF.ArchiLogger.LogGenericException(e);
return null;
}
if (globalConfig == null) {
Program.ArchiLogger.LogNullError(nameof(globalConfig));
ASF.ArchiLogger.LogNullError(nameof(globalConfig));
return null;
}
@@ -139,24 +142,24 @@ namespace ArchiSteamFarm {
case ProtocolType.Udp:
break;
default:
Program.ArchiLogger.LogGenericError(string.Format(Strings.ErrorConfigPropertyInvalid, nameof(globalConfig.SteamProtocol), globalConfig.SteamProtocol));
ASF.ArchiLogger.LogGenericError(string.Format(Strings.ErrorConfigPropertyInvalid, nameof(globalConfig.SteamProtocol), globalConfig.SteamProtocol));
return null;
}
// User might not know what he's doing
// Ensure that he can't screw core ASF variables
if (globalConfig.MaxFarmingTime == 0) {
Program.ArchiLogger.LogGenericError(string.Format(Strings.ErrorConfigPropertyInvalid, nameof(globalConfig.MaxFarmingTime), globalConfig.MaxFarmingTime));
ASF.ArchiLogger.LogGenericError(string.Format(Strings.ErrorConfigPropertyInvalid, nameof(globalConfig.MaxFarmingTime), globalConfig.MaxFarmingTime));
return null;
}
if (globalConfig.FarmingDelay == 0) {
Program.ArchiLogger.LogGenericError(string.Format(Strings.ErrorConfigPropertyInvalid, nameof(globalConfig.FarmingDelay), globalConfig.FarmingDelay));
ASF.ArchiLogger.LogGenericError(string.Format(Strings.ErrorConfigPropertyInvalid, nameof(globalConfig.FarmingDelay), globalConfig.FarmingDelay));
return null;
}
if (globalConfig.ConnectionTimeout == 0) {
Program.ArchiLogger.LogGenericError(string.Format(Strings.ErrorConfigPropertyInvalid, nameof(globalConfig.ConnectionTimeout), globalConfig.ConnectionTimeout));
ASF.ArchiLogger.LogGenericError(string.Format(Strings.ErrorConfigPropertyInvalid, nameof(globalConfig.ConnectionTimeout), globalConfig.ConnectionTimeout));
return null;
}
@@ -164,10 +167,15 @@ namespace ArchiSteamFarm {
return globalConfig;
}
Program.ArchiLogger.LogGenericError(string.Format(Strings.ErrorConfigPropertyInvalid, nameof(globalConfig.WCFPort), globalConfig.WCFPort));
ASF.ArchiLogger.LogGenericError(string.Format(Strings.ErrorConfigPropertyInvalid, nameof(globalConfig.WCFPort), globalConfig.WCFPort));
return null;
}
internal enum EOptimizationMode : byte {
MaxPerformance,
MinMemoryUsage
}
[SuppressMessage("ReSharper", "UnusedMember.Global")]
internal enum EUpdateChannel : byte {
None,

View File

@@ -84,7 +84,7 @@ namespace ArchiSteamFarm {
internal static GlobalDatabase Load(string filePath) {
if (string.IsNullOrEmpty(filePath)) {
Program.ArchiLogger.LogNullError(nameof(filePath));
ASF.ArchiLogger.LogNullError(nameof(filePath));
return null;
}
@@ -97,12 +97,12 @@ namespace ArchiSteamFarm {
try {
globalDatabase = JsonConvert.DeserializeObject<GlobalDatabase>(File.ReadAllText(filePath), CustomSerializerSettings);
} catch (Exception e) {
Program.ArchiLogger.LogGenericException(e);
ASF.ArchiLogger.LogGenericException(e);
return null;
}
if (globalDatabase == null) {
Program.ArchiLogger.LogNullError(nameof(globalDatabase));
ASF.ArchiLogger.LogNullError(nameof(globalDatabase));
return null;
}
@@ -115,7 +115,7 @@ namespace ArchiSteamFarm {
private void Save() {
string json = JsonConvert.SerializeObject(this, CustomSerializerSettings);
if (string.IsNullOrEmpty(json)) {
Program.ArchiLogger.LogNullError(nameof(json));
ASF.ArchiLogger.LogNullError(nameof(json));
return;
}
@@ -125,7 +125,7 @@ namespace ArchiSteamFarm {
File.WriteAllText(FilePath, json);
break;
} catch (Exception e) {
Program.ArchiLogger.LogGenericException(e);
ASF.ArchiLogger.LogGenericException(e);
}
Thread.Sleep(1000);

View File

@@ -39,7 +39,7 @@ namespace ArchiSteamFarm {
public Task UpdateServerListAsync(IEnumerable<IPEndPoint> endPoints) {
if (endPoints == null) {
Program.ArchiLogger.LogNullError(nameof(endPoints));
ASF.ArchiLogger.LogNullError(nameof(endPoints));
return Task.Delay(0);
}

View File

@@ -67,25 +67,25 @@ namespace ArchiSteamFarm.JSON {
HtmlNode htmlNode = HtmlDocument.DocumentNode.SelectSingleNode("//div[@class='tradeoffer']");
if (htmlNode == null) {
Program.ArchiLogger.LogNullError(nameof(htmlNode));
ASF.ArchiLogger.LogNullError(nameof(htmlNode));
return 0;
}
string id = htmlNode.GetAttributeValue("id", null);
if (string.IsNullOrEmpty(id)) {
Program.ArchiLogger.LogNullError(nameof(id));
ASF.ArchiLogger.LogNullError(nameof(id));
return 0;
}
int index = id.IndexOf('_');
if (index < 0) {
Program.ArchiLogger.LogNullError(nameof(index));
ASF.ArchiLogger.LogNullError(nameof(index));
return 0;
}
index++;
if (id.Length <= index) {
Program.ArchiLogger.LogNullError(nameof(id.Length));
ASF.ArchiLogger.LogNullError(nameof(id.Length));
return 0;
}
@@ -94,7 +94,7 @@ namespace ArchiSteamFarm.JSON {
return _TradeOfferID;
}
Program.ArchiLogger.LogNullError(nameof(_TradeOfferID));
ASF.ArchiLogger.LogNullError(nameof(_TradeOfferID));
return 0;
}
}
@@ -131,13 +131,13 @@ namespace ArchiSteamFarm.JSON {
HtmlNode htmlNode = HtmlDocument.DocumentNode.SelectSingleNode("//a/@data-miniprofile");
if (htmlNode == null) {
Program.ArchiLogger.LogNullError(nameof(htmlNode));
ASF.ArchiLogger.LogNullError(nameof(htmlNode));
return 0;
}
string miniProfile = htmlNode.GetAttributeValue("data-miniprofile", null);
if (string.IsNullOrEmpty(miniProfile)) {
Program.ArchiLogger.LogNullError(nameof(miniProfile));
ASF.ArchiLogger.LogNullError(nameof(miniProfile));
return 0;
}
@@ -145,7 +145,7 @@ namespace ArchiSteamFarm.JSON {
return _OtherSteamID3;
}
Program.ArchiLogger.LogNullError(nameof(_OtherSteamID3));
ASF.ArchiLogger.LogNullError(nameof(_OtherSteamID3));
return 0;
}
}
@@ -182,7 +182,7 @@ namespace ArchiSteamFarm.JSON {
set {
if (value == null) {
Program.ArchiLogger.LogNullError(nameof(value));
ASF.ArchiLogger.LogNullError(nameof(value));
return;
}
@@ -237,13 +237,13 @@ namespace ArchiSteamFarm.JSON {
set {
if (string.IsNullOrEmpty(value)) {
Program.ArchiLogger.LogNullError(nameof(value));
ASF.ArchiLogger.LogNullError(nameof(value));
return;
}
uint amount;
if (!uint.TryParse(value, out amount) || (amount == 0)) {
Program.ArchiLogger.LogNullError(nameof(amount));
ASF.ArchiLogger.LogNullError(nameof(amount));
return;
}
@@ -258,13 +258,13 @@ namespace ArchiSteamFarm.JSON {
set {
if (string.IsNullOrEmpty(value)) {
Program.ArchiLogger.LogNullError(nameof(value));
ASF.ArchiLogger.LogNullError(nameof(value));
return;
}
uint appID;
if (!uint.TryParse(value, out appID) || (appID == 0)) {
Program.ArchiLogger.LogNullError(nameof(appID));
ASF.ArchiLogger.LogNullError(nameof(appID));
return;
}
@@ -278,13 +278,13 @@ namespace ArchiSteamFarm.JSON {
set {
if (string.IsNullOrEmpty(value)) {
Program.ArchiLogger.LogNullError(nameof(value));
ASF.ArchiLogger.LogNullError(nameof(value));
return;
}
ulong assetID;
if (!ulong.TryParse(value, out assetID) || (assetID == 0)) {
Program.ArchiLogger.LogNullError(nameof(assetID));
ASF.ArchiLogger.LogNullError(nameof(assetID));
return;
}
@@ -299,7 +299,7 @@ namespace ArchiSteamFarm.JSON {
set {
if (string.IsNullOrEmpty(value)) {
Program.ArchiLogger.LogNullError(nameof(value));
ASF.ArchiLogger.LogNullError(nameof(value));
return;
}
@@ -319,13 +319,13 @@ namespace ArchiSteamFarm.JSON {
set {
if (string.IsNullOrEmpty(value)) {
Program.ArchiLogger.LogNullError(nameof(value));
ASF.ArchiLogger.LogNullError(nameof(value));
return;
}
ulong contextID;
if (!ulong.TryParse(value, out contextID) || (contextID == 0)) {
Program.ArchiLogger.LogNullError(nameof(contextID));
ASF.ArchiLogger.LogNullError(nameof(contextID));
return;
}
@@ -405,7 +405,7 @@ namespace ArchiSteamFarm.JSON {
}
if (OtherSteamID3 == 0) {
Program.ArchiLogger.LogNullError(nameof(OtherSteamID3));
ASF.ArchiLogger.LogNullError(nameof(OtherSteamID3));
return 0;
}

View File

@@ -333,7 +333,10 @@ Trazo de pila:
<value>&lt;{0}&gt;, Introduzca su host de WCF: </value>
<comment>{0} will be replaced by bot's name. Please note that this translation should end with space</comment>
</data>
<data name="WarningUnknownValuePleaseReport" xml:space="preserve">
<value>Recibido valor desconocido para {0}. Por favor, informa de ello: {1}</value>
<comment>{0} will be replaced by object's name, {1} will be replaced by value for that object</comment>
</data>
<data name="WarningTooManyGamesToPlay" xml:space="preserve">
<value>¡Ejecutar más de {0} juegos a la vez no es posible, sólo se usarán las primeras {0} entradas de {1}!</value>
<comment>{0} will be replaced by max number of games, {1} will be replaced by name of the configuration property</comment>

View File

@@ -134,7 +134,7 @@
<comment>{0} will be replaced by name of the configuration property, {1} will be replaced by invalid value</comment>
</data>
<data name="ErrorEarlyFatalExceptionInfo" xml:space="preserve">
<value>ASF V{0} foi executado com uma exceção fatal antes mesmo que o módulo de registro fosse inicializado!</value>
<value>ASF V{0} encontrou uma exceção fatal antes mesmo que o módulo de registro fosse inicializado!</value>
<comment>{0} will be replaced by version number</comment>
</data>
<data name="ErrorEarlyFatalExceptionPrint" xml:space="preserve">
@@ -151,7 +151,7 @@ StackTrace:
<comment>{0} will be replaced by URL of the request</comment>
</data>
<data name="ErrorGlobalConfigNotLoaded" xml:space="preserve">
<value>A configuração global não pode ser carregada, por favor, certifique-se que {0} existe e é válido! Caso estiver com dúvidas, siga o guia de configuração na Wiki.</value>
<value>A configuração global não pôde ser carregada, confirme que {0} existe e é válido! Caso esteja com dúvidas, siga o guia de configuração na Wiki.</value>
<comment>{0} will be replaced by file's path</comment>
</data>
<data name="ErrorIsInvalid" xml:space="preserve">
@@ -162,7 +162,7 @@ StackTrace:
<value>Recusando a execução desta função devido ao DeviceID inválido no ASF 2FA!</value>
</data>
<data name="ErrorNoBotsDefined" xml:space="preserve">
<value>Nenhum bot foi definido, esqueceu de configurar seu ASF?</value>
<value>Nenhum bot foi definido, esqueceu de configurar o seu ASF?</value>
</data>
<data name="ErrorObjectIsNull" xml:space="preserve">
<value>{0} é nulo!</value>
@@ -173,7 +173,7 @@ StackTrace:
<comment>{0} will be replaced by object's name</comment>
</data>
<data name="ErrorRemovingOldBinary" xml:space="preserve">
<value>Não foi possível remover o ASF binário antigo, por favor, remova o {0} manualmente para que a função de atualização funcione!</value>
<value>Não foi possível remover o binário do ASF antigo, remova {0} manualmente para que a função de atualização funcione!</value>
<comment>{0} will be replaced by file's path</comment>
</data>
<data name="ErrorRequestFailedTooManyTimes" xml:space="preserve">
@@ -184,7 +184,7 @@ StackTrace:
<value>Não foi possível verificar a última versão!</value>
</data>
<data name="ErrorUpdateNoAssetForThisBinary" xml:space="preserve">
<value>Não foi possível prosseguir com a atualização pois não existe nenhum recurso associado com o atual binário executado! Por favor certifique-se que seu ASF binário está nomeado corretamente!</value>
<value>Não foi possível prosseguir com a atualização pois não existe nenhum arquivo associado com o binário executado! Por favor, confirme que o binário do ASF está nomeado corretamente!</value>
</data>
<data name="ErrorUpdateNoAssets" xml:space="preserve">
<value>Não foi possível prosseguir com a atualização pois esta versão não inclui nenhum recurso!</value>
@@ -213,7 +213,7 @@ StackTrace:
<comment>{0} will be replaced by trade number</comment>
</data>
<data name="LoggingIn" xml:space="preserve">
<value>Iniciando seção em {0}...</value>
<value>Iniciando sessão em {0}...</value>
<comment>{0} will be replaced by service's name</comment>
</data>
<data name="NoBotsAreRunning" xml:space="preserve">
@@ -230,18 +230,18 @@ StackTrace:
<value>Reiniciando...</value>
</data>
<data name="WarningRuntimeUnsupported" xml:space="preserve">
<value>ASF detectou uma versão do runtime sem suporte, o programa pode NÃO funcionar corretamente no ambiente atual. Você está executando sem suporte por sua conta e risco!</value>
<value>ASF detectou uma versão do runtime que não é suportada, o programa pode NÃO funcionar corretamente no ambiente atual. Você está executando sem suporte por sua conta e risco!</value>
</data>
<data name="RuntimeVersionComparison" xml:space="preserve">
<value>Versão necessária: {0} | Versão encontrada: {1}</value>
<comment>{0} will be replaced by required version, {1} will be replaced by current version</comment>
</data>
<data name="RuntimeVersionOK" xml:space="preserve">
<value>Sua versão do {0} runtime está OK.</value>
<value>A versão do runtime {0} está OK.</value>
<comment>{0} will be replaced by runtime name (e.g. "Mono")</comment>
</data>
<data name="WarningRuntimeVersionTooOld" xml:space="preserve">
<value>Sua versão do {0} runtime é muito antiga!</value>
<value>A versão do runtime {0} é muito antiga!</value>
<comment>{0} will be replaced by runtime name (e.g. "Mono")</comment>
</data>
<data name="Starting" xml:space="preserve">
@@ -252,7 +252,7 @@ StackTrace:
<comment>{0} will be replaced by status code number/name</comment>
</data>
<data name="Success" xml:space="preserve">
<value>Êxito!</value>
<value>Sucesso!</value>
</data>
<data name="TimeSpanDay" xml:space="preserve">
<value>1 dia</value>
@@ -286,16 +286,16 @@ StackTrace:
<value>Desbloqueando modo família...</value>
</data>
<data name="UpdateCheckingNewVersion" xml:space="preserve">
<value>Verificando por nova versão...</value>
<value>Verificando se há atualizações...</value>
</data>
<data name="UpdateDownloadingNewVersion" xml:space="preserve">
<value>Baixando a nova versão... Enquanto aguarda, considere fazer uma doação se você aprecia o trabalho que está sendo feito! :)</value>
<value>Baixando nova versão... Enquanto aguarda, considere fazer uma doação caso aprecie o trabalho que está sendo feito! :)</value>
</data>
<data name="UpdateFinished" xml:space="preserve">
<value>Processo de atualização finalizado!</value>
</data>
<data name="UpdateNewVersionAvailable" xml:space="preserve">
<value>Uma nova versão do ASF está disponível! Considere atualizar!</value>
<value>Nova versão do ASF disponível! Considere atualizar!</value>
</data>
<data name="UpdateVersionInfo" xml:space="preserve">
<value>Versão local: {0} | Versão remota: {1}</value>
@@ -306,23 +306,23 @@ StackTrace:
<comment>{0} will be replaced by bot's name. Please note that this translation should end with space</comment>
</data>
<data name="UserInputSteam2FA" xml:space="preserve">
<value>&lt;{0}&gt; Insira seu código 2FA de seu autentificador do aplicativo móvel do Steam: </value>
<value>&lt;{0}&gt; Insira o código atual gerado pelo autenticador móvel do Steam: </value>
<comment>{0} will be replaced by bot's name. Please note that this translation should end with space</comment>
</data>
<data name="UserInputSteamGuard" xml:space="preserve">
<value>&lt;{0}&gt; Insira seu código de autorização do SteamGuard que foi enviado para seu e-mail: </value>
<value>&lt;{0}&gt; Insira o código do Steam Guard enviado ao seu e-mail: </value>
<comment>{0} will be replaced by bot's name. Please note that this translation should end with space</comment>
</data>
<data name="UserInputSteamLogin" xml:space="preserve">
<value>&lt;{0}&gt; Insira seu usuário do Steam: </value>
<value>&lt;{0}&gt; Insira o seu usuário do Steam: </value>
<comment>{0} will be replaced by bot's name. Please note that this translation should end with space</comment>
</data>
<data name="UserInputSteamParentalPIN" xml:space="preserve">
<value>&lt;{0}&gt; Insira seu PIN do Steam modo família: </value>
<value>&lt;{0}&gt; Insira o seu código do modo família: </value>
<comment>{0} will be replaced by bot's name. Please note that this translation should end with space</comment>
</data>
<data name="UserInputSteamPassword" xml:space="preserve">
<value>&lt;{0}&gt; Insira sua senha do Steam: </value>
<value>&lt;{0}&gt; Insira a sua senha do Steam: </value>
<comment>{0} will be replaced by bot's name. Please note that this translation should end with space</comment>
</data>
<data name="UserInputUnknown" xml:space="preserve">
@@ -330,7 +330,7 @@ StackTrace:
<comment>{0} will be replaced by bot's name, {1} will be replaced by property name. Please note that this translation should end with space</comment>
</data>
<data name="UserInputWCFHost" xml:space="preserve">
<value>&lt;{0}&gt; Insira seu serviço WCF: </value>
<value>&lt;{0}&gt; Insira o seu host WCF: </value>
<comment>{0} will be replaced by bot's name. Please note that this translation should end with space</comment>
</data>
<data name="WarningUnknownValuePleaseReport" xml:space="preserve">
@@ -342,7 +342,7 @@ StackTrace:
<comment>{0} will be replaced by max number of games, {1} will be replaced by name of the configuration property</comment>
</data>
<data name="WarningWCFIgnoringCommand" xml:space="preserve">
<value>Ignorando o comando WCF pois o --client não foi especificado: {0}</value>
<value>Ignorando o comando do WCF pois --client não foi especificado: {0}</value>
<comment>{0} will be replaced by WCF command</comment>
</data>
<data name="ErrorWCFAddressAccessDeniedException" xml:space="preserve">
@@ -371,26 +371,26 @@ StackTrace:
<value>Este bot já está desligado!</value>
</data>
<data name="BotNotFound" xml:space="preserve">
<value>Não foi possível achar nenhum bot chamado {0}!</value>
<value>Não foi possível encontrar nenhum bot chamado {0}!</value>
<comment>{0} will be replaced by bot's name</comment>
</data>
<data name="BotsStatusOverview" xml:space="preserve">
<value>Existe {0}/{1} bots em execução, no total de {2} jogos ({3} cartas) restantes para receber.</value>
<value> {0}/{1} bots em execução, com um total de {2} jogo(s) ({3} cartas) restante(s) para coletar.</value>
<comment>{0} will be replaced by number of active bots, {1} will be replaced by total number of bots, {2} will be replaced by total number of games left to idle, {3} will be replaced by total number of cards left to idle</comment>
</data>
<data name="BotStatusIdling" xml:space="preserve">
<value>Bot {0} está executando o jogo: {1} ({2}, {3} carta restante) no total de {4} jogos ({5} cartas) restante para receber (~{6} restando).</value>
<value>Bot {0} está executando o jogo: {1} ({2}, {3} carta(s) restante(s)) de um total de {4} jogo(s) ({5} cartas) restante(s) para a coleta (~{6} restante(s)).</value>
<comment>{0} will be replaced by bot's name, {1} will be replaced by game's appID (number), {2} will be replaced by game's name, {3} will be replaced by number of cards left to idle, {4} will be replaced by total number of games to idle, {5} will be replaced by total number of cards to idle, {6} will be replaced by translated TimeSpan string built from TimeSpan* translation parts</comment>
</data>
<data name="BotStatusIdlingList" xml:space="preserve">
<value>Bot {0} está executando os jogos: {1} no total de {2} jogos ({3} cartas) restante para executar (~{4} restando).</value>
<value>Bot {0} está executando os jogos: {1} de um total de {2} jogo(s) ({3} cartas) restante(s) para coletar (~{4} restante(s)).</value>
<comment>{0} will be replaced by bot's name, {1} will be replaced by list of the games (appIDs, numbers), {2} will be replaced by total number of games to idle, {3} will be replaced by total number of cards to idle, {4} will be replaced by translated TimeSpan string built from TimeSpan* translation parts</comment>
</data>
<data name="CheckingFirstBadgePage" xml:space="preserve">
<value>Verificando primeira página de insígnias...</value>
</data>
<data name="CheckingOtherBadgePages" xml:space="preserve">
<value>Verificando outras páginas de insignias...</value>
<value>Verificando outras páginas de insígnias...</value>
</data>
<data name="ChosenFarmingAlgorithm" xml:space="preserve">
<value>Algoritmo escolhido para a coleta de cartas: {0}</value>
@@ -400,14 +400,14 @@ StackTrace:
<value>Pronto!</value>
</data>
<data name="GamesToIdle" xml:space="preserve">
<value>ASF contém um total de {0} jogos ({1} cartas) restantes para coletar (faltam ~{2})...</value>
<value>Temos um total de {0} jogo(s) ({1} cartas) para a coleta (~{2} restante(s))...</value>
<comment>{0} will be replaced by number of games, {1} will be replaced by number of cards, {2} will be replaced by translated TimeSpan string built from TimeSpan* translation parts</comment>
</data>
<data name="IdlingFinished" xml:space="preserve">
<value>Processo de receber cartas finalizado!</value>
<value>Coleta de cartas finalizada!</value>
</data>
<data name="IdlingFinishedForGame" xml:space="preserve">
<value>Finalizado o processo de receber cartas: {0} ({1}) após {2} jogados!</value>
<value>Coleta de cartas finalizada: {0} ({1}) após {2} de jogo!</value>
<comment>{0} will be replaced by game's appID (number), {1} will be replaced by game's name, {2} will be replaced by translated TimeSpan string built from TimeSpan* translation parts</comment>
</data>
<data name="IdlingFinishedForGames" xml:space="preserve">
@@ -415,11 +415,11 @@ StackTrace:
<comment>{0} will be replaced by list of the games (appIDs, numbers), separated by a comma</comment>
</data>
<data name="IdlingStatusForGame" xml:space="preserve">
<value>Status do processo de receber cartas para {0} ({1}): {2} cartas restantes</value>
<value>Estado do processo de receber cartas para {0} ({1}): {2} carta(s) restante(s)</value>
<comment>{0} will be replaced by game's appID (number), {1} will be replaced by game's name, {2} will be replaced by number of cards left to idle</comment>
</data>
<data name="IdlingStopped" xml:space="preserve">
<value>Processo de receber cartas parado!</value>
<value>Coleta de cartas interrompida!</value>
</data>
<data name="IgnoredStickyPauseEnabled" xml:space="preserve">
<value>Ignorando esse pedido, já que o pause manual está habilitado!</value>
@@ -428,7 +428,7 @@ StackTrace:
<value>Não temos cartas disponíveis nesta conta!</value>
</data>
<data name="NowIdling" xml:space="preserve">
<value>Agora recebendo cartas: {0} ({1})</value>
<value>Coletando cartas: {0} ({1})</value>
<comment>{0} will be replaced by game's appID (number), {1} will be replaced by game's name</comment>
</data>
<data name="NowIdlingList" xml:space="preserve">
@@ -436,7 +436,7 @@ StackTrace:
<comment>{0} will be replaced by list of the games (appIDs, numbers), separated by a comma</comment>
</data>
<data name="PlayingNotAvailable" xml:space="preserve">
<value>O arquivamento não está disponível no momento. Tente mais tarde!</value>
<value>Não é possível jogar no momento, tentaremos novamente mais tarde!</value>
</data>
<data name="StillIdling" xml:space="preserve">
<value>Ainda executando: {0} ({1})</value>
@@ -447,40 +447,40 @@ StackTrace:
<comment>{0} will be replaced by list of the games (appIDs, numbers), separated by a comma</comment>
</data>
<data name="StoppedIdling" xml:space="preserve">
<value>Execução pausada: {0} ({1})</value>
<value>Coleta interrompida: {0} ({1})</value>
<comment>{0} will be replaced by game's appID (number), {1} will be replaced by game's name</comment>
</data>
<data name="StoppedIdlingList" xml:space="preserve">
<value>Processo pausado: {0}</value>
<value>Coleta interrompida: {0}</value>
<comment>{0} will be replaced by list of the games (appIDs, numbers), separated by a comma</comment>
</data>
<data name="UnknownCommand" xml:space="preserve">
<value>Comando desconhecido!</value>
</data>
<data name="WarningCouldNotCheckBadges" xml:space="preserve">
<value>Não foi possível obter informações de insignias, vamos tentar novamente mais tarde!</value>
<value>Não foi possível obter informações das insígnias, tentaremos novamente mais tarde!</value>
</data>
<data name="WarningCouldNotCheckCardsStatus" xml:space="preserve">
<value>Não foi possível verificar o status das cartas de: {0} ({1}), tentaremos novamente mais tarde!</value>
<value>Não foi possível verificar o estado das cartas de: {0} ({1}), tentaremos novamente mais tarde!</value>
<comment>{0} will be replaced by game's appID (number), {1} will be replaced by game's name</comment>
</data>
<data name="BotAcceptingGift" xml:space="preserve">
<value>Aceitando o presente: {0}...</value>
<value>Aceitando presente: {0}...</value>
<comment>{0} will be replaced by giftID (number)</comment>
</data>
<data name="BotAccountLimited" xml:space="preserve">
<value>Essa conta está limitada, o processo de receber cartas está permanentemente indisponível até que a restrição seja removida!</value>
<value>Essa conta é limitada, o processo de receber cartas está permanentemente indisponível até que a restrição seja removida!</value>
</data>
<data name="BotAddLicenseResponse" xml:space="preserve">
<value>&lt;{0}&gt; GameID: {1} | Status: {2}</value>
<value>&lt;{0}&gt; GameID: {1} | Estado: {2}</value>
<comment>{0} will be replaced by bot's name, {1} will be replaced by gameID (number), {2} will be replaced by status string</comment>
</data>
<data name="BotAddLicenseResponseWithItems" xml:space="preserve">
<value>&lt;{0}&gt; GameID: {1} | Status: {2} | Itens: {3}</value>
<value>&lt;{0}&gt; GameID: {1} | Estado: {2} | Itens: {3}</value>
<comment>{0} will be replaced by bot's name, {1} will be replaced by gameID (number), {2} will be replaced by status string, {3} will be replaced by list of granted appIDs (numbers), separated by a comma</comment>
</data>
<data name="BotAlreadyRunning" xml:space="preserve">
<value>Este bot já está em execução!</value>
<value>Uma instância do bot já está sendo executada!</value>
<comment>{0} will be replaced by bot's name</comment>
</data>
<data name="BotAuthenticatorConverting" xml:space="preserve">
@@ -493,24 +493,24 @@ StackTrace:
<value>Seu DeviceID está incorreto ou não existe!</value>
</data>
<data name="BotAuthenticatorToken" xml:space="preserve">
<value>Código 2FA: {0}</value>
<value>Código de autenticação: {0}</value>
<comment>{0} will be replaced by generated 2FA token (string)</comment>
</data>
<data name="BotAutomaticIdlingNowPaused" xml:space="preserve">
<value>Processo automático de receber cartas está agora pausado!</value>
</data>
<data name="BotAutomaticIdlingNowResumed" xml:space="preserve">
<value>Processo automático de receber cartas está agora retomado!</value>
<value>A coleta automática de cartas foi retomada!</value>
</data>
<data name="BotAutomaticIdlingPausedAlready" xml:space="preserve">
<value>Processo automático de receber cartas já está pausado!</value>
<value>A coleta automática de cartas já está pausada!</value>
</data>
<data name="BotAutomaticIdlingPausedWithCountdown" xml:space="preserve">
<value>Processo automático de receber cartas está agora pausado! Você tem {0} minutos para iniciar um jogo.</value>
<value>A coleta automática de cartas foi pausada! Você tem {0} minutos para iniciar um jogo.</value>
<comment>{0} will be replaced by number of minutes</comment>
</data>
<data name="BotAutomaticIdlingResumedAlready" xml:space="preserve">
<value>Processo automático de receber cartas já está retomado!</value>
<value>A coleta automática de cartas já foi retomada!</value>
</data>
<data name="BotConnected" xml:space="preserve">
<value>Conectado ao Steam!</value>
@@ -526,27 +526,27 @@ StackTrace:
<comment>{0} will be replaced by password encryption method (string), {1} will be replaced by encrypted password using that method (string)</comment>
</data>
<data name="BotInstanceNotStartingBecauseDisabled" xml:space="preserve">
<value>Não foi iniciado esta instância do bot pois está desativado no arquivo de configurações!</value>
<value>Este bot não será iniciado, pois está desativado no arquivo de configurações!</value>
</data>
<data name="BotInvalidAuthenticatorDuringLogin" xml:space="preserve">
<value>Foi recebido o código de erro TwoFactorCodeMismatch {0} vezes seguidas, isto é praticamente um indicativo de que as credenciais do ASF 2FA são inválidas, abortando!</value>
<comment>{0} will be replaced by maximum allowed number of failed 2FA attempts</comment>
</data>
<data name="BotLoggedOff" xml:space="preserve">
<value>Deslogado do Steam: {0}</value>
<value>Sessão finalizada: {0}</value>
<comment>{0} will be replaced by logging off reason (string)</comment>
</data>
<data name="BotLoggedOn" xml:space="preserve">
<value>Logado com sucesso!</value>
<value>Sessão iniciada com sucesso!</value>
</data>
<data name="BotLoggingIn" xml:space="preserve">
<value>Logando...</value>
<value>Iniciando sessão...</value>
</data>
<data name="BotLogonSessionReplaced" xml:space="preserve">
<value>Esta conta parece que está sendo usada em outra instância do ASF, o que é um comportamento indefinido, recusando em continuar executando!</value>
<value>Esta conta parece estar sendo usada em outra instância do ASF, o que é um comportamento indefinido, impedindo-a de ser executada!</value>
</data>
<data name="BotLootingFailed" xml:space="preserve">
<value>Oferta de troca falhou!</value>
<value>Proposta de troca falhou!</value>
</data>
<data name="BotLootingMasterNotDefined" xml:space="preserve">
<value>A troca não pôde ser enviada pois o SteamMasterID não foi definido!</value>
@@ -556,19 +556,19 @@ StackTrace:
<value>Você não configurou nenhum tipo de itens para coletar!</value>
</data>
<data name="BotLootingNowDisabled" xml:space="preserve">
<value>Coleta agora está desabilitada!</value>
<value>A coleta está desabilitada!</value>
</data>
<data name="BotLootingNowEnabled" xml:space="preserve">
<value>A coleta agora está ativada!</value>
</data>
<data name="BotLootingSuccess" xml:space="preserve">
<value>Oferta de troca enviada com sucesso!</value>
<value>Proposta enviada com sucesso!</value>
</data>
<data name="BotLootingTemporarilyDisabled" xml:space="preserve">
<value>Coleta temporariamente desabilitada!</value>
</data>
<data name="BotLootingYourself" xml:space="preserve">
<value>Você não pode coletar seus próprios itens!</value>
<value>Você não pode coletar os seus próprios itens!</value>
</data>
<data name="BotNoASFAuthenticator" xml:space="preserve">
<value>Esse bot não tem ASF 2FA habilitado! Você esqueceu de configurar as confirmações para 2FA ASF?</value>
@@ -582,7 +582,7 @@ StackTrace:
<comment>{0} will be replaced by bot's name, {1} will be replaced by query (string)</comment>
</data>
<data name="BotOwnedAlready" xml:space="preserve">
<value>&lt;{0} &gt; Já possuído: {1} | {2}</value>
<value>&lt;{0} &gt; Já possui: {1} | {2}</value>
<comment>{0} will be replaced by bot's name, {1} will be replaced by game's appID (number), {2} will be replaced by game's name</comment>
</data>
<data name="BotRateLimitExceeded" xml:space="preserve">
@@ -593,22 +593,22 @@ StackTrace:
<value>Reconectando...</value>
</data>
<data name="BotRedeemResponse" xml:space="preserve">
<value>&lt;{0}&gt; Chave: {1} | Status: {2}</value>
<value>&lt;{0}&gt; Chave: {1} | Estado: {2}</value>
<comment>{0} will be replaced by bot's name, {1} will be replaced by cd-key (string), {2} will be replaced by status string</comment>
</data>
<data name="BotRedeemResponseWithItems" xml:space="preserve">
<value>&lt;{0}&gt; Chave: {1} | Status: {2} | Itens: {3}</value>
<value>&lt;{0}&gt; Chave: {1} | Estado: {2} | Itens: {3}</value>
<comment>{0} will be replaced by bot's name, {1} will be replaced by cd-key (string), {2} will be replaced by status string, {3} will be replaced by list of key-value pairs, separated by a comma</comment>
</data>
<data name="BotRemovedExpiredLoginKey" xml:space="preserve">
<value>Chave de login expirada removida!</value>
<value>Chave de sessão expirada removida!</value>
</data>
<data name="BotsStatusNotIdling" xml:space="preserve">
<value>Bot {0} não está executando nada.</value>
<value>Bot {0} não está coletando nada.</value>
<comment>{0} will be replaced by bot's name</comment>
</data>
<data name="BotStatusLimited" xml:space="preserve">
<value>Bot {0} é limitado e não é possível receber nenhuma carta através do recurso.</value>
<value>Bot {0} é limitado e não pode receber nenhuma carta através da coleta.</value>
<comment>{0} will be replaced by bot's name</comment>
</data>
<data name="BotStatusNotConnected" xml:space="preserve">
@@ -628,11 +628,11 @@ StackTrace:
<comment>{0} will be replaced by bot's name</comment>
</data>
<data name="BotUnableToConnect" xml:space="preserve">
<value>Incapaz de conectar com o Steam: {0}</value>
<value>Não foi possível conectar-se ao Steam: {0}</value>
<comment>{0} will be replaced by failure reason (string)</comment>
</data>
<data name="BotUnableToLogin" xml:space="preserve">
<value>Incapaz de logar no Steam: {0}/{1}</value>
<value>Não foi possível iniciar a sessão no Steam: {0}/{1}</value>
<comment>{0} will be replaced by failure reason (string), {1} will be replaced by extended failure reason (string)</comment>
</data>
<data name="ErrorIsEmpty" xml:space="preserve">
@@ -640,7 +640,7 @@ StackTrace:
<comment>{0} will be replaced by object's name</comment>
</data>
<data name="UnusedKeys" xml:space="preserve">
<value>Chaves não usadas: {0}</value>
<value>Códigos não ativados: {0}</value>
<comment>{0} will be replaced by list of cd-keys (strings), separated by a comma</comment>
</data>
<data name="WarningFailedWithError" xml:space="preserve">
@@ -648,7 +648,7 @@ StackTrace:
<comment>{0} will be replaced by failure reason (string)</comment>
</data>
<data name="BotConnectionLost" xml:space="preserve">
<value>Conexão perdida com a Steam Network, reconectando...</value>
<value>Conexão com a rede Steam perdida, reconectando...</value>
</data>
<data name="BotAccountFree" xml:space="preserve">
<value>A conta não está mais ocupada, o processo de receber cartas foi retomado!</value>
@@ -657,22 +657,22 @@ StackTrace:
<value>A conta está atualmente em uso, o ASF retomará o processo quando estiver livre...</value>
</data>
<data name="BotAutomaticIdlingPauseTimeout" xml:space="preserve">
<value>A Biblioteca compartilhada não foi iniciada no período de tempo especificado, o processo de receber cartas foi retomado!</value>
<value>A biblioteca compartilhada não foi iniciada no período de tempo especificado, a coleta foi retomada!</value>
</data>
<data name="BotConnecting" xml:space="preserve">
<value>Conectando...</value>
</data>
<data name="BotHeartBeatFailed" xml:space="preserve">
<value>Falha ao desconectar o cliente, abandonando esse bot!</value>
<value>Falha ao desconectar cliente, abandonando instância!</value>
</data>
<data name="BotSteamDirectoryInitializationFailed" xml:space="preserve">
<value>Não foi possível inicializar o SteamDirectory, a conexão com o Steam Network pode demorar mais do que o normal!</value>
<value>Não foi possível inicializar o SteamDirectory, a conexão com a rede Steam pode demorar mais do que o normal!</value>
</data>
<data name="BotStopping" xml:space="preserve">
<value>Parando...</value>
</data>
<data name="ErrorBotConfigInvalid" xml:space="preserve">
<value>A configuração do seu bot é inválida, por favor verifique o conteúdo de {0} e tente de novo!</value>
<value>A configuração do bot é inválida, verifique o conteúdo de {0} e tente novamente!</value>
<comment>{0} will be replaced by file's path</comment>
</data>
<data name="ErrorDatabaseInvalid" xml:space="preserve">
@@ -687,7 +687,7 @@ StackTrace:
<value>Por favor revise a seção de política de privacidade na nossa wiki se você está preocupado com o que o ASF realmente está fazendo!</value>
</data>
<data name="Welcome" xml:space="preserve">
<value>Parece que é sua primeira vez abrindo o programa, bem-vindo!</value>
<value>Parece que é a sua primeira vez abrindo o programa, bem-vindo(a)!</value>
</data>
<data name="ErrorInvalidCurrentCulture" xml:space="preserve">
<value>O CurrentCulture providenciado é inválido, o ASF continuará usando o padrão!</value>

View File

@@ -584,7 +584,7 @@
<comment>{0} will be replaced by bot's name, {1} will be replaced by game's appID (number), {2} will be replaced by game's name</comment>
</data>
<data name="BotRateLimitExceeded" xml:space="preserve">
<value>超過頻率限制,我們將在 {0} 分鐘後重試...</value>
<value>超過頻率限制,我們將在 {0} 分鐘的CD時間後重試...</value>
<comment>{0} will be replaced by number of minutes</comment>
</data>
<data name="BotReconnecting" xml:space="preserve">

View File

@@ -116,7 +116,7 @@ namespace ArchiSteamFarm {
private static void OnConfigurationChanged(object sender, LoggingConfigurationChangedEventArgs e) {
if ((sender == null) || (e == null)) {
Program.ArchiLogger.LogNullError(nameof(sender) + " || " + nameof(e));
ASF.ArchiLogger.LogNullError(nameof(sender) + " || " + nameof(e));
return;
}

View File

@@ -34,12 +34,11 @@ using System.ServiceProcess;
using System.Threading;
using System.Threading.Tasks;
using ArchiSteamFarm.Localization;
using NLog.Targets;
using SteamKit2;
namespace ArchiSteamFarm {
internal static class Program {
internal static readonly ArchiLogger ArchiLogger = new ArchiLogger(SharedInfo.ASF);
internal static bool IsWCFRunning => WCF.IsServerRunning;
internal static GlobalConfig GlobalConfig { get; private set; }
internal static GlobalDatabase GlobalDatabase { get; private set; }
@@ -55,7 +54,7 @@ namespace ArchiSteamFarm {
internal static void Exit(byte exitCode = 0) {
if (exitCode != 0) {
ArchiLogger.LogGenericError(Strings.ErrorExitingWithNonZeroErrorCode);
ASF.ArchiLogger.LogGenericError(Strings.ErrorExitingWithNonZeroErrorCode);
}
Shutdown();
@@ -68,7 +67,7 @@ namespace ArchiSteamFarm {
}
if (GlobalConfig.Headless || !Runtime.IsUserInteractive) {
ArchiLogger.LogGenericWarning(Strings.ErrorUserInputRunningInHeadlessMode);
ASF.ArchiLogger.LogGenericWarning(Strings.ErrorUserInputRunningInHeadlessMode);
return null;
}
@@ -98,7 +97,7 @@ namespace ArchiSteamFarm {
Console.Write(Strings.UserInputWCFHost, botName);
break;
default:
ArchiLogger.LogGenericWarning(string.Format(Strings.WarningUnknownValuePleaseReport, nameof(userInputType), userInputType));
ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningUnknownValuePleaseReport, nameof(userInputType), userInputType));
Console.Write(Strings.UserInputUnknown, botName, userInputType);
break;
}
@@ -123,7 +122,7 @@ namespace ArchiSteamFarm {
try {
Process.Start(Assembly.GetEntryAssembly().Location, string.Join(" ", Environment.GetCommandLineArgs().Skip(1)));
} catch (Exception e) {
ArchiLogger.LogGenericException(e);
ASF.ArchiLogger.LogGenericException(e);
}
ShutdownResetEvent.Set();
@@ -131,6 +130,12 @@ namespace ArchiSteamFarm {
}
private static async Task Init(string[] args) {
// We must register our logging target as soon as possible
Target.Register<SteamTarget>("Steam");
await InitCore(args).ConfigureAwait(false);
}
private static async Task InitCore(string[] args) {
AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionHandler;
TaskScheduler.UnobservedTaskException += UnobservedTaskExceptionHandler;
@@ -161,12 +166,12 @@ namespace ArchiSteamFarm {
}
Logging.InitLoggers();
ArchiLogger.LogGenericInfo("ASF V" + SharedInfo.Version);
ASF.ArchiLogger.LogGenericInfo("ASF V" + SharedInfo.Version);
await InitServices().ConfigureAwait(false);
if (!Runtime.IsRuntimeSupported) {
ArchiLogger.LogGenericError(Strings.WarningRuntimeUnsupported);
ASF.ArchiLogger.LogGenericError(Strings.WarningRuntimeUnsupported);
await Task.Delay(10 * 1000).ConfigureAwait(false);
}
@@ -177,7 +182,7 @@ namespace ArchiSteamFarm {
Directory.Delete(SharedInfo.DebugDirectory, true);
await Task.Delay(1000).ConfigureAwait(false); // Dirty workaround giving Windows some time to sync
} catch (IOException e) {
ArchiLogger.LogGenericException(e);
ASF.ArchiLogger.LogGenericException(e);
}
}
@@ -207,7 +212,7 @@ namespace ArchiSteamFarm {
GlobalConfig = GlobalConfig.Load(globalConfigFile);
if (GlobalConfig == null) {
ArchiLogger.LogGenericError(string.Format(Strings.ErrorGlobalConfigNotLoaded, globalConfigFile));
ASF.ArchiLogger.LogGenericError(string.Format(Strings.ErrorGlobalConfigNotLoaded, globalConfigFile));
await Task.Delay(5 * 1000).ConfigureAwait(false);
Exit(1);
return;
@@ -219,7 +224,7 @@ namespace ArchiSteamFarm {
CultureInfo culture = CultureInfo.CreateSpecificCulture(GlobalConfig.CurrentCulture);
CultureInfo.DefaultThreadCurrentCulture = CultureInfo.DefaultThreadCurrentUICulture = culture;
} catch (CultureNotFoundException) {
ArchiLogger.LogGenericError(Strings.ErrorInvalidCurrentCulture);
ASF.ArchiLogger.LogGenericError(Strings.ErrorInvalidCurrentCulture);
}
}
@@ -238,20 +243,20 @@ namespace ArchiSteamFarm {
if (currentResourceSetCount < defaultResourceSetCount) {
float translationCompleteness = currentResourceSetCount / (float) defaultResourceSetCount;
ArchiLogger.LogGenericInfo(string.Format(Strings.TranslationIncomplete, CultureInfo.CurrentCulture.Name, translationCompleteness.ToString("P1")));
ASF.ArchiLogger.LogGenericInfo(string.Format(Strings.TranslationIncomplete, CultureInfo.CurrentCulture.Name, translationCompleteness.ToString("P1")));
}
string globalDatabaseFile = Path.Combine(SharedInfo.ConfigDirectory, SharedInfo.GlobalDatabaseFileName);
if (!File.Exists(globalDatabaseFile)) {
ArchiLogger.LogGenericInfo(Strings.Welcome);
ArchiLogger.LogGenericWarning(Strings.WarningPrivacyPolicy);
ASF.ArchiLogger.LogGenericInfo(Strings.Welcome);
ASF.ArchiLogger.LogGenericWarning(Strings.WarningPrivacyPolicy);
await Task.Delay(15 * 1000).ConfigureAwait(false);
}
GlobalDatabase = GlobalDatabase.Load(globalDatabaseFile);
if (GlobalDatabase == null) {
ArchiLogger.LogGenericError(string.Format(Strings.ErrorDatabaseInvalid, globalDatabaseFile));
ASF.ArchiLogger.LogGenericError(string.Format(Strings.ErrorDatabaseInvalid, globalDatabaseFile));
await Task.Delay(5 * 1000).ConfigureAwait(false);
Exit(1);
return;
@@ -261,7 +266,7 @@ namespace ArchiSteamFarm {
WebBrowser.Init();
WCF.Init();
WebBrowser = new WebBrowser(ArchiLogger);
WebBrowser = new WebBrowser(ASF.ArchiLogger);
}
private static bool InitShutdownSequence() {
@@ -300,7 +305,7 @@ namespace ArchiSteamFarm {
private static async Task ParsePostInitArgs(IEnumerable<string> args) {
if (args == null) {
ArchiLogger.LogNullError(nameof(args));
ASF.ArchiLogger.LogNullError(nameof(args));
return;
}
@@ -326,13 +331,13 @@ namespace ArchiSteamFarm {
}
if (!Mode.HasFlag(EMode.Client)) {
ArchiLogger.LogGenericWarning(string.Format(Strings.WarningWCFIgnoringCommand, arg));
ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningWCFIgnoringCommand, arg));
break;
}
string response = WCF.SendCommand(arg);
ArchiLogger.LogGenericInfo(string.Format(Strings.WCFResponseReceived, response));
ASF.ArchiLogger.LogGenericInfo(string.Format(Strings.WCFResponseReceived, response));
break;
}
}
@@ -340,7 +345,7 @@ namespace ArchiSteamFarm {
private static void ParsePreInitArgs(IEnumerable<string> args) {
if (args == null) {
ArchiLogger.LogNullError(nameof(args));
ASF.ArchiLogger.LogNullError(nameof(args));
return;
}
@@ -376,21 +381,21 @@ namespace ArchiSteamFarm {
private static void UnhandledExceptionHandler(object sender, UnhandledExceptionEventArgs args) {
if (args?.ExceptionObject == null) {
ArchiLogger.LogNullError(nameof(args) + " || " + nameof(args.ExceptionObject));
ASF.ArchiLogger.LogNullError(nameof(args) + " || " + nameof(args.ExceptionObject));
return;
}
ArchiLogger.LogFatalException((Exception) args.ExceptionObject);
ASF.ArchiLogger.LogFatalException((Exception) args.ExceptionObject);
Exit(1);
}
private static void UnobservedTaskExceptionHandler(object sender, UnobservedTaskExceptionEventArgs args) {
if (args?.Exception == null) {
ArchiLogger.LogNullError(nameof(args) + " || " + nameof(args.Exception));
ASF.ArchiLogger.LogNullError(nameof(args) + " || " + nameof(args.Exception));
return;
}
ArchiLogger.LogFatalException(args.Exception);
ASF.ArchiLogger.LogFatalException(args.Exception);
Exit(1);
}

View File

@@ -40,42 +40,42 @@ namespace ArchiSteamFarm {
if (IsRunningOnMono) {
Version monoVersion = GetMonoVersion();
if (monoVersion == null) {
Program.ArchiLogger.LogNullError(nameof(monoVersion));
ASF.ArchiLogger.LogNullError(nameof(monoVersion));
return false;
}
Version minMonoVersion = new Version(4, 6);
if (monoVersion >= minMonoVersion) {
Program.ArchiLogger.LogGenericInfo(string.Format(Strings.RuntimeVersionOK, "Mono"));
Program.ArchiLogger.LogGenericInfo(string.Format(Strings.RuntimeVersionComparison, minMonoVersion, monoVersion));
ASF.ArchiLogger.LogGenericInfo(string.Format(Strings.RuntimeVersionOK, "Mono"));
ASF.ArchiLogger.LogGenericInfo(string.Format(Strings.RuntimeVersionComparison, minMonoVersion, monoVersion));
_IsRuntimeSupported = true;
return true;
}
Program.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningRuntimeVersionTooOld, "Mono"));
Program.ArchiLogger.LogGenericWarning(string.Format(Strings.RuntimeVersionComparison, minMonoVersion, monoVersion));
ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningRuntimeVersionTooOld, "Mono"));
ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.RuntimeVersionComparison, minMonoVersion, monoVersion));
_IsRuntimeSupported = false;
return false;
}
Version netVersion = GetNetVersion();
if (netVersion == null) {
Program.ArchiLogger.LogNullError(nameof(netVersion));
ASF.ArchiLogger.LogNullError(nameof(netVersion));
return false;
}
Version minNetVersion = new Version(4, 6, 1);
if (netVersion >= minNetVersion) {
Program.ArchiLogger.LogGenericInfo(string.Format(Strings.RuntimeVersionOK, ".NET"));
Program.ArchiLogger.LogGenericInfo(string.Format(Strings.RuntimeVersionComparison, minNetVersion, netVersion));
ASF.ArchiLogger.LogGenericInfo(string.Format(Strings.RuntimeVersionOK, ".NET"));
ASF.ArchiLogger.LogGenericInfo(string.Format(Strings.RuntimeVersionComparison, minNetVersion, netVersion));
_IsRuntimeSupported = true;
return true;
}
Program.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningRuntimeVersionTooOld, ".NET"));
Program.ArchiLogger.LogGenericWarning(string.Format(Strings.RuntimeVersionComparison, minNetVersion, netVersion));
ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningRuntimeVersionTooOld, ".NET"));
ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.RuntimeVersionComparison, minNetVersion, netVersion));
_IsRuntimeSupported = false;
return false;
}
@@ -112,25 +112,25 @@ namespace ArchiSteamFarm {
private static Version GetMonoVersion() {
if (MonoRuntime == null) {
Program.ArchiLogger.LogNullError(nameof(MonoRuntime));
ASF.ArchiLogger.LogNullError(nameof(MonoRuntime));
return null;
}
MethodInfo displayName = MonoRuntime.GetMethod("GetDisplayName", BindingFlags.NonPublic | BindingFlags.Static);
if (displayName == null) {
Program.ArchiLogger.LogNullError(nameof(displayName));
ASF.ArchiLogger.LogNullError(nameof(displayName));
return null;
}
string versionString = (string) displayName.Invoke(null, null);
if (string.IsNullOrEmpty(versionString)) {
Program.ArchiLogger.LogNullError(nameof(versionString));
ASF.ArchiLogger.LogNullError(nameof(versionString));
return null;
}
int index = versionString.IndexOf(' ');
if (index <= 0) {
Program.ArchiLogger.LogNullError(nameof(index));
ASF.ArchiLogger.LogNullError(nameof(index));
return null;
}
@@ -141,7 +141,7 @@ namespace ArchiSteamFarm {
return version;
}
Program.ArchiLogger.LogNullError(nameof(version));
ASF.ArchiLogger.LogNullError(nameof(version));
return null;
}
@@ -149,18 +149,18 @@ namespace ArchiSteamFarm {
uint release;
using (RegistryKey registryKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32).OpenSubKey("SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full\\")) {
if (registryKey == null) {
Program.ArchiLogger.LogNullError(nameof(registryKey));
ASF.ArchiLogger.LogNullError(nameof(registryKey));
return null;
}
object releaseObj = registryKey.GetValue("Release");
if (releaseObj == null) {
Program.ArchiLogger.LogNullError(nameof(releaseObj));
ASF.ArchiLogger.LogNullError(nameof(releaseObj));
return null;
}
if (!uint.TryParse(releaseObj.ToString(), out release) || (release == 0)) {
Program.ArchiLogger.LogNullError(nameof(release));
ASF.ArchiLogger.LogNullError(nameof(release));
return null;
}
}

View File

@@ -44,7 +44,7 @@ namespace ArchiSteamFarm {
internal const string ServiceDescription = "ASF is an application that allows you to farm steam cards using multiple steam accounts simultaneously.";
internal const string ServiceName = "ArchiSteamFarm";
internal const string StatisticsServer = "asf.justarchi.net";
internal const string VersionNumber = "2.2.1.6";
internal const string VersionNumber = "2.2.1.8";
internal static readonly Version Version = Assembly.GetEntryAssembly().GetName().Version;
}

View File

@@ -87,7 +87,7 @@ namespace ArchiSteamFarm {
internal async Task OnPersonaState(SteamFriends.PersonaStateCallback callback) {
if (callback == null) {
Program.ArchiLogger.LogNullError(nameof(callback));
ASF.ArchiLogger.LogNullError(nameof(callback));
return;
}

View File

@@ -0,0 +1,90 @@
/*
_ _ _ ____ _ _____
/ \ _ __ ___ | |__ (_)/ ___| | |_ ___ __ _ _ __ ___ | ___|__ _ _ __ _ __ ___
/ _ \ | '__|/ __|| '_ \ | |\___ \ | __|/ _ \ / _` || '_ ` _ \ | |_ / _` || '__|| '_ ` _ \
/ ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
/_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
Copyright 2015-2017 Łukasz "JustArchi" Domeradzki
Contact: JustArchi@JustArchi.net
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using NLog;
using NLog.Config;
using NLog.Targets;
namespace ArchiSteamFarm {
[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")]
[Target("Steam")]
internal sealed class SteamTarget : TargetWithLayout {
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")]
// This is NLog config property, it must have public get() and set() capabilities
public string BotName { get; set; }
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")]
[RequiredParameter]
// This is NLog config property, it must have public get() and set() capabilities
public ulong SteamID { get; set; }
[SuppressMessage("ReSharper", "EmptyConstructor")]
public SteamTarget() {
// This constructor is intentionally public, as NLog uses it for creating targets
// It must stay like this as we want to have SteamTargets defined in our NLog.config
// We should use default layout, but keeping date here doesn't make sense
// User can already enable dates/times on Steam, so skip it by default
Layout = "${level:uppercase=true}|${logger}|${message}";
}
protected override void Write(LogEventInfo logEvent) {
if (logEvent == null) {
ASF.ArchiLogger.LogNullError(nameof(logEvent));
return;
}
if (SteamID == 0) {
return;
}
Bot bot;
if (string.IsNullOrEmpty(BotName)) {
bot = Bot.Bots.Values.FirstOrDefault(targetBot => targetBot.IsConnectedAndLoggedOn && (targetBot.SteamID != SteamID));
if (bot == null) {
return;
}
} else {
if (!Bot.Bots.TryGetValue(BotName, out bot)) {
return;
}
if (!bot.IsConnectedAndLoggedOn || (bot.SteamID == SteamID)) {
return;
}
}
string message = Layout.Render(logEvent);
if (string.IsNullOrEmpty(message)) {
return;
}
bot.SendMessage(SteamID, message);
}
}
}

View File

@@ -102,7 +102,21 @@ namespace ArchiSteamFarm {
}
}
ParseTradeResult[] results = await Task.WhenAll(tradeOffers.Select(ParseTrade)).ConfigureAwait(false);
ICollection<ParseTradeResult> results;
IEnumerable<Task<ParseTradeResult>> tasks = tradeOffers.Select(ParseTrade);
switch (Program.GlobalConfig.OptimizationMode) {
case GlobalConfig.EOptimizationMode.MinMemoryUsage:
results = new List<ParseTradeResult>(tradeOffers.Count);
foreach (Task<ParseTradeResult> task in tasks) {
results.Add(await task.ConfigureAwait(false));
}
break;
default:
results = await Task.WhenAll(tasks).ConfigureAwait(false);
break;
}
if (Bot.HasMobileAuthenticator) {
HashSet<ulong> acceptedWithItemLoseTradeIDs = new HashSet<ulong>(results.Where(result => (result != null) && (result.Result == ParseTradeResult.EResult.AcceptedWithItemLose)).Select(result => result.TradeID));

View File

@@ -42,7 +42,7 @@ namespace ArchiSteamFarm {
internal static string GetCookieValue(this CookieContainer cookieContainer, string url, string name) {
if (string.IsNullOrEmpty(url) || string.IsNullOrEmpty(name)) {
Program.ArchiLogger.LogNullError(nameof(url) + " || " + nameof(name));
ASF.ArchiLogger.LogNullError(nameof(url) + " || " + nameof(name));
return null;
}
@@ -51,7 +51,7 @@ namespace ArchiSteamFarm {
try {
uri = new Uri(url);
} catch (UriFormatException e) {
Program.ArchiLogger.LogGenericException(e);
ASF.ArchiLogger.LogGenericException(e);
return null;
}
@@ -64,7 +64,7 @@ namespace ArchiSteamFarm {
/*
internal static int RandomNext(int maxWithout) {
if (maxWithout <= 0) {
Program.ArchiLogger.LogNullError(nameof(maxWithout));
ASF.ArchiLogger.LogNullError(nameof(maxWithout));
return -1;
}
@@ -80,7 +80,7 @@ namespace ArchiSteamFarm {
internal static bool IsValidHexadecimalString(string text) {
if (string.IsNullOrEmpty(text)) {
Program.ArchiLogger.LogNullError(nameof(text));
ASF.ArchiLogger.LogNullError(nameof(text));
return false;
}

View File

@@ -55,7 +55,7 @@ namespace ArchiSteamFarm {
public string HandleCommand(string input) {
if (string.IsNullOrEmpty(input)) {
Program.ArchiLogger.LogNullError(nameof(input));
ASF.ArchiLogger.LogNullError(nameof(input));
return null;
}
@@ -74,7 +74,7 @@ namespace ArchiSteamFarm {
// We must keep it synchronous until either Mono gets fixed, or culprit for freeze located (and corrected)
string output = bot.Response(Program.GlobalConfig.SteamOwnerID, command).Result;
Program.ArchiLogger.LogGenericInfo(string.Format(Strings.WCFAnswered, input, output));
ASF.ArchiLogger.LogGenericInfo(string.Format(Strings.WCFAnswered, input, output));
return output;
}
@@ -91,11 +91,11 @@ namespace ArchiSteamFarm {
internal string SendCommand(string input) {
if (string.IsNullOrEmpty(input)) {
Program.ArchiLogger.LogNullError(nameof(input));
ASF.ArchiLogger.LogNullError(nameof(input));
return null;
}
Program.ArchiLogger.LogGenericInfo(string.Format(Strings.WCFSendingCommand, input, URL));
ASF.ArchiLogger.LogGenericInfo(string.Format(Strings.WCFSendingCommand, input, URL));
if (Client == null) {
Client = new Client(
@@ -117,7 +117,7 @@ namespace ArchiSteamFarm {
return;
}
Program.ArchiLogger.LogGenericInfo(string.Format(Strings.WCFStarting, URL));
ASF.ArchiLogger.LogGenericInfo(string.Format(Strings.WCFStarting, URL));
try {
ServiceHost = new ServiceHost(typeof(WCF), new Uri(URL));
@@ -133,11 +133,11 @@ namespace ArchiSteamFarm {
);
ServiceHost.Open();
Program.ArchiLogger.LogGenericInfo(Strings.WCFReady);
ASF.ArchiLogger.LogGenericInfo(Strings.WCFReady);
} catch (AddressAccessDeniedException) {
Program.ArchiLogger.LogGenericError(Strings.ErrorWCFAddressAccessDeniedException);
ASF.ArchiLogger.LogGenericError(Strings.ErrorWCFAddressAccessDeniedException);
} catch (Exception e) {
Program.ArchiLogger.LogGenericException(e);
ASF.ArchiLogger.LogGenericException(e);
}
}
@@ -150,7 +150,7 @@ namespace ArchiSteamFarm {
try {
ServiceHost.Close();
} catch (Exception e) {
Program.ArchiLogger.LogGenericException(e);
ASF.ArchiLogger.LogGenericException(e);
}
}
@@ -175,14 +175,14 @@ namespace ArchiSteamFarm {
internal string HandleCommand(string input) {
if (string.IsNullOrEmpty(input)) {
Program.ArchiLogger.LogNullError(nameof(input));
ASF.ArchiLogger.LogNullError(nameof(input));
return null;
}
try {
return Channel.HandleCommand(input);
} catch (Exception e) {
Program.ArchiLogger.LogGenericException(e);
ASF.ArchiLogger.LogGenericException(e);
return null;
}
}

View File

@@ -517,7 +517,7 @@ namespace ArchiSteamFarm {
responseMessage = await HttpClient.SendAsync(requestMessage).ConfigureAwait(false);
} catch (Exception e) {
// This exception is really common, don't bother with it unless debug mode is enabled
if (Debugging.IsDebugBuild || Program.GlobalConfig.Debug) {
if (Debugging.IsUserDebugging) {
ArchiLogger.LogGenericDebugException(e);
}
@@ -533,7 +533,7 @@ namespace ArchiSteamFarm {
return responseMessage;
}
if (Debugging.IsDebugBuild || Program.GlobalConfig.Debug) {
if (Debugging.IsUserDebugging) {
ArchiLogger.LogGenericDebug(string.Format(Strings.ErrorFailingRequest, request));
ArchiLogger.LogGenericDebug(string.Format(Strings.StatusCode, responseMessage.StatusCode));
ArchiLogger.LogGenericDebug(string.Format(Strings.Content, await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false)));

View File

@@ -21,6 +21,7 @@
"LoginLimiterDelay": 10,
"MaxFarmingTime": 10,
"MaxTradeHoldDuration": 15,
"OptimizationMode": 0,
"Statistics": true,
"SteamOwnerID": 0,
"SteamProtocol": 6,

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -98,6 +98,10 @@ namespace ConfigGenerator {
[JsonProperty(Required = Required.DisallowNull)]
public byte MaxTradeHoldDuration { get; set; } = 15;
[LocalizedCategory("Performance")]
[JsonProperty(Required = Required.DisallowNull)]
public EOptimizationMode OptimizationMode { get; set; } = EOptimizationMode.MaxPerformance;
[JsonProperty(Required = Required.DisallowNull)]
public bool Statistics { get; set; } = true;
@@ -206,6 +210,11 @@ namespace ConfigGenerator {
Logging.LogGenericWarning(string.Format(CGStrings.WarningConfigPropertyModified, nameof(WCFPort), WCFPort));
}
internal enum EOptimizationMode : byte {
MaxPerformance,
MinMemoryUsage
}
internal enum EUpdateChannel : byte {
None,
Stable,

View File

@@ -136,7 +136,7 @@
<value>Actualizaciones</value>
</data>
<data name="ConfirmRemoval" xml:space="preserve">
<value>¿Realmente quieres eliminar esta configuración?</value>
<value>¿Seguro que quieres eliminar esta configuración?</value>
</data>
<data name="ErrorBotNameEmpty" xml:space="preserve">
<value>¡El nombre de tu bot está vacío!</value>
@@ -203,13 +203,30 @@ Por favor, usa la versión de ConfigGenerator correspondiente a tu ejecutable de
<value>En la parte superior de la ventana puedes ver las configuraciones cargadas actualmente, así como tres botones extra para eliminar [-], renombrar [~] y añadir nuevas[+].</value>
<comment>If possible, try to keep visual representation of buttons: [-], [~] and [+]</comment>
</data>
<data name="TutorialMainFormConfigurationWiki" xml:space="preserve">
<value>Toda la información acerca de las propiedades de configuración disponibles (incluyendo su descripción, finalidad y valores aceptados) está disponible en nuestra wiki de GitHub. No dudes en usarla como referencia.</value>
</data>
<data name="TutorialMainFormConfigurationWindow" xml:space="preserve">
<value>En medio de la ventana puedes configurar todas las propiedades disponibles para tu configuración seleccionada actualmente.</value>
</data>
<data name="TutorialMainFormFinished" xml:space="preserve">
<value>De acuerdo, empecemos a configurar ASF. ¡Clica en el botón [+] para añadir tu primera cuenta de steam!</value>
<comment>If possible, try to keep visual representation of [+] button</comment>
</data>
<data name="TutorialMainFormHelpButton" xml:space="preserve">
<value>En la esquina superior derecha encontrarás el botón de ayuda [?], el cual te redirigirá a la wiki de ASF para más información.</value>
<comment>If possible, try to keep visual representation of [?] button</comment>
</data>
<data name="TutorialMainFormShown" xml:space="preserve">
<value>Esta es la pantalla principal del generador de configuraciones de ASF. ¡Es muy fácil de usar!</value>
</data>
<data name="TutorialNewBotFormFinished" xml:space="preserve">
<value>¡Como puedes ver, tu bot ya está listo para ser configurado! Lo primero que querrás hacer es cambiar la propiedad {0} de falso a verdadero. ¡Pruébalo!</value>
<comment>{0} will be replaced by name of the configuration property ("Enabled")</comment>
</data>
<data name="TutorialNewBotFormShown" xml:space="preserve">
<value>¡Bien hecho! Ahora se te pedirá el nombre de tu bot. Un buen ejemplo podría ser un nick que estés usando para la cuenta de steam que vas a configurar, o cualquier otro nombre a tu elección que te permita conectar con facilidad con la instancia del bot que está siendo configurado.</value>
</data>
<data name="TutorialStart" xml:space="preserve">
<value>¡Bienvenido! Me he dado cuenta de que estás usando ASF ConfigGenerator por primera vez, así que déjame que te ayude un poco.</value>
</data>

View File

@@ -118,16 +118,16 @@
<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>Permissão de Acesso</value>
<value>Permissão de acesso</value>
</data>
<data name="CategoryAdvanced" xml:space="preserve">
<value>Preferências avançadas</value>
<value>Avançado</value>
</data>
<data name="CategoryCore" xml:space="preserve">
<value>Básico</value>
<value>Principal</value>
</data>
<data name="CategoryDebugging" xml:space="preserve">
<value>Depurando</value>
<value>Depuração</value>
</data>
<data name="CategoryPerformance" xml:space="preserve">
<value>Desempenho</value>
@@ -136,10 +136,10 @@
<value>Atualizações</value>
</data>
<data name="ConfirmRemoval" xml:space="preserve">
<value>Você deseja realmente remover essa configuração?</value>
<value>Você realmente deseja remover essa configuração?</value>
</data>
<data name="ErrorBotNameEmpty" xml:space="preserve">
<value>O nome de seu bot está em branco!</value>
<value>O nome do bot está em branco!</value>
</data>
<data name="ErrorCantRemoveGlobalConfig" xml:space="preserve">
<value>Você não pode remover a configuração global!</value>
@@ -148,14 +148,14 @@
<value>Você não pode renomear a configuração global!</value>
</data>
<data name="ErrorConfigDirectoryNotFound" xml:space="preserve">
<value>Configuração do diretório não pôde ser encontrada!</value>
<value>Diretório da configuração não encontrado!</value>
</data>
<data name="ErrorConfigPropertyInvalid" xml:space="preserve">
<value>Configuração {0} inválida com a propriedade: {1}</value>
<value>Configuração da propriedade {0} inválida: {1}</value>
<comment>{0} will be replaced by name of the configuration property, {1} will be replaced by invalid value</comment>
</data>
<data name="ErrorInvalidCurrentCulture" xml:space="preserve">
<value>Sua CurrentCulture é inválida, o ConfigGenerator continuará executando pelo padrão!</value>
<value>A propriedade CurrentCulture fornecida é inválida, o ConfigGenerator continuará executando com o valor padrão!</value>
</data>
<data name="ErrorNameAlreadyUsed" xml:space="preserve">
<value>Este nome já está em uso!</value>
@@ -170,11 +170,11 @@
<comment>{0} will be replaced by object's name</comment>
</data>
<data name="ErrorVersionMismatch" xml:space="preserve">
<value>Você tentou usar uma versão inválida do ConfigGenerator em seu ASF!
<value>Você tentou usar uma versão inválida do ConfigGenerator no seu ASF!
ASF: {0} | ConfigGenerator: {1}
Por favor use uma versão do ConfigGenerator correspondente ao seu ASF. Você será redirecionado para a versão apropriada...</value>
Por favor, use uma versão do ConfigGenerator correspondente ao seu ASF. Você será redirecionado para a versão apropriada...</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">
@@ -182,7 +182,7 @@ Por favor use uma versão do ConfigGenerator correspondente ao seu ASF. Você se
<comment>This is used as MessageBox title</comment>
</data>
<data name="Removal" xml:space="preserve">
<value>Eliminar</value>
<value>Remoção</value>
<comment>This is used as MessageBox title</comment>
</data>
<data name="Rename" xml:space="preserve">
@@ -190,52 +190,52 @@ Por favor use uma versão do ConfigGenerator correspondente ao seu ASF. Você se
<comment>This is used as MessageBox title</comment>
</data>
<data name="TutorialBotFormEnabled" xml:space="preserve">
<value>Excelente! Seu bot agora está ativado. Na verdade, isso era tudo que você precisava fazer para rodar este bot no ASF, mas talvez você deveria configurar mais duas propriedades: {0} e {1}. Caso queira continuar o tutorial, fique à vontade. Lembre-se de consultar a Wiki se você não tem certeza se tal propriedade deve ser configurada, ou se precisar de uma ajuda extra.</value>
<value>Excelente! O seu bot agora está ativado. Na verdade, isso era tudo que você precisava fazer para usar esse bot no ASF, mas talvez você queira configurar mais duas propriedades: {0} e {1}. Caso queira continuar o tutorial, fique à vontade. Lembre-se de consultar a Wiki caso não tenha certeza de como alguma propriedade deve ser configurada ou se precisar de uma ajuda extra.</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>Seu ASF está agora pronto! Basta executar o ASF.exe e digitar tudo corretamente, você verá o ASF entrar em seção e começar o processo de receber cartas. Se você tiver o SteamGuard ou autenticação por dois fatores ativado, o ASF te perguntará por essas credenciais durante o processo.</value>
<value>O ASF agora está pronto! Basta executar o ASF.exe e digitar tudo corretamente para que o ASF inicie a sessão e comece o processo de coleta. Caso tenha o Steam Guard ou a autenticação em duas etapas ativada, o ASF pedirá por essas credenciais durante o processo.</value>
</data>
<data name="TutorialFinished" xml:space="preserve">
<value>Parabéns! Você fez tudo que era necessário para deixar o ASF em processo de uso, isso também completa o tutorial que preparamos para você. É altamente recomendado agora ler toda a seção de configuração na Wiki, pois o ASF oferece outras ótimas funções para você configurar, como receber cartas em modo offline ou ativar o ASF no melhor modo algorítimo de receber cartas para a sua conta. Tudo isso claro, é opcional, e você pode fechar nosso configurador quando quiser. Nós desejamos que aproveite o programa que desenvolvemos para você!</value>
<value>Parabéns! Você fez tudo que era necessário para deixar o ASF usável, isso também completa o tutorial que preparamos para você. É altamente recomendado agora ler toda a seção de configuração na Wiki, pois o ASF oferece outras ótimas funções para você configurar, como receber cartas em modo offline ou ativar o ASF no algoritmo mais eficiente de receber cartas para a sua conta. Claro que tudo isso é opcional e você pode fechar o nosso configurador quando quiser. Nós desejamos que aproveite o programa que desenvolvemos para você!</value>
</data>
<data name="TutorialMainFormBotsManagementButtons" xml:space="preserve">
<value>Na parte superior da janela, você pode notar que atualmente as configurações abertas, e 3 botões extras para remoção [-], renomeação [~] e adição de novos [+].</value>
<value>Na parte superior da janela você pode ver as configurações atualmente abertas e 3 botões extras para remoção [-], renomeação [~] e adição [+] de novas.</value>
<comment>If possible, try to keep visual representation of buttons: [-], [~] and [+]</comment>
</data>
<data name="TutorialMainFormConfigurationWiki" xml:space="preserve">
<value>Por favor, note-se que todas informações sobre as propriedades das configurações disponíveis, incluindo suas descrições, finalidades, e valores aceitos, estão disponíveis em nossa Wiki no GitHub. Por favor use isto como referência.</value>
<value>Por favor, observe que todas as informações sobre as propriedades das configurações disponíveis, incluindo descrições, finalidades e valores aceitos estão disponíveis na nossa Wiki no GitHub. Use-a como referência.</value>
</data>
<data name="TutorialMainFormConfigurationWindow" xml:space="preserve">
<value>No meio da janela você pode configurar todas as propriedades das configurações que estão disponíveis para você, para as suas atuais configurações selecionadas.</value>
<value>No meio da janela você pode configurar todas as propriedades das configurações que estão disponíveis para você, para as configurações selecionadas atualmente.</value>
</data>
<data name="TutorialMainFormFinished" xml:space="preserve">
<value>Certo, vamos começar a configurar nosso ASF. Clique no botão de mais [+] para adicionar sua primeira conta do Steam!</value>
<value>Certo, vamos começar a configurar o ASF. Clique no botão de mais [+] para adicionar a sua primeira conta Steam!</value>
<comment>If possible, try to keep visual representation of [+] button</comment>
</data>
<data name="TutorialMainFormHelpButton" xml:space="preserve">
<value>No canto superior você encontrará o botão de ajuda [?] que te redirecionará para a Wiki do ASF para mais informações.</value>
<value>No canto superior direito você encontrará o botão de ajuda [?] que te redirecionará para a Wiki do ASF para mais informações.</value>
<comment>If possible, try to keep visual representation of [?] button</comment>
</data>
<data name="TutorialMainFormShown" xml:space="preserve">
<value>Esta é a janela principal do ASF ConfigGenerator, é muito fácil de usar!</value>
<value>Esta é a janela principal do ConfigGenerator do ASF, é muito fácil de usar!</value>
</data>
<data name="TutorialNewBotFormFinished" xml:space="preserve">
<value>Como você pode ver, seu bot está agora pronto para ser configurado! A primeira coisa que você deve fazer é trocar a propriedade {0} de falso para verdadeiro, experimente!</value>
<value>Como você pode ver, o seu bot está agora pronto para ser configurado! A primeira coisa que você deve fazer é trocar a propriedade {0} de falso (false) para verdadeiro (true), experimente!</value>
<comment>{0} will be replaced by name of the configuration property ("Enabled")</comment>
</data>
<data name="TutorialNewBotFormShown" xml:space="preserve">
<value>Bom trabalho! Agora você será pedido para inserir o nome de seu bot. Um bom exemplo seria um nick que você usa para o nome da sua conta do Steam que está prestes a ser configurada, ou qualquer outro nome que você desejar e seja fácil para você conectar a instância do bot que está sendo configurado.</value>
<value>Bom trabalho! Agora você precisará informar o nome do bot. Um bom exemplo seria o apelido usado na conta Steam que você está configurando, ou qualquer outro nome que você desejar que seja fácil para você conectar com a instância configurada.</value>
</data>
<data name="TutorialStart" xml:space="preserve">
<value>Bem-Vindo! Eu notei que você está usando o ASF ConfigGenerator pela primeira vez, então deixe-me te ajudar.</value>
<value>Bem-vindo(a)! Notei que você está usando o ConfigGenerator do ASF pela primeira vez, então deixe-me ajudá-lo(a).</value>
</data>
<data name="UserInputBotName" xml:space="preserve">
<value>Por favor, insira o novo nome do bot: </value>
<value>Insira o nome do novo do bot: </value>
<comment>Please note that this translation should end with space</comment>
</data>
<data name="WarningConfigPropertyModified" xml:space="preserve">
<value>{0} foi definido como: {1}</value>
<value>{0} definido como: {1}</value>
<comment>{0} will be replaced by name of the configuration property, {1} will be replaced by new value</comment>
</data>
</root>

View File

@@ -65,8 +65,8 @@
<Private>True</Private>
</Reference>
<Reference Include="SteamKit2, Version=1.8.0.26737, Culture=neutral, PublicKeyToken=ed3ce47ed5aad940, processorArchitecture=MSIL">
<HintPath>..\packages\SteamKit2.1.8.0\lib\net45\SteamKit2.dll</HintPath>
<Private>True</Private>
<SpecificVersion>False</SpecificVersion>
<HintPath>..\ArchiSteamFarm\lib\SteamKit2.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
@@ -160,6 +160,9 @@
<Compile Include="..\ArchiSteamFarm\SteamSaleEvent.cs">
<Link>SteamSaleEvent.cs</Link>
</Compile>
<Compile Include="..\ArchiSteamFarm\SteamTarget.cs">
<Link>SteamTarget.cs</Link>
</Compile>
<Compile Include="..\ArchiSteamFarm\Trading.cs">
<Link>Trading.cs</Link>
</Compile>