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

Commit

Permalink
Updated pack to commit 960dd47 common
Browse files Browse the repository at this point in the history
  • Loading branch information
emako committed May 27, 2023
1 parent 90ac2cd commit 81ede6c
Show file tree
Hide file tree
Showing 10 changed files with 350 additions and 41 deletions.
6 changes: 3 additions & 3 deletions src/GenshinSwitch.Analyze/GenshinSwitch.Analyze.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AppCenter" Version="5.0.1" />
<PackageReference Include="Microsoft.AppCenter.Analytics" Version="5.0.1" />
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="5.0.1" />
<PackageReference Include="Microsoft.AppCenter" Version="5.0.2" />
<PackageReference Include="Microsoft.AppCenter.Analytics" Version="5.0.2" />
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="5.0.2" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions src/GenshinSwitch.Core/GenshinSwitch.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.IO.Abstractions" Version="19.2.9" />
<PackageReference Include="YamlDotNet" Version="13.0.2" />
<PackageReference Include="System.IO.Abstractions" Version="19.2.29" />
<PackageReference Include="YamlDotNet" Version="13.1.0" />
</ItemGroup>

</Project>
10 changes: 5 additions & 5 deletions src/GenshinSwitch.Fetch/GenshinSwitch.Fetch.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.4" />
<PackageReference Include="Microsoft.Extensions.Configuration.Ini" Version="7.0.0" />
<PackageReference Include="NAudio.Wasapi" Version="2.1.0" />
<PackageReference Include="Octokit" Version="5.0.3" />
<PackageReference Include="Vanara.PInvoke.ComCtl32" Version="3.4.13" />
<PackageReference Include="Vanara.PInvoke.Security" Version="3.4.13" />
<PackageReference Include="Vanara.PInvoke.User32" Version="3.4.13" />
<PackageReference Include="YamlDotNet" Version="13.0.2" />
<PackageReference Include="Octokit" Version="6.0.0" />
<PackageReference Include="Vanara.PInvoke.ComCtl32" Version="3.4.15" />
<PackageReference Include="Vanara.PInvoke.Security" Version="3.4.15" />
<PackageReference Include="Vanara.PInvoke.User32" Version="3.4.15" />
<PackageReference Include="YamlDotNet" Version="13.1.0" />
</ItemGroup>

</Project>
26 changes: 13 additions & 13 deletions src/GenshinSwitch/GenshinSwitch.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
<ApplicationIcon>Assets/Logos/Favicon.ico</ApplicationIcon>
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<AssemblyVersion>2.1.1</AssemblyVersion>
<FileVersion>2.1.1</FileVersion>
<Version>$(VersionPrefix)2.1.1</Version>
<AssemblyVersion>2.1.2</AssemblyVersion>
<FileVersion>2.1.2</FileVersion>
<Version>$(VersionPrefix)2.1.2</Version>
<Authors>GenshinMatrix</Authors>
<Company>GenshinMatrix</Company>
<RuntimeIdentifiers>win10-x64</RuntimeIdentifiers>
Expand All @@ -23,7 +23,7 @@
<LangVersion>11.0</LangVersion>
<EnableMsixTooling>true</EnableMsixTooling>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
<PackageCertificateThumbprint>A7C792A1E97C61397F171DFFDD4618D5B081B139</PackageCertificateThumbprint>
<PackageCertificateThumbprint>BDA5C28BFBF227F59EB447A926319726B1F0FD5B</PackageCertificateThumbprint>
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
Expand Down Expand Up @@ -51,7 +51,7 @@

