Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 57 additions & 2 deletions SAM.Game/Manager.Designer.cs

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

37 changes: 37 additions & 0 deletions SAM.Game/Manager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,20 @@ private void GetAchievements()
}
}

// Date filtering
if (this._DateFilterCheckBox.Checked)
{
var innerPicker = (System.Windows.Forms.DateTimePicker)this._DateFilterPicker.Control;
var filterDate = innerPicker.Value.Date;

// Only show achievements that were unlocked on the selected date
if (isAchieved == false || unlockTime <= 0 ||
DateTimeOffset.FromUnixTimeSeconds(unlockTime).LocalDateTime.Date != filterDate)
{
Comment on lines +490 to +499
continue;
}
}

Stats.AchievementInfo info = new()
{
Id = def.Id,
Expand Down Expand Up @@ -910,6 +924,29 @@ private void OnDisplayCheckedOnly(object sender, EventArgs e)
this.GetAchievements();
}

private void OnLockVisible(object sender, EventArgs e)
{
foreach (ListViewItem item in this._AchievementListView.Items)
{
item.Checked = false;
}
}

private void OnDateFilterToggle(object sender, EventArgs e)
{
var innerPicker = (System.Windows.Forms.DateTimePicker)this._DateFilterPicker.Control;
innerPicker.Enabled = this._DateFilterCheckBox.Checked;
this.GetAchievements();
}

private void OnDateFilterChanged(object sender, EventArgs e)
{
if (this._DateFilterCheckBox.Checked)
{
this.GetAchievements();
}
}

private void OnFilterUpdate(object sender, KeyEventArgs e)
{
this.GetAchievements();
Expand Down
4 changes: 4 additions & 0 deletions SAM.Game/SAM.Game.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<LangVersion>9.0</LangVersion>
<Platforms>x86</Platforms>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<OutputPath>..\bin\</OutputPath>
Expand Down Expand Up @@ -56,4 +57,7 @@
<ItemGroup>
<ProjectReference Include="..\SAM.API\SAM.API.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Resources.Extensions" Version="10.0.8" />
</ItemGroup>
</Project>
4 changes: 4 additions & 0 deletions SAM.Picker/SAM.Picker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<LangVersion>9.0</LangVersion>
<Platforms>x86</Platforms>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<OutputPath>..\bin\</OutputPath>
Expand Down Expand Up @@ -56,4 +57,7 @@
<ItemGroup>
<ProjectReference Include="..\SAM.API\SAM.API.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Resources.Extensions" Version="10.0.8" />
</ItemGroup>
</Project>
Loading