Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
Add notification
Browse files Browse the repository at this point in the history
  • Loading branch information
kokoropie committed Oct 28, 2023
1 parent b94ba37 commit 05dc8e2
Show file tree
Hide file tree
Showing 4 changed files with 365 additions and 193 deletions.
13 changes: 12 additions & 1 deletion CheckinHoyoverse/CheckinHoyoverse.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<TargetFramework>net6.0-windows10.0.17763.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<UseWindowsForms>True</UseWindowsForms>
Expand All @@ -18,20 +18,31 @@
<Version>1.1.3</Version>
</PropertyGroup>

<PropertyGroup>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>embedded</DebugType>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DebugType>embedded</DebugType>
</PropertyGroup>

<Target Name="SpicNSpan" AfterTargets="Clean" Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<RemoveDir Directories="$(BaseOutputPath)" />
<RemoveDir Directories="$(BaseIntermediateOutputPath)" />
</Target>

<ItemGroup>
<Content Include="favicon.ico" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="ConsoleTables" Version="2.5.0" />
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.3" />
</ItemGroup>

<UsingTask TaskName="CreateAppHost" AssemblyFile="$(MicrosoftNETBuildTasksAssembly)" />
Expand Down
6 changes: 5 additions & 1 deletion CheckinHoyoverse/JSON/ConfigJson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ public class ConfigJson
[JsonPropertyName("api_lang")]
public string api_lang { get; set; }

[JsonPropertyName("enable_notification")]
public bool notification { get; set; }

public ConfigJson()
{
data = new List<Data>();
Expand All @@ -42,9 +45,10 @@ public ConfigJson()
userAgent.Add("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36 OPR/77.0.4054.277");
userAgent.Add("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36");
userAgent.Add("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36");
current_user_agent = 0;
current_user_agent = new Random().Next(0, userAgent.Count - 1);
lang = "en-us";
api_lang = "https://bbs-api-os.hoyolab.com/community/misc/wapi/langs";
notification = false;
}
}

Expand Down
Loading

0 comments on commit 05dc8e2

Please sign in to comment.