mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-16 08:25:28 +00:00
Gigantic code cleanup
Time to enforce some common file layout, as general mess started to annoying me. Sorry in advance for people using custom forks and having merge conflicts, this will help everybody in long-run
This commit is contained in:
@@ -34,28 +34,6 @@ using ArchiSteamFarm.JSON;
|
||||
|
||||
namespace ArchiSteamFarm {
|
||||
internal static class ASF {
|
||||
internal sealed class BotConfigEventArgs : EventArgs {
|
||||
internal readonly BotConfig BotConfig;
|
||||
|
||||
internal BotConfigEventArgs(BotConfig botConfig = null) {
|
||||
BotConfig = botConfig;
|
||||
}
|
||||
}
|
||||
|
||||
internal enum EUserInputType : byte {
|
||||
Unknown,
|
||||
DeviceID,
|
||||
Login,
|
||||
Password,
|
||||
PhoneNumber,
|
||||
SMS,
|
||||
SteamGuard,
|
||||
SteamParentalPIN,
|
||||
RevocationCode,
|
||||
TwoFactorAuthentication,
|
||||
WCFHostname
|
||||
}
|
||||
|
||||
internal static readonly ArchiLogger ArchiLogger = new ArchiLogger(SharedInfo.ASF);
|
||||
|
||||
private static readonly ConcurrentDictionary<Bot, DateTime> LastWriteTimes = new ConcurrentDictionary<Bot, DateTime>();
|
||||
@@ -90,10 +68,7 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
|
||||
if ((AutoUpdatesTimer == null) && Program.GlobalConfig.AutoUpdates) {
|
||||
AutoUpdatesTimer = new Timer(
|
||||
async e => await CheckForUpdate().ConfigureAwait(false),
|
||||
null,
|
||||
TimeSpan.FromDays(1), // Delay
|
||||
AutoUpdatesTimer = new Timer(async e => await CheckForUpdate().ConfigureAwait(false), null, TimeSpan.FromDays(1), // Delay
|
||||
TimeSpan.FromDays(1) // Period
|
||||
);
|
||||
|
||||
@@ -258,9 +233,7 @@ namespace ArchiSteamFarm {
|
||||
return;
|
||||
}
|
||||
|
||||
FileSystemWatcher = new FileSystemWatcher(SharedInfo.ConfigDirectory, "*.json") {
|
||||
NotifyFilter = NotifyFilters.FileName | NotifyFilters.LastWrite
|
||||
};
|
||||
FileSystemWatcher = new FileSystemWatcher(SharedInfo.ConfigDirectory, "*.json") { NotifyFilter = NotifyFilters.FileName | NotifyFilters.LastWrite };
|
||||
|
||||
FileSystemWatcher.Changed += OnChanged;
|
||||
FileSystemWatcher.Created += OnCreated;
|
||||
@@ -408,5 +381,27 @@ namespace ArchiSteamFarm {
|
||||
|
||||
CreateBot(newBotName).Forget();
|
||||
}
|
||||
|
||||
internal sealed class BotConfigEventArgs : EventArgs {
|
||||
internal readonly BotConfig BotConfig;
|
||||
|
||||
internal BotConfigEventArgs(BotConfig botConfig = null) {
|
||||
BotConfig = botConfig;
|
||||
}
|
||||
}
|
||||
|
||||
internal enum EUserInputType : byte {
|
||||
Unknown,
|
||||
DeviceID,
|
||||
Login,
|
||||
Password,
|
||||
PhoneNumber,
|
||||
SMS,
|
||||
SteamGuard,
|
||||
SteamParentalPIN,
|
||||
RevocationCode,
|
||||
TwoFactorAuthentication,
|
||||
WCFHostname
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user