Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
chr233 committed Mar 9, 2024
1 parent 659d2e8 commit 7a1075c
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 9 deletions.
5 changes: 4 additions & 1 deletion ASFEnhanceTools/App.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
Expand All @@ -16,6 +16,9 @@
<setting name="SavePassword" serializeAs="String">
<value>False</value>
</setting>
<setting name="Upgraded" serializeAs="String">
<value>False</value>
</setting>
</ASFEnhanceTools.Properties.GlobalConfig>
</userSettings>
</configuration>
3 changes: 2 additions & 1 deletion ASFEnhanceTools/Data/GetCartResponse.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using SteamKit2;
using SteamKit2;

namespace ASFEnhanceTools.Data;
internal sealed record GetCartResponse : AbstractResponse<IDictionary<string, GetCartResponse.ResultData>>
Expand All @@ -15,6 +15,7 @@ public sealed record CartItemData
public uint? PackageId { get; set; }
public uint? BundleId { get; set; }
public string? LineItemId { get; set; }
public string? Name { get; set; }
public bool IsValid { get; set; }
public ulong TimeAdded { get; set; }
public string? PriceCents { get; set; }
Expand Down
16 changes: 13 additions & 3 deletions ASFEnhanceTools/Forms/FormClient.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions ASFEnhanceTools/Forms/FormClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@ private async void BtnReloadCart_Click(object sender, EventArgs e)
try
{
btnReloadCart.Enabled = false;
btnFakePurchase.Enabled = false;
var bot = FetchBot(cbBotSelector.SelectedIndex);

if (bot == null)
Expand Down Expand Up @@ -525,11 +526,12 @@ private async void BtnReloadCart_Click(object sender, EventArgs e)
var id = (item.BundleId > 0 ? $"bundle/{item.BundleId}" : $"sub{item.PackageId}") ?? "??";
lvCartItems.Items.Add(new ListViewItem
{
Text = id,
Text = item.LineItemId,
Tag = item,
SubItems =
{
item.LineItemId,
id,
item.Name,
item.PriceFormatted,
item.IsPrivate ? "" : "×",
item.IsGift ? "" : "×",
Expand All @@ -552,6 +554,7 @@ private async void BtnReloadCart_Click(object sender, EventArgs e)
finally
{
btnReloadCart.Enabled = true;
btnFakePurchase.Enabled = true;
}
}

Expand Down
9 changes: 9 additions & 0 deletions ASFEnhanceTools/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using ASFEnhanceTools.Forms;
using ASFEnhanceTools.Properties;

namespace ASFEnhanceTools
{
Expand All @@ -7,6 +8,14 @@ internal static class Program
[STAThread]
static void Main()
{
var config = GlobalConfig.Default;
if (!config.Upgraded)
{
config.Upgrade();
config.Upgraded = true;
config.Save();
}

ApplicationConfiguration.Initialize();
Application.Run(new FormConnector());
}
Expand Down
14 changes: 13 additions & 1 deletion ASFEnhanceTools/Properties/GlobalConfig.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions ASFEnhanceTools/Properties/GlobalConfig.settings
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
<Setting Name="SavePassword" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="Upgraded" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>1.1.0.1</Version>
<Version>1.1.0.2</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down

0 comments on commit 7a1075c

Please sign in to comment.