<ItemGroup>
<PackageReference Include="AutoMapper" Version="12.0.1" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.1.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.0" />
<PackageReference Include="CommunityToolkit.WinUI.Notifications" Version="7.1.2" />
<PackageReference Include="CommunityToolkit.WinUI.UI.Animations" Version="7.1.2" />
<PackageReference Include="CommunityToolkit.WinUI.UI.Behaviors" Version="7.1.2" />
Expand All @@ -60,25 +60,25 @@
<PackageReference Include="MediaInfoDLL" Version="22.12.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.14" />
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="17.5.22" />
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.5.22">
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="17.6.40" />
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.6.40">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.2.230313.1" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.3.230502000" />
<PackageReference Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.0.9" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Text.Encoding.CodePages" Version="7.0.0" />
<PackageReference Include="Vanara.PInvoke.ComCtl32" Version="3.4.13" />
<PackageReference Include="Vanara.PInvoke.User32" Version="3.4.13" />
<PackageReference Include="WinUIEx" Version="2.1.0" />
<PackageReference Include="Vanara.PInvoke.ComCtl32" Version="3.4.15" />
<PackageReference Include="Vanara.PInvoke.User32" Version="3.4.15" />
<PackageReference Include="WinUIEx" Version="2.2.0" />
<PackageReference Include="H.NotifyIcon.WinUI" Version="2.0.108" />
<PackageReference Include="System.IO.Abstractions" Version="19.2.9" />
<PackageReference Include="YamlDotNet" Version="13.0.2" />
<PackageReference Include="System.IO.Abstractions" Version="19.2.29" />
<PackageReference Include="YamlDotNet" Version="13.1.0" />
<PackageReference Include="Lnk" Version="1.3.2.5" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/GenshinSwitch/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<Identity
Name="E0F0B14C-9CA5-4B60-8B6E-0DC219EBB4A7"
Publisher="CN=ema"
Version="2.1.1.0" />
Version="2.1.2.0" />

<Properties>
<DisplayName>GenshinSwitch</DisplayName>
Expand Down
4 changes: 2 additions & 2 deletions src/GenshinSwitch/ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -317,12 +317,12 @@ public void OnConcactDragItemsCompleted(ListViewBase sender, DragItemsCompletedE
SettingsManager.Save();
}

