├── .gitattributes ├── .gitignore ├── LICENSE ├── README.md ├── ROADMAP.md ├── assets ├── account.png ├── main.png └── settings.png └── src ├── .editorconfig ├── .gitignore ├── .vsconfig ├── GenshinSwitch.Analyze ├── .gitignore ├── AppCenterException.cs ├── AppCenterWrapper.cs └── GenshinSwitch.Analyze.csproj ├── GenshinSwitch.Core ├── .gitignore ├── AssemblyInfo.cs ├── Contracts │ └── Services │ │ ├── IFileService.cs │ │ └── ISpecialPathService.cs ├── Extensions │ └── ProcessExtension.cs ├── GenshinSwitch.Core.csproj ├── GenshinSwitch.Core.csproj.user ├── GenshinSwitchException.cs ├── Helpers │ ├── Json.cs │ └── Yaml.cs ├── Logger.cs ├── README.md ├── Services │ ├── FileService.cs │ └── SpecialPathService.cs ├── Settings │ ├── SettingsCache.cs │ ├── SettingsDefinition{T}.cs │ ├── SettingsManager.cs │ └── SettingsSerializer.cs └── Threads │ └── CancelabledTask.cs ├── GenshinSwitch.Fetch ├── .gitignore ├── Attributes │ └── UACRequestAttribute.cs ├── ConfigIni │ └── GenshinConfigIni.cs ├── GenshinSwitch.Fetch.csproj ├── Launch │ ├── HyperionCtrl.cs │ ├── LaunchCtrl.cs │ ├── LaunchParameter.cs │ └── RelaunchMethod.cs ├── Lazy │ ├── LazyCrypto.cs │ ├── LazyInput.cs │ ├── LazyInputHelper.cs │ ├── LazyLauncher.cs │ ├── LazyOutput.cs │ ├── LazyOutputHelper.cs │ ├── LazyOutputSerializer.cs │ ├── LazyProtocol.cs │ ├── LazyRepository.cs │ ├── LazySpecialPathProvider.cs │ ├── LazyVerification.cs │ └── UpdateTime.cs ├── Muter │ ├── ForegroundWindowHelper.cs │ └── MuteManager.cs ├── Regedit │ ├── GenshinRegedit.cs │ ├── GenshinRegedit.reg │ ├── README.md │ └── RegeditKeys.cs └── Service │ ├── MainService.cs │ └── MainServiceCommmand.cs ├── GenshinSwitch.WindowsService ├── .gitignore ├── App.config ├── AutoStartRegistyHelper.cs ├── CommandRunner.cs ├── EventLoop.cs ├── FodyWeavers.xml ├── FodyWeavers.xsd ├── GenshinSwitch.WindowsService.csproj ├── GenshinSwitch.WindowsService.sln ├── MainInstaller.cs ├── MainRegister.cs ├── MainRunner.cs ├── MainService.cs ├── Program.cs ├── Properties │ └── launchSettings.json ├── RuntimeHelper.cs ├── Sapphire.ico └── app.manifest ├── GenshinSwitch.sln ├── GenshinSwitch ├── .gitignore ├── Activation │ ├── ActivationHandler.cs │ ├── AppNotificationActivationHandler.cs │ ├── DefaultActivationHandler.cs │ └── IActivationHandler.cs ├── App.xaml ├── App.xaml.cs ├── Assets │ ├── Fonts │ │ ├── DigitalClock.ttf │ │ ├── HarmonyOS_Sans_SC_Regular.ttf │ │ └── Segoe Fluent Icons.ttf │ ├── Images │ │ ├── LocalAvatars │ │ │ ├── CreateCSharp.py │ │ │ ├── UI_Gcg_Char_AvatarIcon_Ayaka.png │ │ │ ├── UI_Gcg_Char_AvatarIcon_Barbara.png │ │ │ ├── UI_Gcg_Char_AvatarIcon_Bennett.png │ │ │ ├── UI_Gcg_Char_AvatarIcon_Chongyun.png │ │ │ ├── UI_Gcg_Char_AvatarIcon_Collei.png │ │ │ ├── UI_Gcg_Char_AvatarIcon_Cyno.png │ │ │ ├── UI_Gcg_Char_AvatarIcon_Diluc.png │ │ │ ├── UI_Gcg_Char_AvatarIcon_Diona.png │ │ │ ├── UI_Gcg_Char_AvatarIcon_Fischl.png │ │ │ ├── UI_Gcg_Char_AvatarIcon_Ganyu.png │ │ │ ├── UI_Gcg_Char_AvatarIcon_Kaeya.png │ │ │ ├── UI_Gcg_Char_AvatarIcon_Keqing.png │ │ │ ├── UI_Gcg_Char_AvatarIcon_Mona.png │ │ │ ├── UI_Gcg_Char_AvatarIcon_Ningguang.png │ │ │ ├── UI_Gcg_Char_AvatarIcon_Noel.png │ │ │ ├── UI_Gcg_Char_AvatarIcon_Qin.png │ │ │ ├── UI_Gcg_Char_AvatarIcon_Razor.png │ │ │ ├── UI_Gcg_Char_AvatarIcon_Sucrose.png │ │ │ ├── UI_Gcg_Char_AvatarIcon_Xiangling.png │ │ │ ├── UI_Gcg_Char_AvatarIcon_Xingqiu.png │ │ │ ├── UI_Gcg_Char_AvatarIcon_Yoimiya.png │ │ │ ├── UI_Gcg_Char_EnemyIcon_AbyssFire.png │ │ │ ├── UI_Gcg_Char_EnemyIcon_AbyssIce.png │ │ │ ├── UI_Gcg_Char_EnemyIcon_AbyssWater.png │ │ │ ├── UI_Gcg_Char_EnemyIcon_BruteAxeElec.png │ │ │ ├── UI_Gcg_Char_EnemyIcon_BruteAxeFire.png │ │ │ ├── UI_Gcg_Char_EnemyIcon_BruteIceShield.png │ │ │ ├── UI_Gcg_Char_EnemyIcon_Hili.png │ │ │ ├── UI_Gcg_Char_EnemyIcon_HiliClub.png │ │ │ ├── UI_Gcg_Char_EnemyIcon_HiliIce.png │ │ │ ├── UI_Gcg_Char_EnemyIcon_HiliRange.png │ │ │ ├── UI_Gcg_Char_EnemyIcon_HiliRangeElec.png │ │ │ ├── UI_Gcg_Char_EnemyIcon_KairagiElec.png │ │ │ ├── UI_Gcg_Char_EnemyIcon_KairagiFire.png │ │ │ ├── UI_Gcg_Char_EnemyIcon_SamuraiRonin01.png │ │ │ ├── UI_Gcg_Char_EnemyIcon_SamuraiRonin02.png │ │ │ ├── UI_Gcg_Char_EnemyIcon_SamuraiRonin03.png │ │ │ ├── UI_Gcg_Char_EnemyIcon_ShamanGrass.png │ │ │ ├── UI_Gcg_Char_EnemyIcon_ShamanWater.png │ │ │ ├── UI_Gcg_Char_EnemyIcon_ShamanWind.png │ │ │ ├── UI_Gcg_Char_EnemyIcon_SlimeElec.png │ │ │ ├── UI_Gcg_Char_EnemyIcon_SlimeWater.png │ │ │ ├── UI_Gcg_Char_EnemyIcon_UnuAnudattaGrass.png │ │ │ ├── UI_Gcg_Char_MonsterIcon_Bruterock.png │ │ │ ├── UI_Gcg_Char_MonsterIcon_Fatuus.png │ │ │ ├── UI_Gcg_Char_MonsterIcon_Fungusgrass.png │ │ │ ├── UI_Gcg_Char_MonsterIcon_Maidenwater.png │ │ │ ├── UI_Gcg_Char_MonsterIcon_Ningyo.png │ │ │ ├── UI_Gcg_Char_MonsterIcon_Oceanid.png │ │ │ ├── UI_Gcg_Char_MonsterIcon_SkirmisherWater.png │ │ │ ├── UI_Gcg_Char_MonsterIcon_SkirmisherWind.png │ │ │ ├── UI_MusicV3SelectPage_Album_Pic01.png │ │ │ ├── UI_MusicV3SelectPage_Album_Pic02.png │ │ │ ├── UI_MusicV3SelectPage_Album_Pic03.png │ │ │ ├── UI_MusicV3SelectPage_Album_Pic04.png │ │ │ ├── UI_MusicV3SelectPage_Album_Pic05.png │ │ │ ├── UI_MusicV3SelectPage_Album_Pic06.png │ │ │ └── UI_MusicV3SelectPage_Album_Pic07.png │ │ ├── UI_ActivitySmallIcon_Summertime_02.png │ │ ├── UI_Activity_Steeplechase_DialogOfficialIcon.png │ │ ├── UI_BtnFrame_W27.png │ │ ├── UI_BtnIcon_PlayerBoy.png │ │ ├── UI_BtnIcon_PlayerGirl.png │ │ ├── UI_BtnIcon_SkillSet.png │ │ ├── UI_ClockIcon_Dusk.png │ │ ├── UI_ClockIcon_Morning.png │ │ ├── UI_ClockIcon_Night.png │ │ ├── UI_ClockIcon_Noon.png │ │ ├── UI_EchoShell_Popo_Small.png │ │ ├── UI_EmotionIcon100.png │ │ ├── UI_EmotionIcon97.png │ │ ├── UI_EmotionIcon98.png │ │ ├── UI_EmotionIcon99.png │ │ ├── UI_Frame_Equipped.png │ │ ├── UI_GcgIcon_CardCurrency.png │ │ ├── UI_HomeworldLevel_Coins_1.png │ │ ├── UI_HomeworldLevel_Coins_2.png │ │ ├── UI_HomeworldLevel_Coins_3.png │ │ ├── UI_HomeworldLevel_Treasurebowl.png │ │ ├── UI_Icon_Close.png │ │ ├── UI_Icon_Explore.png │ │ ├── UI_Icon_GcgBossChallenges_Difficulty.png │ │ ├── UI_Icon_Intee_Explore_1.png │ │ ├── UI_Icon_L.png │ │ ├── UI_Icon_TimeSpeedUp_S.png │ │ ├── UI_Icon_Tower_Star.png │ │ ├── UI_Img_Aster_MainRewardS.png │ │ ├── UI_Img_Cursor.png │ │ ├── UI_Img_Cursor_PC.cur │ │ ├── UI_Img_Cursor_PC.png │ │ ├── UI_Img_Red.png │ │ ├── UI_ItemIcon_100064.png │ │ ├── UI_ItemIcon_105.png │ │ ├── UI_ItemIcon_107012.png │ │ ├── UI_ItemIcon_202.png │ │ ├── UI_ItemIcon_204.png │ │ ├── UI_ItemIcon_210.png │ │ ├── UI_ItemIcon_211.png │ │ ├── UI_ItemIcon_220021.png │ │ ├── UI_ItemIcon_221.png │ │ ├── UI_ItemIcon_222.png │ │ ├── UI_LiYueShiLaiMu_Alpha.png │ │ ├── UI_Mall_BannerBig1.png │ │ ├── UI_Mall_BannerBig3.png │ │ ├── UI_Mall_Purchase_Blessofmoon.png │ │ ├── UI_Mall_Purchase_Resin_Monthly.png │ │ ├── UI_MarkPoint_GcgZhanDou.png │ │ ├── UI_MarkPoint_GeneralCargo.png │ │ ├── UI_MarkPoint_Vintage.png │ │ ├── UI_MarkQuest_Common_Proce.png │ │ ├── UI_MarkQuest_Events_Proce.png │ │ ├── UI_MarkQuest_Random_Proce.png │ │ ├── UI_MarkTower.png │ │ ├── UI_MarkTower_Daily.png │ │ ├── UI_MarkTower_Tower.png │ │ ├── UI_MarkTower_Weekly.png │ │ ├── UI_NetstatIcon_1.png │ │ ├── UI_NetstatIcon_2.png │ │ ├── UI_NetstatIcon_3.png │ │ ├── UI_Rename.py │ │ ├── UI_SeaLamp_StoryPic_02_2.png │ │ ├── UI_SummerTime_ImgCharacter_01.png │ │ ├── UI_SummerTime_ImgDecorate_01.png │ │ ├── UI_SummerTime_ImgDecorate_02.png │ │ ├── UI_Tab_GachaShowPanel_Default.png │ │ ├── UI_Tips_Item_Complete.png │ │ ├── UI_Tips_Item_Quest.png │ │ ├── UI_Tips_Item_Warning.png │ │ ├── UI_TouchIcon_Auto.png │ │ ├── e_tiangou.cbec2da1..png │ │ ├── miyoushe.png │ │ ├── prize_bg.0014ae02..png │ │ └── stage_3_icon.02bbe66b..png │ └── Logos │ │ ├── Favicon.ico │ │ ├── Favicon.png │ │ ├── LargeTile.scale-100.png │ │ ├── LargeTile.scale-125.png │ │ ├── LargeTile.scale-150.png │ │ ├── LargeTile.scale-200.png │ │ ├── LargeTile.scale-400.png │ │ ├── SmallTile.scale-100.png │ │ ├── SmallTile.scale-125.png │ │ ├── SmallTile.scale-150.png │ │ ├── SmallTile.scale-200.png │ │ ├── SmallTile.scale-400.png │ │ ├── SplashScreen.scale-100.png │ │ ├── SplashScreen.scale-125.png │ │ ├── SplashScreen.scale-150.png │ │ ├── SplashScreen.scale-200.png │ │ ├── SplashScreen.scale-400.png │ │ ├── Square150x150Logo.scale-100.png │ │ ├── Square150x150Logo.scale-125.png │ │ ├── Square150x150Logo.scale-150.png │ │ ├── Square150x150Logo.scale-200.png │ │ ├── Square150x150Logo.scale-400.png │ │ ├── Square44x44Logo.altform-lightunplated_targetsize-16.png │ │ ├── Square44x44Logo.altform-lightunplated_targetsize-24.png │ │ ├── Square44x44Logo.altform-lightunplated_targetsize-256.png │ │ ├── Square44x44Logo.altform-lightunplated_targetsize-32.png │ │ ├── Square44x44Logo.altform-lightunplated_targetsize-48.png │ │ ├── Square44x44Logo.altform-unplated_targetsize-16.png │ │ ├── Square44x44Logo.altform-unplated_targetsize-24.png │ │ ├── Square44x44Logo.altform-unplated_targetsize-256.png │ │ ├── Square44x44Logo.altform-unplated_targetsize-32.png │ │ ├── Square44x44Logo.altform-unplated_targetsize-48.png │ │ ├── Square44x44Logo.scale-100.png │ │ ├── Square44x44Logo.scale-125.png │ │ ├── Square44x44Logo.scale-150.png │ │ ├── Square44x44Logo.scale-200.png │ │ ├── Square44x44Logo.scale-400.png │ │ ├── Square44x44Logo.targetsize-16.png │ │ ├── Square44x44Logo.targetsize-24.png │ │ ├── Square44x44Logo.targetsize-256.png │ │ ├── Square44x44Logo.targetsize-32.png │ │ ├── Square44x44Logo.targetsize-48.png │ │ ├── StoreLogo.scale-100.png │ │ ├── StoreLogo.scale-125.png │ │ ├── StoreLogo.scale-150.png │ │ ├── StoreLogo.scale-200.png │ │ ├── StoreLogo.scale-400.png │ │ ├── Wide310x150Logo.scale-100.png │ │ ├── Wide310x150Logo.scale-125.png │ │ ├── Wide310x150Logo.scale-150.png │ │ ├── Wide310x150Logo.scale-200.png │ │ └── Wide310x150Logo.scale-400.png ├── Behaviors │ ├── NavigationViewHeaderBehavior.cs │ └── NavigationViewHeaderMode.cs ├── Contracts │ ├── Services │ │ ├── IActivationService.cs │ │ ├── IAppNotificationService.cs │ │ ├── ILocalSettingsService.cs │ │ ├── INavigationService.cs │ │ ├── INavigationViewService.cs │ │ ├── IPageService.cs │ │ ├── IThemeSelectorService.cs │ │ └── IWebViewService.cs │ └── ViewModels │ │ ├── INavigationAware.cs │ │ └── MainViewModel.cs ├── Controls │ ├── Bubble │ │ └── Bubble.cs │ ├── Image │ │ └── ImageHelper.cs │ ├── ListView │ │ └── ListViewHelper.cs │ ├── MessageBox │ │ ├── MessageBoxX.xaml │ │ └── MessageBoxX.xaml.cs │ ├── Notice │ │ ├── NoticeService.cs │ │ └── ToastContentBuilderExtensions.cs │ ├── SettingCard │ │ ├── SettingCard.xaml │ │ └── SettingCard.xaml.cs │ └── Window │ │ └── WindowX.cs ├── GenshinSwitch.csproj ├── GlobalSuppressions.cs ├── GlobalUsing.cs ├── Helpers │ ├── AssemblyUtils.cs │ ├── AutoStart │ │ ├── AutoStartManager.cs │ │ ├── AutoStartProgramDataHelper.cs │ │ ├── AutoStartRegistyHelper.cs │ │ └── IAutoStartHelper.cs │ ├── BrushExtension.cs │ ├── CancelabledTask.cs │ ├── ClipboardHelper.cs │ ├── CommandLineHelper.cs │ ├── FrameExtensions.cs │ ├── GenerateChineseWords.cs │ ├── MapperExtension.cs │ ├── NavigationHelper.cs │ ├── ResourceExtensions.cs │ ├── RuntimeHelper.cs │ ├── SecurityControlHelper.cs │ ├── SettingsStorageExtensions.cs │ ├── ShortcutCreator.cs │ └── TitleBarHelper.cs ├── MainWindow.xaml ├── MainWindow.xaml.cs ├── Models │ ├── Contacts │ │ ├── Contact.cs │ │ ├── Contact.vm.cs │ │ └── ContactMapperProvider.cs │ ├── LocalAvatars.cs │ ├── LocalSettingsOptions.cs │ ├── Messages │ │ ├── AutoMuteChangedMessage.cs │ │ ├── ContactMessage.cs │ │ └── ThemeChangedMessage.cs │ └── Settings.cs ├── Pack.cs ├── Package.appxmanifest ├── Program.cs ├── Properties │ ├── PublishProfiles │ │ └── FolderProfile.pubxml │ └── launchsettings.json ├── README.md ├── Services │ ├── ActivationService.cs │ ├── AppNotificationService.cs │ ├── LocalSettingsService.cs │ ├── NavigationService.cs │ ├── NavigationViewService.cs │ ├── PageService.cs │ ├── ThemeSelectorService.cs │ └── WebViewService.cs ├── Strings │ ├── en-us │ │ └── Resources.resw │ └── zh-cn │ │ └── Resources.resw ├── Styles │ ├── ButtonStyle.xaml │ ├── FontSizes.xaml │ ├── FontStyle.xaml │ ├── FontSymbols.cs │ ├── TextBlock.xaml │ └── Thickness.xaml ├── ViewModels │ ├── AddContactSelectionViewModel.cs │ ├── AddContactViewModel.cs │ ├── Contacts │ │ ├── ContactProgress.cs │ │ ├── ContactProgressValue.cs │ │ ├── ContactViewModel.cs │ │ ├── DailyNoteInfoViewModel.cs │ │ ├── LazyInfoViewModel.cs │ │ ├── SignInInfoViewModel.cs │ │ └── SpiralAbyssInfoViewModel.cs │ ├── MainViewModel.cs │ ├── SetLazyTokenViewModel.cs │ ├── SettingsContactProgressViewModel.cs │ ├── SettingsViewModel.cs │ ├── ShellViewModel.cs │ ├── ShowLazyViewModel.cs │ └── WebViewViewModel.cs ├── Views │ ├── AddContactContentDialog.xaml │ ├── AddContactContentDialog.xaml.cs │ ├── Converters │ │ ├── BoolInvertConverter.cs │ │ ├── BoolToVisibilityConverter.cs │ │ ├── BoolToVisibilityReversedConverter.cs │ │ ├── DateTimeOffsetToDayStringConverter.cs │ │ ├── DateTimeOffsetToTimeStringConverter.cs │ │ ├── DateTimeToDayStringConverter.cs │ │ ├── DateTimeToTimeStringConverter.cs │ │ ├── EnumToBooleanConverter.cs │ │ ├── ExpeditionStatusToColorConverter.cs │ │ ├── HoyolabSignInStatsStringConverter.cs │ │ ├── IsNullOrEmptyConverter.cs │ │ ├── IsNullOrEmptyToVisibilityConverter.cs │ │ ├── LazyInfoStatsStringConverter.cs │ │ ├── LazyNetstatIconConverter.cs │ │ ├── QuestEventStatsConverter.cs │ │ ├── QuestRandomProceIconConverter.cs │ │ ├── ResinBrushHintConverter.cs │ │ ├── StringConcatConverter.cs │ │ ├── TreasurebowCoinsIconConverter.cs │ │ └── UriStringToImageSourceConverter.cs │ ├── LaunchWindow.xaml │ ├── LaunchWindow.xaml.cs │ ├── MainPage.xaml │ ├── MainPage.xaml.cs │ ├── SetLazyTokenContentDialog.xaml │ ├── SetLazyTokenContentDialog.xaml.cs │ ├── SettingsPage.xaml │ ├── SettingsPage.xaml.cs │ ├── ShellPage.xaml │ ├── ShellPage.xaml.cs │ ├── ShowLazyContentDialog.xaml │ ├── ShowLazyContentDialog.xaml.cs │ ├── WebViewPage.xaml │ └── WebViewPage.xaml.cs ├── app.manifest └── appsettings.json ├── Xunkong.Core ├── .gitignore ├── ChannelType.cs ├── ElementType.cs ├── EnumExtension.cs ├── PlatformType.cs ├── PropertyType.cs ├── RegionHelper.cs ├── RegionType.cs ├── WeaponType.cs ├── Xunkong.Core.csproj └── XunkongException.cs └── Xunkong.Hoyolab ├── .gitignore ├── Account ├── GenshinRoleInfo.cs ├── GenshinRoleInfoWrapper.cs ├── HoyolabUserInfo.cs ├── HoyolabUserInfoWrapper.cs ├── SignInInfo.cs ├── SignInRisk.cs └── SignTodayJsonConverter.cs ├── Activity ├── Activity.cs ├── Announcement.cs ├── BirthdayStarIndex.cs └── CalendarInfo.cs ├── Avatar ├── AvatarCalculate.cs ├── AvatarConstellation.cs ├── AvatarCostume.cs ├── AvatarDetail.cs ├── AvatarDetailWrapper.cs ├── AvatarInfo.cs ├── AvatarReliquary.cs ├── AvatarSkill.cs ├── AvatarWeapon.cs ├── ReliquaryAffix.cs └── ReliquarySet.cs ├── DailyNote ├── DailyNoteInfo.cs ├── Expedition.cs ├── RecoveryTimeJsonConverter.cs ├── Transformer.cs └── TransformerRecoveryTime.cs ├── DynamicSecret.cs ├── GameRecord ├── GameRecordSummary.cs ├── PlayerRiskStats.cs ├── PotHome.cs ├── WorldExploration.cs ├── WorldExplorationOffering.cs └── WorldExplorationRewardType.cs ├── GlobalUsing.cs ├── HoyolabBaseWrapper.cs ├── HoyolabClient.cs ├── HoyolabException.cs ├── HoyolabJsonContext.cs ├── ListWrapper.cs ├── News ├── NewsDetailWrapper.cs ├── NewsItem.cs ├── NewsListWrapper.cs ├── NewsPost.cs ├── NewsTimeJsonConverter.cs └── NewsType.cs ├── SpiralAbyss ├── SpiralAbyssAvatar.cs ├── SpiralAbyssBattle.cs ├── SpiralAbyssFloor.cs ├── SpiralAbyssInfo.cs ├── SpiralAbyssLevel.cs ├── SpiralAbyssRank.cs └── SpiralAbyssTimeJsonConverter.cs ├── TravelNotes ├── TravelNotesAwardItem.cs ├── TravelNotesAwardType.cs ├── TravelNotesBase.cs ├── TravelNotesDateJsonConverter.cs ├── TravelNotesDateTimeJsonConverter.cs ├── TravelNotesDayData.cs ├── TravelNotesDetail.cs ├── TravelNotesMonthData.cs ├── TravelNotesPrimogemsMonthGroupStats.cs └── TravelNotesSummary.cs ├── Wishlog ├── QueryParam.cs ├── WishEventInfo.cs ├── WishType.cs ├── WishTypeJsonConverter.cs ├── WishlogBackup.cs ├── WishlogClient.cs ├── WishlogItem.cs ├── WishlogJsonContext.cs └── WishlogWrapper.cs └── Xunkong.Hoyolab.csproj /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.7z 2 | *.exe 3 | src/obj/* 4 | src/bin/* 5 | src/.vs/* 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 ema 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | **⚠️ 由于不好维护需要管理员权限的 WinUI 应用,该项目目前停止了维护,可移步到 [Fischless](https://github.com/GenshinMatrix/Fischless) 获得类似功能。** 4 | 5 | # GenshinSwitch 6 | 7 | ![StoreLogo.scale-200](src/GenshinSwitch/Assets/Logos/StoreLogo.scale-200.png) 8 | 9 | [![GitHub downloads](https://img.shields.io/github/downloads/emako/genshin-switch/total)](https://github.com/emako/genshin-switch/releases) 10 | [![GitHub downloads](https://img.shields.io/github/downloads/emako/genshin-switch/latest/total)](https://github.com/emako/genshin-switch/releases) 11 | 12 | > GenshinSwitch 2.x系列 for Windows 13 | > 14 | > - [x] 原神账号快速切换工具(国服/国际服) 15 | > - [x] 米游社实时便签等接口支持(国服) 16 | 17 | ## 截图 18 | 19 | ![](assets/main.png) 20 | 21 | ![](assets/account.png) 22 | 23 | ![](assets/settings.png) 24 | 25 | ## 使用方法 26 | 27 | 1. 登录游戏账号1点击「添加」,比如添加保存为大号 28 | 2. 再登录游戏账号2点击「添加」,比如添加保存为小号 29 | 3. 双击保存的大号或小号即可自动登录 30 | 4. 可添加Cookie支持米游社接口的实时便签提醒 31 | 32 | ## 其他说明 33 | 34 | - 本程序的1.x系列已停止维护并转入[legacy](https://github.com/genshin-matrix/genshin-switch/tree/legacy)分支 35 | - 需要管理员权限是因为游戏要管理员权限启动 36 | - 选中账号右键可以使用「缓启动」(自动3分钟后启动,方便循环打大世界BOSS材料) 37 | 38 | ## 常见问题 39 | 40 | - 若安装包无法安装,请确保你的系统已安装应用商店,安装包依赖商店架构 (MSIX)。 41 | - 运行环境是net6.0-windows10.0.19041.0。 42 | 43 | ## 功能列表 44 | 45 | 1. 原神账号快速切换工具(国服/国际服) 46 | 2. 米游社实时便签等接口支持(国服) 47 | 3. 游戏自动静音,当游戏退出前台窗口状态时自动静音 48 | 4. 咕咕鸡接口(私有库) 49 | 50 | ## 路线图 51 | 52 | [ROADMAP.md](ROADMAP.md) 53 | 54 | ## 许可证 55 | 56 | [MIT License](https://github.com/genshin-matrix/genshin-switch/blob/main/LICENSE) 57 | 58 | ## 特别鸣谢 59 | 60 | [xunkong](https://github.com/xunkong/xunkong) 61 | 62 | -------------------------------------------------------------------------------- /ROADMAP.md: -------------------------------------------------------------------------------- 1 | # Genshin Switch 2 | 3 | ## Roadmap 4 | 5 | 1期工程剩余: 6 | 7 | - [x] 所有接口展示 8 | - [x] 每日世界任务服务器查看 9 | - [x] 开机启动(包形式编译除外) 10 | - [x] 托盘右键菜单 11 | - [x] 主窗口关闭自动托盘 12 | - [ ] 自动静音 13 | - [ ] 代理获取Cookie 14 | - [ ] 设定游戏目录 15 | - [ ] 手动指定目录 16 | - [ ] 读取当前游戏进程信息获取游戏目录 17 | - [ ] 恢复游戏注册表 18 | 19 | - [ ] 咕咕鸡高级 20 | - [x] 设定咕咕鸡令牌 21 | - [ ] 咕咕鸡检查更新 22 | - [ ] 咕咕鸡下载 23 | 24 | - [ ] 预留启动协议 25 | - [ ] 统计游戏时长 26 | - [ ] 上架微软商店 27 | 28 | --- 29 | 30 | 2期工程剩余: 31 | 32 | - [ ] 桌面小树脂 33 | - [ ] 第三方组件 34 | - [ ] 快捷指令 35 | - [ ] 游戏系统菜单栏快捷指令 36 | - [ ] 启动游戏 37 | - [ ] 启动云游戏 38 | - [ ] 启动第三方组件 39 | - [ ] 启动自定义组件(TBD) 40 | - [ ] 启动安卓子系统米游社 41 | - [ ] 解包组件(贴图/音轨/视频) 42 | 43 | - [ ] 优化重复接口 44 | - [ ] 跨日获取米游社签到 45 | 46 | - [ ] 跨4点获取每日世界任务 47 | - [ ] 自定义网页 48 | - [ ] 祈愿记录服务 49 | - [ ] 优化图层内存(非必须) 50 | - [ ] 解锁帧数 51 | 52 | --- 53 | 54 | 3期工程剩余: 55 | 56 | - [ ] 原神模型预览 57 | - [ ] 成就OCR 58 | - [ ] 黄历(预览版) 59 | - [ ] 圣遗物预期 60 | 61 | --- 62 | 63 | 4期工程剩余: 64 | 65 | - [ ] 圣遗物评分 66 | 67 | -------------------------------------------------------------------------------- /assets/account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/assets/account.png -------------------------------------------------------------------------------- /assets/main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/assets/main.png -------------------------------------------------------------------------------- /assets/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/assets/settings.png -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- 1 | .vs/ 2 | -------------------------------------------------------------------------------- /src/.vsconfig: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "components": [ 4 | "Microsoft.Component.MSBuild", 5 | "Microsoft.NetCore.Component.Runtime.6.0", 6 | "Microsoft.NetCore.Component.SDK", 7 | "Microsoft.VisualStudio.Component.ManagedDesktop.Core", 8 | "Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites", 9 | "Microsoft.VisualStudio.Component.NuGet", 10 | "Microsoft.VisualStudio.Component.Windows10SDK.19041", 11 | "Microsoft.VisualStudio.Component.Windows10SDK", 12 | "Microsoft.VisualStudio.ComponentGroup.MSIX.Packaging", 13 | "Microsoft.VisualStudio.ComponentGroup.WindowsAppSDK.Cs", 14 | "Microsoft.VisualStudio.Workload.ManagedDesktop" 15 | ] 16 | } -------------------------------------------------------------------------------- /src/GenshinSwitch.Analyze/.gitignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | obj/ 3 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Analyze/AppCenterException.cs: -------------------------------------------------------------------------------- 1 | namespace GenshinSwitch.Analyze; 2 | 3 | public class AppCenterDummyException : Exception 4 | { 5 | public AppCenterDummyException(string message) : base(message) 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Analyze/GenshinSwitch.Analyze.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | x64 8 | 11.0 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Core/.gitignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | obj/ 3 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Core/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | [assembly: InternalsVisibleTo("GenshinSwitch")] 4 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Core/Contracts/Services/IFileService.cs: -------------------------------------------------------------------------------- 1 | namespace GenshinSwitch.Core.Contracts.Services; 2 | 3 | public interface IFileService 4 | { 5 | T Read(string folderPath, string fileName); 6 | 7 | void Save(string folderPath, string fileName, T content); 8 | 9 | void Delete(string folderPath, string fileName); 10 | } 11 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Core/Contracts/Services/ISpecialPathService.cs: -------------------------------------------------------------------------------- 1 | namespace GenshinSwitch.Core.Contracts.Services; 2 | 3 | public interface ISpecialPathService 4 | { 5 | string GetFolder(string optionFolder); 6 | string GetPath(string baseName); 7 | string GetTempPath(string baseName); 8 | } 9 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Core/GenshinSwitch.Core.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net6.0 4 | GenshinSwitch.Core 5 | x64 6 | 11.0 7 | enable 8 | enable 9 | true 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Core/GenshinSwitch.Core.csproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Core/GenshinSwitchException.cs: -------------------------------------------------------------------------------- 1 | namespace GenshinSwitch.Core; 2 | 3 | public class GenshinSwitchException : Exception 4 | { 5 | public GenshinSwitchException() 6 | { 7 | } 8 | 9 | public GenshinSwitchException(string? message) : base(message) 10 | { 11 | } 12 | 13 | public GenshinSwitchException(string? message, Exception? innerException) : base(message, innerException) 14 | { 15 | } 16 | 17 | public GenshinSwitchException(Exception? innerException) : base(null!, innerException) 18 | { 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Core/Helpers/Json.cs: -------------------------------------------------------------------------------- 1 | using YamlDotNet.Serialization; 2 | 3 | namespace GenshinSwitch.Core.Helpers; 4 | 5 | public static class Json 6 | { 7 | public static async Task ToObjectAsync(string value) 8 | { 9 | return await Task.Run(() => 10 | { 11 | Deserializer deserializer = new(); 12 | return deserializer.Deserialize(value); 13 | }); 14 | } 15 | 16 | public static async Task StringifyAsync(object value) 17 | { 18 | return await Task.Run(() => 19 | { 20 | Serializer serializer = new(); 21 | return serializer.Serialize(value!); 22 | }); 23 | } 24 | } -------------------------------------------------------------------------------- /src/GenshinSwitch.Core/Helpers/Yaml.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace GenshinSwitch.Core.Helpers; 4 | 5 | public static class Yaml 6 | { 7 | public static async Task ToObjectAsync(string value) 8 | { 9 | return await Task.Run(() => 10 | { 11 | // todo 12 | return JsonConvert.DeserializeObject(value)!; 13 | }); 14 | } 15 | 16 | public static async Task StringifyAsync(object value) 17 | { 18 | return await Task.Run(() => 19 | { 20 | // todo 21 | return JsonConvert.SerializeObject(value); 22 | }); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Core/README.md: -------------------------------------------------------------------------------- 1 | *Recommended Markdown Viewer: [Markdown Editor](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.MarkdownEditor2)* 2 | 3 | ## Getting Started 4 | 5 | The Core project contains code that can be [reused across multiple application projects](https://docs.microsoft.com/dotnet/standard/net-standard#net-5-and-net-standard). 6 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Core/Services/FileService.cs: -------------------------------------------------------------------------------- 1 | using GenshinSwitch.Core.Contracts.Services; 2 | using Newtonsoft.Json; 3 | using System.Text; 4 | 5 | namespace GenshinSwitch.Core.Services; 6 | 7 | public class FileService : IFileService 8 | { 9 | public T Read(string folderPath, string fileName) 10 | { 11 | string path = Path.Combine(folderPath, fileName); 12 | 13 | if (File.Exists(path)) 14 | { 15 | string json = File.ReadAllText(path); 16 | return JsonConvert.DeserializeObject(json)!; 17 | } 18 | return default!; 19 | } 20 | 21 | public void Save(string folderPath, string fileName, T content) 22 | { 23 | if (!Directory.Exists(folderPath)) 24 | { 25 | Directory.CreateDirectory(folderPath); 26 | } 27 | 28 | string fileContent = JsonConvert.SerializeObject(content, Formatting.Indented); 29 | File.WriteAllText(Path.Combine(folderPath, fileName), fileContent, Encoding.UTF8); 30 | } 31 | 32 | public void Delete(string folderPath, string fileName) 33 | { 34 | if (fileName != null && File.Exists(Path.Combine(folderPath, fileName))) 35 | { 36 | File.Delete(Path.Combine(folderPath, fileName)); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Core/Services/SpecialPathService.cs: -------------------------------------------------------------------------------- 1 | using GenshinSwitch.Core.Contracts.Services; 2 | 3 | namespace GenshinSwitch.Core.Services; 4 | 5 | public class SpecialPathService : ISpecialPathService 6 | { 7 | private const string _defaultApplicationDataFolder = "genshin-switch"; 8 | private readonly static string _localApplicationData = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); 9 | 10 | internal static SpecialPathService Provider => new(); 11 | public static string TempPath { get; } = Path.GetTempPath(); 12 | 13 | public string GetFolder(string optionFolder = null!) 14 | { 15 | return Path.Combine(_localApplicationData, optionFolder ?? _defaultApplicationDataFolder); 16 | } 17 | 18 | public string GetPath(string baseName) 19 | { 20 | string configPath = Path.Combine(GetFolder(), baseName); 21 | 22 | if (!Directory.Exists(new FileInfo(configPath).DirectoryName)) 23 | { 24 | Directory.CreateDirectory(new FileInfo(configPath).DirectoryName!); 25 | } 26 | return configPath; 27 | } 28 | 29 | public string GetTempPath(string baseName) 30 | { 31 | return Path.Combine(TempPath + _defaultApplicationDataFolder, baseName); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Core/Settings/SettingsCache.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Concurrent; 2 | 3 | namespace GenshinSwitch.Core.Settings; 4 | 5 | internal class SettingsCache : ConcurrentDictionary 6 | { 7 | public T Get(SettingsDefinition definition) 8 | { 9 | string key = definition.Name; 10 | T defaultValue = definition.DefaultValue; 11 | Func converter = definition.Converter; 12 | 13 | if (!TryGetValue(key, out object value)) 14 | { 15 | this[key] = defaultValue!; 16 | return defaultValue; 17 | } 18 | else 19 | { 20 | if (value is T tValue) 21 | { 22 | return tValue; 23 | } 24 | else 25 | { 26 | if (converter is null) 27 | { 28 | return (T)value!; 29 | } 30 | else 31 | { 32 | return converter.Invoke(value!); 33 | } 34 | } 35 | } 36 | } 37 | 38 | public void Set(SettingsDefinition definition, object value) 39 | { 40 | string key = definition.Name; 41 | this[key] = value; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Core/Settings/SettingsSerializer.cs: -------------------------------------------------------------------------------- 1 | using YamlDotNet.Serialization; 2 | 3 | namespace GenshinSwitch.Core.Settings; 4 | 5 | internal class SettingsSerializer 6 | { 7 | public static string SerializeObject(T obj) 8 | { 9 | Serializer serializer = new(); 10 | return serializer.Serialize(obj!); 11 | } 12 | 13 | public static T DeserializeObject(string input) 14 | { 15 | IDeserializer deserializer = new DeserializerBuilder().IgnoreUnmatchedProperties().Build(); 16 | return deserializer.Deserialize(input); 17 | } 18 | 19 | public static bool SerializeFile(string fileName, T obj) 20 | { 21 | bool ret = false; 22 | 23 | try 24 | { 25 | Serializer serializer = new(); 26 | string str = serializer.Serialize(obj!); 27 | using StreamWriter sw = File.CreateText(fileName); 28 | 29 | sw.Write(str); 30 | sw.Flush(); 31 | ret = true; 32 | } 33 | catch (Exception e) 34 | { 35 | _ = e; 36 | } 37 | return ret; 38 | } 39 | 40 | public static T DeserializeFile(string fileName) 41 | { 42 | T info = default!; 43 | 44 | try 45 | { 46 | Deserializer deserializer = new(); 47 | using StreamReader reader = new(fileName); 48 | info = deserializer.Deserialize(reader); 49 | } 50 | catch (Exception e) 51 | { 52 | _ = e; 53 | } 54 | return info; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Core/Threads/CancelabledTask.cs: -------------------------------------------------------------------------------- 1 | namespace GenshinSwitch.Core.Threads; 2 | 3 | public class CancelabledTask 4 | { 5 | public bool IsCanceled { get; private set; } = false; 6 | 7 | public async void DelayAsync(int millisecondsDelay) 8 | { 9 | _ = await Task.Run(() => SpinWait.SpinUntil(() => IsCanceled, millisecondsDelay)); 10 | 11 | if (IsCanceled) 12 | { 13 | throw new GenshinSwitchException(new TimeoutException("User Aborted")); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Fetch/.gitignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | obj/ 3 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Fetch/Attributes/UACRequestAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace GenshinSwitch.Fetch.Attributes; 2 | 3 | [AttributeUsage(AttributeTargets.All, AllowMultiple = false)] 4 | public class UACRequestAttribute : Attribute 5 | { 6 | public bool ButMaybe { get; set; } = false; 7 | } 8 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Fetch/ConfigIni/GenshinConfigIni.cs: -------------------------------------------------------------------------------- 1 | using GenshinSwitch.Fetch.Attributes; 2 | using GenshinSwitch.Fetch.Regedit; 3 | using Microsoft.Extensions.Configuration; 4 | using System.Text; 5 | 6 | namespace GenshinSwitch.Fetch.ConfigIni; 7 | 8 | public static class GenshinConfigIni 9 | { 10 | public static string FilePath = @$"{GenshinRegedit.InstallPathCN}\config.ini"; 11 | public static Dictionary Launcher { get; } = new(); 12 | 13 | static GenshinConfigIni() 14 | { 15 | Fetch(); 16 | } 17 | 18 | public static void Fetch() 19 | { 20 | List> list = 21 | new ConfigurationBuilder() 22 | ?.AddIniFile(FilePath) 23 | ?.Build() 24 | ?.GetSection("launcher") 25 | ?.AsEnumerable().ToList()!; 26 | 27 | if (list is not null) 28 | { 29 | foreach (var kv in list) 30 | { 31 | if (kv.Value is not null) 32 | { 33 | Launcher.Add(kv.Key, kv.Value); 34 | } 35 | } 36 | } 37 | } 38 | 39 | [UACRequest(ButMaybe = true)] 40 | public static void Save() 41 | { 42 | StringBuilder sb = new(); 43 | 44 | sb.AppendLine("[launcher]"); 45 | foreach (KeyValuePair kv in Launcher) 46 | { 47 | sb.AppendLine($"{kv.Key}={kv.Value}"); 48 | } 49 | File.WriteAllText(FilePath, sb.ToString()); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Fetch/GenshinSwitch.Fetch.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net6.0-windows10.0.18362.0 5 | 10.0.18362.0 6 | enable 7 | enable 8 | x64 9 | 11.0 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Fetch/Launch/HyperionCtrl.cs: -------------------------------------------------------------------------------- 1 | using GenshinSwitch.Core; 2 | using System.Diagnostics; 3 | 4 | namespace GenshinSwitch.Fetch.Launch; 5 | 6 | public static class HyperionCtrl 7 | { 8 | /// 9 | /// Windows Subsystem for Android™️ 10 | /// Windows 11 Only Android Hoyolab Application 11 | /// 12 | public const string Android = "wsa://com.mihoyo.hyperion"; 13 | 14 | /// 15 | /// Chinese Server Hoyolab named MiYouShe 16 | /// 17 | public const string Web = "https://www.miyoushe.com/ys/"; 18 | 19 | public static async Task LaunchAsync(string type = null!) 20 | { 21 | try 22 | { 23 | _ = Process.Start(new ProcessStartInfo() 24 | { 25 | UseShellExecute = true, 26 | FileName = type ?? Android, 27 | }); 28 | } 29 | catch (Exception e) 30 | { 31 | Logger.Error(e); 32 | } 33 | await Task.CompletedTask; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Fetch/Launch/LaunchParameter.cs: -------------------------------------------------------------------------------- 1 | using System.Text; 2 | 3 | namespace GenshinSwitch.Fetch.Launch; 4 | 5 | public class LaunchParameter 6 | { 7 | public string? Server { get; set; } = null!; 8 | public string? Prod { get; set; } = null!; 9 | 10 | public bool? IsFullScreen { get; set; } = null!; 11 | public int? ScreenWidth { get; set; } = null!; 12 | public int? ScreenHeight { get; set; } = null!; 13 | 14 | public override string ToString() 15 | { 16 | StringBuilder sb = new(); 17 | 18 | if (IsFullScreen != null) 19 | { 20 | sb.Append("-screen-fullscreen").Append(' ').Append(IsFullScreen.Value ? 1 : 0); 21 | } 22 | if (ScreenWidth != null) 23 | { 24 | sb.Append("-screen-width").Append(' ').Append(ScreenWidth); 25 | } 26 | if (ScreenHeight != null) 27 | { 28 | sb.Append("-screen-height").Append(' ').Append(ScreenHeight); 29 | } 30 | return sb.ToString(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Fetch/Launch/RelaunchMethod.cs: -------------------------------------------------------------------------------- 1 | using GenshinSwitch.Fetch.Attributes; 2 | using System.Reflection; 3 | 4 | namespace GenshinSwitch.Fetch.Launch; 5 | 6 | [Obfuscation] 7 | public enum RelaunchMethods 8 | { 9 | None, 10 | Kill, 11 | [UACRequest] 12 | Close, 13 | } 14 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Fetch/Lazy/LazyInput.cs: -------------------------------------------------------------------------------- 1 | namespace GenshinSwitch.Fetch.Lazy; 2 | 3 | public class LazyInput 4 | { 5 | public string Uid { get; set; } = null!; 6 | public string DateTime { get; set; } = null!; 7 | public bool Today { get; set; } = false; 8 | } 9 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Fetch/Lazy/LazyLauncher.cs: -------------------------------------------------------------------------------- 1 | using GenshinSwitch.Core; 2 | using System.Diagnostics; 3 | 4 | namespace GenshinSwitch.Fetch.Lazy; 5 | 6 | public static class LazyLauncher 7 | { 8 | public static async Task LaunchAsync(string path, Func stdOutAsync = null!, Func stdErrAsync = null!) 9 | { 10 | return await Task.Run(() => 11 | { 12 | try 13 | { 14 | Process p = Process.Start(new ProcessStartInfo() 15 | { 16 | UseShellExecute = false, 17 | FileName = path, 18 | RedirectStandardOutput = true, 19 | RedirectStandardError = true, 20 | CreateNoWindow = true, 21 | WindowStyle = ProcessWindowStyle.Hidden, 22 | }); 23 | 24 | if (p != null) 25 | { 26 | if (stdOutAsync != null) 27 | { 28 | p.OutputDataReceived += (_, e) => stdOutAsync.Invoke(e.Data!); 29 | } 30 | if (stdErrAsync != null) 31 | { 32 | p.ErrorDataReceived += (_, e) => stdErrAsync.Invoke(e.Data!); 33 | } 34 | } 35 | p!.WaitForExit(); 36 | return p.ExitCode; 37 | } 38 | catch (Exception e) 39 | { 40 | Logger.Error(e); 41 | return int.MaxValue; 42 | } 43 | }); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Fetch/Lazy/LazyOutput.cs: -------------------------------------------------------------------------------- 1 | namespace GenshinSwitch.Fetch.Lazy; 2 | 3 | internal class LazyOutput 4 | { 5 | public string Uid { get; set; } = null!; 6 | public string Prod { get; set; } = null!; 7 | public string DateTimeUtc { get; set; } = null!; 8 | } 9 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Fetch/Lazy/LazyOutputSerializer.cs: -------------------------------------------------------------------------------- 1 | using YamlDotNet.Serialization; 2 | 3 | namespace GenshinSwitch.Fetch.Lazy; 4 | 5 | internal class LazyOutputSerializer 6 | { 7 | public static string SerializeObject(T obj) 8 | { 9 | Serializer serializer = new(); 10 | return serializer.Serialize(obj!); 11 | } 12 | 13 | public static T DeserializeObject(string input) 14 | { 15 | IDeserializer deserializer = new DeserializerBuilder().IgnoreUnmatchedProperties().Build(); 16 | return deserializer.Deserialize(input); 17 | } 18 | 19 | public static bool SerializeFile(string fileName, T obj) 20 | { 21 | bool ret = false; 22 | 23 | try 24 | { 25 | Serializer serializer = new(); 26 | string str = serializer.Serialize(obj!); 27 | using StreamWriter sw = File.CreateText(fileName); 28 | 29 | sw.Write(str); 30 | sw.Flush(); 31 | ret = true; 32 | } 33 | catch (Exception e) 34 | { 35 | _ = e; 36 | } 37 | return ret; 38 | } 39 | 40 | public static T DeserializeFile(string fileName) 41 | { 42 | T info = default!; 43 | 44 | try 45 | { 46 | Deserializer deserializer = new(); 47 | using StreamReader reader = new(fileName); 48 | info = deserializer.Deserialize(reader); 49 | } 50 | catch (Exception e) 51 | { 52 | _ = e; 53 | } 54 | return info; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Fetch/Lazy/LazySpecialPathProvider.cs: -------------------------------------------------------------------------------- 1 | namespace GenshinSwitch.Fetch.Lazy; 2 | 3 | internal class LazySpecialPathProvider 4 | { 5 | public static string TempPath { get; } = Path.GetTempPath(); 6 | 7 | public static string GetPath(string baseName) 8 | { 9 | return GetPathInternal(baseName); 10 | } 11 | 12 | internal static string GetPathInternal(string baseName) 13 | { 14 | string appUserPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); 15 | string configPath = Path.Combine(Path.Combine(appUserPath, "genshin-lazy"), baseName); 16 | 17 | if (!Directory.Exists(new FileInfo(configPath).DirectoryName)) 18 | { 19 | Directory.CreateDirectory(new FileInfo(configPath).DirectoryName!); 20 | } 21 | return configPath; 22 | } 23 | 24 | public static string GetTempPath(string baseName) 25 | { 26 | return Path.Combine(TempPath + "genshin-lazy", baseName); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Fetch/Lazy/LazyVerification.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | 3 | namespace GenshinSwitch.Fetch.Lazy; 4 | 5 | public static class LazyVerification 6 | { 7 | public static async Task VerifyAssembly(string path) 8 | { 9 | FileVersionInfo fvi = await Task.Run(() => 10 | { 11 | if (File.Exists(path)) 12 | { 13 | return FileVersionInfo.GetVersionInfo(path); 14 | } 15 | return null!; 16 | }); 17 | 18 | if (fvi != null) 19 | { 20 | return fvi.ProductName == "GenshinLazy" 21 | && fvi.OriginalFilename == "GenshinLazy.dll" 22 | && fvi.CompanyName == "GenshinMatrix"; 23 | } 24 | return false; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Fetch/Regedit/GenshinRegedit.reg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch.Fetch/Regedit/GenshinRegedit.reg -------------------------------------------------------------------------------- /src/GenshinSwitch.Fetch/Regedit/README.md: -------------------------------------------------------------------------------- 1 | # Regedit 2 | 3 | > 可能用到的注册表键 4 | 5 | ```bash 6 | 计算机\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run 7 | 计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\原神 8 | 计算机\HKEY_CURRENT_USER\Software\miHoYo\原神 9 | ``` 10 | 11 | ```bash 12 | C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup 13 | C:\Users\ema\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup 14 | ``` 15 | 16 | ```bash 17 | shell:startup 18 | shell:appsfolder 19 | ``` 20 | 21 | > 恢复原神注册表 22 | > 23 | > ※需要GBK编码 24 | 25 | ```ini 26 | Windows Registry Editor Version 5.00 27 | 28 | [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\原神] 29 | "UUID"="8ae919d528ab45e39487f7b106b9ab451639403361704" 30 | "DisplayIcon"="D:\\Program Files\\Genshin Impact\\launcher.exe" 31 | "DisplayName"="原神" 32 | "DisplayVersion"="2.23.0.0" 33 | "Publisher"="miHoYo Co.,Ltd" 34 | "UninstallString"="D:\\Program Files\\Genshin Impact\\uninstall.exe" 35 | "InstallPath"="D:\\Program Files\\Genshin Impact" 36 | "ExeName"="launcher.exe" 37 | "URLInfoAbout"="https://ys.mihoyo.com/main/" 38 | "EstimatedSize"=dword:00049535 39 | ``` 40 | 41 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Fetch/Regedit/RegeditKeys.cs: -------------------------------------------------------------------------------- 1 | namespace GenshinSwitch.Fetch.Regedit; 2 | 3 | public class RegeditKeys 4 | { 5 | public const string CN = "原神"; 6 | public const string PROD_CN = "MIHOYOSDK_ADL_PROD_CN_h3123967166"; 7 | public const string DATA = "GENERAL_DATA_h2389025596"; 8 | 9 | public const string OVERSEA = "Genshin Impact"; 10 | public const string PROD_OVERSEA = "MIHOYOSDK_ADL_PROD_OVERSEA_h1158948810"; 11 | 12 | public const string CNCloud = "云·原神"; 13 | public const string PROD_CNCloud = "MIHOYOSDK_ADL_0"; 14 | } 15 | -------------------------------------------------------------------------------- /src/GenshinSwitch.Fetch/Service/MainServiceCommmand.cs: -------------------------------------------------------------------------------- 1 | namespace GenshinSwitch.Fetch.Service; 2 | 3 | public enum MainServiceCommmand 4 | { 5 | None = 0x00, 6 | SetGameAccountRegisty = 0x01, 7 | GetGameAccountRegisty = 0x02, 8 | LaunchProcess = 0x03, 9 | Kill = 0x88, 10 | } 11 | -------------------------------------------------------------------------------- /src/GenshinSwitch.WindowsService/.gitignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | obj/ 3 | 4 | *.user 5 | -------------------------------------------------------------------------------- /src/GenshinSwitch.WindowsService/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/GenshinSwitch.WindowsService/EventLoop.cs: -------------------------------------------------------------------------------- 1 | using System.Threading; 2 | 3 | namespace GenshinSwitch.WindowsService; 4 | 5 | internal class EventLoop 6 | { 7 | public void Start() 8 | { 9 | while (true) 10 | { 11 | Thread.Sleep(int.MaxValue); 12 | } 13 | } 14 | 15 | public void Stop() 16 | { 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/GenshinSwitch.WindowsService/FodyWeavers.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /src/GenshinSwitch.WindowsService/GenshinSwitch.WindowsService.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | WinExe 5 | net472 6 | enable 7 | 11.0 8 | app.manifest 9 | Sapphire.ico 10 | 1.0.3 11 | 1.0.3 12 | $(VersionPrefix)1.0.3 13 | GenshinMatrix 14 | GenshinMatrix 15 | GenshinMatrix 16 | GenshinSwitch extending boxed APIs Provider. 17 | GenshinMatrix 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | all 27 | runtime; build; native; contentfiles; analyzers; buildtransitive 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/GenshinSwitch.WindowsService/GenshinSwitch.WindowsService.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.5.33502.453 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GenshinSwitch.WindowsService", "GenshinSwitch.WindowsService.csproj", "{B2C2CE92-64CC-48FE-9FFF-7FCB16BA0E90}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {B2C2CE92-64CC-48FE-9FFF-7FCB16BA0E90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {B2C2CE92-64CC-48FE-9FFF-7FCB16BA0E90}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {B2C2CE92-64CC-48FE-9FFF-7FCB16BA0E90}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {B2C2CE92-64CC-48FE-9FFF-7FCB16BA0E90}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {694665B5-2E44-4F9C-BEBC-3E747B4974BA} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /src/GenshinSwitch.WindowsService/MainInstaller.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.ComponentModel; 3 | using System.Configuration.Install; 4 | using System.ServiceProcess; 5 | 6 | namespace GenshinSwitch.WindowsService; 7 | 8 | [RunInstaller(true)] 9 | public class MainInstaller : Installer 10 | { 11 | private readonly ServiceInstaller? serviceInstaller; 12 | private readonly ServiceProcessInstaller? processInstaller; 13 | 14 | public MainInstaller() 15 | { 16 | serviceInstaller = new ServiceInstaller 17 | { 18 | ServiceName = "GenshinSwitch.WindowsService", 19 | DisplayName = "GenshinSwitch", 20 | Description = "GenshinSwitch extending boxed APIs Provider", 21 | StartType = ServiceStartMode.Automatic, 22 | }; 23 | 24 | processInstaller = new ServiceProcessInstaller 25 | { 26 | Account = ServiceAccount.LocalSystem, 27 | }; 28 | 29 | Installers.Add(serviceInstaller); 30 | Installers.Add(processInstaller); 31 | } 32 | 33 | public override void Install(IDictionary stateSaver) 34 | { 35 | base.Install(stateSaver); 36 | } 37 | 38 | public override void Uninstall(IDictionary savedState) 39 | { 40 | base.Uninstall(savedState); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/GenshinSwitch.WindowsService/MainRunner.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | 3 | namespace GenshinSwitch.WindowsService; 4 | 5 | internal static class MainRunner 6 | { 7 | public static bool Start() 8 | { 9 | Process p = new() 10 | { 11 | StartInfo = new ProcessStartInfo() 12 | { 13 | FileName = "net.exe", 14 | Arguments = "start GenshinSwitch.WindowsService", 15 | UseShellExecute = false, 16 | CreateNoWindow = true, 17 | Verb = "runas", 18 | }, 19 | }; 20 | p.Start(); 21 | p.WaitForExit(); 22 | return p.ExitCode == 0; 23 | } 24 | 25 | public static bool Stop() 26 | { 27 | Process p = new() 28 | { 29 | StartInfo = new ProcessStartInfo() 30 | { 31 | FileName = "net.exe", 32 | Arguments = "stop GenshinSwitch.WindowsService", 33 | UseShellExecute = false, 34 | CreateNoWindow = true, 35 | Verb = "runas", 36 | }, 37 | }; 38 | p.Start(); 39 | p.WaitForExit(); 40 | return p.ExitCode == 0; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/GenshinSwitch.WindowsService/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "GenshinSwitch.WindowsService": { 4 | "commandName": "Project" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /src/GenshinSwitch.WindowsService/Sapphire.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch.WindowsService/Sapphire.ico -------------------------------------------------------------------------------- /src/GenshinSwitch/.gitignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | obj/ 3 | 4 | *.user 5 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Activation/ActivationHandler.cs: -------------------------------------------------------------------------------- 1 | namespace GenshinSwitch.Activation; 2 | 3 | // Extend this class to implement new ActivationHandlers. See DefaultActivationHandler for an example. 4 | // https://github.com/microsoft/TemplateStudio/blob/main/docs/WinUI/activation.md 5 | public abstract class ActivationHandler : IActivationHandler 6 | where T : class 7 | { 8 | // Override this method to add the logic for whether to handle the activation. 9 | protected virtual bool CanHandleInternal(T args) => true; 10 | 11 | // Override this method to add the logic for your activation handler. 12 | protected abstract Task HandleInternalAsync(T args); 13 | 14 | public bool CanHandle(object args) => args is T && CanHandleInternal((args as T)!); 15 | 16 | public async Task HandleAsync(object args) => await HandleInternalAsync((args as T)!); 17 | } 18 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Activation/DefaultActivationHandler.cs: -------------------------------------------------------------------------------- 1 | using GenshinSwitch.Contracts.Services; 2 | using GenshinSwitch.ViewModels; 3 | using Microsoft.UI.Xaml; 4 | 5 | namespace GenshinSwitch.Activation; 6 | 7 | public class DefaultActivationHandler : ActivationHandler 8 | { 9 | private readonly INavigationService navigationService; 10 | 11 | public DefaultActivationHandler(INavigationService navigationService) 12 | { 13 | this.navigationService = navigationService; 14 | } 15 | 16 | protected override bool CanHandleInternal(LaunchActivatedEventArgs args) 17 | { 18 | // None of the ActivationHandlers has handled the activation. 19 | return navigationService.Frame?.Content == null; 20 | } 21 | 22 | protected async override Task HandleInternalAsync(LaunchActivatedEventArgs args) 23 | { 24 | navigationService.NavigateTo(typeof(MainViewModel).FullName!, args.Arguments); 25 | 26 | await Task.CompletedTask; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Activation/IActivationHandler.cs: -------------------------------------------------------------------------------- 1 | namespace GenshinSwitch.Activation; 2 | 3 | public interface IActivationHandler 4 | { 5 | bool CanHandle(object args); 6 | 7 | Task HandleAsync(object args); 8 | } 9 | -------------------------------------------------------------------------------- /src/GenshinSwitch/App.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Fonts/DigitalClock.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Fonts/DigitalClock.ttf -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Fonts/HarmonyOS_Sans_SC_Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Fonts/HarmonyOS_Sans_SC_Regular.ttf -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Fonts/Segoe Fluent Icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Fonts/Segoe Fluent Icons.ttf -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/CreateCSharp.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | for rt, dirs, files in os.walk('.'): 4 | for f in files: 5 | fname, ext = os.path.splitext(f) 6 | if ext == '.png': 7 | print('public const string ' + fname + ' = "ms-appx:///Assets/Images/LocalAvatars/' + fname + ext + '";') 8 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Ayaka.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Ayaka.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Barbara.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Barbara.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Bennett.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Bennett.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Chongyun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Chongyun.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Collei.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Collei.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Cyno.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Cyno.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Diluc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Diluc.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Diona.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Diona.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Fischl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Fischl.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Ganyu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Ganyu.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Kaeya.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Kaeya.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Keqing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Keqing.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Mona.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Mona.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Ningguang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Ningguang.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Noel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Noel.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Qin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Qin.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Razor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Razor.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Sucrose.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Sucrose.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Xiangling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Xiangling.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Xingqiu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Xingqiu.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Yoimiya.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_AvatarIcon_Yoimiya.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_AbyssFire.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_AbyssFire.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_AbyssIce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_AbyssIce.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_AbyssWater.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_AbyssWater.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_BruteAxeElec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_BruteAxeElec.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_BruteAxeFire.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_BruteAxeFire.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_BruteIceShield.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_BruteIceShield.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_Hili.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_Hili.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_HiliClub.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_HiliClub.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_HiliIce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_HiliIce.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_HiliRange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_HiliRange.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_HiliRangeElec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_HiliRangeElec.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_KairagiElec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_KairagiElec.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_KairagiFire.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_KairagiFire.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_SamuraiRonin01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_SamuraiRonin01.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_SamuraiRonin02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_SamuraiRonin02.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_SamuraiRonin03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_SamuraiRonin03.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_ShamanGrass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_ShamanGrass.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_ShamanWater.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_ShamanWater.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_ShamanWind.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_ShamanWind.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_SlimeElec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_SlimeElec.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_SlimeWater.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_SlimeWater.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_UnuAnudattaGrass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_EnemyIcon_UnuAnudattaGrass.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_MonsterIcon_Bruterock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_MonsterIcon_Bruterock.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_MonsterIcon_Fatuus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_MonsterIcon_Fatuus.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_MonsterIcon_Fungusgrass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_MonsterIcon_Fungusgrass.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_MonsterIcon_Maidenwater.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_MonsterIcon_Maidenwater.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_MonsterIcon_Ningyo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_MonsterIcon_Ningyo.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_MonsterIcon_Oceanid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_MonsterIcon_Oceanid.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_MonsterIcon_SkirmisherWater.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_MonsterIcon_SkirmisherWater.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_MonsterIcon_SkirmisherWind.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_Gcg_Char_MonsterIcon_SkirmisherWind.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_MusicV3SelectPage_Album_Pic01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_MusicV3SelectPage_Album_Pic01.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_MusicV3SelectPage_Album_Pic02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_MusicV3SelectPage_Album_Pic02.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_MusicV3SelectPage_Album_Pic03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_MusicV3SelectPage_Album_Pic03.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_MusicV3SelectPage_Album_Pic04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_MusicV3SelectPage_Album_Pic04.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_MusicV3SelectPage_Album_Pic05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_MusicV3SelectPage_Album_Pic05.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_MusicV3SelectPage_Album_Pic06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_MusicV3SelectPage_Album_Pic06.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/LocalAvatars/UI_MusicV3SelectPage_Album_Pic07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/LocalAvatars/UI_MusicV3SelectPage_Album_Pic07.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_ActivitySmallIcon_Summertime_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_ActivitySmallIcon_Summertime_02.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_Activity_Steeplechase_DialogOfficialIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_Activity_Steeplechase_DialogOfficialIcon.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_BtnFrame_W27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_BtnFrame_W27.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_BtnIcon_PlayerBoy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_BtnIcon_PlayerBoy.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_BtnIcon_PlayerGirl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_BtnIcon_PlayerGirl.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_BtnIcon_SkillSet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_BtnIcon_SkillSet.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_ClockIcon_Dusk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_ClockIcon_Dusk.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_ClockIcon_Morning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_ClockIcon_Morning.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_ClockIcon_Night.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_ClockIcon_Night.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_ClockIcon_Noon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_ClockIcon_Noon.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_EchoShell_Popo_Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_EchoShell_Popo_Small.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_EmotionIcon100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_EmotionIcon100.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_EmotionIcon97.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_EmotionIcon97.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_EmotionIcon98.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_EmotionIcon98.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_EmotionIcon99.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_EmotionIcon99.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_Frame_Equipped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_Frame_Equipped.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_GcgIcon_CardCurrency.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_GcgIcon_CardCurrency.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_HomeworldLevel_Coins_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_HomeworldLevel_Coins_1.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_HomeworldLevel_Coins_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_HomeworldLevel_Coins_2.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_HomeworldLevel_Coins_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_HomeworldLevel_Coins_3.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_HomeworldLevel_Treasurebowl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_HomeworldLevel_Treasurebowl.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_Icon_Close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_Icon_Close.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_Icon_Explore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_Icon_Explore.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_Icon_GcgBossChallenges_Difficulty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_Icon_GcgBossChallenges_Difficulty.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_Icon_Intee_Explore_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_Icon_Intee_Explore_1.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_Icon_L.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_Icon_L.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_Icon_TimeSpeedUp_S.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_Icon_TimeSpeedUp_S.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_Icon_Tower_Star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_Icon_Tower_Star.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_Img_Aster_MainRewardS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_Img_Aster_MainRewardS.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_Img_Cursor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_Img_Cursor.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_Img_Cursor_PC.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_Img_Cursor_PC.cur -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_Img_Cursor_PC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_Img_Cursor_PC.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_Img_Red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_Img_Red.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_ItemIcon_100064.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_ItemIcon_100064.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_ItemIcon_105.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_ItemIcon_105.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_ItemIcon_107012.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_ItemIcon_107012.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_ItemIcon_202.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_ItemIcon_202.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_ItemIcon_204.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_ItemIcon_204.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_ItemIcon_210.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_ItemIcon_210.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_ItemIcon_211.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_ItemIcon_211.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_ItemIcon_220021.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_ItemIcon_220021.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_ItemIcon_221.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_ItemIcon_221.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_ItemIcon_222.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_ItemIcon_222.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_LiYueShiLaiMu_Alpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_LiYueShiLaiMu_Alpha.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_Mall_BannerBig1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_Mall_BannerBig1.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_Mall_BannerBig3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_Mall_BannerBig3.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_Mall_Purchase_Blessofmoon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_Mall_Purchase_Blessofmoon.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_Mall_Purchase_Resin_Monthly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_Mall_Purchase_Resin_Monthly.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_MarkPoint_GcgZhanDou.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_MarkPoint_GcgZhanDou.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_MarkPoint_GeneralCargo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_MarkPoint_GeneralCargo.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_MarkPoint_Vintage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_MarkPoint_Vintage.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_MarkQuest_Common_Proce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_MarkQuest_Common_Proce.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_MarkQuest_Events_Proce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_MarkQuest_Events_Proce.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_MarkQuest_Random_Proce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_MarkQuest_Random_Proce.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_MarkTower.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_MarkTower.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_MarkTower_Daily.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_MarkTower_Daily.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_MarkTower_Tower.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_MarkTower_Tower.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_MarkTower_Weekly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_MarkTower_Weekly.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_NetstatIcon_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_NetstatIcon_1.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_NetstatIcon_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_NetstatIcon_2.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_NetstatIcon_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_NetstatIcon_3.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_Rename.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | for rt, dirs, files in os.walk('.'): 4 | for f in files: 5 | fname, ext = os.path.splitext(f) 6 | if ext == '.png' and '+' in fname: 7 | try: 8 | os.rename(f, f[0 : fname.find('+')] + ext) 9 | except: 10 | pass 11 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_SeaLamp_StoryPic_02_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_SeaLamp_StoryPic_02_2.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_SummerTime_ImgCharacter_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_SummerTime_ImgCharacter_01.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_SummerTime_ImgDecorate_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_SummerTime_ImgDecorate_01.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_SummerTime_ImgDecorate_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_SummerTime_ImgDecorate_02.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_Tab_GachaShowPanel_Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_Tab_GachaShowPanel_Default.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_Tips_Item_Complete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_Tips_Item_Complete.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_Tips_Item_Quest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_Tips_Item_Quest.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_Tips_Item_Warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_Tips_Item_Warning.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/UI_TouchIcon_Auto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/UI_TouchIcon_Auto.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/e_tiangou.cbec2da1..png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/e_tiangou.cbec2da1..png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/miyoushe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/miyoushe.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/prize_bg.0014ae02..png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/prize_bg.0014ae02..png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Images/stage_3_icon.02bbe66b..png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Images/stage_3_icon.02bbe66b..png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Favicon.ico -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Favicon.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/LargeTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/LargeTile.scale-100.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/LargeTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/LargeTile.scale-125.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/LargeTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/LargeTile.scale-150.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/LargeTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/LargeTile.scale-200.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/LargeTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/LargeTile.scale-400.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/SmallTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/SmallTile.scale-100.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/SmallTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/SmallTile.scale-125.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/SmallTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/SmallTile.scale-150.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/SmallTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/SmallTile.scale-200.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/SmallTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/SmallTile.scale-400.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/SplashScreen.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/SplashScreen.scale-100.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/SplashScreen.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/SplashScreen.scale-125.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/SplashScreen.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/SplashScreen.scale-150.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/SplashScreen.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/SplashScreen.scale-400.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Square150x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Square150x150Logo.scale-100.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Square150x150Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Square150x150Logo.scale-125.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Square150x150Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Square150x150Logo.scale-150.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Square150x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Square150x150Logo.scale-400.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Square44x44Logo.altform-lightunplated_targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Square44x44Logo.altform-lightunplated_targetsize-16.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Square44x44Logo.altform-lightunplated_targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Square44x44Logo.altform-lightunplated_targetsize-24.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Square44x44Logo.altform-lightunplated_targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Square44x44Logo.altform-lightunplated_targetsize-256.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Square44x44Logo.altform-lightunplated_targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Square44x44Logo.altform-lightunplated_targetsize-32.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Square44x44Logo.altform-lightunplated_targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Square44x44Logo.altform-lightunplated_targetsize-48.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Square44x44Logo.altform-unplated_targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Square44x44Logo.altform-unplated_targetsize-16.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Square44x44Logo.altform-unplated_targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Square44x44Logo.altform-unplated_targetsize-24.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Square44x44Logo.altform-unplated_targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Square44x44Logo.altform-unplated_targetsize-256.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Square44x44Logo.altform-unplated_targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Square44x44Logo.altform-unplated_targetsize-32.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Square44x44Logo.altform-unplated_targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Square44x44Logo.altform-unplated_targetsize-48.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Square44x44Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Square44x44Logo.scale-100.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Square44x44Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Square44x44Logo.scale-125.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Square44x44Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Square44x44Logo.scale-150.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Square44x44Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Square44x44Logo.scale-400.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Square44x44Logo.targetsize-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Square44x44Logo.targetsize-16.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Square44x44Logo.targetsize-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Square44x44Logo.targetsize-24.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Square44x44Logo.targetsize-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Square44x44Logo.targetsize-256.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Square44x44Logo.targetsize-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Square44x44Logo.targetsize-32.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Square44x44Logo.targetsize-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Square44x44Logo.targetsize-48.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/StoreLogo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/StoreLogo.scale-100.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/StoreLogo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/StoreLogo.scale-125.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/StoreLogo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/StoreLogo.scale-150.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/StoreLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/StoreLogo.scale-200.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/StoreLogo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/StoreLogo.scale-400.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Wide310x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Wide310x150Logo.scale-100.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Wide310x150Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Wide310x150Logo.scale-125.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Wide310x150Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Wide310x150Logo.scale-150.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Assets/Logos/Wide310x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GenshinMatrix/genshin-switch/3559c6ea493ca8fe684bc637b31bc3dd521824ea/src/GenshinSwitch/Assets/Logos/Wide310x150Logo.scale-400.png -------------------------------------------------------------------------------- /src/GenshinSwitch/Behaviors/NavigationViewHeaderMode.cs: -------------------------------------------------------------------------------- 1 | namespace GenshinSwitch.Behaviors; 2 | 3 | public enum NavigationViewHeaderMode 4 | { 5 | Always, 6 | Never, 7 | Minimal, 8 | } 9 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Contracts/Services/IActivationService.cs: -------------------------------------------------------------------------------- 1 | namespace GenshinSwitch.Contracts.Services; 2 | 3 | public interface IActivationService 4 | { 5 | Task ActivateAsync(object activationArgs); 6 | } 7 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Contracts/Services/IAppNotificationService.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Specialized; 2 | 3 | namespace GenshinSwitch.Contracts.Services; 4 | 5 | public interface IAppNotificationService 6 | { 7 | void Initialize(); 8 | 9 | bool Show(string payload); 10 | 11 | NameValueCollection ParseArguments(string arguments); 12 | 13 | void Unregister(); 14 | } 15 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Contracts/Services/ILocalSettingsService.cs: -------------------------------------------------------------------------------- 1 | namespace GenshinSwitch.Contracts.Services; 2 | 3 | public interface ILocalSettingsService 4 | { 5 | Task ReadSettingAsync(string key); 6 | 7 | Task SaveSettingAsync(string key, T value); 8 | } 9 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Contracts/Services/INavigationService.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.UI.Xaml.Controls; 2 | using Microsoft.UI.Xaml.Navigation; 3 | 4 | namespace GenshinSwitch.Contracts.Services; 5 | 6 | public interface INavigationService 7 | { 8 | event NavigatedEventHandler Navigated; 9 | 10 | bool CanGoBack { get; } 11 | 12 | Frame? Frame { get; set; } 13 | 14 | bool NavigateTo(string pageKey, object? parameter = null, bool clearNavigation = false); 15 | 16 | bool GoBack(); 17 | 18 | void SetListDataItemForNextConnectedAnimation(object item); 19 | } 20 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Contracts/Services/INavigationViewService.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.UI.Xaml.Controls; 2 | 3 | namespace GenshinSwitch.Contracts.Services; 4 | 5 | public interface INavigationViewService 6 | { 7 | IList? MenuItems { get; } 8 | 9 | object? SettingsItem { get; } 10 | 11 | void Initialize(NavigationView navigationView); 12 | 13 | void UnregisterEvents(); 14 | 15 | NavigationViewItem? GetSelectedItem(Type pageType); 16 | } 17 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Contracts/Services/IPageService.cs: -------------------------------------------------------------------------------- 1 | namespace GenshinSwitch.Contracts.Services; 2 | 3 | public interface IPageService 4 | { 5 | Type GetPageType(string key); 6 | } 7 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Contracts/Services/IThemeSelectorService.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.UI.Xaml; 2 | 3 | namespace GenshinSwitch.Contracts.Services; 4 | 5 | public interface IThemeSelectorService 6 | { 7 | public ElementTheme Theme { get; } 8 | 9 | public Task InitializeAsync(); 10 | 11 | public Task SetThemeAsync(ElementTheme theme); 12 | 13 | public Task SetRequestedThemeAsync(); 14 | } 15 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Contracts/Services/IWebViewService.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.UI.Xaml.Controls; 2 | using Microsoft.Web.WebView2.Core; 3 | 4 | namespace GenshinSwitch.Contracts.Services; 5 | 6 | public interface IWebViewService 7 | { 8 | Uri? Source { get; } 9 | 10 | bool CanGoBack { get; } 11 | 12 | bool CanGoForward { get; } 13 | 14 | event EventHandler? NavigationCompleted; 15 | 16 | void Initialize(WebView2 webView); 17 | 18 | void GoBack(); 19 | 20 | void GoForward(); 21 | 22 | void Reload(); 23 | 24 | void UnregisterEvents(); 25 | } 26 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Contracts/ViewModels/INavigationAware.cs: -------------------------------------------------------------------------------- 1 | namespace GenshinSwitch.Contracts.ViewModels; 2 | 3 | public interface INavigationAware 4 | { 5 | void OnNavigatedTo(object parameter); 6 | 7 | void OnNavigatedFrom(); 8 | } 9 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Contracts/ViewModels/MainViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace GenshinSwitch.Contracts.ViewModels; 8 | 9 | internal class MainViewModel 10 | { 11 | } 12 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Controls/Image/ImageHelper.cs: -------------------------------------------------------------------------------- 1 | using GenshinSwitch.Views.Converters; 2 | using Microsoft.UI.Xaml; 3 | using Microsoft.UI.Xaml.Controls; 4 | using Microsoft.UI.Xaml.Media; 5 | using Microsoft.UI.Xaml.Media.Imaging; 6 | using Vanara.Extensions.Reflection; 7 | 8 | namespace GenshinSwitch.Controls; 9 | 10 | public static class ImageHelper 11 | { 12 | public static double GetWidth(DependencyObject obj) 13 | { 14 | return (double)obj.GetValue(WidthProperty); 15 | } 16 | 17 | public static void SetWidth(DependencyObject obj, double value) 18 | { 19 | obj.SetValue(WidthProperty, value); 20 | } 21 | 22 | public static readonly DependencyProperty WidthProperty = DependencyProperty.RegisterAttached("Width", typeof(double), typeof(ImageHelper), new PropertyMetadata(0d, OnWidthChanged)); 23 | 24 | private static void OnWidthChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) 25 | { 26 | if (d is Image image) 27 | { 28 | if (image.Source is BitmapImage bitmapImage) 29 | { 30 | if (!string.IsNullOrEmpty(bitmapImage.UriSource.ToString())) 31 | { 32 | UriStringToImageSourceConverter converter = new(); 33 | ImageSource imageSource = converter.Convert(bitmapImage.UriSource.ToString(), typeof(ImageSource), e.NewValue, string.Empty) as ImageSource; 34 | image.Source = imageSource; 35 | } 36 | } 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Controls/MessageBox/MessageBoxX.xaml: -------------------------------------------------------------------------------- 1 |  13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Controls/MessageBox/MessageBoxX.xaml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.UI.Xaml; 2 | using Microsoft.UI.Xaml.Controls; 3 | 4 | namespace GenshinSwitch.Controls; 5 | 6 | public sealed partial class MessageBoxX : ContentDialog 7 | { 8 | public string Message 9 | { 10 | get => (string)GetValue(MessageProperty); 11 | set => SetValue(MessageProperty, value); 12 | } 13 | public static readonly DependencyProperty MessageProperty = DependencyProperty.Register("Message", typeof(string), typeof(MessageBoxX), new PropertyMetadata(null!)); 14 | 15 | public MessageBoxX() 16 | { 17 | InitializeComponent(); 18 | } 19 | 20 | public MessageBoxX(string message, string title = null!) 21 | : this() 22 | { 23 | XamlRoot = App.MainWindow.XamlRoot; 24 | RequestedTheme = App.MainWindow.ActualTheme; 25 | Message = message; 26 | Title = title; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Controls/Notice/NoticeService.cs: -------------------------------------------------------------------------------- 1 | using CommunityToolkit.WinUI.Notifications; 2 | using GenshinSwitch.Core; 3 | 4 | namespace GenshinSwitch.Controls.Notice; 5 | 6 | internal static class NoticeService 7 | { 8 | static NoticeService() 9 | { 10 | ClearNotice(); 11 | } 12 | 13 | public static void AddNotice(string header, string title, string detail = null!, ToastDuration duration = ToastDuration.Short) 14 | { 15 | new ToastContentBuilder() 16 | .AddHeader("AddNotice", header, "AddNotice") 17 | .AddText(title) 18 | .AddAttributionTextIf(!string.IsNullOrEmpty(detail), detail) 19 | .SetToastDuration(duration) 20 | .ShowSafe(); 21 | } 22 | 23 | public static void AddNoticeWithButton(string header, string title, string button, (string, string) arg, ToastDuration duration = ToastDuration.Short) 24 | { 25 | new ToastContentBuilder() 26 | .AddHeader("AddNotice", header, "AddNotice") 27 | .AddText(title) 28 | .AddButton(new ToastButton().SetContent(button).AddArgument(arg.Item1, arg.Item2).SetBackgroundActivation()) 29 | .SetToastDuration(duration) 30 | .ShowSafe(); 31 | } 32 | 33 | public static void ClearNotice() 34 | { 35 | try 36 | { 37 | ToastNotificationManagerCompat.History.Clear(); 38 | } 39 | catch (Exception e) 40 | { 41 | Logger.Error(e); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Controls/Notice/ToastContentBuilderExtensions.cs: -------------------------------------------------------------------------------- 1 | using CommunityToolkit.WinUI.Notifications; 2 | using GenshinSwitch.Core; 3 | using Microsoft.UI.Dispatching; 4 | 5 | namespace GenshinSwitch.Controls.Notice; 6 | 7 | internal static class ToastContentBuilderExtensions 8 | { 9 | public static ToastContentBuilder AddAttributionTextIf(this ToastContentBuilder builder, bool condition, string text) 10 | { 11 | if (condition) 12 | { 13 | return builder.AddAttributionText(text); 14 | } 15 | else 16 | { 17 | return builder.Stub(); 18 | } 19 | } 20 | 21 | public static ToastContentBuilder Stub(this ToastContentBuilder builder) 22 | { 23 | return builder; 24 | } 25 | 26 | public static void ShowSafe(this ToastContentBuilder builder) 27 | { 28 | try 29 | { 30 | App.MainWindow.DispatcherQueue.TryEnqueue(DispatcherQueuePriority.Low, () => 31 | { 32 | builder.Show(); 33 | }); 34 | } 35 | catch (Exception e) 36 | { 37 | Logger.Error(e); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Controls/SettingCard/SettingCard.xaml.cs: -------------------------------------------------------------------------------- 1 | using CommunityToolkit.Mvvm.ComponentModel; 2 | using Microsoft.UI.Xaml.Controls; 3 | 4 | namespace GenshinSwitch.Controls; 5 | 6 | /// 7 | /// https://github.com/xunkong/xunkong/blob/main/App/Controls/SettingCard.xaml.cs 8 | /// 9 | [INotifyPropertyChanged] 10 | public sealed partial class SettingCard : UserControl 11 | { 12 | [ObservableProperty] 13 | private object icon = null!; 14 | 15 | [ObservableProperty] 16 | private object content = null!; 17 | 18 | [ObservableProperty] 19 | private object selector = null!; 20 | 21 | public SettingCard() 22 | { 23 | InitializeComponent(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/GenshinSwitch/GlobalSuppressions.cs: -------------------------------------------------------------------------------- 1 | // This file is used by Code Analysis to maintain SuppressMessage 2 | // attributes that are applied to this project. 3 | // Project-level suppressions either have no target or are given 4 | // a specific target and scoped to a namespace, type, member, etc. 5 | 6 | using System.Diagnostics.CodeAnalysis; 7 | 8 | [assembly: SuppressMessage("Usage", "VSTHRD101:Avoid unsupported async delegates", Justification = "", Scope = "member", Target = "~M:GenshinSwitch.ViewModels.MainViewModel.#ctor")] 9 | [assembly: SuppressMessage("Usage", "VSTHRD101:Avoid unsupported async delegates", Justification = "", Scope = "member", Target = "~M:GenshinSwitch.Views.AddContactContentDialog.#ctor(GenshinSwitch.Models.Contact)")] 10 | -------------------------------------------------------------------------------- /src/GenshinSwitch/GlobalUsing.cs: -------------------------------------------------------------------------------- 1 | global using WinUIEx; 2 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Helpers/AutoStart/AutoStartManager.cs: -------------------------------------------------------------------------------- 1 | namespace GenshinSwitch.Helpers; 2 | 3 | public static class AutoStartManager 4 | { 5 | private static IAutoStartHelper Service { get; } = new AutoStartProgramDataHelper(); 6 | 7 | public static bool IsEnabled() 8 | { 9 | return Service.IsEnabled(); 10 | } 11 | 12 | public static void SetEnabled(bool enable) 13 | { 14 | Service.SetEnabled(enable); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Helpers/AutoStart/IAutoStartHelper.cs: -------------------------------------------------------------------------------- 1 | namespace GenshinSwitch.Helpers; 2 | 3 | internal interface IAutoStartHelper 4 | { 5 | public void Enable(); 6 | public bool IsEnabled(); 7 | public void Disable(); 8 | public void SetEnabled(bool enable); 9 | } 10 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Helpers/BrushExtension.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.UI.Xaml.Media; 2 | using Windows.UI; 3 | 4 | namespace GenshinSwitch.Helpers; 5 | 6 | public static class BrushExtension 7 | { 8 | public static Brush ToBrush(this Color color) 9 | { 10 | Brush brush = new SolidColorBrush(color); 11 | return brush; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Helpers/CancelabledTask.cs: -------------------------------------------------------------------------------- 1 | using GenshinSwitch.Core; 2 | 3 | namespace GenshinSwitch.Helpers; 4 | 5 | public static class CancelabledTask 6 | { 7 | public static bool IsCanceled { get; private set; } = false; 8 | 9 | public static async Task DelayAsync(int millisecondsDelay) 10 | { 11 | _ = await Task.Run(() => SpinWait.SpinUntil(() => IsCanceled, millisecondsDelay)); 12 | 13 | if (IsCanceled) 14 | { 15 | throw new GenshinSwitchException(new TimeoutException("User Aborted")); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Helpers/FrameExtensions.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.UI.Xaml.Controls; 2 | 3 | namespace GenshinSwitch.Helpers; 4 | 5 | public static class FrameExtensions 6 | { 7 | public static object? GetPageViewModel(this Frame frame) => frame?.Content?.GetType().GetProperty("ViewModel")?.GetValue(frame.Content, null); 8 | } 9 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Helpers/GenerateChineseWords.cs: -------------------------------------------------------------------------------- 1 | using System.Text; 2 | 3 | namespace GenshinSwitch.Helpers; 4 | 5 | /// 6 | /// https://blog.csdn.net/szsbell/article/details/105864814 7 | /// 8 | public static class GenerateChineseWords 9 | { 10 | static GenerateChineseWords() 11 | { 12 | Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); 13 | } 14 | 15 | public static string Generate(int? countRequest = null!) 16 | { 17 | int count = countRequest ?? new Random().Next(2, 6); 18 | string chineseWords = string.Empty; 19 | Random rm = new(); 20 | 21 | for (int i = 0; i < count; i++) 22 | { 23 | int regionCode = rm.Next(16, 56); 24 | int positionCode; 25 | 26 | if (regionCode == 55) 27 | { 28 | positionCode = rm.Next(1, 90); 29 | } 30 | else 31 | { 32 | positionCode = rm.Next(1, 95); 33 | } 34 | 35 | int regionCode_Machine = regionCode + 160; 36 | int positionCode_Machine = positionCode + 160; 37 | byte[] bytes = new byte[] 38 | { 39 | (byte)regionCode_Machine, 40 | (byte)positionCode_Machine, 41 | }; 42 | 43 | chineseWords += Encoding.GetEncoding("gb2312").GetString(bytes); 44 | } 45 | return chineseWords; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Helpers/MapperExtension.cs: -------------------------------------------------------------------------------- 1 | using AutoMapper; 2 | using System.ComponentModel.DataAnnotations.Schema; 3 | using System.Reflection; 4 | 5 | namespace GenshinSwitch.Helpers; 6 | 7 | public static class MapperExtension 8 | { 9 | public static void CustomMap(this IMappingExpression expression, Action function) 10 | { 11 | expression.BeforeMap(function).ForAllMembers(cfg => cfg.Ignore()); 12 | } 13 | 14 | public static IMappingExpression ForAllMembersStringClone(this IMappingExpression expression) 15 | { 16 | expression.ValueTransformers.Add(value => (value.Clone() as string)!); 17 | return expression; 18 | } 19 | 20 | public static IMappingExpression IgnoreAllNotMappedAttribute(this IMappingExpression expression) 21 | { 22 | foreach (PropertyInfo prop in typeof(TDestination).GetProperties(BindingFlags.Public | BindingFlags.Instance)) 23 | { 24 | if (prop.GetCustomAttribute() is NotMappedAttribute attr) 25 | { 26 | expression.ForMember(prop.Name, opt => opt.Ignore()); 27 | } 28 | } 29 | return expression; 30 | } 31 | 32 | public static void Forget(this IMappingExpression expression) 33 | { 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Helpers/NavigationHelper.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.UI.Xaml; 2 | using Microsoft.UI.Xaml.Controls; 3 | 4 | namespace GenshinSwitch.Helpers; 5 | 6 | // Helper class to set the navigation target for a NavigationViewItem. 7 | // 8 | // Usage in XAML: 9 | // 10 | // 11 | // Usage in code: 12 | // NavigationHelper.SetNavigateTo(navigationViewItem, typeof(MainViewModel).FullName); 13 | public class NavigationHelper 14 | { 15 | public static string GetNavigateTo(NavigationViewItem item) => (string)item.GetValue(NavigateToProperty); 16 | 17 | public static void SetNavigateTo(NavigationViewItem item, string value) => item.SetValue(NavigateToProperty, value); 18 | 19 | public static readonly DependencyProperty NavigateToProperty = 20 | DependencyProperty.RegisterAttached("NavigateTo", typeof(string), typeof(NavigationHelper), new PropertyMetadata(null)); 21 | } 22 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Helpers/ResourceExtensions.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Windows.ApplicationModel.Resources; 2 | 3 | namespace GenshinSwitch.Helpers; 4 | 5 | [System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.NamingRules", "SA1311:Static readonly fields should begin with upper-case letter", Justification = "")] 6 | public static class ResourceExtensions 7 | { 8 | private static readonly ResourceLoader resourceLoader = new(); 9 | 10 | public static string GetLocalized(this string resourceKey) => resourceLoader.GetString(resourceKey); 11 | } 12 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Helpers/ShortcutCreator.cs: -------------------------------------------------------------------------------- 1 | using IWshRuntimeLibrary; 2 | 3 | namespace GenshinSwitch.Helpers; 4 | 5 | /// 6 | /// https://www.cnblogs.com/conexpress/p/ShortcutCreator.html 7 | /// 8 | internal static class ShortcutCreator 9 | { 10 | public static void CreateShortcut(string directory, string shortcutName, string targetPath, string arguments = null!, string description = null!, string iconLocation = null!) 11 | { 12 | if (!Directory.Exists(directory)) 13 | { 14 | Directory.CreateDirectory(directory); 15 | } 16 | 17 | string shortcutPath = Path.Combine(directory, $"{shortcutName}.lnk"); 18 | WshShell shell = new(); 19 | IWshShortcut shortcut = (IWshShortcut)shell.CreateShortcut(shortcutPath); 20 | shortcut.TargetPath = targetPath; 21 | shortcut.WorkingDirectory = Path.GetDirectoryName(targetPath); 22 | shortcut.WindowStyle = 1; 23 | shortcut.Arguments = arguments; 24 | shortcut.Description = description; 25 | shortcut.IconLocation = string.IsNullOrWhiteSpace(iconLocation) ? targetPath : iconLocation; 26 | shortcut.Save(); 27 | } 28 | 29 | public static void CreateShortcutOnDesktop(string shortcutName, string targetPath, string arguments = null!, string description = null!, string iconLocation = null!) 30 | { 31 | string desktop = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory); 32 | 33 | CreateShortcut(desktop, shortcutName, targetPath, arguments, description, iconLocation); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/GenshinSwitch/MainWindow.xaml: -------------------------------------------------------------------------------- 1 |  15 | 16 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Models/Contacts/Contact.vm.cs: -------------------------------------------------------------------------------- 1 | using GenshinSwitch.ViewModels.Contacts; 2 | using System.ComponentModel.DataAnnotations.Schema; 3 | using YamlDotNet.Serialization; 4 | 5 | namespace GenshinSwitch.Models; 6 | 7 | public partial class Contact 8 | { 9 | [YamlIgnore] 10 | [NotMapped] 11 | public ContactViewModel ViewModel { get; set; } 12 | 13 | public Contact() 14 | { 15 | ViewModel = new(this); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Models/LocalSettingsOptions.cs: -------------------------------------------------------------------------------- 1 | namespace GenshinSwitch.Models; 2 | 3 | public class LocalSettingsOptions 4 | { 5 | public string? ApplicationDataFolder { get; set; } 6 | 7 | public string? LocalSettingsFile { get; set; } 8 | } 9 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Models/Messages/AutoMuteChangedMessage.cs: -------------------------------------------------------------------------------- 1 | namespace GenshinSwitch.Models.Messages; 2 | 3 | /// 4 | /// 5 | /// 6 | internal class AutoMuteChangedMessage 7 | { 8 | } 9 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Models/Messages/ContactMessage.cs: -------------------------------------------------------------------------------- 1 | namespace GenshinSwitch.Models.Messages; 2 | 3 | internal class ContactMessage 4 | { 5 | internal enum ContactMessageType 6 | { 7 | Added, 8 | Removed, 9 | Edited, 10 | } 11 | 12 | public ContactMessageType Type { get; set; } = ContactMessageType.Added; 13 | public Contact Contact { get; set; } = null!; 14 | } 15 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Models/Messages/ThemeChangedMessage.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.UI.Xaml; 2 | 3 | namespace GenshinSwitch.Models.Messages; 4 | 5 | internal class ThemeChangedMessage 6 | { 7 | public ElementTheme? Theme { get; set; } 8 | public string? Backdrop { get; set; } 9 | } 10 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Pack.cs: -------------------------------------------------------------------------------- 1 | using GenshinSwitch.Helpers; 2 | using Windows.ApplicationModel; 3 | 4 | namespace GenshinSwitch; 5 | 6 | public class Pack 7 | { 8 | public static string AppName => "GenshinSwitch"; 9 | 10 | public static string AppVersion 11 | { 12 | get 13 | { 14 | if (RuntimeHelper.IsMSIX) 15 | { 16 | PackageVersion v = Package.Current.Id.Version; 17 | return $"v{v.Major}.{v.Minor}.{v.Build}.{v.Revision}"; 18 | } 19 | return AssemblyUtils.GetAssemblyVersion(typeof(App).Assembly, prefix: "v"); 20 | } 21 | } 22 | 23 | public static readonly string UriIcon = "ms-appx:///Assets/Logos/Favicon.ico"; 24 | } 25 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Program.cs: -------------------------------------------------------------------------------- 1 | using GenshinSwitch.Helpers; 2 | using Microsoft.UI.Dispatching; 3 | using Microsoft.UI.Xaml; 4 | using WinRT; 5 | 6 | namespace GenshinSwitch; 7 | 8 | internal static class Program 9 | { 10 | [STAThread] 11 | internal static void Main() 12 | { 13 | RuntimeHelper.CheckSingleInstance(); 14 | RuntimeHelper.XamlCheckProcessRequirements(); 15 | ComWrappersSupport.InitializeComWrappers(); 16 | Application.Start((p) => 17 | { 18 | DispatcherQueueSynchronizationContext context = new(DispatcherQueue.GetForCurrentThread()); 19 | SynchronizationContext.SetSynchronizationContext(context); 20 | _ = new App(); 21 | }); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Properties/PublishProfiles/FolderProfile.pubxml: -------------------------------------------------------------------------------- 1 |  2 | 5 | 6 | 7 | Release 8 | x64 9 | bin\x64\Release\net6.0-windows10.0.18362.0\publish\win10-x64\ 10 | FileSystem 11 | <_TargetId>Folder 12 | net6.0-windows10.0.18362.0 13 | win10-x64 14 | true 15 | true 16 | false 17 | false 18 | 19 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Properties/launchsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "GenshinSwitch (Package)": { 4 | "commandName": "MsixPackage", 5 | "doNotLaunchApp": false 6 | }, 7 | "GenshinSwitch (Unpackaged)": { 8 | "commandName": "Project" 9 | }, 10 | "WSL": { 11 | "commandName": "WSL2", 12 | "distributionName": "" 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/GenshinSwitch/README.md: -------------------------------------------------------------------------------- 1 | ## CI Pipelines 2 | 3 | See [README.md](https://github.com/microsoft/TemplateStudio/blob/main/docs/WinUI/pipelines/README.md) for guidance on building and testing projects in CI pipelines. 4 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Styles/FontSizes.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 24 6 | 7 | 16 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/GenshinSwitch/ViewModels/AddContactSelectionViewModel.cs: -------------------------------------------------------------------------------- 1 | using CommunityToolkit.Mvvm.ComponentModel; 2 | 3 | namespace GenshinSwitch.ViewModels; 4 | 5 | public class AddContactSelectionViewModel : ObservableRecipient 6 | { 7 | public AddContactViewModel? Parent { get; set; } 8 | 9 | private string? localIconUri = null!; 10 | public string? LocalIconUri 11 | { 12 | get => localIconUri; 13 | set => SetProperty(ref localIconUri, value); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/GenshinSwitch/ViewModels/Contacts/ContactProgressValue.cs: -------------------------------------------------------------------------------- 1 | namespace GenshinSwitch.ViewModels.Contacts; 2 | 3 | public struct ContactProgressValue 4 | { 5 | public double? ValueDouble { get; set; } 6 | public int? ValueInt32 { get; set; } 7 | 8 | public ContactProgressValue(double value) 9 | { 10 | ValueDouble = value; 11 | } 12 | 13 | public ContactProgressValue(int value) 14 | { 15 | ValueInt32 = value; 16 | } 17 | 18 | public static implicit operator ContactProgressValue(double value) 19 | { 20 | return new(value); 21 | } 22 | 23 | public static implicit operator double(ContactProgressValue self) 24 | { 25 | return self.ValueDouble ?? self.ValueInt32 ?? default; 26 | } 27 | 28 | public static implicit operator ContactProgressValue(int value) 29 | { 30 | return new(value); 31 | } 32 | 33 | public static implicit operator int(ContactProgressValue self) 34 | { 35 | return self.ValueInt32 ?? (int?)self.ValueDouble ?? default; 36 | } 37 | 38 | public override int GetHashCode() 39 | { 40 | return this; 41 | } 42 | 43 | public override string ToString() 44 | { 45 | if (ValueDouble != null) 46 | { 47 | return ValueDouble.ToString()!; 48 | } 49 | else if (ValueInt32 != null) 50 | { 51 | return ValueInt32.ToString()!; 52 | } 53 | return null!; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/GenshinSwitch/ViewModels/Contacts/LazyInfoViewModel.cs: -------------------------------------------------------------------------------- 1 | using CommunityToolkit.Mvvm.ComponentModel; 2 | 3 | namespace GenshinSwitch.ViewModels.Contacts; 4 | 5 | #pragma warning disable MVVMTK0033 6 | 7 | [ObservableObject] 8 | public partial class LazyInfoViewModel 9 | { 10 | [ObservableProperty] 11 | private bool isUnlocked = false; 12 | 13 | [ObservableProperty] 14 | private bool isFetched = false; 15 | 16 | [ObservableProperty] 17 | private bool isFinished = false; 18 | } 19 | -------------------------------------------------------------------------------- /src/GenshinSwitch/ViewModels/Contacts/SignInInfoViewModel.cs: -------------------------------------------------------------------------------- 1 | using CommunityToolkit.Mvvm.ComponentModel; 2 | using System.ComponentModel.DataAnnotations.Schema; 3 | 4 | namespace GenshinSwitch.ViewModels.Contacts; 5 | 6 | #pragma warning disable MVVMTK0033 7 | 8 | [ObservableObject] 9 | public partial class SignInInfoViewModel 10 | { 11 | /// 12 | /// 累积签到天数 13 | /// 14 | [ObservableProperty] 15 | private int totalSignDays; 16 | 17 | /// 18 | /// 今天是... 19 | /// 20 | [ObservableProperty] 21 | private DateTime today; 22 | 23 | /// 24 | /// 今日是否已签到 25 | /// 26 | [ObservableProperty] 27 | private bool isSign; 28 | 29 | [ObservableProperty] 30 | private bool isSub; 31 | 32 | [ObservableProperty] 33 | private bool firstBind; 34 | 35 | [ObservableProperty] 36 | private bool isFirstDayOfMonth; 37 | 38 | [ObservableProperty] 39 | private int missedCount; 40 | 41 | [ObservableProperty] 42 | [NotMapped] 43 | private bool isFetched = false; 44 | } 45 | -------------------------------------------------------------------------------- /src/GenshinSwitch/ViewModels/SettingsContactProgressViewModel.cs: -------------------------------------------------------------------------------- 1 | using CommunityToolkit.Mvvm.ComponentModel; 2 | using System.ComponentModel; 3 | 4 | namespace GenshinSwitch.ViewModels; 5 | 6 | #pragma warning disable MVVMTK0033 7 | 8 | [ObservableObject] 9 | public partial class SettingsContactProgressViewModel 10 | { 11 | [ObservableProperty] 12 | private bool isEnabled; 13 | 14 | [ObservableProperty] 15 | private double hintValue; 16 | 17 | [ObservableProperty] 18 | private bool isRed; 19 | 20 | public SettingsContactProgressViewModel(PropertyChangedEventHandler? changedHandler = null!) 21 | { 22 | if (changedHandler != null) 23 | { 24 | PropertyChanged += changedHandler; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/GenshinSwitch/ViewModels/ShowLazyViewModel.cs: -------------------------------------------------------------------------------- 1 | using CommunityToolkit.Mvvm.ComponentModel; 2 | using GenshinSwitch.Fetch.Lazy; 3 | using System.Collections.ObjectModel; 4 | 5 | namespace GenshinSwitch.ViewModels; 6 | 7 | public partial class ShowLazyViewModel : ObservableRecipient 8 | { 9 | [ObservableProperty] 10 | private ObservableCollection lazys = new(); 11 | 12 | public void Reload(string file) 13 | { 14 | LazyInput[] lazyIns = LazyInputHelper.AnalysisFile(file); 15 | 16 | foreach (LazyInput lazyIn in lazyIns) 17 | { 18 | Lazys.Add(lazyIn); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Views/Converters/BoolInvertConverter.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.UI.Xaml.Data; 2 | 3 | namespace GenshinSwitch.Views.Converters; 4 | 5 | internal class BoolInvertConverter : IValueConverter 6 | { 7 | public object Convert(object value, Type targetType, object parameter, string language) 8 | { 9 | if (value is bool @bool) 10 | { 11 | return !@bool; 12 | } 13 | return value; 14 | } 15 | 16 | public object ConvertBack(object value, Type targetType, object parameter, string language) 17 | { 18 | if (value is bool @bool) 19 | { 20 | return !@bool; 21 | } 22 | return value; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Views/Converters/BoolToVisibilityConverter.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.UI.Xaml; 2 | using Microsoft.UI.Xaml.Data; 3 | 4 | namespace GenshinSwitch.Views.Converters; 5 | 6 | internal class BoolToVisibilityConverter : IValueConverter 7 | { 8 | public object Convert(object value, Type targetType, object parameter, string language) 9 | { 10 | if (value is bool @bool) 11 | { 12 | return @bool ? Visibility.Visible : Visibility.Collapsed; 13 | } 14 | return null!; 15 | } 16 | 17 | public object ConvertBack(object value, Type targetType, object parameter, string language) 18 | { 19 | return null!; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Views/Converters/BoolToVisibilityReversedConverter.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.UI.Xaml; 2 | using Microsoft.UI.Xaml.Data; 3 | 4 | namespace GenshinSwitch.Views.Converters; 5 | 6 | internal class BoolToVisibilityReversedConverter : IValueConverter 7 | { 8 | public object Convert(object value, Type targetType, object parameter, string language) 9 | { 10 | if (value is bool @bool) 11 | { 12 | return @bool ? Visibility.Collapsed : Visibility.Visible; 13 | } 14 | return null!; 15 | } 16 | 17 | public object ConvertBack(object value, Type targetType, object parameter, string language) 18 | { 19 | throw new NotImplementedException(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Views/Converters/DateTimeOffsetToTimeStringConverter.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.UI.Xaml.Data; 2 | 3 | namespace GenshinSwitch.Views.Converters; 4 | 5 | internal class DateTimeOffsetToTimeStringConverter : IValueConverter 6 | { 7 | public object? Convert(object value, Type targetType, object parameter, string language) 8 | { 9 | if (value is DateTimeOffset time) 10 | { 11 | return time.LocalDateTime.ToString("HH:mm:ss"); 12 | } 13 | if (value is DateTime time1) 14 | { 15 | return time1.ToString("HH:mm:ss"); 16 | } 17 | return null; 18 | } 19 | 20 | public object ConvertBack(object value, Type targetType, object parameter, string language) 21 | { 22 | throw new NotImplementedException(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Views/Converters/DateTimeToDayStringConverter.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.UI.Xaml.Data; 2 | 3 | namespace GenshinSwitch.Views.Converters; 4 | 5 | internal class DateTimeToDayStringConverter : IValueConverter 6 | { 7 | public object? Convert(object value, Type targetType, object parameter, string language) 8 | { 9 | if (value is DateTimeOffset time) 10 | { 11 | return time.ToString("yyyy.MM.dd"); 12 | } 13 | if (value is DateTime time1) 14 | { 15 | return time1.ToString("yyyy.MM.dd"); 16 | } 17 | return null; 18 | } 19 | 20 | public object ConvertBack(object value, Type targetType, object parameter, string language) 21 | { 22 | throw new NotImplementedException(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Views/Converters/DateTimeToTimeStringConverter.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.UI.Xaml.Data; 2 | 3 | namespace GenshinSwitch.Views.Converters; 4 | 5 | internal class DateTimeToTimeStringConverter : IValueConverter 6 | { 7 | public object? Convert(object value, Type targetType, object parameter, string language) 8 | { 9 | if (value is DateTimeOffset time) 10 | { 11 | return time.ToString("HH:mm:ss.fff"); 12 | } 13 | if (value is DateTime time1) 14 | { 15 | return time1.ToString("HH:mm:ss.fff"); 16 | } 17 | return null; 18 | } 19 | 20 | public object ConvertBack(object value, Type targetType, object parameter, string language) 21 | { 22 | throw new NotImplementedException(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Views/Converters/EnumToBooleanConverter.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.UI.Xaml; 2 | using Microsoft.UI.Xaml.Data; 3 | 4 | namespace GenshinSwitch.Views.Converters; 5 | 6 | public class EnumToBooleanConverter : IValueConverter 7 | { 8 | public EnumToBooleanConverter() 9 | { 10 | } 11 | 12 | public object Convert(object value, Type targetType, object parameter, string language) 13 | { 14 | if (parameter is string enumString) 15 | { 16 | if (!Enum.IsDefined(typeof(ElementTheme), value)) 17 | { 18 | throw new ArgumentException("ExceptionEnumToBooleanConverterValueMustBeAnEnum"); 19 | } 20 | 21 | var enumValue = Enum.Parse(typeof(ElementTheme), enumString); 22 | 23 | return enumValue.Equals(value); 24 | } 25 | 26 | throw new ArgumentException("ExceptionEnumToBooleanConverterParameterMustBeAnEnumName"); 27 | } 28 | 29 | public object ConvertBack(object value, Type targetType, object parameter, string language) 30 | { 31 | if (parameter is string enumString) 32 | { 33 | return Enum.Parse(typeof(ElementTheme), enumString); 34 | } 35 | 36 | throw new ArgumentException("ExceptionEnumToBooleanConverterParameterMustBeAnEnumName"); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Views/Converters/ExpeditionStatusToColorConverter.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.UI; 2 | using Microsoft.UI.Xaml.Data; 3 | using Microsoft.UI.Xaml.Media; 4 | 5 | namespace GenshinSwitch.Views.Converters; 6 | 7 | internal class ExpeditionStatusToColorConverter : IValueConverter 8 | { 9 | private static readonly SolidColorBrush Green = new(Colors.Green); 10 | private static readonly SolidColorBrush Orange = new(Colors.Orange); 11 | 12 | public object Convert(object value, Type targetType, object parameter, string language) 13 | { 14 | var status = (bool)value; 15 | if (status) 16 | { 17 | return Green; 18 | } 19 | else 20 | { 21 | return Orange; 22 | } 23 | } 24 | 25 | public object ConvertBack(object value, Type targetType, object parameter, string language) 26 | { 27 | throw new NotImplementedException(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Views/Converters/HoyolabSignInStatsStringConverter.cs: -------------------------------------------------------------------------------- 1 | using GenshinSwitch.ViewModels.Contacts; 2 | using Microsoft.UI.Xaml.Data; 3 | 4 | namespace GenshinSwitch.Views.Converters; 5 | 6 | internal class HoyolabSignInStatsStringConverter : IValueConverter 7 | { 8 | public object Convert(object value, Type targetType, object parameter, string language) 9 | { 10 | string message = "未知签到"; 11 | 12 | if (value is SignInInfoViewModel info) 13 | { 14 | if (info.IsFetched) 15 | { 16 | if (info.IsSign) 17 | { 18 | message = "今天已签到"; 19 | } 20 | else 21 | { 22 | message = "今天未签到"; 23 | } 24 | } 25 | } 26 | if (parameter is ContactProgress progress) 27 | { 28 | if (progress.IsYellow) 29 | { 30 | message = "未知签到"; 31 | } 32 | } 33 | return message; 34 | } 35 | 36 | public object ConvertBack(object value, Type targetType, object parameter, string language) 37 | { 38 | throw new NotImplementedException(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Views/Converters/IsNullOrEmptyConverter.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.UI.Xaml.Data; 2 | 3 | namespace GenshinSwitch.Views.Converters; 4 | 5 | internal class IsNullOrEmptyConverter : IValueConverter 6 | { 7 | public object Convert(object value, Type targetType, object parameter, string language) 8 | { 9 | return string.IsNullOrEmpty(value?.ToString()); 10 | } 11 | 12 | public object ConvertBack(object value, Type targetType, object parameter, string language) 13 | { 14 | return null!; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Views/Converters/IsNullOrEmptyToVisibilityConverter.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.UI.Xaml; 2 | using Microsoft.UI.Xaml.Data; 3 | 4 | namespace GenshinSwitch.Views.Converters; 5 | 6 | internal class IsNullOrEmptyToVisibilityConverter : IValueConverter 7 | { 8 | public object Convert(object value, Type targetType, object parameter, string language) 9 | { 10 | return string.IsNullOrEmpty(value?.ToString()) ? Visibility.Collapsed : Visibility.Visible; 11 | } 12 | 13 | public object ConvertBack(object value, Type targetType, object parameter, string language) 14 | { 15 | return null!; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Views/Converters/QuestRandomProceIconConverter.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.UI.Xaml; 2 | using Microsoft.UI.Xaml.Data; 3 | 4 | namespace GenshinSwitch.Views.Converters; 5 | 6 | internal class QuestRandomProceIconConverter : IValueConverter 7 | { 8 | public object Convert(object value, Type targetType, object parameter, string language) 9 | { 10 | if (value is int icon) 11 | { 12 | if (icon.ToString() == parameter?.ToString()) 13 | { 14 | return Visibility.Visible; 15 | } 16 | } 17 | return Visibility.Collapsed; 18 | } 19 | 20 | public object ConvertBack(object value, Type targetType, object parameter, string language) 21 | { 22 | return null!; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Views/Converters/ResinBrushHintConverter.cs: -------------------------------------------------------------------------------- 1 | using CommunityToolkit.WinUI.Helpers; 2 | using GenshinSwitch.Helpers; 3 | using GenshinSwitch.Models; 4 | using Microsoft.UI.Xaml.Data; 5 | 6 | namespace GenshinSwitch.Views.Converters; 7 | 8 | internal class ResinBrushHintConverter : IValueConverter 9 | { 10 | public object Convert(object value, Type targetType, object parameter, string language) 11 | { 12 | if (value != null) 13 | { 14 | parameter ??= $"{Settings.HintResinLimit.Get()};80FF0000;803C8CF0"; 15 | 16 | if (parameter is string ps) 17 | { 18 | string[] pps = ps.Split(';'); 19 | 20 | if (pps.Length >= 3) 21 | { 22 | double v1 = System.Convert.ToDouble(value.ToString()); 23 | double v2 = System.Convert.ToDouble(pps[0]); 24 | 25 | return ("#" + (v1 >= v2 ? pps[1] : pps[2])).ToColor().ToBrush(); 26 | } 27 | } 28 | } 29 | return null!; 30 | } 31 | 32 | public object ConvertBack(object value, Type targetType, object parameter, string language) 33 | { 34 | return null!; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Views/Converters/StringConcatConverter.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.UI.Xaml.Data; 2 | 3 | namespace GenshinSwitch.Views.Converters; 4 | 5 | internal class StringConcatConverter : IValueConverter 6 | { 7 | public object Convert(object value, Type targetType, object parameter, string language) 8 | { 9 | if (value is string left) 10 | { 11 | if (parameter is string right) 12 | { 13 | return left + right; 14 | } 15 | } 16 | return value; 17 | } 18 | 19 | public object ConvertBack(object value, Type targetType, object parameter, string language) 20 | { 21 | return value; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Views/Converters/UriStringToImageSourceConverter.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.UI.Xaml.Data; 2 | using Microsoft.UI.Xaml.Media.Imaging; 3 | 4 | namespace GenshinSwitch.Views.Converters; 5 | 6 | internal class UriStringToImageSourceConverter : IValueConverter 7 | { 8 | public object Convert(object value, Type targetType, object parameter, string language) 9 | { 10 | int? w = null; 11 | Uri? uri = null; 12 | 13 | if (parameter is string pixel) 14 | { 15 | w = int.Parse(pixel); 16 | } 17 | 18 | if (value is Uri uri0) 19 | { 20 | uri = uri0; 21 | } 22 | else if (value is string uriString) 23 | { 24 | uri = new Uri(uriString); 25 | } 26 | 27 | if (uri != null) 28 | { 29 | if (w != null) 30 | { 31 | BitmapImage image = new() 32 | { 33 | DecodePixelWidth = w.Value, 34 | UriSource = uri, 35 | }; 36 | return image; 37 | } 38 | else 39 | { 40 | return new BitmapImage(uri); 41 | } 42 | } 43 | else if (value is BitmapImage image && w != null) 44 | { 45 | image.DecodePixelWidth = w.Value; 46 | return image; 47 | } 48 | return null!; 49 | } 50 | 51 | public object ConvertBack(object value, Type targetType, object parameter, string language) 52 | { 53 | return null!; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Views/LaunchWindow.xaml: -------------------------------------------------------------------------------- 1 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Views/LaunchWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using GenshinSwitch.Fetch.Lazy; 2 | using GenshinSwitch.Models; 3 | using Microsoft.UI.Xaml.Media; 4 | using Microsoft.VisualStudio.Threading; 5 | using WinRT.Interop; 6 | 7 | namespace GenshinSwitch.Views; 8 | 9 | public sealed partial class LaunchWindow : WindowEx 10 | { 11 | public IntPtr Hwnd { get; private set; } 12 | 13 | public LaunchWindow() 14 | { 15 | Hwnd = WindowNative.GetWindowHandle(this); 16 | InitializeComponent(); 17 | #if LEGACY 18 | Backdrop = Settings.Backdrop.Get() switch 19 | { 20 | "None" => null, 21 | "Acrylic" => new AcrylicSystemBackdrop(), 22 | "Mica" or _ => new MicaSystemBackdrop(), 23 | }; 24 | #else 25 | SystemBackdrop = Settings.Backdrop.Get() switch 26 | { 27 | "None" => null, 28 | "Acrylic" => new DesktopAcrylicBackdrop(), 29 | "Mica" or _ => new MicaBackdrop(), 30 | }; 31 | #endif 32 | AppWindow.SetIcon(Path.Combine(AppContext.BaseDirectory, "../Assets/Logos/Favicon.ico")); 33 | 34 | Task.Run(async () => 35 | { 36 | await LazyLauncher.LaunchAsync(Settings.ComponentLazyPath.Get()); 37 | }).Forget(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Views/MainPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using GenshinSwitch.Models; 2 | using GenshinSwitch.ViewModels; 3 | using Microsoft.UI.Dispatching; 4 | using Microsoft.UI.Xaml.Controls; 5 | using System.Diagnostics.CodeAnalysis; 6 | 7 | namespace GenshinSwitch.Views; 8 | 9 | [SuppressMessage("Usage", "VSTHRD101:Avoid unsupported async delegates", Justification = "")] 10 | public sealed partial class MainPage : Page 11 | { 12 | public MainViewModel ViewModel { get; } 13 | 14 | public MainPage() 15 | { 16 | ViewModel = App.GetService(); 17 | InitializeComponent(); 18 | 19 | foreach (var kv in Settings.Contacts.Get()) 20 | { 21 | ViewModel.Contacts.Add(kv.Value); 22 | 23 | _ = App.MainWindow.DispatcherQueue.TryEnqueue(DispatcherQueuePriority.Low, async () => 24 | { 25 | await kv.Value.ViewModel.FetchAllAsync(); 26 | }); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Views/SetLazyTokenContentDialog.xaml.cs: -------------------------------------------------------------------------------- 1 | using GenshinSwitch.ViewModels; 2 | using Microsoft.UI.Xaml.Controls; 3 | 4 | namespace GenshinSwitch.Views; 5 | 6 | public sealed partial class SetLazyTokenContentDialog : ContentDialog 7 | { 8 | public SetLazyTokenViewModel ViewModel { get; } 9 | 10 | public SetLazyTokenContentDialog() 11 | { 12 | ViewModel = App.GetService(); 13 | InitializeComponent(); 14 | } 15 | 16 | public async Task<(ContentDialogResult, string)> ShowAndGetTokenAsync() 17 | { 18 | ContentDialogResult result = await ShowAsync(); 19 | string tokenInput = ViewModel.TokenInput; 20 | return (result, tokenInput); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Views/SettingsPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using GenshinSwitch.ViewModels; 2 | using Microsoft.UI.Xaml.Controls; 3 | 4 | namespace GenshinSwitch.Views; 5 | 6 | // TODO: Set the URL for your privacy policy by updating SettingsPage_PrivacyTermsLink.NavigateUri in Resources.resw. 7 | public sealed partial class SettingsPage : Page 8 | { 9 | public SettingsViewModel ViewModel { get; } 10 | 11 | public SettingsPage() 12 | { 13 | ViewModel = App.GetService(); 14 | InitializeComponent(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Views/ShowLazyContentDialog.xaml.cs: -------------------------------------------------------------------------------- 1 | using GenshinSwitch.ViewModels; 2 | using Microsoft.UI.Xaml.Controls; 3 | 4 | namespace GenshinSwitch.Views; 5 | 6 | public sealed partial class ShowLazyContentDialog : ContentDialog 7 | { 8 | public ShowLazyViewModel ViewModel { get; } 9 | 10 | public ShowLazyContentDialog(string file) 11 | { 12 | ViewModel = App.GetService(); 13 | ViewModel.Reload(file); 14 | InitializeComponent(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/GenshinSwitch/Views/WebViewPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using GenshinSwitch.ViewModels; 2 | 3 | using Microsoft.UI.Xaml.Controls; 4 | 5 | namespace GenshinSwitch.Views; 6 | 7 | // To learn more about WebView2, see https://docs.microsoft.com/microsoft-edge/webview2/. 8 | public sealed partial class WebViewPage : Page 9 | { 10 | public WebViewViewModel ViewModel { get; } 11 | 12 | public WebViewPage() 13 | { 14 | ViewModel = App.GetService(); 15 | InitializeComponent(); 16 | 17 | ViewModel.WebViewService.Initialize(WebView); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/GenshinSwitch/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "LocalSettingsOptions": { 3 | "ApplicationDataFolder": "genshin-switch", 4 | "LocalSettingsFile": "config.json" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/Xunkong.Core/.gitignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | obj/ 3 | -------------------------------------------------------------------------------- /src/Xunkong.Core/ChannelType.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace Xunkong.Core; 4 | 5 | [Flags] 6 | public enum ChannelType 7 | { 8 | 9 | [Description("正式版")] 10 | Stable = 1, 11 | 12 | 13 | [Description("预览版")] 14 | Preview = 2, 15 | 16 | 17 | [Description("开发版")] 18 | Development = 4, 19 | 20 | 21 | [Description("商店版")] 22 | Store = 8, 23 | 24 | 25 | [Description("侧载版")] 26 | Sideload = 16, 27 | 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/Xunkong.Core/ElementType.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Core; 2 | 3 | /// 4 | /// 元素类型 5 | /// 6 | [Flags] 7 | public enum ElementType 8 | { 9 | 10 | /// 11 | /// 未知 12 | /// 13 | None = 0, 14 | 15 | /// 16 | /// 物理 17 | /// 18 | Physics = 1, 19 | 20 | /// 21 | /// 火 22 | /// 23 | Pyro = 2, 24 | Fire = 2, 25 | 26 | /// 27 | /// 水 28 | /// 29 | Hydro = 4, 30 | Water = 4, 31 | 32 | /// 33 | /// 风 34 | /// 35 | Anemo = 8, 36 | Wind = 8, 37 | 38 | /// 39 | /// 雷 40 | /// 41 | Electro = 16, 42 | 43 | /// 44 | /// 草 45 | /// 46 | Dendro = 32, 47 | Grass = 32, 48 | 49 | /// 50 | /// 冰 51 | /// 52 | Cryo = 64, 53 | Ice = 64, 54 | 55 | /// 56 | /// 岩 57 | /// 58 | Geo = 128, 59 | Rock = 128, 60 | 61 | } 62 | -------------------------------------------------------------------------------- /src/Xunkong.Core/EnumExtension.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace Xunkong.Core; 4 | 5 | public static class EnumExtension 6 | { 7 | public static string ToDescription(this Enum value) 8 | { 9 | var text = value.ToString(); 10 | var fieldInfo = value.GetType().GetField(text); 11 | var descriptionAttribute = fieldInfo?.GetCustomAttributes(typeof(DescriptionAttribute), false).FirstOrDefault(); 12 | return (descriptionAttribute as DescriptionAttribute)?.Description ?? text; 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/Xunkong.Core/PlatformType.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Core; 2 | 3 | [Flags] 4 | public enum PlatformType 5 | { 6 | 7 | Desktop = 1, 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/Xunkong.Core/RegionHelper.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Core; 2 | 3 | public static class RegionHelper 4 | { 5 | 6 | public static RegionType UidToRegionType(int uid) 7 | { 8 | return uid.ToString().FirstOrDefault() switch 9 | { 10 | '1' => RegionType.cn_gf01, 11 | '2' => RegionType.cn_gf01, 12 | '3' => RegionType.cn_gf01, 13 | '4' => RegionType.cn_gf01, 14 | '5' => RegionType.cn_qd01, 15 | '6' => RegionType.os_usa, 16 | '7' => RegionType.os_euro, 17 | '8' => RegionType.os_asia, 18 | '9' => RegionType.os_cht, 19 | _ => RegionType.None, 20 | }; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/Xunkong.Core/RegionType.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Core; 2 | 3 | /// 4 | /// 服务器区域 5 | /// 6 | public enum RegionType 7 | { 8 | None = 0, 9 | 10 | cn_gf01 = 1, 11 | 12 | cn_qd01 = 5, 13 | 14 | os_usa = 6, 15 | 16 | os_euro = 7, 17 | 18 | os_asia = 8, 19 | 20 | os_cht = 9, 21 | } 22 | -------------------------------------------------------------------------------- /src/Xunkong.Core/WeaponType.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace Xunkong.Core; 4 | 5 | /// 6 | /// 武器类型 7 | /// 8 | public enum WeaponType 9 | { 10 | 11 | /// 12 | /// 未知 13 | /// 14 | [Description("未知")] 15 | None = 0, 16 | 17 | /// 18 | /// 单手剑 19 | /// 20 | [Description("单手剑")] 21 | Sword = 1, 22 | 23 | /// 24 | /// 双手剑 25 | /// 26 | [Description("双手剑")] 27 | Claymore = 2, 28 | 29 | /// 30 | /// 长柄武器 31 | /// 32 | [Description("长柄武器")] 33 | Polearm = 4, 34 | 35 | /// 36 | /// 法器 37 | /// 38 | [Description("法器")] 39 | Catalyst = 8, 40 | 41 | /// 42 | /// 弓箭 43 | /// 44 | [Description("弓箭")] 45 | Bow = 16, 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/Xunkong.Core/Xunkong.Core.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | 1.0.0 8 | 1.0.0 9 | 1.0.0 10 | Scighost 11 | Xunying 12 | 11.0 13 | https://github.com/xunkong 14 | https://github.com/xunkong/common 15 | MIT 16 | Xunying genshin 17 | x64 18 | Xunying.Core 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/Xunkong.Core/XunkongException.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Core; 2 | 3 | public class XunkongException : Exception 4 | { 5 | 6 | public XunkongException() { } 7 | 8 | public XunkongException(string? message) : base(message) { } 9 | 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/.gitignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | obj/ 3 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/Account/GenshinRoleInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Xml.Serialization; 2 | 3 | namespace Xunkong.Hoyolab.Account; 4 | 5 | public class GenshinRoleInfo 6 | { 7 | 8 | [JsonPropertyName("game_biz")] 9 | public string? GameBiz { get; set; } 10 | 11 | 12 | [JsonPropertyName("region"), JsonConverter(typeof(JsonStringEnumConverter))] 13 | public RegionType Region { get; set; } 14 | 15 | 16 | [JsonPropertyName("game_uid"), JsonNumberHandling(JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)] 17 | public int Uid { get; set; } 18 | 19 | 20 | [JsonPropertyName("nickname")] 21 | public string? Nickname { get; set; } 22 | 23 | 24 | [JsonPropertyName("level")] 25 | public int Level { get; set; } 26 | 27 | 28 | [JsonPropertyName("is_chosen")] 29 | public bool IsChosen { get; set; } 30 | 31 | 32 | [JsonPropertyName("region_name")] 33 | public string? RegionName { get; set; } 34 | 35 | 36 | [JsonPropertyName("is_official")] 37 | public bool IsOfficial { get; set; } 38 | 39 | 40 | [JsonIgnore] 41 | public string? Cookie { get; set; } 42 | } 43 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/Account/GenshinRoleInfoWrapper.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.Account; 2 | 3 | internal class GenshinRoleInfoWrapper 4 | { 5 | [JsonPropertyName("list")] 6 | public List? List { get; set; } 7 | } 8 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/Account/HoyolabUserInfo.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.Account; 2 | 3 | public class HoyolabUserInfo 4 | { 5 | /// 6 | /// 通行证 ID 7 | /// 8 | [JsonPropertyName("uid"), JsonNumberHandling(JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)] 9 | public int Uid { get; set; } 10 | 11 | /// 12 | /// 昵称 13 | /// 14 | [JsonPropertyName("nickname")] 15 | public string? Nickname { get; set; } 16 | 17 | /// 18 | /// 介绍 19 | /// 20 | [JsonPropertyName("introduce")] 21 | public string? Introduce { get; set; } 22 | 23 | /// 24 | /// 头像 ID 25 | /// 26 | [JsonPropertyName("avatar")] 27 | public string? Avatar { get; set; } 28 | 29 | /// 30 | /// 性别 0/1/2 31 | /// 32 | [JsonPropertyName("gender")] 33 | public int Gender { get; set; } 34 | 35 | /// 36 | /// 头像 37 | /// 38 | [JsonPropertyName("avatar_url")] 39 | public string? AvatarUrl { get; set; } 40 | 41 | /// 42 | /// 头像框 43 | /// 44 | [JsonPropertyName("pendant")] 45 | public string? Pendant { get; set; } 46 | 47 | /// 48 | /// 与此账号相关联的 Cookie 49 | /// 50 | [JsonIgnore] 51 | public string? Cookie { get; set; } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/Account/HoyolabUserInfoWrapper.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.Account; 2 | 3 | internal class HoyolabUserInfoWrapper 4 | { 5 | [JsonPropertyName("user_info")] 6 | public HoyolabUserInfo? HoyolabUserInfo { get; set; } 7 | } 8 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/Account/SignInInfo.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.Account; 2 | 3 | public class SignInInfo 4 | { 5 | /// 6 | /// 累积签到天数 7 | /// 8 | [JsonPropertyName("total_sign_day")] 9 | public int TotalSignDays { get; set; } 10 | 11 | /// 12 | /// 今天是... 13 | /// 14 | [JsonPropertyName("today"), JsonConverter(typeof(SignTodayJsonConverter))] 15 | public DateTime Today { get; set; } 16 | 17 | /// 18 | /// 今日是否已签到 19 | /// 20 | [JsonPropertyName("is_sign")] 21 | public bool IsSign { get; set; } 22 | 23 | 24 | [JsonPropertyName("is_sub")] 25 | public bool IsSub { get; set; } 26 | 27 | 28 | [JsonPropertyName("first_bind")] 29 | public bool FirstBind { get; set; } 30 | 31 | 32 | [JsonPropertyName("month_first")] 33 | public bool IsFirstDayOfMonth { get; set; } 34 | 35 | 36 | [JsonPropertyName("sign_cnt_missed")] 37 | public int MissedCount { get; set; } 38 | } 39 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/Account/SignInRisk.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.Account; 2 | 3 | /// 4 | /// 签到风控 5 | /// 6 | public class SignInRisk 7 | { 8 | 9 | [JsonPropertyName("code")] 10 | public string? Code { get; set; } 11 | 12 | [JsonPropertyName("risk_code")] 13 | public int RiskCode { get; set; } 14 | 15 | [JsonPropertyName("gt")] 16 | public string? GT { get; set; } 17 | 18 | [JsonPropertyName("challenge")] 19 | public string? Challenge { get; set; } 20 | 21 | [JsonPropertyName("success")] 22 | public int Success { get; set; } 23 | } 24 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/Account/SignTodayJsonConverter.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.Account; 2 | 3 | public class SignTodayJsonConverter : JsonConverter 4 | { 5 | public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 6 | { 7 | var str = reader.GetString(); 8 | if (DateTime.TryParse(str, out var date)) 9 | { 10 | return date; 11 | } 12 | else 13 | { 14 | return DateTime.Now; 15 | } 16 | } 17 | 18 | public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options) 19 | { 20 | writer.WriteStringValue(value.ToString("yyyy-MM-dd")); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/Avatar/AvatarCalculate.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.Avatar; 2 | 3 | 4 | /// 5 | /// 角色养成计算器 6 | /// 7 | public class AvatarCalculate 8 | { 9 | /// 10 | /// 角色技能 11 | /// 12 | [JsonPropertyName("skill_list")] 13 | public List? Skills { get; set; } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/Avatar/AvatarConstellation.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.Avatar; 2 | 3 | /// 4 | /// 角色命之座 5 | /// 6 | public class AvatarConstellation 7 | { 8 | 9 | [JsonPropertyName("id")] 10 | public int Id { get; set; } 11 | 12 | /// 13 | /// 名称 14 | /// 15 | [JsonPropertyName("name")] 16 | public string? Name { get; set; } 17 | 18 | /// 19 | /// 名座图标(白色) 20 | /// 21 | /// 22 | [JsonPropertyName("icon")] 23 | public string? Icon { get; set; } 24 | 25 | /// 26 | /// 名字效果(内容中会带上原神特有的 color 标签) 27 | /// 28 | /// 29 | /// 神里绫华的普通攻击或重击对敌人造成<color=#99FFFFFF>冰元素伤害</color>时,有50%的几率使<ccolor=#FFD780FF>神里流·冰华</color>的冷却时间缩减0.3秒。该效果每0.1秒只能触发一次。 30 | /// 31 | /// 32 | /// 33 | [JsonPropertyName("effect")] 34 | public string? Effect { get; set; } 35 | 36 | /// 37 | /// 是否激活 38 | /// 39 | [JsonPropertyName("is_actived")] 40 | public bool IsActived { get; set; } 41 | 42 | /// 43 | /// 位置 1-6 44 | /// 45 | [JsonPropertyName("pos")] 46 | public int Position { get; set; } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/Avatar/AvatarCostume.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.Avatar; 2 | 3 | /// 4 | /// 角色服装 5 | /// 6 | public class AvatarCostume 7 | { 8 | 9 | [JsonPropertyName("id")] 10 | public int Id { get; set; } 11 | 12 | /// 13 | /// 服装名称 14 | /// 15 | [JsonPropertyName("name")] 16 | public string? Name { get; set; } 17 | 18 | /// 19 | /// 服装图片 20 | /// 21 | /// 22 | [JsonPropertyName("icon")] 23 | public string? Icon { get; set; } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/Avatar/AvatarDetail.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.Avatar; 2 | 3 | public class AvatarDetail : AvatarInfo 4 | { 5 | 6 | /// 7 | /// 半身肖像 8 | /// 9 | /// 10 | [JsonPropertyName("icon")] 11 | public string? Icon { get; set; } 12 | 13 | /// 14 | /// 半透明全身图片 15 | /// 16 | /// 17 | [JsonPropertyName("image")] 18 | public new string? Image { get; set; } 19 | 20 | /// 21 | /// 已装备武器 22 | /// 23 | [JsonPropertyName("weapon")] 24 | public AvatarWeapon? Weapon { get; set; } 25 | 26 | /// 27 | /// 已装备圣遗物 28 | /// 29 | [JsonPropertyName("reliquaries")] 30 | public List? Reliquaries { get; set; } 31 | 32 | /// 33 | /// 命之座 34 | /// 35 | [JsonPropertyName("constellations")] 36 | public List? Constellations { get; set; } 37 | 38 | /// 39 | /// 已拥有服装 40 | /// 41 | [JsonPropertyName("costumes")] 42 | public List? Costumes { get; set; } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/Avatar/AvatarDetailWrapper.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.Avatar; 2 | 3 | internal class AvatarDetailWrapper 4 | { 5 | [JsonPropertyName("avatars")] 6 | public List? Avatars { get; set; } 7 | } 8 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/Avatar/AvatarReliquary.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.Avatar; 2 | 3 | /// 4 | /// 圣遗物 5 | /// 6 | public class AvatarReliquary 7 | { 8 | 9 | [JsonPropertyName("id")] 10 | public int Id { get; set; } 11 | 12 | /// 13 | /// 名称 14 | /// 15 | [JsonPropertyName("name")] 16 | public string? Name { get; set; } 17 | 18 | /// 19 | /// 圣遗物图标 20 | /// 21 | /// 22 | [JsonPropertyName("icon")] 23 | public string? Icon { get; set; } 24 | 25 | /// 26 | /// 圣遗物位置,1-5花羽沙杯冠 27 | /// 28 | [JsonPropertyName("pos")] 29 | public int Position { get; set; } 30 | 31 | /// 32 | /// 稀有度 33 | /// 34 | [JsonPropertyName("rarity")] 35 | public int Rarity { get; set; } 36 | 37 | /// 38 | /// 强化等级 39 | /// 40 | [JsonPropertyName("level")] 41 | public int Level { get; set; } 42 | 43 | /// 44 | /// 套装及效果 45 | /// 46 | [JsonPropertyName("set")] 47 | public ReliquarySet? ReliquarySet { get; set; } 48 | 49 | /// 50 | /// 位置名称(生之花) 51 | /// 52 | [JsonPropertyName("pos_name")] 53 | public string? PositionName { get; set; } 54 | 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/Avatar/AvatarSkill.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.Avatar; 2 | 3 | /// 4 | /// 角色技能 5 | /// 6 | public class AvatarSkill 7 | { 8 | [JsonPropertyName("id")] 9 | public int Id { get; set; } 10 | 11 | [JsonPropertyName("group_id")] 12 | public int GroupId { get; set; } 13 | 14 | /// 15 | /// 技能名称 16 | /// 17 | [JsonPropertyName("name")] 18 | public string? Name { get; set; } 19 | 20 | /// 21 | /// 技能图标 22 | /// 23 | /// 24 | [JsonPropertyName("icon")] 25 | public string? Icon { get; set; } 26 | 27 | /// 28 | /// 当前等级(不计入名座加成) 29 | /// 30 | [JsonPropertyName("level_current")] 31 | public int CurrentLevel { get; set; } 32 | 33 | /// 34 | /// 最大等级(可升级为10,不可升级为1,不计入名座加成) 35 | /// 36 | [JsonPropertyName("max_level")] 37 | public int MaxLevel { get; set; } 38 | 39 | } -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/Avatar/ReliquaryAffix.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.Avatar; 2 | 3 | /// 4 | /// 圣遗物套装效果 5 | /// 6 | public class ReliquaryAffix 7 | { 8 | 9 | /// 10 | /// 激活效果所需的数量 11 | /// 12 | [JsonPropertyName("activation_number")] 13 | public int ActivationNumber { get; set; } 14 | 15 | /// 16 | /// 效果描述 17 | /// 18 | [JsonPropertyName("effect")] 19 | public string? Effect { get; set; } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/Avatar/ReliquarySet.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.Avatar; 2 | 3 | /// 4 | /// 圣遗物套装 5 | /// 6 | public class ReliquarySet 7 | { 8 | 9 | [JsonPropertyName("id")] 10 | public int Id { get; set; } 11 | 12 | /// 13 | /// 套装名称 14 | /// 15 | [JsonPropertyName("name")] 16 | public string? Name { get; set; } 17 | 18 | /// 19 | /// 圣遗物套装效果 20 | /// 21 | [JsonPropertyName("affixes")] 22 | public List? Affixes { get; set; } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/DailyNote/Expedition.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.DailyNote; 2 | 3 | /// 4 | /// 探索派遣 5 | /// 6 | public class Expedition 7 | { 8 | /// 9 | /// 角色侧面图 10 | /// 11 | [JsonPropertyName("avatar_side_icon")] 12 | public string? AvatarSideIcon { get; set; } 13 | 14 | /// 15 | /// 状态 Ongoing:派遣中 Finished:已完成 16 | /// 17 | [JsonPropertyName("status")] 18 | public string? Status { get; set; } 19 | 20 | [JsonIgnore] 21 | public DateTimeOffset NowTime { get; init; } = DateTimeOffset.Now; 22 | 23 | /// 24 | /// 剩余时间 25 | /// 26 | [JsonPropertyName("remained_time"), JsonConverter(typeof(RecoveryTimeJsonConverter))] 27 | public TimeSpan RemainedTime { get; set; } 28 | 29 | /// 30 | /// 探索派遣是否完成 31 | /// 32 | [JsonIgnore] 33 | public bool IsFinished => RemainedTime == TimeSpan.Zero; 34 | 35 | /// 36 | /// 完成时刻 37 | /// 38 | [JsonIgnore] 39 | public DateTimeOffset FinishedTime => NowTime + RemainedTime; 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/DailyNote/RecoveryTimeJsonConverter.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.DailyNote; 2 | 3 | public class RecoveryTimeJsonConverter : JsonConverter 4 | { 5 | public override TimeSpan Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 6 | { 7 | var secondStr = reader.GetString(); 8 | if (int.TryParse(secondStr, out var second)) 9 | { 10 | return TimeSpan.FromSeconds(second); 11 | } 12 | else 13 | { 14 | return TimeSpan.Zero; 15 | } 16 | } 17 | 18 | public override void Write(Utf8JsonWriter writer, TimeSpan value, JsonSerializerOptions options) 19 | { 20 | writer.WriteStringValue(value.TotalSeconds.ToString()); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/DailyNote/Transformer.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.DailyNote; 2 | 3 | /// 4 | /// 参量质变仪 5 | /// 6 | public class Transformer 7 | { 8 | 9 | /// 10 | /// 是否获得 11 | /// 12 | [JsonPropertyName("obtained")] 13 | public bool Obtained { get; set; } 14 | 15 | /// 16 | /// 剩余时间 17 | /// 18 | [JsonPropertyName("recovery_time")] 19 | public TransformerRecoveryTime? RecoveryTime { get; set; } 20 | 21 | /// 22 | /// Wiki url 23 | /// 24 | [JsonPropertyName("wiki")] 25 | public string? Wiki { get; set; } 26 | } 27 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/DailyNote/TransformerRecoveryTime.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.DailyNote; 2 | 3 | /// 4 | /// 参量质变仪恢复时间 5 | /// 时间四值中仅有 有值 6 | /// 7 | public class TransformerRecoveryTime 8 | { 9 | [JsonPropertyName("Day")] 10 | public int Day { get; set; } 11 | 12 | [JsonPropertyName("Hour")] 13 | public int Hour { get; set; } 14 | 15 | [JsonPropertyName("Minute")] 16 | public int Minute { get; set; } 17 | 18 | [JsonPropertyName("Second")] 19 | public int Second { get; set; } 20 | 21 | /// 22 | /// 是否可再次使用 23 | /// 24 | [JsonPropertyName("reached")] 25 | public bool Reached { get; set; } 26 | } 27 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/GameRecord/GameRecordSummary.cs: -------------------------------------------------------------------------------- 1 | using Xunkong.Hoyolab.Avatar; 2 | 3 | namespace Xunkong.Hoyolab.GameRecord; 4 | 5 | public class GameRecordSummary 6 | { 7 | /// 8 | /// 角色信息 9 | /// 10 | [JsonPropertyName("avatars")] 11 | public List? AvatarInfos { get; set; } 12 | 13 | /// 14 | /// 冒险统计 15 | /// 16 | [JsonPropertyName("stats")] 17 | public PlayerRiskStats? PlayerStat { get; set; } 18 | 19 | /// 20 | /// 世界探索 21 | /// 22 | [JsonPropertyName("world_explorations")] 23 | public List? WorldExplorations { get; set; } 24 | 25 | /// 26 | /// 尘歌壶 27 | /// 28 | [JsonPropertyName("homes")] 29 | public List? PotHomes { get; set; } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/GameRecord/WorldExplorationOffering.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.GameRecord; 2 | 3 | /// 4 | /// 贡品类型奖励信息 5 | /// 6 | public class WorldExplorationOffering 7 | { 8 | 9 | [JsonPropertyName("name")] 10 | public string? Name { get; set; } 11 | 12 | 13 | [JsonPropertyName("level")] 14 | public int Level { get; set; } 15 | 16 | 17 | [JsonPropertyName("icon")] 18 | public string? Icon { get; set; } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/GameRecord/WorldExplorationRewardType.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.GameRecord; 2 | 3 | /// 4 | /// 世界探索奖励类型 5 | /// 6 | public enum WorldExplorationRewardType 7 | { 8 | /// 9 | /// 声望 10 | /// 11 | Reputation, 12 | 13 | /// 14 | /// 贡品 15 | /// 16 | Offering, 17 | } 18 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/GlobalUsing.cs: -------------------------------------------------------------------------------- 1 | global using System.Text.Json; 2 | global using System.Text.Json.Serialization; 3 | global using Xunkong.Core; 4 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/HoyolabBaseWrapper.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab; 2 | 3 | internal class HoyolabBaseWrapper where T : class 4 | { 5 | 6 | [JsonPropertyName("retcode")] 7 | public int ReturnCode { get; set; } 8 | 9 | 10 | [JsonPropertyName("message")] 11 | public string? Message { get; set; } 12 | 13 | 14 | [JsonPropertyName("data")] 15 | public T? Data { get; set; } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/HoyolabException.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab; 2 | 3 | public class HoyolabException : Exception 4 | { 5 | 6 | public int ReturnCode { get; init; } 7 | 8 | public HoyolabException(string? message) : base(message) 9 | { 10 | } 11 | 12 | public HoyolabException(int returnCode, string? message) : base($"{message} ({returnCode})") 13 | { 14 | ReturnCode = returnCode; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/ListWrapper.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab; 2 | 3 | internal class ListWrapper 4 | { 5 | [JsonPropertyName("list")] 6 | public List? List { get; set; } 7 | } 8 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/News/NewsDetailWrapper.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.News; 2 | 3 | internal class NewsDetailWrapper 4 | { 5 | 6 | [JsonPropertyName("post")] 7 | public NewsItem? Post { get; set; } 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/News/NewsItem.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.News; 2 | 3 | public class NewsItem 4 | { 5 | 6 | /// 7 | /// 新闻内容 8 | /// 9 | [JsonPropertyName("post")] 10 | public NewsPost? Post { get; set; } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/News/NewsListWrapper.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.News; 2 | 3 | 4 | internal class NewsListWrapper 5 | { 6 | 7 | /// 8 | /// 是否翻到结尾了 9 | /// 10 | [JsonPropertyName("is_last")] 11 | public bool IsLast { get; set; } 12 | 13 | /// 14 | /// 下一次请求时使用 15 | /// 16 | [JsonPropertyName("last_id")] 17 | public int LastId { get; set; } 18 | 19 | /// 20 | /// 新闻 21 | /// 22 | [JsonPropertyName("list")] 23 | public List? List { get; set; } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/News/NewsPost.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.News; 2 | 3 | /// 4 | /// 新闻内容 5 | /// 6 | public class NewsPost 7 | { 8 | 9 | [JsonPropertyName("post_id"), JsonNumberHandling(JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)] 10 | public int PostId { get; set; } 11 | 12 | /// 13 | /// 标题 14 | /// 15 | [JsonPropertyName("subject")] 16 | public string? Subject { get; set; } 17 | 18 | /// 19 | /// 正文(html格式) 20 | /// 21 | [JsonPropertyName("content")] 22 | public string? Content { get; set; } 23 | 24 | /// 25 | /// 创建时间 26 | /// 27 | [JsonPropertyName("created_at"), JsonConverter(typeof(NewsTimeJsonConverter))] 28 | public DateTimeOffset CreateTime { get; set; } 29 | 30 | /// 31 | /// 图片,第一张为封面 32 | /// 33 | [JsonPropertyName("images")] 34 | public List? Images { get; set; } 35 | 36 | /// 37 | /// 结构化正文 38 | /// 39 | [JsonPropertyName("structured_content")] 40 | public string? StructuredContent { get; set; } 41 | 42 | /// 43 | /// 修改时间 44 | /// 45 | [JsonPropertyName("updated_at"), JsonConverter(typeof(NewsTimeJsonConverter))] 46 | public DateTimeOffset UpdateTime { get; set; } 47 | 48 | /// 49 | /// 封面 50 | /// 51 | [JsonIgnore] 52 | public string? Cover => Images?.FirstOrDefault(); 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/News/NewsTimeJsonConverter.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.News; 2 | 3 | public class NewsTimeJsonConverter : JsonConverter 4 | { 5 | public override DateTimeOffset Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 6 | { 7 | return DateTimeOffset.FromUnixTimeSeconds(reader.GetInt64()); 8 | } 9 | 10 | public override void Write(Utf8JsonWriter writer, DateTimeOffset value, JsonSerializerOptions options) 11 | { 12 | writer.WriteNumberValue(value.ToUnixTimeSeconds()); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/News/NewsType.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.News; 2 | 3 | /// 4 | /// 新闻类型 5 | /// 6 | public enum NewsType 7 | { 8 | 9 | /// 10 | /// 公告 11 | /// 12 | Announce = 1, 13 | 14 | /// 15 | /// 活动 16 | /// 17 | Activity = 2, 18 | 19 | /// 20 | /// 资讯 21 | /// 22 | Infomation = 3, 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/SpiralAbyss/SpiralAbyssAvatar.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.SpiralAbyss; 2 | 3 | /// 4 | /// 深境螺旋角色 5 | /// 6 | public class SpiralAbyssAvatar 7 | { 8 | 9 | [JsonIgnore] 10 | public int Id { get; set; } 11 | 12 | 13 | [JsonPropertyName("id")] 14 | public int AvatarId { get; set; } 15 | 16 | 17 | [JsonPropertyName("icon")] 18 | public string? Icon { get; set; } 19 | 20 | 21 | [JsonPropertyName("level")] 22 | public int Level { get; set; } 23 | 24 | 25 | [JsonPropertyName("rarity")] 26 | public int Rarity { get; set; } 27 | 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/SpiralAbyss/SpiralAbyssBattle.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.SpiralAbyss 2 | { 3 | 4 | /// 5 | /// 深境螺旋一场战斗 6 | /// 7 | public class SpiralAbyssBattle 8 | { 9 | [JsonIgnore] 10 | public int Id { get; set; } 11 | 12 | 13 | [JsonPropertyName("index")] 14 | public int Index { get; set; } 15 | 16 | 17 | [JsonPropertyName("timestamp"), JsonConverter(typeof(SpiralAbyssTimeJsonConverter))] 18 | public DateTimeOffset Time { get; set; } 19 | 20 | 21 | [JsonPropertyName("avatars")] 22 | public List? Avatars { get; set; } 23 | 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/SpiralAbyss/SpiralAbyssFloor.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.SpiralAbyss; 2 | 3 | /// 4 | /// 深境螺旋层 5 | /// 6 | public class SpiralAbyssFloor 7 | { 8 | [JsonIgnore] 9 | public int Id { get; set; } 10 | 11 | 12 | [JsonPropertyName("index")] 13 | public int Index { get; set; } 14 | 15 | 16 | [JsonPropertyName("icon")] 17 | public string? Icon { get; set; } 18 | 19 | 20 | [JsonPropertyName("is_unlock")] 21 | public bool IsUnlock { get; set; } 22 | 23 | 24 | [JsonPropertyName("settle_time")] 25 | public string? SettleTime { get; set; } 26 | 27 | 28 | [JsonPropertyName("star")] 29 | public int Star { get; set; } 30 | 31 | 32 | [JsonPropertyName("max_star")] 33 | public int MaxStar { get; set; } 34 | 35 | 36 | [JsonPropertyName("levels")] 37 | public List? Levels { get; set; } 38 | 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/SpiralAbyss/SpiralAbyssLevel.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.SpiralAbyss; 2 | 3 | /// 4 | /// 深境螺旋间 5 | /// 6 | public class SpiralAbyssLevel 7 | { 8 | 9 | [JsonIgnore] 10 | public int Id { get; set; } 11 | 12 | 13 | [JsonPropertyName("index")] 14 | public int Index { get; set; } 15 | 16 | 17 | [JsonPropertyName("star")] 18 | public int Star { get; set; } 19 | 20 | 21 | [JsonPropertyName("max_star")] 22 | public int MaxStar { get; set; } 23 | 24 | 25 | [JsonPropertyName("battles")] 26 | public List? Battles { get; set; } 27 | 28 | 29 | [JsonIgnore] 30 | public DateTimeOffset FirstBattleTime => Battles!.FirstOrDefault()?.Time ?? new(); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/SpiralAbyss/SpiralAbyssRank.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.SpiralAbyss; 2 | 3 | /// 4 | /// 深境螺旋最值统计 5 | /// 6 | public class SpiralAbyssRank 7 | { 8 | 9 | [JsonIgnore] 10 | public int Id { get; set; } 11 | 12 | 13 | [JsonPropertyName("avatar_id")] 14 | public int AvatarId { get; set; } 15 | 16 | 17 | [JsonPropertyName("avatar_icon")] 18 | public string? AvatarIcon { get; set; } 19 | 20 | 21 | [JsonPropertyName("value")] 22 | public int Value { get; set; } 23 | 24 | 25 | [JsonPropertyName("rarity")] 26 | public int Rarity { get; set; } 27 | 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/SpiralAbyss/SpiralAbyssTimeJsonConverter.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.SpiralAbyss; 2 | 3 | public class SpiralAbyssTimeJsonConverter : JsonConverter 4 | { 5 | public override DateTimeOffset Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 6 | { 7 | var str = reader.GetString(); 8 | if (int.TryParse(str, out var seconds)) 9 | { 10 | return DateTimeOffset.FromUnixTimeSeconds(seconds); 11 | } 12 | else 13 | { 14 | return DateTimeOffset.Now; 15 | } 16 | } 17 | 18 | public override void Write(Utf8JsonWriter writer, DateTimeOffset value, JsonSerializerOptions options) 19 | { 20 | writer.WriteStringValue(value.ToUnixTimeSeconds().ToString()); 21 | } 22 | } -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/TravelNotes/TravelNotesAwardItem.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.TravelNotes; 2 | 3 | /// 4 | /// 旅行记录原石或摩拉获取记录 5 | /// 6 | public class TravelNotesAwardItem 7 | { 8 | 9 | [JsonIgnore] 10 | public int Id { get; set; } 11 | 12 | public int Uid { get; set; } 13 | 14 | public int Year { get; set; } 15 | 16 | public int Month { get; set; } 17 | 18 | public TravelNotesAwardType Type { get; set; } 19 | 20 | 21 | [JsonPropertyName("action_id")] 22 | public int ActionId { get; set; } 23 | 24 | 25 | [JsonPropertyName("action")] 26 | public string? ActionName { get; set; } 27 | 28 | /// 29 | /// 获取时间,UTC+8 30 | /// 31 | [JsonPropertyName("time"), JsonConverter(typeof(TravelNotesDateTimeJsonConverter))] 32 | public DateTime Time { get; set; } 33 | 34 | 35 | [JsonPropertyName("num")] 36 | public int Number { get; set; } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/TravelNotes/TravelNotesAwardType.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace Xunkong.Hoyolab.TravelNotes; 4 | 5 | /// 6 | /// 旅行札记收入类型 7 | /// 8 | public enum TravelNotesAwardType 9 | { 10 | 11 | None = 0, 12 | 13 | /// 14 | /// 原石 15 | /// 16 | [Description("原石")] 17 | Primogems = 1, 18 | 19 | /// 20 | /// 摩拉 21 | /// 22 | [Description("摩拉")] 23 | Mora = 2, 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/TravelNotes/TravelNotesBase.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.TravelNotes; 2 | 3 | public abstract class TravelNotesBase 4 | { 5 | 6 | [JsonPropertyName("uid")] 7 | public int Uid { get; set; } 8 | 9 | 10 | [JsonPropertyName("region"), JsonConverter(typeof(JsonStringEnumConverter))] 11 | public RegionType Region { get; set; } 12 | 13 | /// 14 | /// 米游社 ID 15 | /// 16 | [JsonPropertyName("account_id")] 17 | public int AccountId { get; set; } 18 | 19 | 20 | [JsonPropertyName("nickname")] 21 | public string? Nickname { get; set; } 22 | 23 | /// 24 | /// 当前日期 25 | /// 26 | [JsonPropertyName("date"), JsonConverter(typeof(TravelNotesDateJsonConverter))] 27 | public DateTime Date { get; set; } 28 | 29 | /// 30 | /// 当前月 31 | /// 32 | [JsonPropertyName("month")] 33 | public int CurrentMonth { get; set; } 34 | 35 | /// 36 | /// 可查询月份 37 | /// 38 | [JsonPropertyName("optional_month")] 39 | public List? OptionalMonth { get; set; } 40 | 41 | /// 42 | /// 获取的数据所在的月份 43 | /// 44 | [JsonPropertyName("data_month")] 45 | public int DataMonth { get; set; } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/TravelNotes/TravelNotesDateJsonConverter.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.TravelNotes; 2 | 3 | public class TravelNotesDateJsonConverter : JsonConverter 4 | { 5 | public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 6 | { 7 | return DateTime.Parse(reader.GetString()!); 8 | } 9 | 10 | public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options) 11 | { 12 | writer.WriteStringValue(value.ToString("yyyy-MM-dd HH:mm:ss")); 13 | } 14 | } -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/TravelNotes/TravelNotesDateTimeJsonConverter.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.TravelNotes; 2 | 3 | public class TravelNotesDateTimeJsonConverter : JsonConverter 4 | { 5 | public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 6 | { 7 | return DateTime.Parse(reader.GetString()!); 8 | } 9 | 10 | public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options) 11 | { 12 | writer.WriteStringValue(value.ToString("yyyy-MM-dd HH:mm:ss")); 13 | } 14 | } -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/TravelNotes/TravelNotesDayData.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.TravelNotes; 2 | 3 | /// 4 | /// 旅行札记每日统计 5 | /// 6 | public class TravelNotesDayData 7 | { 8 | 9 | [JsonPropertyName("current_primogems")] 10 | public int CurrentPrimogems { get; set; } 11 | 12 | 13 | [JsonPropertyName("current_mora")] 14 | public int CurrentMora { get; set; } 15 | 16 | 17 | [JsonPropertyName("last_primogems")] 18 | public int LastPrimogems { get; set; } 19 | 20 | 21 | [JsonPropertyName("last_mora")] 22 | public int LastMora { get; set; } 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/TravelNotes/TravelNotesDetail.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.TravelNotes; 2 | 3 | /// 4 | /// 旅行札记收入记录详细信息 5 | /// 6 | public class TravelNotesDetail : TravelNotesBase, IJsonOnDeserialized 7 | { 8 | 9 | [JsonPropertyName("page")] 10 | public int Page { get; set; } 11 | 12 | 13 | [JsonPropertyName("list")] 14 | public List? List { get; set; } 15 | 16 | 17 | /// 18 | /// 反序列化后没有赋值 19 | /// 20 | public void OnDeserialized() 21 | { 22 | if (!(List?.Any() ?? false)) 23 | { 24 | return; 25 | } 26 | var year = List[0].Time.Year; 27 | var month = List[0].Time.Month; 28 | foreach (var item in List) 29 | { 30 | item.Uid = Uid; 31 | item.Year = year; 32 | item.Month = month; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/TravelNotes/TravelNotesPrimogemsMonthGroupStats.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.TravelNotes; 2 | 3 | /// 4 | /// 旅行记录原石获取的分组统计 5 | /// 6 | public class TravelNotesPrimogemsMonthGroupStats 7 | { 8 | 9 | [JsonIgnore] 10 | public int Id { get; set; } 11 | 12 | public int Uid { get; set; } 13 | 14 | public int Year { get; set; } 15 | 16 | public int Month { get; set; } 17 | 18 | 19 | [JsonPropertyName("action_id")] 20 | public int ActionId { get; set; } 21 | 22 | 23 | [JsonPropertyName("action")] 24 | public string? ActionName { get; set; } 25 | 26 | 27 | [JsonPropertyName("num")] 28 | public int Number { get; set; } 29 | 30 | 31 | [JsonPropertyName("percent")] 32 | public int Percent { get; set; } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/TravelNotes/TravelNotesSummary.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.TravelNotes; 2 | 3 | /// 4 | /// 旅行札记总览 5 | /// 6 | public class TravelNotesSummary : TravelNotesBase, IJsonOnDeserialized 7 | { 8 | /// 9 | /// 查询月份的上个月 10 | /// 11 | [JsonPropertyName("data_last_month")] 12 | public int DataLastMonth { get; set; } 13 | 14 | /// 15 | /// 今日数据,查询月份不是当前月时,数据内容均为0 16 | /// 17 | [JsonPropertyName("day_data")] 18 | public TravelNotesDayData? DayData { get; set; } 19 | 20 | /// 21 | /// 查询月数据 22 | /// 23 | [JsonPropertyName("month_data")] 24 | public TravelNotesMonthData? MonthData { get; set; } 25 | 26 | /// 27 | /// 不知道是什么 28 | /// 29 | [JsonPropertyName("lantern")] 30 | public bool Lantern { get; set; } 31 | 32 | public void OnDeserialized() 33 | { 34 | var year = DataMonth > Date.Month ? Date.Year - 1 : Date.Year; 35 | MonthData!.Uid = Uid; 36 | MonthData.Year = year; 37 | MonthData.Month = DataMonth; 38 | foreach (var item in MonthData.PrimogemsGroupBy!) 39 | { 40 | item.Uid = Uid; 41 | item.Year = year; 42 | item.Month = DataMonth; 43 | } 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/Wishlog/QueryParam.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.Wishlog; 2 | 3 | struct QueryParam 4 | { 5 | public WishType WishType { get; set; } 6 | 7 | public int Page { get; set; } 8 | 9 | public long EndId { get; set; } 10 | 11 | public int Size { get; set; } 12 | 13 | 14 | /// 15 | /// 获取一页祈愿记录时的查询参数 16 | /// 17 | /// 18 | /// 19 | /// 这一页有多少条记录,不超过20,默认6 20 | /// 上一页记录中最后一条的id,为0则从最新的记录开始获取 21 | public QueryParam(WishType type, int page, int size = 6, long endId = 0) 22 | { 23 | WishType = type; 24 | Page = page; 25 | Size = size; 26 | EndId = endId; 27 | } 28 | 29 | public override string ToString() 30 | { 31 | return $"gacha_type={(int)WishType}&page={Page}&size={Size}&end_id={EndId}"; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/Wishlog/WishType.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace Xunkong.Hoyolab.Wishlog; 4 | 5 | /// 6 | /// 祈愿类型 7 | /// 8 | public enum WishType 9 | { 10 | 11 | /// 12 | /// 新手祈愿 13 | /// 14 | [Description("新手祈愿")] 15 | Novice = 100, 16 | 17 | /// 18 | /// 常驻祈愿 19 | /// 20 | [Description("常驻祈愿")] 21 | Permanent = 200, 22 | 23 | /// 24 | /// 角色活动祈愿 25 | /// 26 | [Description("角色活动祈愿")] 27 | CharacterEvent = 301, 28 | 29 | /// 30 | /// 武器活动祈愿 31 | /// 32 | [Description("武器活动祈愿")] 33 | WeaponEvent = 302, 34 | 35 | /// 36 | /// 角色活动祈愿-2 37 | /// 38 | [Description("角色活动祈愿-2")] 39 | CharacterEvent_2 = 400, 40 | } 41 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/Wishlog/WishTypeJsonConverter.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.Wishlog; 2 | 3 | public class WishTypeJsonConverter : JsonConverter 4 | { 5 | public override WishType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 6 | { 7 | var str = reader.GetString(); 8 | if (int.TryParse(str, out var num)) 9 | { 10 | return (WishType)num; 11 | } 12 | else 13 | { 14 | return 0; 15 | } 16 | } 17 | 18 | public override void Write(Utf8JsonWriter writer, WishType value, JsonSerializerOptions options) 19 | { 20 | writer.WriteStringValue(((int)value).ToString()); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/Wishlog/WishlogBackup.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.Wishlog; 2 | 3 | public class WishlogBackup 4 | { 5 | 6 | public string? ExportApp { get; set; } 7 | 8 | 9 | public string? AppVersion { get; set; } 10 | 11 | 12 | public DateTimeOffset ExportTime { get; set; } 13 | 14 | 15 | public int Uid { get; set; } 16 | 17 | 18 | public int WishlogCount { get; set; } 19 | 20 | 21 | public DateTimeOffset? FirstItemTime { get; set; } 22 | 23 | 24 | public DateTimeOffset? LastItemTime { get; set; } 25 | 26 | 27 | public List? WishlogList { get; set; } 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/Wishlog/WishlogJsonContext.cs: -------------------------------------------------------------------------------- 1 | #if NativeAOT 2 | 3 | namespace Xunkong.Hoyolab.Wishlog; 4 | 5 | 6 | [JsonSerializable(typeof(WishType[]))] 7 | [JsonSerializable(typeof(HoyolabBaseWrapper))] 8 | [JsonSerializable(typeof(WishlogItem))] 9 | internal partial class WishlogJsonContext : JsonSerializerContext { } 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/Wishlog/WishlogWrapper.cs: -------------------------------------------------------------------------------- 1 | namespace Xunkong.Hoyolab.Wishlog; 2 | 3 | internal class WishlogWrapper 4 | { 5 | [JsonPropertyName("page"), JsonNumberHandling(JsonNumberHandling.AllowReadingFromString)] 6 | public int Page { get; set; } 7 | 8 | [JsonPropertyName("size"), JsonNumberHandling(JsonNumberHandling.AllowReadingFromString)] 9 | public int Size { get; set; } 10 | 11 | [JsonPropertyName("total"), JsonNumberHandling(JsonNumberHandling.AllowReadingFromString)] 12 | public int Total { get; set; } 13 | 14 | [JsonPropertyName("list")] 15 | public List? List { get; set; } 16 | 17 | [JsonPropertyName("region")] 18 | public string? Region { get; set; } 19 | } 20 | -------------------------------------------------------------------------------- /src/Xunkong.Hoyolab/Xunkong.Hoyolab.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | preview 8 | 1.0.0 9 | 1.0.0 10 | 1.0.0 11 | Scighost 12 | Xunying 13 | 11.0 14 | 米游社原神部分 API (国服限定) 15 | https://github.com/xunkong 16 | https://github.com/xunkong/common 17 | MIT 18 | Xunying genshin 19 | x64 20 | Xunying.Hoyolab 21 | IDE0044;MVVMTK0033;MVVMTK0034; 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | --------------------------------------------------------------------------------