mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2025-12-17 06:50:29 +00:00
Compare commits
49 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b3a5ff337 | ||
|
|
0387eb3746 | ||
|
|
3ebc6d618a | ||
|
|
92d9e10cb8 | ||
|
|
d0d670f1a5 | ||
|
|
3597c8f138 | ||
|
|
8a8ec29b41 | ||
|
|
a3352d032d | ||
|
|
d5f8647fcc | ||
|
|
79a700d786 | ||
|
|
bc223f0644 | ||
|
|
2b0d82453b | ||
|
|
fa0150e745 | ||
|
|
c95d11ef66 | ||
|
|
63b268f9c4 | ||
|
|
03d38f8a2a | ||
|
|
c88d9bf123 | ||
|
|
053ebe15bb | ||
|
|
b03bfb6bbc | ||
|
|
e48867000e | ||
|
|
e08cdbd74d | ||
|
|
0b4c585a58 | ||
|
|
6213e77fab | ||
|
|
fccca6a4fc | ||
|
|
d4f4ec3401 | ||
|
|
b23dd3612d | ||
|
|
ca4fa4ac27 | ||
|
|
5e53a208d5 | ||
|
|
895c69642d | ||
|
|
765f9d29bb | ||
|
|
99af5c86a5 | ||
|
|
0bb2b3ed5f | ||
|
|
4181f3ba21 | ||
|
|
c189b398c0 | ||
|
|
de4fbf8b04 | ||
|
|
f91a558314 | ||
|
|
7587ff024c | ||
|
|
06778c9bb0 | ||
|
|
7a97045412 | ||
|
|
5d9bedfd28 | ||
|
|
575992c25d | ||
|
|
72db5bc9f3 | ||
|
|
b015720a3e | ||
|
|
84a6d4501b | ||
|
|
07049e71c0 | ||
|
|
4710d9c1eb | ||
|
|
d08462745a | ||
|
|
eb4e9ee077 | ||
|
|
601a486b13 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -12,6 +12,9 @@ ArchiSteamFarm/config/*
|
|||||||
ArchiSteamFarm/log.txt
|
ArchiSteamFarm/log.txt
|
||||||
ArchiSteamFarm/debug/*
|
ArchiSteamFarm/debug/*
|
||||||
|
|
||||||
|
# Ignore out
|
||||||
|
out/
|
||||||
|
|
||||||
#################
|
#################
|
||||||
## Eclipse
|
## Eclipse
|
||||||
#################
|
#################
|
||||||
|
|||||||
@@ -1,12 +1,17 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 14
|
# Visual Studio 14
|
||||||
VisualStudioVersion = 14.0.23107.0
|
VisualStudioVersion = 14.0.24720.0
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArchiSteamFarm", "ArchiSteamFarm\ArchiSteamFarm.csproj", "{35AF7887-08B9-40E8-A5EA-797D8B60B30C}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArchiSteamFarm", "ArchiSteamFarm\ArchiSteamFarm.csproj", "{35AF7887-08B9-40E8-A5EA-797D8B60B30C}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SteamAuth", "SteamAuth\SteamAuth.csproj", "{5AD0934E-F6C4-4AE5-83AF-C788313B2A87}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SteamAuth", "SteamAuth\SteamAuth.csproj", "{5AD0934E-F6C4-4AE5-83AF-C788313B2A87}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConfigGenerator", "ConfigGenerator\ConfigGenerator.csproj", "{C3F6FE68-5E75-415E-BEA1-1E7C16D6A433}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{35AF7887-08B9-40E8-A5EA-797D8B60B30C} = {35AF7887-08B9-40E8-A5EA-797D8B60B30C}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -21,6 +26,10 @@ Global
|
|||||||
{5AD0934E-F6C4-4AE5-83AF-C788313B2A87}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{5AD0934E-F6C4-4AE5-83AF-C788313B2A87}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{5AD0934E-F6C4-4AE5-83AF-C788313B2A87}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{5AD0934E-F6C4-4AE5-83AF-C788313B2A87}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{5AD0934E-F6C4-4AE5-83AF-C788313B2A87}.Release|Any CPU.Build.0 = Release|Any CPU
|
{5AD0934E-F6C4-4AE5-83AF-C788313B2A87}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{C3F6FE68-5E75-415E-BEA1-1E7C16D6A433}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{C3F6FE68-5E75-415E-BEA1-1E7C16D6A433}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{C3F6FE68-5E75-415E-BEA1-1E7C16D6A433}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{C3F6FE68-5E75-415E-BEA1-1E7C16D6A433}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
@@ -265,6 +265,36 @@ namespace ArchiSteamFarm {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Please remove me immediately after https://github.com/SteamRE/SteamKit/issues/254 gets fixed
|
||||||
|
internal void HackedLogOn(SteamUser.LogOnDetails details) {
|
||||||
|
if (!Client.IsConnected) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
SteamID steamID = new SteamID(details.AccountID, details.AccountInstance, Client.ConnectedUniverse, EAccountType.Individual);
|
||||||
|
|
||||||
|
var logon = new ClientMsgProtobuf<CMsgClientLogon>(EMsg.ClientLogon);
|
||||||
|
logon.Body.obfustucated_private_ip = details.LoginID.Value;
|
||||||
|
logon.ProtoHeader.client_sessionid = 0;
|
||||||
|
logon.ProtoHeader.steamid = steamID.ConvertToUInt64();
|
||||||
|
logon.Body.account_name = details.Username;
|
||||||
|
logon.Body.password = details.Password;
|
||||||
|
logon.Body.should_remember_password = details.ShouldRememberPassword;
|
||||||
|
logon.Body.protocol_version = MsgClientLogon.CurrentProtocol;
|
||||||
|
logon.Body.client_os_type = (uint) details.ClientOSType;
|
||||||
|
logon.Body.client_language = details.ClientLanguage;
|
||||||
|
logon.Body.cell_id = details.CellID;
|
||||||
|
logon.Body.steam2_ticket_request = details.RequestSteam2Ticket;
|
||||||
|
logon.Body.client_package_version = 1771;
|
||||||
|
logon.Body.auth_code = details.AuthCode;
|
||||||
|
logon.Body.two_factor_code = details.TwoFactorCode;
|
||||||
|
logon.Body.login_key = details.LoginKey;
|
||||||
|
logon.Body.sha_sentryfile = details.SentryFileHash;
|
||||||
|
logon.Body.eresult_sentryfile = (int) (details.SentryFileHash != null ? EResult.OK : EResult.FileNotFound);
|
||||||
|
|
||||||
|
Client.Send(logon);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
_ _ _ _
|
_ _ _ _
|
||||||
| | | | __ _ _ __ __| || | ___ _ __ ___
|
| | | | __ _ _ __ __| || | ___ _ __ ___
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="protobuf-net, Version=2.0.0.668, Culture=neutral, PublicKeyToken=257b51d87d2e4d67, processorArchitecture=MSIL">
|
<Reference Include="protobuf-net, Version=2.0.0.668, Culture=neutral, PublicKeyToken=257b51d87d2e4d67, processorArchitecture=MSIL">
|
||||||
@@ -160,20 +160,20 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent Condition=" '$(OS)' != 'Unix' AND '$(ConfigurationName)' == 'Release' ">
|
<PostBuildEvent Condition=" '$(OS)' != 'Unix' AND '$(ConfigurationName)' == 'Release' ">
|
||||||
mkdir "$(TargetDir)out" "$(TargetDir)out\config"
|
mkdir "$(SolutionDir)out" "$(SolutionDir)out\config"
|
||||||
copy "$(TargetDir)config\ASF.json" "$(TargetDir)out\config"
|
copy "$(TargetDir)config\ASF.json" "$(SolutionDir)out\config"
|
||||||
copy "$(TargetDir)config\example.json" "$(TargetDir)out\config"
|
copy "$(TargetDir)config\example.json" "$(SolutionDir)out\config"
|
||||||
copy "$(TargetDir)config\minimal.json" "$(TargetDir)out\config"
|
copy "$(TargetDir)config\minimal.json" "$(SolutionDir)out\config"
|
||||||
"$(SolutionDir)tools\ILRepack.exe" /ndebug /internalize /parallel /targetplatform:v4 /wildcards /out:"$(TargetDir)out\ASF.exe" "$(TargetDir)$(TargetName).exe" "$(TargetDir)*.dll"
|
"$(SolutionDir)tools\ILRepack.exe" /ndebug /internalize /parallel /targetplatform:v4 /wildcards /out:"$(SolutionDir)out\ASF.exe" "$(TargetDir)$(TargetName).exe" "$(TargetDir)*.dll"
|
||||||
del "$(TargetDir)out\ASF.exe.config"
|
del "$(SolutionDir)out\ASF.exe.config"
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
<PostBuildEvent Condition=" '$(OS)' == 'Unix' AND '$(ConfigurationName)' == 'Release' ">
|
<PostBuildEvent Condition=" '$(OS)' == 'Unix' AND '$(ConfigurationName)' == 'Release' ">
|
||||||
mkdir -p "$(TargetDir)out" "$(TargetDir)out/config"
|
mkdir -p "$(SolutionDir)out" "$(SolutionDir)out/config"
|
||||||
cp "$(TargetDir)config/ASF.json" "$(TargetDir)out/config"
|
cp "$(TargetDir)config/ASF.json" "$(SolutionDir)out/config"
|
||||||
cp "$(TargetDir)config/example.json" "$(TargetDir)out/config"
|
cp "$(TargetDir)config/example.json" "$(SolutionDir)out/config"
|
||||||
cp "$(TargetDir)config/minimal.json" "$(TargetDir)out/config"
|
cp "$(TargetDir)config/minimal.json" "$(SolutionDir)out/config"
|
||||||
mono -O=all "$(SolutionDir)tools/ILRepack.exe" /ndebug /internalize /parallel /targetplatform:v4 /wildcards /out:"$(TargetDir)out/ASF.exe" "$(TargetDir)$(TargetName).exe" "$(TargetDir)*.dll"
|
mono -O=all "$(SolutionDir)tools/ILRepack.exe" /ndebug /internalize /parallel /targetplatform:v4 /wildcards /out:"$(SolutionDir)out/ASF.exe" "$(TargetDir)$(TargetName).exe" "$(TargetDir)*.dll"
|
||||||
rm "$(TargetDir)out/ASF.exe.config"
|
rm "$(SolutionDir)out/ASF.exe.config"
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
|||||||
@@ -31,9 +31,14 @@ using System.Net;
|
|||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using System.Xml;
|
||||||
|
|
||||||
namespace ArchiSteamFarm {
|
namespace ArchiSteamFarm {
|
||||||
internal sealed class ArchiWebHandler {
|
internal sealed class ArchiWebHandler {
|
||||||
|
private const string SteamCommunity = "steamcommunity.com";
|
||||||
|
|
||||||
|
private static string SteamCommunityURL = "https://" + SteamCommunity;
|
||||||
|
|
||||||
private static int Timeout = 30 * 1000;
|
private static int Timeout = 30 * 1000;
|
||||||
|
|
||||||
private readonly Bot Bot;
|
private readonly Bot Bot;
|
||||||
@@ -43,6 +48,7 @@ namespace ArchiSteamFarm {
|
|||||||
|
|
||||||
internal static void Init() {
|
internal static void Init() {
|
||||||
Timeout = Program.GlobalConfig.HttpTimeout * 1000;
|
Timeout = Program.GlobalConfig.HttpTimeout * 1000;
|
||||||
|
SteamCommunityURL = (Program.GlobalConfig.ForceHttp ? "http://" : "https://") + SteamCommunity;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal ArchiWebHandler(Bot bot) {
|
internal ArchiWebHandler(Bot bot) {
|
||||||
@@ -91,7 +97,7 @@ namespace ArchiSteamFarm {
|
|||||||
sessionkey: Encoding.ASCII.GetString(WebUtility.UrlEncodeToBytes(cryptedSessionKey, 0, cryptedSessionKey.Length)),
|
sessionkey: Encoding.ASCII.GetString(WebUtility.UrlEncodeToBytes(cryptedSessionKey, 0, cryptedSessionKey.Length)),
|
||||||
encrypted_loginkey: Encoding.ASCII.GetString(WebUtility.UrlEncodeToBytes(cryptedLoginKey, 0, cryptedLoginKey.Length)),
|
encrypted_loginkey: Encoding.ASCII.GetString(WebUtility.UrlEncodeToBytes(cryptedLoginKey, 0, cryptedLoginKey.Length)),
|
||||||
method: WebRequestMethods.Http.Post,
|
method: WebRequestMethods.Http.Post,
|
||||||
secure: true
|
secure: !Program.GlobalConfig.ForceHttp
|
||||||
);
|
);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logging.LogGenericException(e, Bot.BotName);
|
Logging.LogGenericException(e, Bot.BotName);
|
||||||
@@ -126,7 +132,7 @@ namespace ArchiSteamFarm {
|
|||||||
|
|
||||||
HtmlDocument htmlDocument = null;
|
HtmlDocument htmlDocument = null;
|
||||||
for (byte i = 0; i < WebBrowser.MaxRetries && htmlDocument == null; i++) {
|
for (byte i = 0; i < WebBrowser.MaxRetries && htmlDocument == null; i++) {
|
||||||
htmlDocument = await WebBrowser.UrlGetToHtmlDocument("https://steamcommunity.com/my/profile", Cookie).ConfigureAwait(false);
|
htmlDocument = await WebBrowser.UrlGetToHtmlDocument(SteamCommunityURL + "/my/profile", Cookie).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (htmlDocument == null) {
|
if (htmlDocument == null) {
|
||||||
@@ -149,6 +155,51 @@ namespace ArchiSteamFarm {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal async Task<Dictionary<uint, string>> GetOwnedGames() {
|
||||||
|
if (SteamID == 0) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
string request = SteamCommunityURL + "/profiles/" + SteamID + "/games/?xml=1";
|
||||||
|
|
||||||
|
XmlDocument response = null;
|
||||||
|
for (byte i = 0; i < WebBrowser.MaxRetries && response == null; i++) {
|
||||||
|
response = await WebBrowser.UrlGetToXML(request, Cookie).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (response == null) {
|
||||||
|
Logging.LogGenericWTF("Request failed even after " + WebBrowser.MaxRetries + " tries", Bot.BotName);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
XmlNodeList xmlNodeList = response.SelectNodes("gamesList/games/game");
|
||||||
|
if (xmlNodeList == null || xmlNodeList.Count == 0) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Dictionary<uint, string> result = new Dictionary<uint, string>(xmlNodeList.Count);
|
||||||
|
foreach (XmlNode xmlNode in xmlNodeList) {
|
||||||
|
XmlNode appNode = xmlNode.SelectSingleNode("appID");
|
||||||
|
if (appNode == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint appID;
|
||||||
|
if (!uint.TryParse(appNode.InnerText, out appID)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
XmlNode nameNode = xmlNode.SelectSingleNode("name");
|
||||||
|
if (nameNode == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
result[appID] = nameNode.InnerText;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
internal List<Steam.TradeOffer> GetTradeOffers() {
|
internal List<Steam.TradeOffer> GetTradeOffers() {
|
||||||
if (string.IsNullOrEmpty(Bot.BotConfig.SteamApiKey)) {
|
if (string.IsNullOrEmpty(Bot.BotConfig.SteamApiKey)) {
|
||||||
return null;
|
return null;
|
||||||
@@ -163,7 +214,7 @@ namespace ArchiSteamFarm {
|
|||||||
response = iEconService.GetTradeOffers(
|
response = iEconService.GetTradeOffers(
|
||||||
get_received_offers: 1,
|
get_received_offers: 1,
|
||||||
active_only: 1,
|
active_only: 1,
|
||||||
secure: true
|
secure: !Program.GlobalConfig.ForceHttp
|
||||||
);
|
);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logging.LogGenericException(e, Bot.BotName);
|
Logging.LogGenericException(e, Bot.BotName);
|
||||||
@@ -180,7 +231,7 @@ namespace ArchiSteamFarm {
|
|||||||
foreach (KeyValue trade in response["trade_offers_received"].Children) {
|
foreach (KeyValue trade in response["trade_offers_received"].Children) {
|
||||||
Steam.TradeOffer tradeOffer = new Steam.TradeOffer {
|
Steam.TradeOffer tradeOffer = new Steam.TradeOffer {
|
||||||
tradeofferid = trade["tradeofferid"].AsString(),
|
tradeofferid = trade["tradeofferid"].AsString(),
|
||||||
accountid_other = trade["accountid_other"].AsInteger(),
|
accountid_other = (uint) trade["accountid_other"].AsUnsignedLong(), // TODO: Correct this when SK2 with https://github.com/SteamRE/SteamKit/pull/255 gets released
|
||||||
trade_offer_state = trade["trade_offer_state"].AsEnum<Steam.TradeOffer.ETradeOfferState>()
|
trade_offer_state = trade["trade_offer_state"].AsEnum<Steam.TradeOffer.ETradeOfferState>()
|
||||||
};
|
};
|
||||||
foreach (KeyValue item in trade["items_to_give"].Children) {
|
foreach (KeyValue item in trade["items_to_give"].Children) {
|
||||||
@@ -219,7 +270,7 @@ namespace ArchiSteamFarm {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
string request = "https://steamcommunity.com/gid/" + clanID;
|
string request = SteamCommunityURL + "/gid/" + clanID;
|
||||||
|
|
||||||
Dictionary<string, string> data = new Dictionary<string, string>(2) {
|
Dictionary<string, string> data = new Dictionary<string, string>(2) {
|
||||||
{"sessionID", sessionID},
|
{"sessionID", sessionID},
|
||||||
@@ -249,7 +300,7 @@ namespace ArchiSteamFarm {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
string referer = "https://steamcommunity.com/tradeoffer/" + tradeID;
|
string referer = SteamCommunityURL + "/tradeoffer/" + tradeID;
|
||||||
string request = referer + "/accept";
|
string request = referer + "/accept";
|
||||||
|
|
||||||
Dictionary<string, string> data = new Dictionary<string, string>(3) {
|
Dictionary<string, string> data = new Dictionary<string, string>(3) {
|
||||||
@@ -285,7 +336,7 @@ namespace ArchiSteamFarm {
|
|||||||
response = iEconService.DeclineTradeOffer(
|
response = iEconService.DeclineTradeOffer(
|
||||||
tradeofferid: tradeID.ToString(),
|
tradeofferid: tradeID.ToString(),
|
||||||
method: WebRequestMethods.Http.Post,
|
method: WebRequestMethods.Http.Post,
|
||||||
secure: true
|
secure: !Program.GlobalConfig.ForceHttp
|
||||||
);
|
);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logging.LogGenericException(e, Bot.BotName);
|
Logging.LogGenericException(e, Bot.BotName);
|
||||||
@@ -304,7 +355,7 @@ namespace ArchiSteamFarm {
|
|||||||
internal async Task<List<Steam.Item>> GetMyTradableInventory() {
|
internal async Task<List<Steam.Item>> GetMyTradableInventory() {
|
||||||
JObject jObject = null;
|
JObject jObject = null;
|
||||||
for (byte i = 0; i < WebBrowser.MaxRetries && jObject == null; i++) {
|
for (byte i = 0; i < WebBrowser.MaxRetries && jObject == null; i++) {
|
||||||
jObject = await WebBrowser.UrlGetToJObject("https://steamcommunity.com/my/inventory/json/753/6?trading=1", Cookie).ConfigureAwait(false);
|
jObject = await WebBrowser.UrlGetToJObject(SteamCommunityURL + "/my/inventory/json/753/6?trading=1", Cookie).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (jObject == null) {
|
if (jObject == null) {
|
||||||
@@ -362,7 +413,7 @@ namespace ArchiSteamFarm {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
string referer = "https://steamcommunity.com/tradeoffer/new";
|
string referer = SteamCommunityURL + "/tradeoffer/new";
|
||||||
string request = referer + "/send";
|
string request = referer + "/send";
|
||||||
|
|
||||||
foreach (Steam.TradeOfferRequest trade in trades) {
|
foreach (Steam.TradeOfferRequest trade in trades) {
|
||||||
@@ -396,7 +447,7 @@ namespace ArchiSteamFarm {
|
|||||||
|
|
||||||
HtmlDocument htmlDocument = null;
|
HtmlDocument htmlDocument = null;
|
||||||
for (byte i = 0; i < WebBrowser.MaxRetries && htmlDocument == null; i++) {
|
for (byte i = 0; i < WebBrowser.MaxRetries && htmlDocument == null; i++) {
|
||||||
htmlDocument = await WebBrowser.UrlGetToHtmlDocument("https://steamcommunity.com/profiles/" + SteamID + "/badges?l=english&p=" + page, Cookie).ConfigureAwait(false);
|
htmlDocument = await WebBrowser.UrlGetToHtmlDocument(SteamCommunityURL + "/profiles/" + SteamID + "/badges?l=english&p=" + page, Cookie).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (htmlDocument == null) {
|
if (htmlDocument == null) {
|
||||||
@@ -414,7 +465,7 @@ namespace ArchiSteamFarm {
|
|||||||
|
|
||||||
HtmlDocument htmlDocument = null;
|
HtmlDocument htmlDocument = null;
|
||||||
for (byte i = 0; i < WebBrowser.MaxRetries && htmlDocument == null; i++) {
|
for (byte i = 0; i < WebBrowser.MaxRetries && htmlDocument == null; i++) {
|
||||||
htmlDocument = await WebBrowser.UrlGetToHtmlDocument("https://steamcommunity.com/profiles/" + SteamID + "/gamecards/" + appID + "?l=english", Cookie).ConfigureAwait(false);
|
htmlDocument = await WebBrowser.UrlGetToHtmlDocument(SteamCommunityURL + "/profiles/" + SteamID + "/gamecards/" + appID + "?l=english", Cookie).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (htmlDocument == null) {
|
if (htmlDocument == null) {
|
||||||
@@ -432,7 +483,7 @@ namespace ArchiSteamFarm {
|
|||||||
|
|
||||||
HttpResponseMessage response = null;
|
HttpResponseMessage response = null;
|
||||||
for (byte i = 0; i < WebBrowser.MaxRetries && response == null; i++) {
|
for (byte i = 0; i < WebBrowser.MaxRetries && response == null; i++) {
|
||||||
response = await WebBrowser.UrlGet("https://steamcommunity.com/profiles/" + SteamID + "/inventory", Cookie).ConfigureAwait(false);
|
response = await WebBrowser.UrlGet(SteamCommunityURL + "/profiles/" + SteamID + "/inventory", Cookie).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response == null) {
|
if (response == null) {
|
||||||
@@ -453,9 +504,12 @@ namespace ArchiSteamFarm {
|
|||||||
{ "pin", parentalPin }
|
{ "pin", parentalPin }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
string referer = SteamCommunityURL;
|
||||||
|
string request = referer + "/parental/ajaxunlock";
|
||||||
|
|
||||||
HttpResponseMessage response = null;
|
HttpResponseMessage response = null;
|
||||||
for (byte i = 0; i < WebBrowser.MaxRetries && response == null; i++) {
|
for (byte i = 0; i < WebBrowser.MaxRetries && response == null; i++) {
|
||||||
response = await WebBrowser.UrlPost("https://steamcommunity.com/parental/ajaxunlock", data, Cookie, "https://steamcommunity.com/").ConfigureAwait(false);
|
response = await WebBrowser.UrlPost(request, data, Cookie, referer).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response == null) {
|
if (response == null) {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -57,10 +57,10 @@ namespace ArchiSteamFarm {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[JsonProperty(Required = Required.AllowNull)]
|
[JsonProperty]
|
||||||
private string _LoginKey;
|
private string _LoginKey;
|
||||||
|
|
||||||
[JsonProperty(Required = Required.AllowNull)]
|
[JsonProperty]
|
||||||
private SteamGuardAccount _SteamGuardAccount;
|
private SteamGuardAccount _SteamGuardAccount;
|
||||||
|
|
||||||
private string FilePath;
|
private string FilePath;
|
||||||
@@ -91,7 +91,7 @@ namespace ArchiSteamFarm {
|
|||||||
// This constructor is used only by deserializer
|
// This constructor is used only by deserializer
|
||||||
private BotDatabase() { }
|
private BotDatabase() { }
|
||||||
|
|
||||||
private void Save() {
|
internal void Save() {
|
||||||
lock (FilePath) {
|
lock (FilePath) {
|
||||||
try {
|
try {
|
||||||
File.WriteAllText(FilePath, JsonConvert.SerializeObject(this));
|
File.WriteAllText(FilePath, JsonConvert.SerializeObject(this));
|
||||||
|
|||||||
@@ -399,7 +399,7 @@ namespace ArchiSteamFarm {
|
|||||||
await StartFarming().ConfigureAwait(false);
|
await StartFarming().ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<bool?> ShouldFarm(ulong appID) {
|
private async Task<bool?> ShouldFarm(uint appID) {
|
||||||
if (appID == 0) {
|
if (appID == 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -425,12 +425,12 @@ namespace ArchiSteamFarm {
|
|||||||
|
|
||||||
bool? keepFarming = await ShouldFarm(appID).ConfigureAwait(false);
|
bool? keepFarming = await ShouldFarm(appID).ConfigureAwait(false);
|
||||||
for (ushort farmingTime = 0; farmingTime <= 60 * Program.GlobalConfig.MaxFarmingTime && keepFarming.GetValueOrDefault(true); farmingTime += Program.GlobalConfig.FarmingDelay) {
|
for (ushort farmingTime = 0; farmingTime <= 60 * Program.GlobalConfig.MaxFarmingTime && keepFarming.GetValueOrDefault(true); farmingTime += Program.GlobalConfig.FarmingDelay) {
|
||||||
Logging.LogGenericInfo("Still farming: " + appID, Bot.BotName);
|
|
||||||
if (FarmResetEvent.WaitOne(60 * 1000 * Program.GlobalConfig.FarmingDelay)) {
|
if (FarmResetEvent.WaitOne(60 * 1000 * Program.GlobalConfig.FarmingDelay)) {
|
||||||
success = false;
|
success = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
keepFarming = await ShouldFarm(appID).ConfigureAwait(false);
|
keepFarming = await ShouldFarm(appID).ConfigureAwait(false);
|
||||||
|
Logging.LogGenericInfo("Still farming: " + appID, Bot.BotName);
|
||||||
}
|
}
|
||||||
|
|
||||||
Bot.ResetGamesPlayed();
|
Bot.ResetGamesPlayed();
|
||||||
|
|||||||
@@ -22,6 +22,10 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
using SteamKit2;
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
namespace ArchiSteamFarm {
|
namespace ArchiSteamFarm {
|
||||||
internal static class Debugging {
|
internal static class Debugging {
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -33,5 +37,27 @@ namespace ArchiSteamFarm {
|
|||||||
internal static bool IsReleaseBuild => !IsDebugBuild;
|
internal static bool IsReleaseBuild => !IsDebugBuild;
|
||||||
|
|
||||||
internal static bool NetHookAlreadyInitialized { get; set; } = false;
|
internal static bool NetHookAlreadyInitialized { get; set; } = false;
|
||||||
|
|
||||||
|
internal sealed class DebugListener : IDebugListener {
|
||||||
|
private readonly string FilePath;
|
||||||
|
|
||||||
|
internal DebugListener(string filePath) {
|
||||||
|
if (string.IsNullOrEmpty(filePath)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
FilePath = filePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void WriteLine(string category, string msg) {
|
||||||
|
lock (FilePath) {
|
||||||
|
try {
|
||||||
|
File.AppendAllText(FilePath, category + " | " + msg + Environment.NewLine);
|
||||||
|
} catch (Exception e) {
|
||||||
|
Logging.LogGenericException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ using Newtonsoft.Json;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Net.Sockets;
|
||||||
|
|
||||||
namespace ArchiSteamFarm {
|
namespace ArchiSteamFarm {
|
||||||
internal sealed class GlobalConfig {
|
internal sealed class GlobalConfig {
|
||||||
@@ -47,6 +48,12 @@ namespace ArchiSteamFarm {
|
|||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
internal EUpdateChannel UpdateChannel { get; private set; } = EUpdateChannel.Stable;
|
internal EUpdateChannel UpdateChannel { get; private set; } = EUpdateChannel.Stable;
|
||||||
|
|
||||||
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
|
internal ProtocolType SteamProtocol { get; private set; } = ProtocolType.Tcp;
|
||||||
|
|
||||||
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
|
internal ulong SteamOwnerID { get; private set; } = 0;
|
||||||
|
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
internal byte MaxFarmingTime { get; private set; } = 10;
|
internal byte MaxFarmingTime { get; private set; } = 10;
|
||||||
|
|
||||||
@@ -66,7 +73,10 @@ namespace ArchiSteamFarm {
|
|||||||
internal byte InventoryLimiterDelay { get; private set; } = 3;
|
internal byte InventoryLimiterDelay { get; private set; } = 3;
|
||||||
|
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
internal byte HttpTimeout { get; private set; } = 30;
|
internal bool ForceHttp { get; private set; } = false;
|
||||||
|
|
||||||
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
|
internal byte HttpTimeout { get; private set; } = 60;
|
||||||
|
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
internal string WCFHostname { get; private set; } = "localhost";
|
internal string WCFHostname { get; private set; } = "localhost";
|
||||||
@@ -74,9 +84,16 @@ namespace ArchiSteamFarm {
|
|||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
internal ushort WCFPort { get; private set; } = 1242;
|
internal ushort WCFPort { get; private set; } = 1242;
|
||||||
|
|
||||||
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
|
internal bool LogToFile { get; private set; } = true;
|
||||||
|
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
internal bool Statistics { get; private set; } = true;
|
internal bool Statistics { get; private set; } = true;
|
||||||
|
|
||||||
|
// TODO: Please remove me immediately after https://github.com/SteamRE/SteamKit/issues/254 gets fixed
|
||||||
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
|
internal bool HackIgnoreMachineID { get; private set; } = false;
|
||||||
|
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
internal HashSet<uint> Blacklist { get; private set; } = new HashSet<uint>(GlobalBlacklist);
|
internal HashSet<uint> Blacklist { get; private set; } = new HashSet<uint>(GlobalBlacklist);
|
||||||
|
|
||||||
@@ -94,6 +111,18 @@ namespace ArchiSteamFarm {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SK2 supports only TCP and UDP steam protocols
|
||||||
|
// Make sure that user can't screw this up
|
||||||
|
switch (globalConfig.SteamProtocol) {
|
||||||
|
case ProtocolType.Tcp:
|
||||||
|
case ProtocolType.Udp:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Logging.LogGenericWarning("Configured SteamProtocol is invalid: " + globalConfig.SteamProtocol + ", default TCP protocol will be used instead");
|
||||||
|
globalConfig.SteamProtocol = ProtocolType.Tcp;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
return globalConfig;
|
return globalConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ namespace ArchiSteamFarm {
|
|||||||
internal string tradeofferid { get; set; }
|
internal string tradeofferid { get; set; }
|
||||||
|
|
||||||
[JsonProperty(Required = Required.Always)]
|
[JsonProperty(Required = Required.Always)]
|
||||||
internal int accountid_other { get; set; }
|
internal uint accountid_other { get; set; }
|
||||||
|
|
||||||
[JsonProperty(Required = Required.Always)]
|
[JsonProperty(Required = Required.Always)]
|
||||||
internal ETradeOfferState trade_offer_state { get; set; }
|
internal ETradeOfferState trade_offer_state { get; set; }
|
||||||
@@ -97,7 +97,7 @@ namespace ArchiSteamFarm {
|
|||||||
internal ulong OtherSteamID64 {
|
internal ulong OtherSteamID64 {
|
||||||
get {
|
get {
|
||||||
if (_OtherSteamID64 == 0 && accountid_other != 0) {
|
if (_OtherSteamID64 == 0 && accountid_other != 0) {
|
||||||
_OtherSteamID64 = new SteamID((uint) accountid_other, EUniverse.Public, EAccountType.Individual).ConvertToUInt64();
|
_OtherSteamID64 = new SteamID(accountid_other, EUniverse.Public, EAccountType.Individual).ConvertToUInt64();
|
||||||
}
|
}
|
||||||
|
|
||||||
return _OtherSteamID64;
|
return _OtherSteamID64;
|
||||||
|
|||||||
@@ -31,18 +31,18 @@ namespace ArchiSteamFarm {
|
|||||||
internal static class Logging {
|
internal static class Logging {
|
||||||
private static readonly object FileLock = new object();
|
private static readonly object FileLock = new object();
|
||||||
|
|
||||||
internal static bool? LogToFile { get; set; } = null;
|
private static bool LogToFile = false;
|
||||||
|
|
||||||
internal static void Init() {
|
internal static void Init() {
|
||||||
if (!LogToFile.HasValue) {
|
LogToFile = Program.GlobalConfig.LogToFile;
|
||||||
LogToFile = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
lock (FileLock) {
|
if (LogToFile) {
|
||||||
try {
|
lock (FileLock) {
|
||||||
File.Delete(Program.LogFile);
|
try {
|
||||||
} catch (Exception e) {
|
File.Delete(Program.LogFile);
|
||||||
LogGenericException(e);
|
} catch (Exception e) {
|
||||||
|
LogGenericException(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -69,11 +69,10 @@ namespace ArchiSteamFarm {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Log("[!] EXCEPTION: " + previousMethodName + "() <" + botName + "> " + exception.Message);
|
Log("[!] EXCEPTION: " + previousMethodName + "() <" + botName + "> " + exception.Message);
|
||||||
Log("[!] StackTrace: " + exception.StackTrace);
|
Log("[!] StackTrace:" + Environment.NewLine + exception.StackTrace);
|
||||||
|
|
||||||
Exception innerException = exception.InnerException;
|
if (exception.InnerException != null) {
|
||||||
if (innerException != null) {
|
LogGenericException(exception.InnerException, botName, previousMethodName);
|
||||||
LogGenericException(innerException, botName, previousMethodName);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,17 +118,18 @@ namespace ArchiSteamFarm {
|
|||||||
|
|
||||||
// Write on console only when not awaiting response from user
|
// Write on console only when not awaiting response from user
|
||||||
if (!Program.ConsoleIsBusy) {
|
if (!Program.ConsoleIsBusy) {
|
||||||
Console.Write(loggedMessage);
|
try {
|
||||||
|
Console.Write(loggedMessage);
|
||||||
|
} catch { }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LogToFile.GetValueOrDefault()) {
|
if (LogToFile) {
|
||||||
lock (FileLock) {
|
lock (FileLock) {
|
||||||
try {
|
try {
|
||||||
File.AppendAllText(Program.LogFile, loggedMessage);
|
File.AppendAllText(Program.LogFile, loggedMessage);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LogToFile = false;
|
LogToFile = false;
|
||||||
LogGenericException(e);
|
LogGenericException(e);
|
||||||
LogToFile = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ using System.Threading.Tasks;
|
|||||||
namespace ArchiSteamFarm {
|
namespace ArchiSteamFarm {
|
||||||
internal static class Program {
|
internal static class Program {
|
||||||
internal enum EUserInputType : byte {
|
internal enum EUserInputType : byte {
|
||||||
|
Unknown,
|
||||||
|
DeviceID,
|
||||||
Login,
|
Login,
|
||||||
Password,
|
Password,
|
||||||
PhoneNumber,
|
PhoneNumber,
|
||||||
@@ -46,13 +48,12 @@ namespace ArchiSteamFarm {
|
|||||||
}
|
}
|
||||||
|
|
||||||
internal enum EMode : byte {
|
internal enum EMode : byte {
|
||||||
|
Unknown,
|
||||||
Normal, // Standard most common usage
|
Normal, // Standard most common usage
|
||||||
Client, // WCF client only
|
Client, // WCF client only
|
||||||
Server // Normal + WCF server
|
Server // Normal + WCF server
|
||||||
}
|
}
|
||||||
|
|
||||||
private const string GithubReleaseURL = "https://api.github.com/repos/JustArchi/ArchiSteamFarm/releases";
|
|
||||||
|
|
||||||
internal const string ASF = "ASF";
|
internal const string ASF = "ASF";
|
||||||
internal const string ConfigDirectory = "config";
|
internal const string ConfigDirectory = "config";
|
||||||
internal const string DebugDirectory = "debug";
|
internal const string DebugDirectory = "debug";
|
||||||
@@ -60,17 +61,19 @@ namespace ArchiSteamFarm {
|
|||||||
internal const string GlobalConfigFile = ASF + ".json";
|
internal const string GlobalConfigFile = ASF + ".json";
|
||||||
internal const string GlobalDatabaseFile = ASF + ".db";
|
internal const string GlobalDatabaseFile = ASF + ".db";
|
||||||
|
|
||||||
|
private const string GithubReleaseURL = "https://api.github.com/repos/JustArchi/ArchiSteamFarm/releases"; // GitHub API is HTTPS only
|
||||||
|
|
||||||
|
private static readonly Assembly Assembly = Assembly.GetExecutingAssembly();
|
||||||
|
internal static readonly Version Version = Assembly.GetName().Version;
|
||||||
|
|
||||||
private static readonly object ConsoleLock = new object();
|
private static readonly object ConsoleLock = new object();
|
||||||
private static readonly SemaphoreSlim SteamSemaphore = new SemaphoreSlim(1);
|
private static readonly SemaphoreSlim SteamSemaphore = new SemaphoreSlim(1);
|
||||||
private static readonly ManualResetEvent ShutdownResetEvent = new ManualResetEvent(false);
|
private static readonly ManualResetEvent ShutdownResetEvent = new ManualResetEvent(false);
|
||||||
private static readonly Assembly Assembly = Assembly.GetExecutingAssembly();
|
|
||||||
private static readonly string ExecutableFile = Assembly.Location;
|
private static readonly string ExecutableFile = Assembly.Location;
|
||||||
private static readonly string ExecutableName = Path.GetFileName(ExecutableFile);
|
private static readonly string ExecutableName = Path.GetFileName(ExecutableFile);
|
||||||
private static readonly string ExecutableDirectory = Path.GetDirectoryName(ExecutableFile);
|
private static readonly string ExecutableDirectory = Path.GetDirectoryName(ExecutableFile);
|
||||||
private static readonly WCF WCF = new WCF();
|
private static readonly WCF WCF = new WCF();
|
||||||
|
|
||||||
internal static readonly string Version = Assembly.GetName().Version.ToString();
|
|
||||||
|
|
||||||
internal static GlobalConfig GlobalConfig { get; private set; }
|
internal static GlobalConfig GlobalConfig { get; private set; }
|
||||||
internal static GlobalDatabase GlobalDatabase { get; private set; }
|
internal static GlobalDatabase GlobalDatabase { get; private set; }
|
||||||
internal static bool ConsoleIsBusy { get; private set; } = false;
|
internal static bool ConsoleIsBusy { get; private set; } = false;
|
||||||
@@ -141,9 +144,11 @@ namespace ArchiSteamFarm {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Logging.LogGenericInfo("Local version: " + Version + " | Remote version: " + releaseResponse.Tag);
|
Version newVersion = new Version(releaseResponse.Tag);
|
||||||
|
|
||||||
if (string.Compare(Version, releaseResponse.Tag, StringComparison.Ordinal) >= 0) { // If local version is the same or newer than remote version
|
Logging.LogGenericInfo("Local version: " + Version + " | Remote version: " + newVersion);
|
||||||
|
|
||||||
|
if (Version.CompareTo(newVersion) >= 0) { // If local version is the same or newer than remote version
|
||||||
if (GlobalConfig.AutoUpdates && AutoUpdatesTimer == null) {
|
if (GlobalConfig.AutoUpdates && AutoUpdatesTimer == null) {
|
||||||
Logging.LogGenericInfo("ASF will automatically check for new versions every 24 hours");
|
Logging.LogGenericInfo("ASF will automatically check for new versions every 24 hours");
|
||||||
AutoUpdatesTimer = new Timer(
|
AutoUpdatesTimer = new Timer(
|
||||||
@@ -237,34 +242,15 @@ namespace ArchiSteamFarm {
|
|||||||
Logging.LogGenericInfo("Update process is finished! ASF will now restart itself...");
|
Logging.LogGenericInfo("Update process is finished! ASF will now restart itself...");
|
||||||
await Utilities.SleepAsync(5000);
|
await Utilities.SleepAsync(5000);
|
||||||
|
|
||||||
if (!Restart()) {
|
Restart();
|
||||||
// Make sure that we won't try updating again in this case
|
|
||||||
if (AutoUpdatesTimer != null) {
|
|
||||||
AutoUpdatesTimer.Dispose();
|
|
||||||
AutoUpdatesTimer = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Inform user about failure
|
|
||||||
Logging.LogGenericWarning("ASF could not restart itself, you may need to restart it manually!");
|
|
||||||
await Utilities.SleepAsync(5000);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void Exit(int exitCode = 0) {
|
internal static void Restart() {
|
||||||
Environment.Exit(exitCode);
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static bool Restart() {
|
|
||||||
try {
|
try {
|
||||||
if (Process.Start(ExecutableFile, string.Join(" ", Environment.GetCommandLineArgs().Skip(1))) != null) {
|
Process.Start(ExecutableFile, string.Join(" ", Environment.GetCommandLineArgs().Skip(1)));
|
||||||
Exit();
|
Environment.Exit(0);
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logging.LogGenericException(e);
|
Logging.LogGenericException(e);
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -277,10 +263,17 @@ namespace ArchiSteamFarm {
|
|||||||
}
|
}
|
||||||
|
|
||||||
internal static string GetUserInput(string botLogin, EUserInputType userInputType, string extraInformation = null) {
|
internal static string GetUserInput(string botLogin, EUserInputType userInputType, string extraInformation = null) {
|
||||||
|
if (userInputType == EUserInputType.Unknown) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
string result;
|
string result;
|
||||||
lock (ConsoleLock) {
|
lock (ConsoleLock) {
|
||||||
ConsoleIsBusy = true;
|
ConsoleIsBusy = true;
|
||||||
switch (userInputType) {
|
switch (userInputType) {
|
||||||
|
case EUserInputType.DeviceID:
|
||||||
|
Console.Write("<" + botLogin + "> Please enter your Device ID (including \"android:\"): ");
|
||||||
|
break;
|
||||||
case EUserInputType.Login:
|
case EUserInputType.Login:
|
||||||
Console.Write("<" + botLogin + "> Please enter your login: ");
|
Console.Write("<" + botLogin + "> Please enter your login: ");
|
||||||
break;
|
break;
|
||||||
@@ -307,6 +300,9 @@ namespace ArchiSteamFarm {
|
|||||||
case EUserInputType.TwoFactorAuthentication:
|
case EUserInputType.TwoFactorAuthentication:
|
||||||
Console.Write("<" + botLogin + "> Please enter your 2 factor auth code from your authenticator app: ");
|
Console.Write("<" + botLogin + "> Please enter your 2 factor auth code from your authenticator app: ");
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
Console.Write("<" + botLogin + "> Please enter not documented yet value of \"" + userInputType + "\": ");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
result = Console.ReadLine();
|
result = Console.ReadLine();
|
||||||
Console.Clear(); // For security purposes
|
Console.Clear(); // For security purposes
|
||||||
@@ -328,6 +324,7 @@ namespace ArchiSteamFarm {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Logging.LogGenericInfo("No bots are running, exiting");
|
Logging.LogGenericInfo("No bots are running, exiting");
|
||||||
|
Thread.Sleep(5000);
|
||||||
ShutdownResetEvent.Set();
|
ShutdownResetEvent.Set();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -336,14 +333,14 @@ namespace ArchiSteamFarm {
|
|||||||
if (GlobalConfig == null) {
|
if (GlobalConfig == null) {
|
||||||
Logging.LogGenericError("Global config could not be loaded, please make sure that ASF.json exists and is valid!");
|
Logging.LogGenericError("Global config could not be loaded, please make sure that ASF.json exists and is valid!");
|
||||||
Thread.Sleep(5000);
|
Thread.Sleep(5000);
|
||||||
Exit(1);
|
Environment.Exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
GlobalDatabase = GlobalDatabase.Load();
|
GlobalDatabase = GlobalDatabase.Load();
|
||||||
if (GlobalDatabase == null) {
|
if (GlobalDatabase == null) {
|
||||||
Logging.LogGenericError("Global database could not be loaded!");
|
Logging.LogGenericError("Global database could not be loaded!");
|
||||||
Thread.Sleep(5000);
|
Thread.Sleep(5000);
|
||||||
Exit(1);
|
Environment.Exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ArchiWebHandler.Init();
|
ArchiWebHandler.Init();
|
||||||
@@ -356,13 +353,6 @@ namespace ArchiSteamFarm {
|
|||||||
switch (arg) {
|
switch (arg) {
|
||||||
case "--client":
|
case "--client":
|
||||||
Mode = EMode.Client;
|
Mode = EMode.Client;
|
||||||
Logging.LogToFile = false;
|
|
||||||
break;
|
|
||||||
case "--log":
|
|
||||||
Logging.LogToFile = true;
|
|
||||||
break;
|
|
||||||
case "--no-log":
|
|
||||||
Logging.LogToFile = false;
|
|
||||||
break;
|
break;
|
||||||
case "--server":
|
case "--server":
|
||||||
Mode = EMode.Server;
|
Mode = EMode.Server;
|
||||||
@@ -379,10 +369,10 @@ namespace ArchiSteamFarm {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
Logging.LogGenericInfo("Command sent: \"" + arg + "\"");
|
Logging.LogGenericInfo("Command sent: " + arg);
|
||||||
|
|
||||||
// We intentionally execute this async block synchronously
|
// We intentionally execute this async block synchronously
|
||||||
Logging.LogGenericInfo("Response received: \"" + WCF.SendCommand(arg) + "\"");
|
Logging.LogGenericInfo("Response received: " + WCF.SendCommand(arg));
|
||||||
/*
|
/*
|
||||||
Task.Run(async () => {
|
Task.Run(async () => {
|
||||||
Logging.LogGenericNotice("WCF", "Response received: " + await WCF.SendCommand(arg).ConfigureAwait(false));
|
Logging.LogGenericNotice("WCF", "Response received: " + await WCF.SendCommand(arg).ConfigureAwait(false));
|
||||||
@@ -401,8 +391,17 @@ namespace ArchiSteamFarm {
|
|||||||
Logging.LogGenericException((Exception) args.ExceptionObject);
|
Logging.LogGenericException((Exception) args.ExceptionObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void Main(string[] args) {
|
private static void UnobservedTaskExceptionHandler(object sender, UnobservedTaskExceptionEventArgs args) {
|
||||||
|
if (sender == null || args == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Logging.LogGenericException(args.Exception);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void Init(string[] args) {
|
||||||
AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionHandler;
|
AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionHandler;
|
||||||
|
TaskScheduler.UnobservedTaskException += UnobservedTaskExceptionHandler;
|
||||||
|
|
||||||
Logging.LogGenericInfo("Archi's Steam Farm, version " + Version);
|
Logging.LogGenericInfo("Archi's Steam Farm, version " + Version);
|
||||||
Directory.SetCurrentDirectory(ExecutableDirectory);
|
Directory.SetCurrentDirectory(ExecutableDirectory);
|
||||||
@@ -425,6 +424,18 @@ namespace ArchiSteamFarm {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If debugging is on, we prepare debug directory prior to running
|
||||||
|
if (GlobalConfig.Debug) {
|
||||||
|
if (Directory.Exists(DebugDirectory)) {
|
||||||
|
Directory.Delete(DebugDirectory, true);
|
||||||
|
Thread.Sleep(1000); // Dirty workaround giving Windows some time to sync
|
||||||
|
}
|
||||||
|
Directory.CreateDirectory(DebugDirectory);
|
||||||
|
|
||||||
|
SteamKit2.DebugLog.AddListener(new Debugging.DebugListener(Path.Combine(Program.DebugDirectory, "debug.txt")));
|
||||||
|
SteamKit2.DebugLog.Enabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
// Parse args
|
// Parse args
|
||||||
ParseArgs(args);
|
ParseArgs(args);
|
||||||
|
|
||||||
@@ -439,7 +450,7 @@ namespace ArchiSteamFarm {
|
|||||||
if (!Directory.Exists(ConfigDirectory)) {
|
if (!Directory.Exists(ConfigDirectory)) {
|
||||||
Logging.LogGenericError("Config directory doesn't exist!");
|
Logging.LogGenericError("Config directory doesn't exist!");
|
||||||
Thread.Sleep(5000);
|
Thread.Sleep(5000);
|
||||||
Exit(1);
|
Environment.Exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckForUpdate().Wait();
|
CheckForUpdate().Wait();
|
||||||
@@ -447,6 +458,8 @@ namespace ArchiSteamFarm {
|
|||||||
// Before attempting to connect, initialize our list of CMs
|
// Before attempting to connect, initialize our list of CMs
|
||||||
Bot.RefreshCMs(GlobalDatabase.CellID).Wait();
|
Bot.RefreshCMs(GlobalDatabase.CellID).Wait();
|
||||||
|
|
||||||
|
bool isRunning = false;
|
||||||
|
|
||||||
foreach (var configFile in Directory.EnumerateFiles(ConfigDirectory, "*.json")) {
|
foreach (var configFile in Directory.EnumerateFiles(ConfigDirectory, "*.json")) {
|
||||||
string botName = Path.GetFileNameWithoutExtension(configFile);
|
string botName = Path.GetFileNameWithoutExtension(configFile);
|
||||||
if (botName.Equals(ASF)) {
|
if (botName.Equals(ASF)) {
|
||||||
@@ -454,7 +467,9 @@ namespace ArchiSteamFarm {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Bot bot = new Bot(botName);
|
Bot bot = new Bot(botName);
|
||||||
if (!bot.BotConfig.Enabled) {
|
if (bot.BotConfig != null && bot.BotConfig.Enabled) {
|
||||||
|
isRunning = true;
|
||||||
|
} else {
|
||||||
Logging.LogGenericInfo("Not starting this instance because it's disabled in config file", botName);
|
Logging.LogGenericInfo("Not starting this instance because it's disabled in config file", botName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -464,23 +479,28 @@ namespace ArchiSteamFarm {
|
|||||||
string botName = Path.GetFileNameWithoutExtension(configFile);
|
string botName = Path.GetFileNameWithoutExtension(configFile);
|
||||||
Logging.LogGenericWarning("Found legacy " + botName + ".xml config file, it will now be converted to new ASF V2.0 format!");
|
Logging.LogGenericWarning("Found legacy " + botName + ".xml config file, it will now be converted to new ASF V2.0 format!");
|
||||||
Bot bot = new Bot(botName);
|
Bot bot = new Bot(botName);
|
||||||
if (bot.BotConfig == null || !bot.BotConfig.Enabled) {
|
if (bot.BotConfig != null && bot.BotConfig.Enabled) {
|
||||||
|
isRunning = true;
|
||||||
|
} else {
|
||||||
Logging.LogGenericInfo("Not starting this instance because it's disabled in config file", botName);
|
Logging.LogGenericInfo("Not starting this instance because it's disabled in config file", botName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// CONVERSION END
|
// CONVERSION END
|
||||||
|
|
||||||
// Check if we got any bots running
|
// Check if we got any bots running
|
||||||
OnBotShutdown();
|
if (!isRunning) {
|
||||||
|
OnBotShutdown();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void Main(string[] args) {
|
||||||
|
Init(args);
|
||||||
|
|
||||||
// Wait for signal to shutdown
|
// Wait for signal to shutdown
|
||||||
ShutdownResetEvent.WaitOne();
|
ShutdownResetEvent.WaitOne();
|
||||||
|
|
||||||
// We got a signal to shutdown, consider giving user some time to read the message
|
// We got a signal to shutdown
|
||||||
Thread.Sleep(5000);
|
Environment.Exit(0);
|
||||||
|
|
||||||
// This is over, cleanup only now
|
|
||||||
WCF.StopServer();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("2.0.0.6")]
|
[assembly: AssemblyVersion("2.0.1.5")]
|
||||||
[assembly: AssemblyFileVersion("2.0.0.6")]
|
[assembly: AssemblyFileVersion("2.0.1.5")]
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
using SteamAuth;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -35,6 +36,7 @@ namespace ArchiSteamFarm {
|
|||||||
|
|
||||||
private readonly Bot Bot;
|
private readonly Bot Bot;
|
||||||
private readonly SemaphoreSlim Semaphore = new SemaphoreSlim(1);
|
private readonly SemaphoreSlim Semaphore = new SemaphoreSlim(1);
|
||||||
|
|
||||||
private volatile byte ParsingTasks = 0;
|
private volatile byte ParsingTasks = 0;
|
||||||
|
|
||||||
internal static async Task LimitInventoryRequestsAsync() {
|
internal static async Task LimitInventoryRequestsAsync() {
|
||||||
@@ -81,7 +83,7 @@ namespace ArchiSteamFarm {
|
|||||||
}
|
}
|
||||||
|
|
||||||
await Task.WhenAll(tasks).ConfigureAwait(false);
|
await Task.WhenAll(tasks).ConfigureAwait(false);
|
||||||
await Bot.AcceptAllConfirmations().ConfigureAwait(false);
|
await Bot.AcceptConfirmations(Confirmation.ConfirmationType.Trade).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task ParseTrade(Steam.TradeOffer tradeOffer) {
|
private async Task ParseTrade(Steam.TradeOffer tradeOffer) {
|
||||||
|
|||||||
@@ -113,12 +113,12 @@ namespace ArchiSteamFarm {
|
|||||||
return "ERROR: Couldn't find any bot named: " + botName;
|
return "ERROR: Couldn't find any bot named: " + botName;
|
||||||
}
|
}
|
||||||
|
|
||||||
Logging.LogGenericInfo("Received command: \"" + input + "\"");
|
Logging.LogGenericInfo("Received command: " + input);
|
||||||
|
|
||||||
string command = '!' + input;
|
string command = '!' + input;
|
||||||
string output = bot.HandleMessage(command).Result; // TODO: This should be asynchronous
|
string output = bot.Response(Program.GlobalConfig.SteamOwnerID, command).Result; // TODO: This should be asynchronous
|
||||||
|
|
||||||
Logging.LogGenericInfo("Answered to command: \"" + input + "\" with: \"" + output + "\"");
|
Logging.LogGenericInfo("Answered to command: " + input + " with: " + output);
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,18 +31,20 @@ using System.Net;
|
|||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using System.Xml;
|
||||||
|
|
||||||
namespace ArchiSteamFarm {
|
namespace ArchiSteamFarm {
|
||||||
internal static class WebBrowser {
|
internal static class WebBrowser {
|
||||||
internal const byte MaxConnections = 10; // Defines maximum number of connections per ServicePoint. Be careful, as it also defines maximum number of sockets in CLOSE_WAIT state
|
|
||||||
internal const byte MaxIdleTime = 15; // In seconds, how long socket is allowed to stay in CLOSE_WAIT state after there are no connections to it
|
|
||||||
internal const byte MaxRetries = 5; // Defines maximum number of retries, UrlRequest() does not handle retry by itself (it's app responsibility)
|
internal const byte MaxRetries = 5; // Defines maximum number of retries, UrlRequest() does not handle retry by itself (it's app responsibility)
|
||||||
|
|
||||||
|
private const byte MaxConnections = 10; // Defines maximum number of connections per ServicePoint. Be careful, as it also defines maximum number of sockets in CLOSE_WAIT state
|
||||||
|
private const byte MaxIdleTime = 15; // In seconds, how long socket is allowed to stay in CLOSE_WAIT state after there are no connections to it
|
||||||
|
|
||||||
private static readonly string DefaultUserAgent = "ArchiSteamFarm/" + Program.Version;
|
private static readonly string DefaultUserAgent = "ArchiSteamFarm/" + Program.Version;
|
||||||
private static readonly HttpClient HttpClient = new HttpClient(new HttpClientHandler {
|
private static readonly HttpClient HttpClient = new HttpClient(new HttpClientHandler {
|
||||||
UseCookies = false
|
UseCookies = false
|
||||||
}) {
|
}) {
|
||||||
Timeout = TimeSpan.FromSeconds(30)
|
Timeout = TimeSpan.FromSeconds(60)
|
||||||
};
|
};
|
||||||
|
|
||||||
internal static void Init() {
|
internal static void Init() {
|
||||||
@@ -155,6 +157,28 @@ namespace ArchiSteamFarm {
|
|||||||
return jObject;
|
return jObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static async Task<XmlDocument> UrlGetToXML(string request, Dictionary<string, string> cookies = null, string referer = null) {
|
||||||
|
if (string.IsNullOrEmpty(request)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
string content = await UrlGetToContent(request, cookies, referer).ConfigureAwait(false);
|
||||||
|
if (string.IsNullOrEmpty(content)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
XmlDocument xmlDocument = new XmlDocument();
|
||||||
|
|
||||||
|
try {
|
||||||
|
xmlDocument.LoadXml(content);
|
||||||
|
} catch (XmlException e) {
|
||||||
|
Logging.LogGenericException(e);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return xmlDocument;
|
||||||
|
}
|
||||||
|
|
||||||
private static async Task<HttpResponseMessage> UrlRequest(string request, HttpMethod httpMethod, Dictionary<string, string> data = null, Dictionary<string, string> cookies = null, string referer = null) {
|
private static async Task<HttpResponseMessage> UrlRequest(string request, HttpMethod httpMethod, Dictionary<string, string> data = null, Dictionary<string, string> cookies = null, string referer = null) {
|
||||||
if (string.IsNullOrEmpty(request) || httpMethod == null) {
|
if (string.IsNullOrEmpty(request) || httpMethod == null) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -2,16 +2,21 @@
|
|||||||
"Debug": false,
|
"Debug": false,
|
||||||
"AutoUpdates": true,
|
"AutoUpdates": true,
|
||||||
"UpdateChannel": 1,
|
"UpdateChannel": 1,
|
||||||
|
"SteamProtocol": 6,
|
||||||
|
"SteamOwnerID": 0,
|
||||||
"MaxFarmingTime": 10,
|
"MaxFarmingTime": 10,
|
||||||
"IdleFarmingPeriod": 3,
|
"IdleFarmingPeriod": 3,
|
||||||
"FarmingDelay": 5,
|
"FarmingDelay": 5,
|
||||||
"AccountPlayingDelay": 5,
|
"AccountPlayingDelay": 5,
|
||||||
"LoginLimiterDelay": 7,
|
"LoginLimiterDelay": 7,
|
||||||
"InventoryLimiterDelay": 3,
|
"InventoryLimiterDelay": 3,
|
||||||
"HttpTimeout": 30,
|
"ForceHttp": false,
|
||||||
|
"HttpTimeout": 60,
|
||||||
"WCFHostname": "localhost",
|
"WCFHostname": "localhost",
|
||||||
"WCFPort": 1242,
|
"WCFPort": 1242,
|
||||||
|
"LogToFile": true,
|
||||||
"Statistics": true,
|
"Statistics": true,
|
||||||
|
"HackIgnoreMachineID": false,
|
||||||
"Blacklist": [
|
"Blacklist": [
|
||||||
267420,
|
267420,
|
||||||
303700,
|
303700,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="HtmlAgilityPack" version="1.4.9" targetFramework="net45" />
|
<package id="HtmlAgilityPack" version="1.4.9" targetFramework="net45" />
|
||||||
<package id="Newtonsoft.Json" version="8.0.2" targetFramework="net452" />
|
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net451" />
|
||||||
<package id="protobuf-net" version="2.0.0.668" targetFramework="net45" />
|
<package id="protobuf-net" version="2.0.0.668" targetFramework="net45" />
|
||||||
<package id="SteamKit2" version="1.7.0" targetFramework="net452" />
|
<package id="SteamKit2" version="1.7.0" targetFramework="net452" />
|
||||||
</packages>
|
</packages>
|
||||||
6
ConfigGenerator/App.config
Normal file
6
ConfigGenerator/App.config
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />
|
||||||
|
</startup>
|
||||||
|
</configuration>
|
||||||
121
ConfigGenerator/ConfigGenerator.csproj
Normal file
121
ConfigGenerator/ConfigGenerator.csproj
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{C3F6FE68-5E75-415E-BEA1-1E7C16D6A433}</ProjectGuid>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>ConfigGenerator</RootNamespace>
|
||||||
|
<AssemblyName>ConfigGenerator</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugType>none</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>
|
||||||
|
</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Deployment" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="EnhancedPropertyGrid.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Debugging.cs" />
|
||||||
|
<Compile Include="GlobalConfig.cs" />
|
||||||
|
<Compile Include="GlobalConfigPage.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Logging.cs" />
|
||||||
|
<Compile Include="MainForm.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MainForm.Designer.cs">
|
||||||
|
<DependentUpon>MainForm.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Program.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<EmbeddedResource Include="GlobalConfigPage.resx">
|
||||||
|
<DependentUpon>GlobalConfigPage.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="MainForm.resx">
|
||||||
|
<DependentUpon>MainForm.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<Compile Include="Properties\Resources.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<None Include="packages.config" />
|
||||||
|
<None Include="Properties\Settings.settings">
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<Compile Include="Properties\Settings.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<PostBuildEvent Condition=" '$(OS)' != 'Unix' AND '$(ConfigurationName)' == 'Release' ">
|
||||||
|
mkdir "$(SolutionDir)out" "$(SolutionDir)out\config"
|
||||||
|
"$(SolutionDir)tools\ILRepack.exe" /ndebug /internalize /parallel /targetplatform:v4 /wildcards /out:"$(SolutionDir)out\ASF-GUI.exe" "$(TargetDir)$(TargetName).exe" "$(TargetDir)*.dll"
|
||||||
|
del "$(SolutionDir)out\ASF-GUI.exe.config"
|
||||||
|
</PostBuildEvent>
|
||||||
|
<PostBuildEvent Condition=" '$(OS)' == 'Unix' AND '$(ConfigurationName)' == 'Release' ">
|
||||||
|
mkdir -p "$(SolutionDir)out" "$(SolutionDir)out/config"
|
||||||
|
mono -O=all "$(SolutionDir)tools/ILRepack.exe" /ndebug /internalize /parallel /targetplatform:v4 /wildcards /out:"$(SolutionDir)out/ASF-GUI.exe" "$(TargetDir)$(TargetName).exe" "$(TargetDir)*.dll"
|
||||||
|
rm "$(SolutionDir)out/ASF-GUI.exe.config"
|
||||||
|
</PostBuildEvent>
|
||||||
|
</PropertyGroup>
|
||||||
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
<Target Name="BeforeBuild">
|
||||||
|
</Target>
|
||||||
|
<Target Name="AfterBuild">
|
||||||
|
</Target>
|
||||||
|
-->
|
||||||
|
</Project>
|
||||||
38
ConfigGenerator/Debugging.cs
Normal file
38
ConfigGenerator/Debugging.cs
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
_ _ _ ____ _ _____
|
||||||
|
/ \ _ __ ___ | |__ (_)/ ___| | |_ ___ __ _ _ __ ___ | ___|__ _ _ __ _ __ ___
|
||||||
|
/ _ \ | '__|/ __|| '_ \ | |\___ \ | __|/ _ \ / _` || '_ ` _ \ | |_ / _` || '__|| '_ ` _ \
|
||||||
|
/ ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
|
||||||
|
/_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
|
||||||
|
|
||||||
|
Copyright 2015-2016 Ł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;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
namespace ConfigGenerator {
|
||||||
|
internal static class Debugging {
|
||||||
|
#if DEBUG
|
||||||
|
internal static readonly bool IsDebugBuild = true;
|
||||||
|
#else
|
||||||
|
internal static readonly bool IsDebugBuild = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
internal static bool IsReleaseBuild => !IsDebugBuild;
|
||||||
|
}
|
||||||
|
}
|
||||||
20
ConfigGenerator/EnhancedPropertyGrid.cs
Normal file
20
ConfigGenerator/EnhancedPropertyGrid.cs
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace ConfigGenerator {
|
||||||
|
internal sealed class EnhancedPropertyGrid : PropertyGrid {
|
||||||
|
private GlobalConfig GlobalConfig;
|
||||||
|
internal EnhancedPropertyGrid(GlobalConfig globalConfig) : base() {
|
||||||
|
if (globalConfig == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
GlobalConfig = globalConfig;
|
||||||
|
|
||||||
|
SelectedObject = globalConfig;
|
||||||
|
Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
|
||||||
|
Dock = DockStyle.Fill;
|
||||||
|
HelpVisible = false;
|
||||||
|
ToolbarVisible = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
154
ConfigGenerator/GlobalConfig.cs
Normal file
154
ConfigGenerator/GlobalConfig.cs
Normal file
@@ -0,0 +1,154 @@
|
|||||||
|
/*
|
||||||
|
_ _ _ ____ _ _____
|
||||||
|
/ \ _ __ ___ | |__ (_)/ ___| | |_ ___ __ _ _ __ ___ | ___|__ _ _ __ _ __ ___
|
||||||
|
/ _ \ | '__|/ __|| '_ \ | |\___ \ | __|/ _ \ / _` || '_ ` _ \ | |_ / _` || '__|| '_ ` _ \
|
||||||
|
/ ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
|
||||||
|
/_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
|
||||||
|
|
||||||
|
Copyright 2015-2016 Ł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 Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Net.Sockets;
|
||||||
|
|
||||||
|
namespace ConfigGenerator {
|
||||||
|
internal sealed class GlobalConfig {
|
||||||
|
internal enum EUpdateChannel : byte {
|
||||||
|
Unknown,
|
||||||
|
Stable,
|
||||||
|
Experimental
|
||||||
|
}
|
||||||
|
|
||||||
|
// This is hardcoded blacklist which should not be possible to change
|
||||||
|
internal static readonly HashSet<uint> GlobalBlacklist = new HashSet<uint> { 267420, 303700, 335590, 368020, 425280 };
|
||||||
|
|
||||||
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
|
public bool Debug { get; set; } = false;
|
||||||
|
|
||||||
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
|
public bool AutoUpdates { get; set; } = true;
|
||||||
|
|
||||||
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
|
public EUpdateChannel UpdateChannel { get; set; } = EUpdateChannel.Stable;
|
||||||
|
|
||||||
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
|
public ProtocolType SteamProtocol { get; set; } = ProtocolType.Tcp;
|
||||||
|
|
||||||
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
|
public ulong SteamOwnerID { get; set; } = 0;
|
||||||
|
|
||||||
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
|
public byte MaxFarmingTime { get; set; } = 10;
|
||||||
|
|
||||||
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
|
public byte IdleFarmingPeriod { get; set; } = 3;
|
||||||
|
|
||||||
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
|
public byte FarmingDelay { get; set; } = 5;
|
||||||
|
|
||||||
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
|
public byte AccountPlayingDelay { get; set; } = 5;
|
||||||
|
|
||||||
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
|
public byte LoginLimiterDelay { get; set; } = 7;
|
||||||
|
|
||||||
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
|
public byte InventoryLimiterDelay { get; set; } = 3;
|
||||||
|
|
||||||
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
|
public bool ForceHttp { get; set; } = false;
|
||||||
|
|
||||||
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
|
public byte HttpTimeout { get; set; } = 60;
|
||||||
|
|
||||||
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
|
public string WCFHostname { get; set; } = "localhost";
|
||||||
|
|
||||||
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
|
public ushort WCFPort { get; set; } = 1242;
|
||||||
|
|
||||||
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
|
public bool LogToFile { get; set; } = true;
|
||||||
|
|
||||||
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
|
public bool Statistics { get; set; } = true;
|
||||||
|
|
||||||
|
// TODO: Please remove me immediately after https://github.com/SteamRE/SteamKit/issues/254 gets fixed
|
||||||
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
|
public bool HackIgnoreMachineID { get; set; } = false;
|
||||||
|
|
||||||
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
|
public List<uint> Blacklist { get; set; } = new List<uint>();
|
||||||
|
|
||||||
|
private string FilePath;
|
||||||
|
|
||||||
|
internal static GlobalConfig Load(string filePath) {
|
||||||
|
if (string.IsNullOrEmpty(filePath)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!File.Exists(filePath)) {
|
||||||
|
return new GlobalConfig(filePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
GlobalConfig globalConfig;
|
||||||
|
try {
|
||||||
|
globalConfig = JsonConvert.DeserializeObject<GlobalConfig>(File.ReadAllText(filePath));
|
||||||
|
} catch (Exception e) {
|
||||||
|
Logging.LogGenericException(e);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
globalConfig.FilePath = filePath;
|
||||||
|
|
||||||
|
// SK2 supports only TCP and UDP steam protocols
|
||||||
|
// Make sure that user can't screw this up
|
||||||
|
switch (globalConfig.SteamProtocol) {
|
||||||
|
case ProtocolType.Tcp:
|
||||||
|
case ProtocolType.Udp:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Logging.LogGenericWarning("Configured SteamProtocol is invalid: " + globalConfig.SteamProtocol + ", default TCP protocol will be used instead");
|
||||||
|
globalConfig.SteamProtocol = ProtocolType.Tcp;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return globalConfig;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void Save() {
|
||||||
|
lock (FilePath) {
|
||||||
|
try {
|
||||||
|
File.WriteAllText(FilePath, JsonConvert.SerializeObject(this, Formatting.Indented));
|
||||||
|
} catch (Exception e) {
|
||||||
|
Logging.LogGenericException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// This constructor is used only by deserializer
|
||||||
|
private GlobalConfig() { }
|
||||||
|
|
||||||
|
private GlobalConfig(string filePath) {
|
||||||
|
FilePath = filePath;
|
||||||
|
Blacklist.AddRange(GlobalBlacklist);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
51
ConfigGenerator/GlobalConfigPage.cs
Normal file
51
ConfigGenerator/GlobalConfigPage.cs
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
using System.IO;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace ConfigGenerator {
|
||||||
|
internal sealed class GlobalConfigPage : TabPage {
|
||||||
|
|
||||||
|
internal GlobalConfig GlobalConfig { get; private set; }
|
||||||
|
|
||||||
|
private EnhancedPropertyGrid EnhancedPropertyGrid;
|
||||||
|
|
||||||
|
internal GlobalConfigPage(string filePath) : base() {
|
||||||
|
if (string.IsNullOrEmpty(filePath)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
GlobalConfig = GlobalConfig.Load(filePath);
|
||||||
|
if (GlobalConfig == null) {
|
||||||
|
Logging.LogNullError("GlobalConfig");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Text = Path.GetFileNameWithoutExtension(filePath);
|
||||||
|
|
||||||
|
EnhancedPropertyGrid = new EnhancedPropertyGrid(GlobalConfig);
|
||||||
|
Controls.Add(EnhancedPropertyGrid);
|
||||||
|
|
||||||
|
Panel panel = new Panel() {
|
||||||
|
Height = 20,
|
||||||
|
Dock = DockStyle.Bottom,
|
||||||
|
};
|
||||||
|
|
||||||
|
panel.Controls.Add(new Button() {
|
||||||
|
Dock = DockStyle.Left,
|
||||||
|
Text = "Load"
|
||||||
|
});
|
||||||
|
|
||||||
|
panel.Controls.Add(new Button() {
|
||||||
|
Dock = DockStyle.Right,
|
||||||
|
Text = "Save"
|
||||||
|
});
|
||||||
|
|
||||||
|
Controls.Add(panel);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InitializeComponent() {
|
||||||
|
this.SuspendLayout();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
123
ConfigGenerator/GlobalConfigPage.resx
Normal file
123
ConfigGenerator/GlobalConfigPage.resx
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>False</value>
|
||||||
|
</metadata>
|
||||||
|
</root>
|
||||||
93
ConfigGenerator/Logging.cs
Normal file
93
ConfigGenerator/Logging.cs
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
/*
|
||||||
|
_ _ _ ____ _ _____
|
||||||
|
/ \ _ __ ___ | |__ (_)/ ___| | |_ ___ __ _ _ __ ___ | ___|__ _ _ __ _ __ ___
|
||||||
|
/ _ \ | '__|/ __|| '_ \ | |\___ \ | __|/ _ \ / _` || '_ ` _ \ | |_ / _` || '__|| '_ ` _ \
|
||||||
|
/ ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
|
||||||
|
/_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
|
||||||
|
|
||||||
|
Copyright 2015-2016 Ł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;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace ConfigGenerator {
|
||||||
|
internal static class Logging {
|
||||||
|
internal static void LogGenericWTF(string message, [CallerMemberName] string previousMethodName = "") {
|
||||||
|
if (string.IsNullOrEmpty(message)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
MessageBox.Show(previousMethodName + "() " + message, "WTF", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static void LogGenericError(string message, [CallerMemberName] string previousMethodName = "") {
|
||||||
|
if (string.IsNullOrEmpty(message)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
MessageBox.Show(previousMethodName + "() " + message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static void LogGenericException(Exception exception, [CallerMemberName] string previousMethodName = "") {
|
||||||
|
if (exception == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
MessageBox.Show(previousMethodName + "() " + exception.Message + Environment.NewLine + exception.StackTrace, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
|
||||||
|
if (exception.InnerException != null) {
|
||||||
|
LogGenericException(exception.InnerException, previousMethodName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static void LogGenericWarning(string message, [CallerMemberName] string previousMethodName = "") {
|
||||||
|
if (string.IsNullOrEmpty(message)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
MessageBox.Show(previousMethodName + "() " + message, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static void LogGenericInfo(string message, [CallerMemberName] string previousMethodName = "") {
|
||||||
|
if (string.IsNullOrEmpty(message)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
MessageBox.Show(previousMethodName + "() " + message, "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static void LogNullError(string nullObjectName, [CallerMemberName] string previousMethodName = "") {
|
||||||
|
if (string.IsNullOrEmpty(nullObjectName)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
LogGenericError(nullObjectName + " is null!", previousMethodName);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Conditional("DEBUG")]
|
||||||
|
internal static void LogGenericDebug(string message, [CallerMemberName] string previousMethodName = "") {
|
||||||
|
if (string.IsNullOrEmpty(message)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
MessageBox.Show(previousMethodName + "() " + message, "Debug", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
135
ConfigGenerator/MainForm.Designer.cs
generated
Normal file
135
ConfigGenerator/MainForm.Designer.cs
generated
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
namespace ConfigGenerator {
|
||||||
|
partial class MainForm {
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing) {
|
||||||
|
if (disposing && (components != null)) {
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent() {
|
||||||
|
this.MenuPanel = new System.Windows.Forms.MenuStrip();
|
||||||
|
this.FileMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.FileMenuHelp = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.BotMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.BotMenuNew = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.BotMenuDelete = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.MainTab = new System.Windows.Forms.TabControl();
|
||||||
|
this.FileMenuExit = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.MenuPanel.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// MenuPanel
|
||||||
|
//
|
||||||
|
this.MenuPanel.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.FileMenu,
|
||||||
|
this.BotMenu});
|
||||||
|
this.MenuPanel.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.MenuPanel.Name = "MenuPanel";
|
||||||
|
this.MenuPanel.Size = new System.Drawing.Size(784, 24);
|
||||||
|
this.MenuPanel.TabIndex = 0;
|
||||||
|
this.MenuPanel.Text = "menuStrip1";
|
||||||
|
//
|
||||||
|
// FileMenu
|
||||||
|
//
|
||||||
|
this.FileMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.FileMenuHelp,
|
||||||
|
this.FileMenuExit});
|
||||||
|
this.FileMenu.Name = "FileMenu";
|
||||||
|
this.FileMenu.Size = new System.Drawing.Size(37, 20);
|
||||||
|
this.FileMenu.Text = "File";
|
||||||
|
//
|
||||||
|
// FileMenuHelp
|
||||||
|
//
|
||||||
|
this.FileMenuHelp.Name = "FileMenuHelp";
|
||||||
|
this.FileMenuHelp.Size = new System.Drawing.Size(152, 22);
|
||||||
|
this.FileMenuHelp.Text = "Help";
|
||||||
|
this.FileMenuHelp.Click += new System.EventHandler(this.FileMenuHelp_Click);
|
||||||
|
//
|
||||||
|
// BotMenu
|
||||||
|
//
|
||||||
|
this.BotMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.BotMenuNew,
|
||||||
|
this.BotMenuDelete});
|
||||||
|
this.BotMenu.Name = "BotMenu";
|
||||||
|
this.BotMenu.Size = new System.Drawing.Size(37, 20);
|
||||||
|
this.BotMenu.Text = "Bot";
|
||||||
|
//
|
||||||
|
// BotMenuNew
|
||||||
|
//
|
||||||
|
this.BotMenuNew.Name = "BotMenuNew";
|
||||||
|
this.BotMenuNew.Size = new System.Drawing.Size(107, 22);
|
||||||
|
this.BotMenuNew.Text = "New";
|
||||||
|
this.BotMenuNew.Click += new System.EventHandler(this.BotMenuNew_Click);
|
||||||
|
//
|
||||||
|
// BotMenuDelete
|
||||||
|
//
|
||||||
|
this.BotMenuDelete.Name = "BotMenuDelete";
|
||||||
|
this.BotMenuDelete.Size = new System.Drawing.Size(107, 22);
|
||||||
|
this.BotMenuDelete.Text = "Delete";
|
||||||
|
this.BotMenuDelete.Click += new System.EventHandler(this.BotMenuDelete_Click);
|
||||||
|
//
|
||||||
|
// MainTab
|
||||||
|
//
|
||||||
|
this.MainTab.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.MainTab.Location = new System.Drawing.Point(12, 27);
|
||||||
|
this.MainTab.Name = "MainTab";
|
||||||
|
this.MainTab.SelectedIndex = 0;
|
||||||
|
this.MainTab.Size = new System.Drawing.Size(760, 522);
|
||||||
|
this.MainTab.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// FileMenuExit
|
||||||
|
//
|
||||||
|
this.FileMenuExit.Name = "FileMenuExit";
|
||||||
|
this.FileMenuExit.Size = new System.Drawing.Size(152, 22);
|
||||||
|
this.FileMenuExit.Text = "Exit";
|
||||||
|
this.FileMenuExit.Click += new System.EventHandler(this.FileMenuExit_Click);
|
||||||
|
//
|
||||||
|
// MainForm
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(784, 561);
|
||||||
|
this.Controls.Add(this.MainTab);
|
||||||
|
this.Controls.Add(this.MenuPanel);
|
||||||
|
this.MainMenuStrip = this.MenuPanel;
|
||||||
|
this.Name = "MainForm";
|
||||||
|
this.Text = "Form1";
|
||||||
|
this.Load += new System.EventHandler(this.MainForm_Load);
|
||||||
|
this.MenuPanel.ResumeLayout(false);
|
||||||
|
this.MenuPanel.PerformLayout();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.MenuStrip MenuPanel;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem BotMenu;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem BotMenuNew;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem BotMenuDelete;
|
||||||
|
private System.Windows.Forms.TabControl MainTab;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem FileMenu;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem FileMenuHelp;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem FileMenuExit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
52
ConfigGenerator/MainForm.cs
Normal file
52
ConfigGenerator/MainForm.cs
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace ConfigGenerator {
|
||||||
|
public partial class MainForm : Form {
|
||||||
|
public MainForm() {
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void BotMenuNew_Click(object sender, EventArgs e) {
|
||||||
|
if (sender == null || e == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Logging.LogGenericError("This option is not ready yet!");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void BotMenuDelete_Click(object sender, EventArgs e) {
|
||||||
|
if (sender == null || e == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Logging.LogGenericError("This option is not ready yet!");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void FileMenuHelp_Click(object sender, EventArgs e) {
|
||||||
|
if (sender == null || e == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Process.Start("https://github.com/JustArchi/ArchiSteamFarm/wiki/Configuration");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void FileMenuExit_Click(object sender, EventArgs e) {
|
||||||
|
if (sender == null || e == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Application.Exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MainForm_Load(object sender, EventArgs e) {
|
||||||
|
if (sender == null || e == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
MainTab.TabPages.Add(new GlobalConfigPage(Path.Combine(Program.ConfigDirectory, Program.GlobalConfigFile)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
123
ConfigGenerator/MainForm.resx
Normal file
123
ConfigGenerator/MainForm.resx
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<metadata name="MenuPanel.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
</root>
|
||||||
77
ConfigGenerator/Program.cs
Normal file
77
ConfigGenerator/Program.cs
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace ConfigGenerator {
|
||||||
|
internal static class Program {
|
||||||
|
internal const string ASF = "ASF";
|
||||||
|
internal const string ConfigDirectory = "config";
|
||||||
|
internal const string GlobalConfigFile = ASF + ".json";
|
||||||
|
|
||||||
|
private const string ASFDirectory = "ArchiSteamFarm";
|
||||||
|
|
||||||
|
private static readonly Assembly Assembly = Assembly.GetExecutingAssembly();
|
||||||
|
private static readonly string ExecutableFile = Assembly.Location;
|
||||||
|
private static readonly string ExecutableName = Path.GetFileName(ExecutableFile);
|
||||||
|
private static readonly string ExecutableDirectory = Path.GetDirectoryName(ExecutableFile);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The main entry point for the application.
|
||||||
|
/// </summary>
|
||||||
|
[STAThread]
|
||||||
|
private static void Main() {
|
||||||
|
Init();
|
||||||
|
Application.EnableVisualStyles();
|
||||||
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
Application.Run(new MainForm());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void Init() {
|
||||||
|
AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionHandler;
|
||||||
|
TaskScheduler.UnobservedTaskException += UnobservedTaskExceptionHandler;
|
||||||
|
|
||||||
|
Directory.SetCurrentDirectory(ExecutableDirectory);
|
||||||
|
|
||||||
|
// Allow loading configs from source tree if it's a debug build
|
||||||
|
if (Debugging.IsDebugBuild) {
|
||||||
|
|
||||||
|
// Common structure is bin/(x64/)Debug/ArchiSteamFarm.exe, so we allow up to 4 directories up
|
||||||
|
for (byte i = 0; i < 4; i++) {
|
||||||
|
Directory.SetCurrentDirectory("..");
|
||||||
|
if (Directory.Exists(ASFDirectory)) {
|
||||||
|
Directory.SetCurrentDirectory(ASFDirectory);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// If config directory doesn't exist after our adjustment, abort all of that
|
||||||
|
if (!Directory.Exists(ConfigDirectory)) {
|
||||||
|
Directory.SetCurrentDirectory(ExecutableDirectory);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Directory.Exists(ConfigDirectory)) {
|
||||||
|
Logging.LogGenericError("Config directory could not be found!");
|
||||||
|
Application.Exit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void UnhandledExceptionHandler(object sender, UnhandledExceptionEventArgs args) {
|
||||||
|
if (sender == null || args == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Logging.LogGenericException((Exception) args.ExceptionObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void UnobservedTaskExceptionHandler(object sender, UnobservedTaskExceptionEventArgs args) {
|
||||||
|
if (sender == null || args == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Logging.LogGenericException(args.Exception);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
36
ConfigGenerator/Properties/AssemblyInfo.cs
Normal file
36
ConfigGenerator/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// General Information about an assembly is controlled through the following
|
||||||
|
// set of attributes. Change these attribute values to modify the information
|
||||||
|
// associated with an assembly.
|
||||||
|
[assembly: AssemblyTitle("ConfigGenerator")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("ConfigGenerator")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
[assembly: Guid("c3f6fe68-5e75-415e-bea1-1e7c16d6a433")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
|
// by using the '*' as shown below:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
62
ConfigGenerator/Properties/Resources.Designer.cs
generated
Normal file
62
ConfigGenerator/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace ConfigGenerator.Properties {
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
|
/// </summary>
|
||||||
|
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||||
|
// class via a tool like ResGen or Visual Studio.
|
||||||
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
|
// with the /str option, or rebuild your VS project.
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
internal class Resources {
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal Resources() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if ((resourceMan == null)) {
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ConfigGenerator.Properties.Resources", typeof(Resources).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Overrides the current thread's CurrentUICulture property for all
|
||||||
|
/// resource lookups using this strongly typed resource class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
117
ConfigGenerator/Properties/Resources.resx
Normal file
117
ConfigGenerator/Properties/Resources.resx
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
26
ConfigGenerator/Properties/Settings.Designer.cs
generated
Normal file
26
ConfigGenerator/Properties/Settings.Designer.cs
generated
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace ConfigGenerator.Properties {
|
||||||
|
|
||||||
|
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||||
|
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||||
|
|
||||||
|
private static Settings defaultInstance = ((Settings) (global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||||
|
|
||||||
|
public static Settings Default {
|
||||||
|
get {
|
||||||
|
return defaultInstance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
7
ConfigGenerator/Properties/Settings.settings
Normal file
7
ConfigGenerator/Properties/Settings.settings
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||||
|
<Profiles>
|
||||||
|
<Profile Name="(Default)" />
|
||||||
|
</Profiles>
|
||||||
|
<Settings />
|
||||||
|
</SettingsFile>
|
||||||
4
ConfigGenerator/packages.config
Normal file
4
ConfigGenerator/packages.config
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net451" />
|
||||||
|
</packages>
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Newtonsoft.Json" version="8.0.2" targetFramework="net452" />
|
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net451" />
|
||||||
</packages>
|
</packages>
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
packages/Newtonsoft.Json.8.0.3/Newtonsoft.Json.8.0.3.nupkg
vendored
Normal file
BIN
packages/Newtonsoft.Json.8.0.3/Newtonsoft.Json.8.0.3.nupkg
vendored
Normal file
Binary file not shown.
BIN
packages/Newtonsoft.Json.8.0.3/lib/net20/Newtonsoft.Json.dll
vendored
Normal file
BIN
packages/Newtonsoft.Json.8.0.3/lib/net20/Newtonsoft.Json.dll
vendored
Normal file
Binary file not shown.
@@ -604,6 +604,12 @@
|
|||||||
Initializes a new instance of the <see cref="T:Newtonsoft.Json.Converters.StringEnumConverter"/> class.
|
Initializes a new instance of the <see cref="T:Newtonsoft.Json.Converters.StringEnumConverter"/> class.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:Newtonsoft.Json.Converters.StringEnumConverter.#ctor(System.Boolean)">
|
||||||
|
<summary>
|
||||||
|
Initializes a new instance of the <see cref="T:Newtonsoft.Json.Converters.StringEnumConverter"/> class.
|
||||||
|
</summary>
|
||||||
|
<param name="camelCaseText"><c>true</c> if the written enum text will be camel case; otherwise, <c>false</c>.</param>
|
||||||
|
</member>
|
||||||
<member name="M:Newtonsoft.Json.Converters.StringEnumConverter.WriteJson(Newtonsoft.Json.JsonWriter,System.Object,Newtonsoft.Json.JsonSerializer)">
|
<member name="M:Newtonsoft.Json.Converters.StringEnumConverter.WriteJson(Newtonsoft.Json.JsonWriter,System.Object,Newtonsoft.Json.JsonSerializer)">
|
||||||
<summary>
|
<summary>
|
||||||
Writes the JSON representation of the object.
|
Writes the JSON representation of the object.
|
||||||
@@ -1058,6 +1064,12 @@
|
|||||||
</summary>
|
</summary>
|
||||||
<value>The method used when merging JSON arrays.</value>
|
<value>The method used when merging JSON arrays.</value>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:Newtonsoft.Json.Linq.JsonMergeSettings.MergeNullValueHandling">
|
||||||
|
<summary>
|
||||||
|
Gets or sets how how null value properties are merged.
|
||||||
|
</summary>
|
||||||
|
<value>How null value properties are merged.</value>
|
||||||
|
</member>
|
||||||
<member name="T:Newtonsoft.Json.Linq.MergeArrayHandling">
|
<member name="T:Newtonsoft.Json.Linq.MergeArrayHandling">
|
||||||
<summary>
|
<summary>
|
||||||
Specifies how JSON arrays are merged together.
|
Specifies how JSON arrays are merged together.
|
||||||
@@ -1075,6 +1087,21 @@
|
|||||||
<member name="F:Newtonsoft.Json.Linq.MergeArrayHandling.Merge">
|
<member name="F:Newtonsoft.Json.Linq.MergeArrayHandling.Merge">
|
||||||
<summary>Merge array items together, matched by index.</summary>
|
<summary>Merge array items together, matched by index.</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="T:Newtonsoft.Json.Linq.MergeNullValueHandling">
|
||||||
|
<summary>
|
||||||
|
Specifies how null value properties are merged.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:Newtonsoft.Json.Linq.MergeNullValueHandling.Ignore">
|
||||||
|
<summary>
|
||||||
|
The content's null value properties will be ignored during merging.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:Newtonsoft.Json.Linq.MergeNullValueHandling.Merge">
|
||||||
|
<summary>
|
||||||
|
The content's null value properties will be merged.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="T:Newtonsoft.Json.Linq.JPropertyDescriptor">
|
<member name="T:Newtonsoft.Json.Linq.JPropertyDescriptor">
|
||||||
<summary>
|
<summary>
|
||||||
Represents a view of a <see cref="T:Newtonsoft.Json.Linq.JProperty"/>.
|
Represents a view of a <see cref="T:Newtonsoft.Json.Linq.JProperty"/>.
|
||||||
@@ -3511,9 +3538,9 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Newtonsoft.Json.Linq.JValue.CreateUndefined">
|
<member name="M:Newtonsoft.Json.Linq.JValue.CreateUndefined">
|
||||||
<summary>
|
<summary>
|
||||||
Creates a <see cref="T:Newtonsoft.Json.Linq.JValue"/> null value.
|
Creates a <see cref="T:Newtonsoft.Json.Linq.JValue"/> undefined value.
|
||||||
</summary>
|
</summary>
|
||||||
<returns>A <see cref="T:Newtonsoft.Json.Linq.JValue"/> null value.</returns>
|
<returns>A <see cref="T:Newtonsoft.Json.Linq.JValue"/> undefined value.</returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Newtonsoft.Json.Linq.JValue.Type">
|
<member name="P:Newtonsoft.Json.Linq.JValue.Type">
|
||||||
<summary>
|
<summary>
|
||||||
@@ -6646,7 +6673,7 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="F:Newtonsoft.Json.MemberSerialization.OptIn">
|
<member name="F:Newtonsoft.Json.MemberSerialization.OptIn">
|
||||||
<summary>
|
<summary>
|
||||||
Only members must be marked with <see cref="T:Newtonsoft.Json.JsonPropertyAttribute"/> or <see cref="!:DataMemberAttribute"/> are serialized.
|
Only members marked with <see cref="T:Newtonsoft.Json.JsonPropertyAttribute"/> or <see cref="!:DataMemberAttribute"/> are serialized.
|
||||||
This member serialization mode can also be set by marking the class with <see cref="!:DataContractAttribute"/>.
|
This member serialization mode can also be set by marking the class with <see cref="!:DataContractAttribute"/>.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
BIN
packages/Newtonsoft.Json.8.0.3/lib/net35/Newtonsoft.Json.dll
vendored
Normal file
BIN
packages/Newtonsoft.Json.8.0.3/lib/net35/Newtonsoft.Json.dll
vendored
Normal file
Binary file not shown.
@@ -627,6 +627,12 @@
|
|||||||
Initializes a new instance of the <see cref="T:Newtonsoft.Json.Converters.StringEnumConverter"/> class.
|
Initializes a new instance of the <see cref="T:Newtonsoft.Json.Converters.StringEnumConverter"/> class.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:Newtonsoft.Json.Converters.StringEnumConverter.#ctor(System.Boolean)">
|
||||||
|
<summary>
|
||||||
|
Initializes a new instance of the <see cref="T:Newtonsoft.Json.Converters.StringEnumConverter"/> class.
|
||||||
|
</summary>
|
||||||
|
<param name="camelCaseText"><c>true</c> if the written enum text will be camel case; otherwise, <c>false</c>.</param>
|
||||||
|
</member>
|
||||||
<member name="M:Newtonsoft.Json.Converters.StringEnumConverter.WriteJson(Newtonsoft.Json.JsonWriter,System.Object,Newtonsoft.Json.JsonSerializer)">
|
<member name="M:Newtonsoft.Json.Converters.StringEnumConverter.WriteJson(Newtonsoft.Json.JsonWriter,System.Object,Newtonsoft.Json.JsonSerializer)">
|
||||||
<summary>
|
<summary>
|
||||||
Writes the JSON representation of the object.
|
Writes the JSON representation of the object.
|
||||||
@@ -1190,6 +1196,12 @@
|
|||||||
</summary>
|
</summary>
|
||||||
<value>The method used when merging JSON arrays.</value>
|
<value>The method used when merging JSON arrays.</value>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:Newtonsoft.Json.Linq.JsonMergeSettings.MergeNullValueHandling">
|
||||||
|
<summary>
|
||||||
|
Gets or sets how how null value properties are merged.
|
||||||
|
</summary>
|
||||||
|
<value>How null value properties are merged.</value>
|
||||||
|
</member>
|
||||||
<member name="T:Newtonsoft.Json.Linq.MergeArrayHandling">
|
<member name="T:Newtonsoft.Json.Linq.MergeArrayHandling">
|
||||||
<summary>
|
<summary>
|
||||||
Specifies how JSON arrays are merged together.
|
Specifies how JSON arrays are merged together.
|
||||||
@@ -1207,6 +1219,21 @@
|
|||||||
<member name="F:Newtonsoft.Json.Linq.MergeArrayHandling.Merge">
|
<member name="F:Newtonsoft.Json.Linq.MergeArrayHandling.Merge">
|
||||||
<summary>Merge array items together, matched by index.</summary>
|
<summary>Merge array items together, matched by index.</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="T:Newtonsoft.Json.Linq.MergeNullValueHandling">
|
||||||
|
<summary>
|
||||||
|
Specifies how null value properties are merged.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:Newtonsoft.Json.Linq.MergeNullValueHandling.Ignore">
|
||||||
|
<summary>
|
||||||
|
The content's null value properties will be ignored during merging.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:Newtonsoft.Json.Linq.MergeNullValueHandling.Merge">
|
||||||
|
<summary>
|
||||||
|
The content's null value properties will be merged.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="T:Newtonsoft.Json.Linq.JRaw">
|
<member name="T:Newtonsoft.Json.Linq.JRaw">
|
||||||
<summary>
|
<summary>
|
||||||
Represents a raw JSON string.
|
Represents a raw JSON string.
|
||||||
@@ -3605,9 +3632,9 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Newtonsoft.Json.Linq.JValue.CreateUndefined">
|
<member name="M:Newtonsoft.Json.Linq.JValue.CreateUndefined">
|
||||||
<summary>
|
<summary>
|
||||||
Creates a <see cref="T:Newtonsoft.Json.Linq.JValue"/> null value.
|
Creates a <see cref="T:Newtonsoft.Json.Linq.JValue"/> undefined value.
|
||||||
</summary>
|
</summary>
|
||||||
<returns>A <see cref="T:Newtonsoft.Json.Linq.JValue"/> null value.</returns>
|
<returns>A <see cref="T:Newtonsoft.Json.Linq.JValue"/> undefined value.</returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Newtonsoft.Json.Linq.JValue.Type">
|
<member name="P:Newtonsoft.Json.Linq.JValue.Type">
|
||||||
<summary>
|
<summary>
|
||||||
@@ -5688,7 +5715,7 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="F:Newtonsoft.Json.MemberSerialization.OptIn">
|
<member name="F:Newtonsoft.Json.MemberSerialization.OptIn">
|
||||||
<summary>
|
<summary>
|
||||||
Only members must be marked with <see cref="T:Newtonsoft.Json.JsonPropertyAttribute"/> or <see cref="T:System.Runtime.Serialization.DataMemberAttribute"/> are serialized.
|
Only members marked with <see cref="T:Newtonsoft.Json.JsonPropertyAttribute"/> or <see cref="T:System.Runtime.Serialization.DataMemberAttribute"/> are serialized.
|
||||||
This member serialization mode can also be set by marking the class with <see cref="T:System.Runtime.Serialization.DataContractAttribute"/>.
|
This member serialization mode can also be set by marking the class with <see cref="T:System.Runtime.Serialization.DataContractAttribute"/>.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
BIN
packages/Newtonsoft.Json.8.0.3/lib/net40/Newtonsoft.Json.dll
vendored
Normal file
BIN
packages/Newtonsoft.Json.8.0.3/lib/net40/Newtonsoft.Json.dll
vendored
Normal file
Binary file not shown.
@@ -699,6 +699,12 @@
|
|||||||
Initializes a new instance of the <see cref="T:Newtonsoft.Json.Converters.StringEnumConverter"/> class.
|
Initializes a new instance of the <see cref="T:Newtonsoft.Json.Converters.StringEnumConverter"/> class.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:Newtonsoft.Json.Converters.StringEnumConverter.#ctor(System.Boolean)">
|
||||||
|
<summary>
|
||||||
|
Initializes a new instance of the <see cref="T:Newtonsoft.Json.Converters.StringEnumConverter"/> class.
|
||||||
|
</summary>
|
||||||
|
<param name="camelCaseText"><c>true</c> if the written enum text will be camel case; otherwise, <c>false</c>.</param>
|
||||||
|
</member>
|
||||||
<member name="M:Newtonsoft.Json.Converters.StringEnumConverter.WriteJson(Newtonsoft.Json.JsonWriter,System.Object,Newtonsoft.Json.JsonSerializer)">
|
<member name="M:Newtonsoft.Json.Converters.StringEnumConverter.WriteJson(Newtonsoft.Json.JsonWriter,System.Object,Newtonsoft.Json.JsonSerializer)">
|
||||||
<summary>
|
<summary>
|
||||||
Writes the JSON representation of the object.
|
Writes the JSON representation of the object.
|
||||||
@@ -1173,6 +1179,12 @@
|
|||||||
</summary>
|
</summary>
|
||||||
<value>The method used when merging JSON arrays.</value>
|
<value>The method used when merging JSON arrays.</value>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:Newtonsoft.Json.Linq.JsonMergeSettings.MergeNullValueHandling">
|
||||||
|
<summary>
|
||||||
|
Gets or sets how how null value properties are merged.
|
||||||
|
</summary>
|
||||||
|
<value>How null value properties are merged.</value>
|
||||||
|
</member>
|
||||||
<member name="T:Newtonsoft.Json.Linq.MergeArrayHandling">
|
<member name="T:Newtonsoft.Json.Linq.MergeArrayHandling">
|
||||||
<summary>
|
<summary>
|
||||||
Specifies how JSON arrays are merged together.
|
Specifies how JSON arrays are merged together.
|
||||||
@@ -1190,6 +1202,21 @@
|
|||||||
<member name="F:Newtonsoft.Json.Linq.MergeArrayHandling.Merge">
|
<member name="F:Newtonsoft.Json.Linq.MergeArrayHandling.Merge">
|
||||||
<summary>Merge array items together, matched by index.</summary>
|
<summary>Merge array items together, matched by index.</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="T:Newtonsoft.Json.Linq.MergeNullValueHandling">
|
||||||
|
<summary>
|
||||||
|
Specifies how null value properties are merged.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:Newtonsoft.Json.Linq.MergeNullValueHandling.Ignore">
|
||||||
|
<summary>
|
||||||
|
The content's null value properties will be ignored during merging.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:Newtonsoft.Json.Linq.MergeNullValueHandling.Merge">
|
||||||
|
<summary>
|
||||||
|
The content's null value properties will be merged.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="T:Newtonsoft.Json.Linq.JRaw">
|
<member name="T:Newtonsoft.Json.Linq.JRaw">
|
||||||
<summary>
|
<summary>
|
||||||
Represents a raw JSON string.
|
Represents a raw JSON string.
|
||||||
@@ -3715,9 +3742,9 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Newtonsoft.Json.Linq.JValue.CreateUndefined">
|
<member name="M:Newtonsoft.Json.Linq.JValue.CreateUndefined">
|
||||||
<summary>
|
<summary>
|
||||||
Creates a <see cref="T:Newtonsoft.Json.Linq.JValue"/> null value.
|
Creates a <see cref="T:Newtonsoft.Json.Linq.JValue"/> undefined value.
|
||||||
</summary>
|
</summary>
|
||||||
<returns>A <see cref="T:Newtonsoft.Json.Linq.JValue"/> null value.</returns>
|
<returns>A <see cref="T:Newtonsoft.Json.Linq.JValue"/> undefined value.</returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Newtonsoft.Json.Linq.JValue.Type">
|
<member name="P:Newtonsoft.Json.Linq.JValue.Type">
|
||||||
<summary>
|
<summary>
|
||||||
@@ -5896,7 +5923,7 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="F:Newtonsoft.Json.MemberSerialization.OptIn">
|
<member name="F:Newtonsoft.Json.MemberSerialization.OptIn">
|
||||||
<summary>
|
<summary>
|
||||||
Only members must be marked with <see cref="T:Newtonsoft.Json.JsonPropertyAttribute"/> or <see cref="T:System.Runtime.Serialization.DataMemberAttribute"/> are serialized.
|
Only members marked with <see cref="T:Newtonsoft.Json.JsonPropertyAttribute"/> or <see cref="T:System.Runtime.Serialization.DataMemberAttribute"/> are serialized.
|
||||||
This member serialization mode can also be set by marking the class with <see cref="T:System.Runtime.Serialization.DataContractAttribute"/>.
|
This member serialization mode can also be set by marking the class with <see cref="T:System.Runtime.Serialization.DataContractAttribute"/>.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
BIN
packages/Newtonsoft.Json.8.0.3/lib/net45/Newtonsoft.Json.dll
vendored
Normal file
BIN
packages/Newtonsoft.Json.8.0.3/lib/net45/Newtonsoft.Json.dll
vendored
Normal file
Binary file not shown.
@@ -778,6 +778,12 @@
|
|||||||
Initializes a new instance of the <see cref="T:Newtonsoft.Json.Converters.StringEnumConverter"/> class.
|
Initializes a new instance of the <see cref="T:Newtonsoft.Json.Converters.StringEnumConverter"/> class.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:Newtonsoft.Json.Converters.StringEnumConverter.#ctor(System.Boolean)">
|
||||||
|
<summary>
|
||||||
|
Initializes a new instance of the <see cref="T:Newtonsoft.Json.Converters.StringEnumConverter"/> class.
|
||||||
|
</summary>
|
||||||
|
<param name="camelCaseText"><c>true</c> if the written enum text will be camel case; otherwise, <c>false</c>.</param>
|
||||||
|
</member>
|
||||||
<member name="M:Newtonsoft.Json.Converters.StringEnumConverter.WriteJson(Newtonsoft.Json.JsonWriter,System.Object,Newtonsoft.Json.JsonSerializer)">
|
<member name="M:Newtonsoft.Json.Converters.StringEnumConverter.WriteJson(Newtonsoft.Json.JsonWriter,System.Object,Newtonsoft.Json.JsonSerializer)">
|
||||||
<summary>
|
<summary>
|
||||||
Writes the JSON representation of the object.
|
Writes the JSON representation of the object.
|
||||||
@@ -5094,6 +5100,12 @@
|
|||||||
</summary>
|
</summary>
|
||||||
<value>The method used when merging JSON arrays.</value>
|
<value>The method used when merging JSON arrays.</value>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:Newtonsoft.Json.Linq.JsonMergeSettings.MergeNullValueHandling">
|
||||||
|
<summary>
|
||||||
|
Gets or sets how how null value properties are merged.
|
||||||
|
</summary>
|
||||||
|
<value>How null value properties are merged.</value>
|
||||||
|
</member>
|
||||||
<member name="T:Newtonsoft.Json.Linq.JProperty">
|
<member name="T:Newtonsoft.Json.Linq.JProperty">
|
||||||
<summary>
|
<summary>
|
||||||
Represents a JSON property.
|
Represents a JSON property.
|
||||||
@@ -6670,9 +6682,9 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Newtonsoft.Json.Linq.JValue.CreateUndefined">
|
<member name="M:Newtonsoft.Json.Linq.JValue.CreateUndefined">
|
||||||
<summary>
|
<summary>
|
||||||
Creates a <see cref="T:Newtonsoft.Json.Linq.JValue"/> null value.
|
Creates a <see cref="T:Newtonsoft.Json.Linq.JValue"/> undefined value.
|
||||||
</summary>
|
</summary>
|
||||||
<returns>A <see cref="T:Newtonsoft.Json.Linq.JValue"/> null value.</returns>
|
<returns>A <see cref="T:Newtonsoft.Json.Linq.JValue"/> undefined value.</returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Newtonsoft.Json.Linq.JValue.Type">
|
<member name="P:Newtonsoft.Json.Linq.JValue.Type">
|
||||||
<summary>
|
<summary>
|
||||||
@@ -6821,6 +6833,21 @@
|
|||||||
<member name="F:Newtonsoft.Json.Linq.MergeArrayHandling.Merge">
|
<member name="F:Newtonsoft.Json.Linq.MergeArrayHandling.Merge">
|
||||||
<summary>Merge array items together, matched by index.</summary>
|
<summary>Merge array items together, matched by index.</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="T:Newtonsoft.Json.Linq.MergeNullValueHandling">
|
||||||
|
<summary>
|
||||||
|
Specifies how null value properties are merged.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:Newtonsoft.Json.Linq.MergeNullValueHandling.Ignore">
|
||||||
|
<summary>
|
||||||
|
The content's null value properties will be ignored during merging.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:Newtonsoft.Json.Linq.MergeNullValueHandling.Merge">
|
||||||
|
<summary>
|
||||||
|
The content's null value properties will be merged.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="T:Newtonsoft.Json.MemberSerialization">
|
<member name="T:Newtonsoft.Json.MemberSerialization">
|
||||||
<summary>
|
<summary>
|
||||||
Specifies the member serialization options for the <see cref="T:Newtonsoft.Json.JsonSerializer"/>.
|
Specifies the member serialization options for the <see cref="T:Newtonsoft.Json.JsonSerializer"/>.
|
||||||
@@ -6834,7 +6861,7 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="F:Newtonsoft.Json.MemberSerialization.OptIn">
|
<member name="F:Newtonsoft.Json.MemberSerialization.OptIn">
|
||||||
<summary>
|
<summary>
|
||||||
Only members must be marked with <see cref="T:Newtonsoft.Json.JsonPropertyAttribute"/> or <see cref="T:System.Runtime.Serialization.DataMemberAttribute"/> are serialized.
|
Only members marked with <see cref="T:Newtonsoft.Json.JsonPropertyAttribute"/> or <see cref="T:System.Runtime.Serialization.DataMemberAttribute"/> are serialized.
|
||||||
This member serialization mode can also be set by marking the class with <see cref="T:System.Runtime.Serialization.DataContractAttribute"/>.
|
This member serialization mode can also be set by marking the class with <see cref="T:System.Runtime.Serialization.DataContractAttribute"/>.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
BIN
packages/Newtonsoft.Json.8.0.3/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll
vendored
Normal file
BIN
packages/Newtonsoft.Json.8.0.3/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll
vendored
Normal file
Binary file not shown.
@@ -610,6 +610,12 @@
|
|||||||
Initializes a new instance of the <see cref="T:Newtonsoft.Json.Converters.StringEnumConverter"/> class.
|
Initializes a new instance of the <see cref="T:Newtonsoft.Json.Converters.StringEnumConverter"/> class.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:Newtonsoft.Json.Converters.StringEnumConverter.#ctor(System.Boolean)">
|
||||||
|
<summary>
|
||||||
|
Initializes a new instance of the <see cref="T:Newtonsoft.Json.Converters.StringEnumConverter"/> class.
|
||||||
|
</summary>
|
||||||
|
<param name="camelCaseText"><c>true</c> if the written enum text will be camel case; otherwise, <c>false</c>.</param>
|
||||||
|
</member>
|
||||||
<member name="M:Newtonsoft.Json.Converters.StringEnumConverter.WriteJson(Newtonsoft.Json.JsonWriter,System.Object,Newtonsoft.Json.JsonSerializer)">
|
<member name="M:Newtonsoft.Json.Converters.StringEnumConverter.WriteJson(Newtonsoft.Json.JsonWriter,System.Object,Newtonsoft.Json.JsonSerializer)">
|
||||||
<summary>
|
<summary>
|
||||||
Writes the JSON representation of the object.
|
Writes the JSON representation of the object.
|
||||||
@@ -4588,6 +4594,12 @@
|
|||||||
</summary>
|
</summary>
|
||||||
<value>The method used when merging JSON arrays.</value>
|
<value>The method used when merging JSON arrays.</value>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:Newtonsoft.Json.Linq.JsonMergeSettings.MergeNullValueHandling">
|
||||||
|
<summary>
|
||||||
|
Gets or sets how how null value properties are merged.
|
||||||
|
</summary>
|
||||||
|
<value>How null value properties are merged.</value>
|
||||||
|
</member>
|
||||||
<member name="T:Newtonsoft.Json.Linq.JToken">
|
<member name="T:Newtonsoft.Json.Linq.JToken">
|
||||||
<summary>
|
<summary>
|
||||||
Represents an abstract JSON token.
|
Represents an abstract JSON token.
|
||||||
@@ -5961,9 +5973,9 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Newtonsoft.Json.Linq.JValue.CreateUndefined">
|
<member name="M:Newtonsoft.Json.Linq.JValue.CreateUndefined">
|
||||||
<summary>
|
<summary>
|
||||||
Creates a <see cref="T:Newtonsoft.Json.Linq.JValue"/> null value.
|
Creates a <see cref="T:Newtonsoft.Json.Linq.JValue"/> undefined value.
|
||||||
</summary>
|
</summary>
|
||||||
<returns>A <see cref="T:Newtonsoft.Json.Linq.JValue"/> null value.</returns>
|
<returns>A <see cref="T:Newtonsoft.Json.Linq.JValue"/> undefined value.</returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Newtonsoft.Json.Linq.JValue.Type">
|
<member name="P:Newtonsoft.Json.Linq.JValue.Type">
|
||||||
<summary>
|
<summary>
|
||||||
@@ -6086,6 +6098,21 @@
|
|||||||
<member name="F:Newtonsoft.Json.Linq.MergeArrayHandling.Merge">
|
<member name="F:Newtonsoft.Json.Linq.MergeArrayHandling.Merge">
|
||||||
<summary>Merge array items together, matched by index.</summary>
|
<summary>Merge array items together, matched by index.</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="T:Newtonsoft.Json.Linq.MergeNullValueHandling">
|
||||||
|
<summary>
|
||||||
|
Specifies how null value properties are merged.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:Newtonsoft.Json.Linq.MergeNullValueHandling.Ignore">
|
||||||
|
<summary>
|
||||||
|
The content's null value properties will be ignored during merging.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:Newtonsoft.Json.Linq.MergeNullValueHandling.Merge">
|
||||||
|
<summary>
|
||||||
|
The content's null value properties will be merged.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="T:Newtonsoft.Json.MemberSerialization">
|
<member name="T:Newtonsoft.Json.MemberSerialization">
|
||||||
<summary>
|
<summary>
|
||||||
Specifies the member serialization options for the <see cref="T:Newtonsoft.Json.JsonSerializer"/>.
|
Specifies the member serialization options for the <see cref="T:Newtonsoft.Json.JsonSerializer"/>.
|
||||||
@@ -6099,7 +6126,7 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="F:Newtonsoft.Json.MemberSerialization.OptIn">
|
<member name="F:Newtonsoft.Json.MemberSerialization.OptIn">
|
||||||
<summary>
|
<summary>
|
||||||
Only members must be marked with <see cref="T:Newtonsoft.Json.JsonPropertyAttribute"/> or <see cref="T:System.Runtime.Serialization.DataMemberAttribute"/> are serialized.
|
Only members marked with <see cref="T:Newtonsoft.Json.JsonPropertyAttribute"/> or <see cref="T:System.Runtime.Serialization.DataMemberAttribute"/> are serialized.
|
||||||
This member serialization mode can also be set by marking the class with <see cref="T:System.Runtime.Serialization.DataContractAttribute"/>.
|
This member serialization mode can also be set by marking the class with <see cref="T:System.Runtime.Serialization.DataContractAttribute"/>.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
BIN
packages/Newtonsoft.Json.8.0.3/lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll
vendored
Normal file
BIN
packages/Newtonsoft.Json.8.0.3/lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll
vendored
Normal file
Binary file not shown.
@@ -650,6 +650,12 @@
|
|||||||
Initializes a new instance of the <see cref="T:Newtonsoft.Json.Converters.StringEnumConverter"/> class.
|
Initializes a new instance of the <see cref="T:Newtonsoft.Json.Converters.StringEnumConverter"/> class.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:Newtonsoft.Json.Converters.StringEnumConverter.#ctor(System.Boolean)">
|
||||||
|
<summary>
|
||||||
|
Initializes a new instance of the <see cref="T:Newtonsoft.Json.Converters.StringEnumConverter"/> class.
|
||||||
|
</summary>
|
||||||
|
<param name="camelCaseText"><c>true</c> if the written enum text will be camel case; otherwise, <c>false</c>.</param>
|
||||||
|
</member>
|
||||||
<member name="M:Newtonsoft.Json.Converters.StringEnumConverter.WriteJson(Newtonsoft.Json.JsonWriter,System.Object,Newtonsoft.Json.JsonSerializer)">
|
<member name="M:Newtonsoft.Json.Converters.StringEnumConverter.WriteJson(Newtonsoft.Json.JsonWriter,System.Object,Newtonsoft.Json.JsonSerializer)">
|
||||||
<summary>
|
<summary>
|
||||||
Writes the JSON representation of the object.
|
Writes the JSON representation of the object.
|
||||||
@@ -4858,6 +4864,12 @@
|
|||||||
</summary>
|
</summary>
|
||||||
<value>The method used when merging JSON arrays.</value>
|
<value>The method used when merging JSON arrays.</value>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:Newtonsoft.Json.Linq.JsonMergeSettings.MergeNullValueHandling">
|
||||||
|
<summary>
|
||||||
|
Gets or sets how how null value properties are merged.
|
||||||
|
</summary>
|
||||||
|
<value>How null value properties are merged.</value>
|
||||||
|
</member>
|
||||||
<member name="T:Newtonsoft.Json.Linq.JToken">
|
<member name="T:Newtonsoft.Json.Linq.JToken">
|
||||||
<summary>
|
<summary>
|
||||||
Represents an abstract JSON token.
|
Represents an abstract JSON token.
|
||||||
@@ -6249,9 +6261,9 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Newtonsoft.Json.Linq.JValue.CreateUndefined">
|
<member name="M:Newtonsoft.Json.Linq.JValue.CreateUndefined">
|
||||||
<summary>
|
<summary>
|
||||||
Creates a <see cref="T:Newtonsoft.Json.Linq.JValue"/> null value.
|
Creates a <see cref="T:Newtonsoft.Json.Linq.JValue"/> undefined value.
|
||||||
</summary>
|
</summary>
|
||||||
<returns>A <see cref="T:Newtonsoft.Json.Linq.JValue"/> null value.</returns>
|
<returns>A <see cref="T:Newtonsoft.Json.Linq.JValue"/> undefined value.</returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Newtonsoft.Json.Linq.JValue.Type">
|
<member name="P:Newtonsoft.Json.Linq.JValue.Type">
|
||||||
<summary>
|
<summary>
|
||||||
@@ -6383,6 +6395,21 @@
|
|||||||
<member name="F:Newtonsoft.Json.Linq.MergeArrayHandling.Merge">
|
<member name="F:Newtonsoft.Json.Linq.MergeArrayHandling.Merge">
|
||||||
<summary>Merge array items together, matched by index.</summary>
|
<summary>Merge array items together, matched by index.</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="T:Newtonsoft.Json.Linq.MergeNullValueHandling">
|
||||||
|
<summary>
|
||||||
|
Specifies how null value properties are merged.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:Newtonsoft.Json.Linq.MergeNullValueHandling.Ignore">
|
||||||
|
<summary>
|
||||||
|
The content's null value properties will be ignored during merging.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:Newtonsoft.Json.Linq.MergeNullValueHandling.Merge">
|
||||||
|
<summary>
|
||||||
|
The content's null value properties will be merged.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="T:Newtonsoft.Json.MemberSerialization">
|
<member name="T:Newtonsoft.Json.MemberSerialization">
|
||||||
<summary>
|
<summary>
|
||||||
Specifies the member serialization options for the <see cref="T:Newtonsoft.Json.JsonSerializer"/>.
|
Specifies the member serialization options for the <see cref="T:Newtonsoft.Json.JsonSerializer"/>.
|
||||||
@@ -6396,7 +6423,7 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="F:Newtonsoft.Json.MemberSerialization.OptIn">
|
<member name="F:Newtonsoft.Json.MemberSerialization.OptIn">
|
||||||
<summary>
|
<summary>
|
||||||
Only members must be marked with <see cref="T:Newtonsoft.Json.JsonPropertyAttribute"/> or <see cref="T:System.Runtime.Serialization.DataMemberAttribute"/> are serialized.
|
Only members marked with <see cref="T:Newtonsoft.Json.JsonPropertyAttribute"/> or <see cref="T:System.Runtime.Serialization.DataMemberAttribute"/> are serialized.
|
||||||
This member serialization mode can also be set by marking the class with <see cref="T:System.Runtime.Serialization.DataContractAttribute"/>.
|
This member serialization mode can also be set by marking the class with <see cref="T:System.Runtime.Serialization.DataContractAttribute"/>.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
Reference in New Issue
Block a user