public async Task LaunchGameAsync(Contact contact)
public static async Task LaunchGameAsync(Contact contact)
{
MainService.ServiceEnabled = Settings.DoubleClickBehavior == 1;
try
{
await LaunchCtrl.LaunchAsync(relaunchMethod: Settings.RelaunchMethod.Get(), launchParameter: new LaunchParameter()
await LaunchCtrl.LaunchAsync(delayMs: 1000, relaunchMethod: Settings.RelaunchMethod.Get(), launchParameter: new LaunchParameter()
{
Server = contact.Server,
Prod = contact.Prod,
Expand Down
9 changes: 8 additions & 1 deletion src/Xunkong.Hoyolab/Activity/Announcement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,14 @@ public string? RemainTimeString
if (DateTimeOffset.TryParse(EndTime + "+08:00", out var result))
{
var remainTime = result - DateTimeOffset.Now;
return $"{remainTime.Days}{remainTime.Hours}小时后结束";
if (remainTime.Days > 0)
{
return $"{remainTime.Days}{remainTime.Hours}小时后结束";
}
else
{
return $"{remainTime.Hours}小时{remainTime.Minutes}分钟后结束";
}
}
}
return null;
Expand Down
161 changes: 161 additions & 0 deletions src/Xunkong.Hoyolab/Activity/BirthdayStarIndex.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
namespace Xunkong.Hoyolab.Activity;

/// <summary>
/// 留影叙佳期,今日生日
/// </summary>
public class BirthdayStarIndex
{

[JsonPropertyName("nick_name")]
public string NickName { get; set; }

[JsonPropertyName("uid")]
public int Uid { get; set; }

[JsonPropertyName("region")]
public string Region { get; set; }

/// <summary>
/// 过生日的角色
/// </summary>
[JsonPropertyName("role")]
public List<BirthdayStarIndexRole> Role { get; set; }

[JsonPropertyName("draw_notice")]
public bool DrawNotice { get; set; }

[JsonPropertyName("CurrentTime")]
public string CurrentTime { get; set; }

[JsonPropertyName("gender")]
public int Gender { get; set; }

[JsonPropertyName("is_show_remind")]
public bool IsShowRemind { get; set; }

}


/// <summary>
/// 留影叙佳期今天过生日的角色
/// </summary>
public class BirthdayStarIndexRole
{
[JsonPropertyName("role_id")]
public int RoleId { get; set; }

[JsonPropertyName("name")]
public string Name { get; set; }

[JsonPropertyName("jump_type")]
public string JumpType { get; set; }

[JsonPropertyName("jump_target")]
public string JumpTarget { get; set; }

[JsonPropertyName("jump_start_time")]
public string JumpStartTime { get; set; }

[JsonPropertyName("jump_end_time")]
public string JumpEndTime { get; set; }

[JsonPropertyName("role_gender")]
public int RoleGender { get; set; }

[JsonPropertyName("take_picture")]
public string TakePicture { get; set; }

[JsonPropertyName("gal_xml")]
public string GalXml { get; set; }

[JsonPropertyName("gal_resource")]
public string GalResource { get; set; }

/// <summary>
/// 已获取相片
/// </summary>
[JsonPropertyName("is_partake")]
public bool IsPartake { get; set; }

[JsonPropertyName("bgm")]
public string Bgm { get; set; }
}


/// <summary>
/// 留影叙佳期相册
/// </summary>
public class BirthdayStarDrawCollection
{
[JsonPropertyName("my_draws")]
public List<BirthdayStarDrawItem> MyDraws { get; set; }

[JsonPropertyName("current_page")]
public int CurrentPage { get; set; }

[JsonPropertyName("total_page")]
public int TotalPage { get; set; }

[JsonPropertyName("draw_notice")]
public bool DrawNotice { get; set; }

}


/// <summary>
/// 留影叙佳期相片
/// </summary>
public class BirthdayStarDrawItem
{
/// <summary>
/// normal / miss
/// </summary>
[JsonPropertyName("draw_status")]
public string DrawStatus { get; set; }

/// <summary>
/// 已获得的相片(错过了生日此值为空
/// </summary>
[JsonPropertyName("take_picture")]
public string TakePicture { get; set; }

/// <summary>
/// 模糊的相片
/// </summary>
[JsonPropertyName("unread_picture")]
public string UnreadPicture { get; set; }

[JsonPropertyName("word_text")]
public string WordText { get; set; }

[JsonPropertyName("year")]
public int Year { get; set; }

/// <summary>
/// MM/dd
/// </summary>
[JsonPropertyName("birthday")]
public string Birthday { get; set; }

[JsonPropertyName("is_new")]
public bool IsNew { get; set; }

[JsonPropertyName("role_id")]
public int RoleId { get; set; }

[JsonPropertyName("gal_xml")]
public string GalXml { get; set; }

[JsonPropertyName("gal_resource")]
public string GalResource { get; set; }

/// <summary>
/// 收藏
/// </summary>
[JsonPropertyName("is_collected")]
public bool IsCollected { get; set; }

[JsonPropertyName("op_id")]
public int OpId { get; set; }

}
6 changes: 3 additions & 3 deletions src/Xunkong.Hoyolab/DailyNote/DailyNoteInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class DailyNoteInfo
/// 获取实时便笺时的时间
/// </summary>
[JsonIgnore]
public DateTimeOffset NowTime { get; init; } = DateTimeOffset.Now;
public DateTimeOffset UpdateTime { get; init; } = DateTimeOffset.Now;

/// <summary>
/// 当前树脂
Expand Down Expand Up @@ -49,7 +49,7 @@ public class DailyNoteInfo
/// 树脂恢复满的时刻
/// </summary>
[JsonIgnore]
public DateTimeOffset ResinFullTime => NowTime + ResinRecoveryTime;
public DateTimeOffset ResinFullTime => UpdateTime + ResinRecoveryTime;

/// <summary>
/// 委托完成数
Expand Down Expand Up @@ -139,6 +139,6 @@ public class DailyNoteInfo
/// 洞天宝钱攒满时刻
/// </summary>
[JsonIgnore]
public DateTimeOffset HomeCoinFullTime => NowTime + HomeCoinRecoveryTime;
public DateTimeOffset HomeCoinFullTime => UpdateTime + HomeCoinRecoveryTime;

}
Loading

0 comments on commit 81ede6c

Please sign in to comment.