├── CONTRIBUTING.md
├── PrivacyPolicy.md
├── README.md
├── UserUseArgeement.md
└── XFP.Impact_Ultimate
├── CLDownloader
├── GashByte-透明.ico
├── Program.cs
└── XFP.CLDownloader.csproj
├── Image
├── GashByte+口号.png
├── GashByte-透明.ico
└── GashByte.png
├── Updater
├── Updater.sln
└── Updater
│ ├── GashByte-透明.ico
│ ├── Program.cs
│ ├── Utils
│ └── ZipHelper.cs
│ └── XFP.Updater.csproj
├── XFP.Cora
├── App.config
├── App.xaml
├── App.xaml.cs
├── Controls
│ ├── AboutUs.xaml
│ ├── AboutUs.xaml.cs
│ ├── AkebiPage.xaml
│ ├── AkebiPage.xaml.cs
│ ├── Basic
│ │ ├── LoginFormMihoyo.xaml
│ │ ├── LoginFormMihoyo.xaml.cs
│ │ ├── Settings.xaml
│ │ └── Settings.xaml.cs
│ ├── CustomNote.xaml
│ ├── CustomNote.xaml.cs
│ ├── Game
│ │ └── Utils
│ │ │ ├── CommandLineBuilder.cs
│ │ │ └── GameConverter.cs
│ ├── HomePage.xaml
│ ├── HomePage.xaml.cs
│ ├── HoyolabAccount.xaml
│ ├── HoyolabAccount.xaml.cs
│ ├── NonClientAreaContent.xaml
│ ├── NonClientAreaContent.xaml.cs
│ ├── WishExport.xaml
│ └── WishExport.xaml.cs
├── GashByte-透明.ico
├── GlobalUsing.cs
├── Hoyolab
│ ├── Account
│ │ ├── GenshinRoleInfo.cs
│ │ ├── GenshinRoleInfoWrapper.cs
│ │ ├── HoyolabUserInfo.cs
│ │ ├── HoyolabUserInfoWrapper.cs
│ │ ├── IWrapper.cs
│ │ ├── SignInInfo.cs
│ │ ├── SignInRisk.cs
│ │ └── SignTodayJsonConverter.cs
│ ├── Avatar
│ │ └── AvatarInfo.cs
│ ├── Core
│ │ ├── ElementType.cs
│ │ └── RegionType.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
│ ├── HoyolabBaseWrapper.cs
│ ├── HoyolabClient.cs
│ └── TravelNotes
│ │ ├── TravelNotesBase.cs
│ │ ├── TravelNotesDateJsonConverter.cs
│ │ ├── TravelNotesDayData.cs
│ │ ├── TravelNotesMonthData.cs
│ │ ├── TravelNotesPrimogemsMonthGroupStats.cs
│ │ └── TravelNotesSummary.cs
├── ICoraException
│ ├── ContentEmptyException.cs
│ ├── DirectoryNotFound.cs
│ ├── HoyolabException.cs
│ ├── IncompleteFile.cs
│ └── UnKnownChoose.cs
├── MainWindow.xaml
├── MainWindow.xaml.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
├── README.md
├── Resources
│ ├── DailyTask.png
│ ├── Domain.png
│ ├── HarmonyOS_Sans_SC_Regular.ttf
│ ├── HomeCoin.png
│ ├── Mora.png
│ ├── PaimonEmotion.png
│ ├── Primogems.png
│ ├── Resin.png
│ ├── ResinFull.png
│ └── Transformer.png
├── Service
│ └── HoyolabService.cs
├── Utlis
│ ├── Base
│ │ └── ModuleVersion.cs
│ ├── DataProvider.cs
│ ├── DllUtils.cs
│ ├── GetFormUrl.cs
│ ├── KeySetter.cs
│ ├── Log
│ │ └── LogWriter.cs
│ ├── MenuInfo.cs
│ ├── Model
│ │ ├── DeveloperOption.cs
│ │ └── Files
│ │ │ ├── DocumentSerializer.cs
│ │ │ └── INIFiles.cs
│ ├── PrimaryScreen.cs
│ └── YSAccount.cs
├── XFP.ICora.csproj
├── XFP.ICora.csproj.user
├── app.manifest
└── app1.manifest
├── XFP.ICora.sln
├── XFP.UnInstaller
├── App.xaml
├── App.xaml.cs
├── AssemblyInfo.cs
├── GashByte-透明.ico
├── MainWindow.xaml
├── MainWindow.xaml.cs
├── XFP.UnInstaller.csproj
└── XFP.UnInstaller.csproj.user
└── 赶紧删库跑路吧.jpg
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # **参与贡献**
2 | 1. Fork 本仓库
3 | 2. 新建 Feat_xxx 分支
4 | 3. 提交代码
5 | 4. 新建 Pull Request
6 |
--------------------------------------------------------------------------------
/PrivacyPolicy.md:
--------------------------------------------------------------------------------
1 | # 隐私策略
2 |
3 | 更新日期:**2023/1/14**
4 | 生效日期: **2022/12/24**
5 |
6 | ## 导言
7 |
8 | _ICora_ 是一款由 _XFP Group_(下称"我们")所创作的产品。您在使用我们的服务时,我们可能会有收集和使用有关您的个人游戏账户的相关信息。我们希望通过此《隐私策略》(下称"策略")向您说明,在使用我们的服务器,我们如何收集、使用、存储和分享您的一些信息,已经我们为您提供的访问、更新、控制和保护这些信息的方式。本策略与您所使用的 _ICora_ 服务息息相关,希望您仔细阅读,在需要时,按照本策略的指引,做出您所认为适当的选择。本策略中设计的相关技术词汇,我们尽量以明了的表述方法,并提供进一步说明连接,以便您的理解。
9 |
10 | **您使用或继续使用我们的服务,即意味着您同意本策略所提到的一切有关收集、使用、储存和分享您的相关信息的服务。**
11 |
12 | 如对本策略或相关事宜有任何疑问,请通过 **QQ群** 与我们联系
13 |
14 | ## 1、 我们收集的信息
15 |
16 | 我们或我们的第三方合作伙伴提供服务时,可能会收集、储存和使用下列与您有关的信息。如果您不提供相关信息,可能无法注册成为我们的用户或无法享受我们提供的某些服务,或者无法达到相关服务最佳的效果。
17 |
18 | ## 2、 信息的存储
19 |
20 | **2.1、信息存储方式和期限**
21 |
22 | * 我们会将重要的个人数据进行加密而后保存到本地(如通过ICoraApp内部进行存储数据,或保存到本地文件)、友商服务器数据库、服务器日志。
23 | * 一般情况下,我们只会为实现服务目的所必需的时间内或法律法规规定的条件下存储您的个人信息。
24 |
25 | **2.2、信息存储的地域**
26 |
27 | * 我们会按照法律法规规定,将境内收集的用户个人信息存储于中国境内。
28 | * 目前我们不会跨境传输或除本策略提到的使用目的外的其他目的存储您的个人信息。将来如需跨境传输或存储的,我们会向您告知信息出境的目的、接收方、安全保证措施和安全风险,并征得您的同意是否进行传输以达个人需求。
29 |
30 | **2.3、产品或服务停运时的通知**
31 |
32 | * 当我们的产品或服务发生意外或由我们决定性的,不得不的停止运营时,我们将以推送通知、公告的形式通知您,并在完全停止运营前将您的所有个人信息从我们的友商服务器数据库、服务器日志(法律法规另有规定的除外)中完全删除,除您本地保存的日志外,您可以使用ICora自带的卸载器达到完全卸载的目的。
33 |
34 | ## 3、安全信息
35 |
36 | 我们使用各种安全技术和程序,以防信息的丢失、不当使用、未经授权阅览或披露。例如,在某些服务中,我们将利用加密技术(例如ASE、SSL加密)来保护您所提供的个人信息。但请您理解,由于技术的限制以及可能存在的各种恶意手段,在互联网行业,即便竭尽所能加强安全措施,也不可能始终保证信息百分之百的安全。您需要了解,您接入我们的服务所用的系统和通讯网络,有可能因我们可控范围外的因素而出现问题。若出现此类状况,ICora不承担任何用户损失,一切损失由实施者承担。
37 |
38 | ## 4、 我们如何使用信息
39 |
40 | 我们可能将在向您提供服务的过程之中所收集的信息用作下列用途:
41 |
42 | * 向您提供服务;
43 | * 在我们提供服务时,用于身份验证、客户服务、安全防范、诈骗监测、存档和备份用途,确保我们向您提供的产品和服务的安全性;
44 | * 帮助我们设计新服务,改善我们现有服务;
45 | * 使我们更加了解您如何接入和使用我们的服务,从而针对性地回应您的个性化需求,例如语言设定、位置设定、个性化的帮助服务和指示,或对您和其他用户作出其他方面的回应;
46 | * 向您提供与您更加相关的广告以替代普遍投放的广告;
47 | * 评估我们服务中的广告和其他促销及推广活动的效果,并加以改善;
48 | * 软件认证或管理软件升级;
49 | * 让您参与有关我们产品和服务的调查。
50 |
51 | ## 5、 信息共享
52 |
53 | 目前,我们不会主动共享或转让您的个人信息至第三方,如存在其他共享或转让您的个人信息或您需要我们将您的个人信息共享或转让至第三方情形时,我们会直接或确认第三方征得您对上述行为的明示同意。为了投放广告,评估、优化广告投放效果等目的,我们需要向广告主及其代理商等第三方合作伙伴共享您的部分数据,要求其严格遵守我们关于数据隐私保护的措施与要求,包括但不限于根据数据保护协议、承诺书及相关数据处理政策进行处理,避免识别出个人身份,保障隐私安全。我们不会向合作伙伴分享可用于识别您个人身份的信息(例如您的姓名或电子邮件地址),除非您明确授权。我们不会对外公开披露所收集的个人信息,如必须公开披露时,我们会向您告知此次公开披露的目的、披露信息的类型及可能涉及的敏感信息,并征得您的明示同意。随着我们业务的持续发展,我们有可能进行合并、收购、资产转让等交易,我们将告知您相关情形,按照法律法规及不低于本《隐私政策》所要求的标准继续保护或要求新的控制者继续保护您的个人信息。另外,根据相关法律法规及国家标准,以下情形中,我们可能会共享、转让、公开披露个人信息无需事先征得您的授权同意:
54 |
55 | * 与国家安全、国防安全直接相关的;
56 | * 与公共安全、公共卫生、重大公共利益直接相关的;
57 | * 犯罪侦查、起诉、审判和判决执行等直接相关的;
58 | * 出于维护个人信息主体或其他个人的生命、财产等重大合法权益但又很难得到本人同意的;
59 | * 个人信息主体自行向社会公众公开个人信息的;
60 | * 从合法公开披露的信息中收集个人信息的,如合法的新闻报道、政府信息公开等渠道
61 |
62 | ## 6、 您的权利
63 |
64 | 在您使用我们的服务期间,我们可能会视产品具体情况为您提供相应的操作设置,以便您可以查询、删除、更正或撤回您的相关个人信息,您可参考相应的具体指引进行操作。此外,我们还设置了投诉举报渠道,您的意见将会得到及时的处理。如果您无法通过上述途径和方式行使您的个人信息主体权利,您可以通过本《隐私政策》中提供的联系方式提出您的请求,我们会按照法律法规的规定予以反馈。
65 |
66 | ## 7、 变更
67 |
68 | 我们可能适时修订本《隐私政策》的条款。当变更发生时,我们会在版本更新时向您提示新的《隐私政策》,并向您说明生效日期。请您仔细阅读变更后的《隐私政策》内容,**若您继续使用我们的服务,即表示您同意我们按照更新后的《隐私政策》处理您的个人信息。**
69 |
70 | ## 8、 未成年人保护
71 |
72 | 我们鼓励父母或监护人指导未满十八岁的未成年人使用我们的服务。我们建议未成年人鼓励他们的父母或监护人阅读本《隐私政策》,并建议未成年人在提交的个人信息之前寻求父母或监护人的同意和指导。
73 |
74 | ## 9、 第三方侵害
75 |
76 | _ICora_ 在制作过程包括发布时不会携带任何会或企图损害用户计算机的内容,_ICora_ 一向以完善 _ICora_ 内容为主要目标,保护用户数据为另一极其重要的目标。若用户计算机出现被恶意破坏的行为,更具本协议第九条规定:_ICora_ 不会包含任何此类内容。则源头不为 _ICora_ 。 _ICora_ 以及 _XFP Group_ 中的所有成员不承担此事件责任,若出现类似事件,我们有权以此开源库中的内容为证据并且提供免责声明, _ICora_ 以及 _XFP Group_ 中的所有成员可以无须承担此次事件责任,但若出现较大面积扩散,我们会给予重视。
77 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # **ICora**  
2 |
3 | 
4 |
5 | ## XFP Studio招人
6 | - Hi Everyone 我们目前急缺懂得 ``C#``、``WinUI3``、``数据库`` 的开发者们 如果你们有兴趣 想要加入 `XFPStudio` 可以前往我的官网 下滑 点击 **Join XFPStudio** 然后联系我的QQ 我会将你拉入我们的交流小组 `XFPStudio` 是一个由我成立的小组织 里面只有两三个人 不过我希望能有越来越多的开发者们能够支持我们 加入我们 和我们肩并肩完成属于我们的梦想
7 | - 访问我的官网:[官网](https://gashbyte.github.io/ICoraIndex/)
8 | - 您也可加入我们的 [Discord群聊](https://discord.gg/GcJCsvTMau) 获得Contributor身份组 与我们一起交流贡献!👀
9 | - ❤ 希望越来越多的人能够支持ICora的诞生 能够与ICora现在的贡献者们肩并肩的一起工作! ❤
10 |
11 | ## 目录
12 |
13 | - [关于我们](#关于我们)
14 | - [功能](#功能)
15 | - [下载](#下载)
16 | - [使用说明](#使用说明)
17 | - [参与贡献](#参与贡献)
18 | - [隐私策略及用户协议](#隐私策略--用户协议)
19 |
20 | # 旅行者踏上了路途
21 |
22 | ## 嗨,旅行者别来无恙啊!
23 | 希望你没有忘记最初来到这片大陆的约定。
24 |
25 | ## 关于我们
26 | |创作团队|XFPGroup|
27 | |---|---
28 | |贡献者|x3zF、LoserSkidder、SaA3ne、GashByte|
29 | |一群|811979687|
30 | |二群|590566763|
31 |
32 | ### x3zF 在这里!!
33 | - 你们好 我是 x3zF.. ❤
34 | - 我正在努力的学习有关编程语言的知识 👀
35 | - 你可以在这里访问我或我们团队的项目储存库 🎁
36 | - 我是ICora的主要开发者之一,但是只有我在Github上传了ICora的源码🎄
37 | - ❤ 就在 -> https://github.com/GashByte/ICora ❤
38 |
39 | ## 关于ICora
40 | ## 什么是ICora?
41 | - XFP.Impact_Ultimate.Cora(ICora)是XFP Group独自开发的免费原神工具箱,并且它严格遵守开源协议。
42 | - 目前,它只支持中国版的原神,但我们正在朝着国际化的方向发展。
43 | ## 功能
44 | V1.3.10
45 | - [x] 游戏启动
46 | - [x] 米游社账户
47 | - [ ] 深渊记录
48 | - [ ] 祈愿记录(即将添加)
49 | - [ ] 成就管理
50 | - [ ] 角色练度
51 | - [ ] 养成计划
52 | - [ ] 游戏公告
53 | - [ ] 活动公告
54 | - [ ] 图鉴管理
55 | - [ ] 过场动画
56 | - [ ] 自定义便签(即将添加)
57 | - 剩余的内容 XFPGroup正在努力开发!
58 |
59 | ## 它会一直免费吗?
60 | - 是的, 我们将一直提供它的支持直到原神停止它的更新
61 | ## 下载
62 | - 访问我们的官网或者获取ICora的源码.
63 | - 官网: https://gashbyte.github.io/ICoraIndex .
64 | - 源码存储库: https://github.com/GashByte/ICora .
65 | - ***More***
66 | - [转服包](https://github.com/GashByte/ICora/releases/download/%E8%BD%AC%E6%9C%8D%E5%8C%85/default.zip)
67 | - [转服包国内分流](https://www.123pan.com/s/UE0KVv-GIcJH)
68 | - [ICora v1.3.11 REL](https://github.com/GashByte/ICora/releases/download/ICora/ICoraRelease.zip)
69 | ## 使用说明
70 | - 需要提前安装[.Net 7.0 SDK](https://download.visualstudio.microsoft.com/download/pr/6ba69569-ee5e-460e-afd8-79ae3cd4617b/16a385a4fab2c5806f50f49f5581b4fd/dotnet-sdk-7.0.102-win-x64.exe)
71 | - 解压REL压缩包,运行```XFP.ICora.exe```即可畅玩
72 |
73 |
74 | ## [参与贡献](/CONTRIBUTING.md)
75 |
76 | ## [隐私策略](/PrivacyPolicy.md) | [用户协议](/UserUseArgeement.md)
77 |
78 | **感谢 宵宫(@Doctor-yoi) 提供README**
79 | ---
80 |
81 | ## ❤ 我们希望ICora能成为您爱不释手的原神工具箱!❤
82 | - 加入群聊获取更多资讯:
83 | - 原神交流群一群 811979687
84 | - 原神交流群二群 590566763
85 | 群内附带Acrepi、阻尼器等实用原神软件!
86 |
87 | ## 关于1.3.11更新的内容!
88 | ***V1.3.11***
89 | - 集中修复了已知Bug
90 | - 添加了自定义便签页面(未完善)
91 | - 添加了祈愿记录页面(未完善)
92 | - 优化了部分代码
93 | - **Build 230129**
94 |
95 | ## 关于下个版本要添加的内容(拟定) - 给制作小组看的QAQ
96 | - [x] 修改页面UI的已知Bug
97 | - [ ] 添加祈愿记录(页面)
98 | - [ ] 添加自定义便签(页面)
99 | - [ ] 修复已知的bug
100 | - [x] 在添加账户时 弹出bug(原因:无法解析用户头像)
101 | - [ ] ~~在选择Dll注入时 自定义Dll路径不包含中文仍弹出提示~~ *wontfix*
102 | - [x] 实时检查CL无法点击、不检查
103 | - [x] 米哈游刷新过快问题
104 | - [x] 派遣提示错误的问题
105 | - **更多Bug请在Issues反馈哦!❤**
106 |
--------------------------------------------------------------------------------
/UserUseArgeement.md:
--------------------------------------------------------------------------------
1 | # 用户使用协议和法律声明
2 |
3 | 更新日期:**2023/1/14**
4 | 生效日期: **2022/12/24**
5 |
6 | ## 总则
7 |
8 | 本"用户使用协议和法律声明"(以下简称"条款"或"使用协议")适用于 _XFP Group_ 开发团队(以下简称"我们")开发的全部软件作品、各开发项目的官方网站、附属的自媒体账号等。
9 | 请您仔细阅读本用户使用协议的全部内容,在您阅读"使用协议"后,若对此用户使用协议中的任何条款有异议,请立刻停止使用我们所开发的任意项目。
10 | 如您未满18周岁,请在法定监护人陪同下仔细阅读并充分理解本协议,并征得法定监护人的同意后使用我们所开发的任意项目。
11 | 若您已安装、使用或在开发时引用我们所开发的任意项目,表示您已主动阅读(已阅读完毕)并完全同意本使用协议所列明的条款,即已充分理解本协议并承诺作为本协议的一方当事人接受协议、法律声明、隐私政策以及与我们所开发的任意项目相关的规则、规范、声明、公告、通知等内容的约束。
12 | 此《用户使用协议》是由用户(以下或称"您")与我们所开发的任意项目所订立的用户使用协议和法律声明,本协议对用户和我们均具有法律效力。
13 |
14 | ## 项目性质、服务以及有关责任与义务的界定
15 |
16 | **1、**
17 | 由于我们所开发的任意项目,均"开源"、"非经营性质",故我们可随时执行全权决定:包括但不限于更改"使用协议",修改我们所开发的任意项目内的任何内容。如"条款"及"作品的内容"有任何变更,我们将在相关的项目展示网站上刊载公告作为通知。经修订的"条款"一经在官方网站上公布后,即自动生效。
18 |
19 | **2、**
20 | 本软件以"学习开发知识"、"积累开发经验"为目的进行开发,所有项目所提供的功能,均"开源"、"非经营性质",如用户对我们所开发的任意项目的安全性表示不满,请立即卸载/删除/停用,如您仍在正常使用,则表示您认可我们所开发的任意项目的安全性。
21 |
22 | **3、**
23 | 一切因使用我们所开发的任意项目的内容而导致的"任何意外损失(包括但不限于:软件、硬件、财产以及虚拟物品等)"、"合约毁坏"、"诽谤"、"版权或知识产权侵犯"及其所造成的损失与责任,均为使用者自身对于网络公开的开源软件的使用过程中自身发生的使用行为所引致的"损失与责任",基于全部作品在其开放源代码的位置(即Github、Gitee)的本声明所约定的内容,应当认定前述的"损失与责任"与全部项目的有关开发者无责任关联。
24 |
25 | **4、**
26 | 用户使用我们所开发的任意项目期间,我们不做任何不发生如下情况的保证:
27 |
28 | 因网络状况、通讯线路等任何技术原因而导致用户不能正常使用或更新;
29 | 因使用"第三方开发的本软件内插件"、"第三方进行二次编译的本软件的修改版"、"复用本开发团队所创作的项目代码而编译成的软件"造成负面结果。
30 | 五、用户认可我们所开发的任意项目,除被动接收软件或其他相关项目中的必要的上传报告或有关信息外,所有信息的上传均需要用户的主动触发;
31 |
32 | 用户认可我们所开发的任意项目,均完全尊重并保护所有用户的"个人隐私权",项目代码亦完全公开,用户不具有"因隐私权收到侵犯"而对开发团队或团队成员发起控诉的主观理由。
33 | 我们所开发的任意项目不会向第三方共享、转让您的个人信息,除非经过您本人事先授权同意,或者共享、转让的个人信息是去标识化处理后的信息,且共享第三方无法重新识别此类信息的自然人主体。
34 | 我们所开发的任意项目包含到其他站点的链接,当您访问第三方链接时,请认真阅读第三方站点的用户协议和声明,我们对于第三方站点的内容、隐私条款、使用协议等不负任何责任。
35 | 在使用我们所开发的任意项目时,提交任意资料的过程中,我们不保证提交的信息保存成功,您需要对您提交的资料做好存储保管。我们所开发的部分项目为"被授权数据"提供存储,但在存储过程中存在各种不可抗力的因素,我们无法承诺对用户的存储信息无限期保留,您的重要信息请自行备份。
36 |
37 | ## 权利和义务
38 |
39 | **6、**
40 | 我们允许任何单位或个人在没有本开发团队授权的情况下,对我们所开发的任意项目进行的二次开发、功能修改以及复用我们创作的代码进行其他项目的开发,但对其所侵犯我们计算机软件著作权的行为,我们保留追责的权利。
41 |
42 | 我开发团队不对任何单位或个人在使用我们所开发的任意项目的内容进行的公开发布行为(包括但不限于制作视频、发布带有本软件内容的文章、上传至非我开发团队指定的下载网站提供下载等)的内容所致的任意结果进行负责。
43 | 我开发团队不对使用"第三方开发的可用于我们所开发的任意项目的附属程序或额外代码"、"第三方进行二次编译的我们所开发的任意项目的修改版"、"复用本开发团队所创作的项目代码而编译成的软件"造成的任意结果负责。
44 | 在此基础上,根据《计算机软件保护条例》第二条与第三条对于"计算机软件"和"文档"的法律定义,本软件开发团队(_XFP Group_)保留全部我们开发项目的计算机软件著作权,其包括但不限于项目构建所需的全部信息、全部项目有关的所有文档资料(即用来描述程序的内容、组成、设计、功能规格、开发情况的程序设计说明书、流程图、用户手册等),具体内容以各项目《计算机软件著作权登记证书》的实际内容为准。
45 |
46 | **7、**
47 | 我们所开发的任意项目仅作用于合法、合规范围内的学习及研究所用,不得利用本软件系统从事违法活动。
48 |
49 | 我们仅作为项目的开发团队(非法人性质,为自然人组成的团体),对任何使用结果不负任何连带责任,软件以及我们开发的任意项目的使用过程中产生的任何法律后果我们概不负责、不承担任何法律责任。
50 | 若用户已开始使用我们所开发的任意项目,即已同意"使用协议",表明我们已履行完毕"本使用协议第十款"的告知情形。
51 |
52 | **8、**
53 | 所开发项目的著作权。
54 |
55 | 本软件开发团队对所开发的"XFP.Impact_Ultimate软件"、"XFP.ICora软件"等作品的软件本身(不包括软件内除功能模块外的显示内容)、上述作品的全部历史版本以及周边网站,以及我们所开发的任意其他作品,拥有软件内的"各商标的所有权"(引用于网络的图片除外),"著作权"等有关的应有权益。
56 | 我们所开发的任意项目的统计数据全部来源于软件用户主动提交,经过对数据简单地筛选后进行展示,因此我们所开发的任意项目不对数据的准确性负责,该数据也与我们无关。
57 | 使用我们所开发的任意项目的过程中可能会产生拥有原有版权的数据,对于这些数据,我们所开发的任意项目不拥有它们的所有权,为了避免造成侵权,使用者有义务完全阅读并履行"本使用协议第十条"的内容。本软件内使用的资源(包括但不限于字体、图片、文字等)均来源于互联网的公开信息,如果出现侵权可立即联系我们移除。
58 |
59 | ## 其他条款
60 |
61 | **9、**
62 | 对于团队所开发项目的"非经营性质"的确定。
63 |
64 | 我们所开发的任意项目,均无任何经营性质。
65 |
66 | 若开发团队的个别或部分成员,在参与开发我们所开发的任意项目期间,与我们所开发的任意项目的第三方用户间产生了包括但不限于:赠与、交换、买卖等关系,其所产生的关系与本开发团队无关,此种情形的发生不基于团队开发有关项目这一事实,而是基于其与第三方用户,在发生上述关系的互联网交互位置或现实地点所产生的独立事件,应当以发生上述关系的互联网交互位置的用户使用条款或结合其在现实地点所发生的具体行为来判定此行为的性质。
67 |
68 | **10、**
69 | 我们所开发的任意项目(含网站),均以"学习开发知识"、"积累开发经验"为目的进行开发,仅供学习交流,严禁用于商业用途,请您在下载或进行查看学习后的24小时内自行删除全部相关信息,若您无视本条要求,本软件开发团队不对"可能产生的版权纠纷、著作权侵权以及民事纠纷等问题"负责。
70 |
71 | **11、**
72 | 本协议的成立、生效、履行、解释及争议的解决均应适用中华人民共和国大陆地区法律。倘本协议之任何规定因与中华人民共和国的法律抵触而无效,则这些条款将尽可能接近本协议原条文意旨重新解析,且本协议其它规定仍应具有完整的效力及效果。
73 |
74 | **12、**
75 | 本协议中的标题(包括副标题)仅为方便及阅读而设,并不影响本协议中任何规定的含义或解释。
76 |
77 | **13、**
78 | 您和本开发团队均是独立的主体,在任何情况下本协议不构成本开发团队对用户的任何形式的明示或暗示担保或条件,双方之间亦不构成代理、合伙、合营或雇佣关系。
79 |
80 | **14、**
81 | 本"用户使用协议和法律声明"中,"我们"或称"本开发团队"(区别于"用户"或"您")的实际主体为" _XFP Group_ 开发团队"的团队整体及每个成员个人,即包含前述网站( https://gitee.com/XFP-Group )中,[XFP Group开发团队]( https://gitee.com/organizations/XFP-Group/members/list )的全部成员。
82 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/CLDownloader/GashByte-透明.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GashByte/ICora/75aab93fba19cf4e6771ae7d38f7073100f7cc0e/XFP.Impact_Ultimate/CLDownloader/GashByte-透明.ico
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/CLDownloader/Program.cs:
--------------------------------------------------------------------------------
1 | using static System.Net.Mime.MediaTypeNames;
2 | using System.Net;
3 | using System.Diagnostics;
4 | using System;
5 |
6 | namespace XFP.Impact_Ultimate.CLDownloader
7 | {
8 | public class CLDownloader
9 | {
10 | private static string Impact_UltimatePath = Environment.CurrentDirectory + "\\ICora";
11 | private static string BkebiPath = Environment.CurrentDirectory + "\\ICora\\libstdimpact.dll";
12 |
13 | static void Main()
14 | {
15 | if (!Directory.Exists(Impact_UltimatePath))
16 | Directory.CreateDirectory(Impact_UltimatePath);
17 | Checker();
18 | }
19 |
20 | static void Checker()
21 | {
22 | Console.WriteLine("-------------------------Checker-------------------------");
23 | Console.WriteLine("正在检查数据");
24 | if (File.Exists(BkebiPath))
25 | {
26 | Console.WriteLine("检查到了libstdimpact.dll的存在 正在校验文件大小");
27 | FileInfo fileInfo = new FileInfo(BkebiPath);
28 | long localsize = fileInfo.Length;
29 | HttpWebRequest request = WebRequest.CreateHttp(
30 | "");
31 | HttpWebResponse? response = request.GetResponse() as HttpWebResponse;
32 | Console.WriteLine("您的lib大小: " + localsize);
33 | Console.WriteLine("服务器的lib大小: " + response.ContentLength);
34 | SizeChecker(localsize, response.ContentLength);
35 | }
36 | else
37 | {
38 | Console.WriteLine("没有检查到CLibrary的存在 正在转跳下载线程");
39 | Downloader();
40 | }
41 | }
42 |
43 | static void Downloader()
44 | {
45 | Console.WriteLine("-------------------------Downloader-------------------------");
46 | Console.WriteLine("正在请求文件中");
47 | HttpWebRequest request = WebRequest.CreateHttp(
48 | "");
49 | HttpWebResponse? response = request.GetResponse() as HttpWebResponse;
50 | Stream responseStream = response.GetResponseStream();
51 | //保存用户头像
52 | Stream stream = new FileStream(BkebiPath, FileMode.Create);
53 | byte[] bArr = new byte[1024];
54 | int size = responseStream.Read(bArr, 0, bArr.Length);
55 | Stopwatch sw = new Stopwatch();
56 | sw.Start();
57 | Console.WriteLine("开始下载");
58 | long totalBytesRead = 0;
59 | do
60 | {
61 | stream.Write(bArr, 0, size);
62 | size = responseStream.Read(bArr, 0, bArr.Length);
63 | totalBytesRead += size;
64 | Console.WriteLine("进度条: " + ((float)totalBytesRead / (float)response.ContentLength) * 100 + "%");
65 | } while (size > 0);
66 | stream.Close();
67 | responseStream.Close();
68 | sw.Stop();
69 | FileInfo fileInfo = new FileInfo(BkebiPath);
70 | long localsize = fileInfo.Length;
71 |
72 | Console.WriteLine("下载成功! 耗时: " + sw.ElapsedMilliseconds / 1000.0000 + " 秒");
73 | Console.WriteLine("文件大小: " + localsize);
74 | Console.WriteLine("正在请求服务器大小: " + response.ContentLength);
75 |
76 | SizeChecker(localsize, response.ContentLength);
77 | }
78 |
79 | static void SizeChecker(long LocalSize, long ServerSize)
80 | {
81 | if (LocalSize != ServerSize)
82 | {
83 | Console.WriteLine("这是一个不符合要求的lib正在重新下载");
84 | File.Delete(BkebiPath);
85 | Downloader();
86 | }
87 | else
88 | {
89 | Console.WriteLine("这是一个合格的lib请放心使用");
90 | Environment.Exit(0);
91 | }
92 | }
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/CLDownloader/XFP.CLDownloader.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net6.0
6 | enable
7 | enable
8 | GashByte-透明.ico
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/Image/GashByte+口号.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GashByte/ICora/75aab93fba19cf4e6771ae7d38f7073100f7cc0e/XFP.Impact_Ultimate/Image/GashByte+口号.png
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/Image/GashByte-透明.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GashByte/ICora/75aab93fba19cf4e6771ae7d38f7073100f7cc0e/XFP.Impact_Ultimate/Image/GashByte-透明.ico
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/Image/GashByte.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GashByte/ICora/75aab93fba19cf4e6771ae7d38f7073100f7cc0e/XFP.Impact_Ultimate/Image/GashByte.png
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/Updater/Updater.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.4.33205.214
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Updater", "Updater\Updater.csproj", "{E85BC1E8-8AF2-4877-B60D-46B620B4D9B6}"
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 | {E85BC1E8-8AF2-4877-B60D-46B620B4D9B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {E85BC1E8-8AF2-4877-B60D-46B620B4D9B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {E85BC1E8-8AF2-4877-B60D-46B620B4D9B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {E85BC1E8-8AF2-4877-B60D-46B620B4D9B6}.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 = {FCE38CBE-EA3E-4D12-8A11-B8F961192CCE}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/Updater/Updater/GashByte-透明.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GashByte/ICora/75aab93fba19cf4e6771ae7d38f7073100f7cc0e/XFP.Impact_Ultimate/Updater/Updater/GashByte-透明.ico
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/Updater/Updater/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 | using System.IO.Compression;
4 | using System.Net;
5 | using System.Web;
6 | using System.IO.Compression;
7 | using XFP.Impact_Ultimate.Updater.Utils;
8 |
9 | namespace XFP.Impact_Ultimate.Updater
10 | {
11 | public class Updater
12 | {
13 | public static string path = Environment.CurrentDirectory + "\\Release.zip";
14 | public static long FileSize;
15 | public static string DownloadPath = "https://gitee.com/MasterGashByte/updates/releases/download/Release/Release.zip";
16 | public static int DownloadCount = 0;
17 |
18 | public static void Main()
19 | {
20 | Console.WriteLine("正在更新 请不要关闭");
21 | Console.WriteLine("正在检查库是否存在");
22 | if (UrlIsExist(DownloadPath))
23 | {
24 | Console.ForegroundColor = ConsoleColor.Green;
25 | Console.WriteLine("检测到库 正在调用下载线程");
26 | Console.ForegroundColor = ConsoleColor.Black;
27 | Console.BackgroundColor = ConsoleColor.Green;
28 | Downloader(DownloadPath);
29 | }
30 | else
31 | {
32 | Console.BackgroundColor = ConsoleColor.Red;
33 | Console.WriteLine("库不存在 请前往群中下载");
34 | Console.ReadKey();
35 | Environment.Exit(0);
36 | }
37 | }
38 |
39 | private static void Downloader(string url)
40 | {
41 | DownloadCount += 1;
42 | if (DownloadCount > 5)
43 | {
44 | Console.BackgroundColor = ConsoleColor.Red;
45 | Console.WriteLine("多次下载失败 请前往群中下载");
46 | Console.ReadKey();
47 | Environment.Exit(0);
48 | }
49 | else
50 | {
51 | Console.BackgroundColor = ConsoleColor.Green;
52 | Console.WriteLine("-----------------Downloader------------------");
53 | Console.WriteLine("下载器载入中");
54 | // HttpDownloader by LoserSkidder
55 | Console.WriteLine("请求下载中...");
56 | // 设置参数
57 | HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
58 | //发送请求并获取相应回应数据
59 | HttpWebResponse response = request.GetResponse() as HttpWebResponse;
60 | Stopwatch sp = new Stopwatch();
61 | //直到request.GetResponse()程序才开始向目标网页发送Post请求
62 | Stream responseStream = response.GetResponseStream();
63 | FileSize = response.ContentLength;
64 | sp.Start();
65 | //创建本地文件写入流
66 | Stream stream = new FileStream(path, FileMode.Create);
67 | byte[] bArr = new byte[1024];
68 | int size = responseStream.Read(bArr, 0, (int)bArr.Length);
69 | while (size > 0)
70 | {
71 | stream.Write(bArr, 0, size);
72 | size = responseStream.Read(bArr, 0, (int)bArr.Length);
73 | }
74 | stream.Close();
75 | responseStream.Close();
76 | sp.Stop();
77 |
78 | Console.WriteLine("下载成功 下载时间:" + sp.ElapsedMilliseconds / 1000.0000 + "秒");
79 | Console.WriteLine("校验数据完整性中...");
80 |
81 | SizeChecker();
82 | }
83 | }
84 |
85 | ///
86 | /// 文件大小的校验 by LoserSkidder
87 | ///
88 | private static void SizeChecker()
89 | {
90 | Console.WriteLine("-----------------SizeChecker-----------------");
91 | HttpWebRequest request = (HttpWebRequest)WebRequest.Create(DownloadPath);
92 | HttpWebResponse response = (HttpWebResponse)request.GetResponse();
93 | FileSize = response.ContentLength;
94 | FileInfo fileInfo = new FileInfo(path);
95 | Console.WriteLine("下载的数据大小: " + fileInfo.Length + " Kb");
96 | Console.WriteLine("服务器请求的大小: " + FileSize + " Kb");
97 | if (fileInfo.Length == FileSize)
98 | {
99 | Console.WriteLine("看起来下载的数据很完整");
100 | Console.WriteLine("载入解压线程...");
101 | UnZip();
102 | }
103 | else
104 | {
105 | Console.BackgroundColor = ConsoleColor.Red;
106 | Console.WriteLine("喔 数据好像不太完整 正在重新下载呢");
107 | File.Delete(path);
108 | Downloader(DownloadPath);
109 | }
110 | }
111 |
112 | ///
113 | /// 文件解压 by x3zF
114 | ///
115 | private static void UnZip()
116 | {
117 | Console.WriteLine("--------------------UnZip--------------------");
118 | Console.WriteLine("正在解压文件");
119 | try
120 | {
121 | ZipHelper.UnZip(Environment.CurrentDirectory + "\\Release.zip", Environment.CurrentDirectory + "\\");
122 |
123 | Console.WriteLine("解压成功! 祝您游玩愉快");
124 | File.Delete(path);
125 | Environment.Exit(0);
126 | }
127 | catch(Exception ex)
128 | {
129 | Console.BackgroundColor = ConsoleColor.Red;
130 | Console.WriteLine("出现异常:");
131 | Console.WriteLine(ex.Message);
132 | Console.ReadKey();
133 | Environment.Exit(0);
134 | }
135 | }
136 |
137 | private static bool UrlIsExist(string url)
138 | {
139 | System.Uri u;
140 | try
141 | {
142 | u = new Uri(url);
143 | }
144 | catch { return false; }
145 | bool isExist = false;
146 | System.Net.HttpWebRequest? r = System.Net.WebRequest.Create(u) as System.Net.HttpWebRequest;
147 | r.Method = "HEAD";
148 | try
149 | {
150 | System.Net.HttpWebResponse? s = r.GetResponse() as System.Net.HttpWebResponse;
151 | if (s.StatusCode == System.Net.HttpStatusCode.OK)
152 | {
153 | isExist = true;
154 | }
155 | }
156 | catch (System.Net.WebException x)
157 | {
158 | try
159 | {
160 | isExist = (x.Response as System.Net.HttpWebResponse).StatusCode != System.Net.HttpStatusCode.NotFound;
161 | }
162 | catch { isExist = x.Status == System.Net.WebExceptionStatus.Success; }
163 | }
164 | return isExist;
165 | }
166 | }
167 | }
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/Updater/Updater/Utils/ZipHelper.cs:
--------------------------------------------------------------------------------
1 | using ICSharpCode.SharpZipLib.Checksums;
2 | using ICSharpCode.SharpZipLib.Zip;
3 | using System;
4 | using System.Collections;
5 | using System.Collections.Generic;
6 | using System.Diagnostics;
7 | using System.IO;
8 | using System.Linq;
9 | using System.Text;
10 |
11 | namespace XFP.Impact_Ultimate.Updater.Utils
12 | {
13 | public class ZipHelper
14 | {
15 | ///
16 | /// 功能:解压zip格式的文件。
17 | ///
18 | /// 压缩文件路径
19 | /// 解压文件存放路径,为空时默认与压缩文件同一级目录下,跟压缩文件同名的文件夹
20 | /// 解压是否成功
21 | public static bool UnZip(string zipFilePath, string unZipDir)
22 | {
23 | try
24 | {
25 | if (zipFilePath == string.Empty)
26 | {
27 | throw new Exception("压缩文件不能为空!");
28 | }
29 | if (!File.Exists(zipFilePath))
30 | {
31 | throw new FileNotFoundException("压缩文件不存在!");
32 | }
33 | //解压文件夹为空时默认与压缩文件同一级目录下,跟压缩文件同名的文件夹
34 | if (unZipDir == string.Empty)
35 | unZipDir = zipFilePath.Replace(Path.GetFileName(zipFilePath), Path.GetFileNameWithoutExtension(zipFilePath));
36 | if (!unZipDir.EndsWith("/"))
37 | unZipDir += "/";
38 | if (!Directory.Exists(unZipDir))
39 | Directory.CreateDirectory(unZipDir);
40 | using (var s = new ZipInputStream(File.OpenRead(zipFilePath)))
41 | {
42 |
43 | ZipEntry theEntry;
44 | while ((theEntry = s.GetNextEntry()) != null)
45 | {
46 | string directoryName = Path.GetDirectoryName(theEntry.Name);
47 | string fileName = Path.GetFileName(theEntry.Name);
48 | if (!string.IsNullOrEmpty(directoryName))
49 | {
50 | Directory.CreateDirectory(unZipDir + directoryName);
51 | }
52 | if (directoryName != null && !directoryName.EndsWith("/"))
53 | {
54 | }
55 | if (fileName != String.Empty)
56 | {
57 | using (FileStream streamWriter = File.Create(unZipDir + theEntry.Name))
58 | {
59 |
60 | int size;
61 | byte[] data = new byte[2048];
62 | while (true)
63 | {
64 | size = s.Read(data, 0, data.Length);
65 | if (size > 0)
66 | {
67 | streamWriter.Write(data, 0, size);
68 | }
69 | else
70 | {
71 | break;
72 | }
73 | }
74 | }
75 | }
76 | }
77 | }
78 | return true;
79 | }
80 | catch (Exception)
81 | {
82 |
83 | return false;
84 | }
85 |
86 | }
87 |
88 | ///
89 | /// 压缩所有的文件
90 | ///
91 | ///
92 | ///
93 | public static void CreateZipFile(string filesPath, string zipFilePath)
94 | {
95 | if (!Directory.Exists(filesPath))
96 | {
97 | return;
98 | }
99 | ZipOutputStream stream = new ZipOutputStream(File.Create(zipFilePath));
100 | stream.SetLevel(0); // 压缩级别 0-9
101 | byte[] buffer = new byte[4096]; //缓冲区大小
102 | string[] filenames = Directory.GetFiles(filesPath, "*.*", SearchOption.AllDirectories);
103 | foreach (string file in filenames)
104 | {
105 | ZipEntry entry = new ZipEntry(file.Replace(filesPath, ""));
106 | entry.DateTime = DateTime.Now;
107 | stream.PutNextEntry(entry);
108 | using (FileStream fs = File.OpenRead(file))
109 | {
110 | int sourceBytes;
111 | do
112 | {
113 | sourceBytes = fs.Read(buffer, 0, buffer.Length);
114 | stream.Write(buffer, 0, sourceBytes);
115 | } while (sourceBytes > 0);
116 | }
117 | }
118 | stream.Finish();
119 | stream.Close();
120 | }
121 | }
122 | }
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/Updater/Updater/XFP.Updater.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net7.0
6 | enable
7 | enable
8 | GashByte-透明.ico
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | E:\备份\XFP.Impact_Ultimate\PluginDownloader\bin\Release\net7.0\ICSharpCode.SharpZipLib.dll
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | 0
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/App.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
12 |
13 |
14 | SDK_SC_Web 85W, ms-appx:///Assets/Fonts/HarmonyOS_Sans_SC_Regular.ttf#HarmonyOS Sans SC
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/App.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace XFP.ICora
2 | {
3 | ///
4 | /// App.xaml 的交互逻辑
5 | ///
6 | public partial class App : Application
7 | {
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Controls/AboutUs.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
17 |
18 |
19 |
24 |
29 |
34 |
40 |
45 |
48 | · 访问我们的官网(推荐!)
49 |
50 |
51 |
56 |
61 |
69 |
77 |
84 |
92 |
100 |
108 |
114 |
122 |
130 |
138 |
146 |
153 |
161 |
169 |
177 |
182 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Controls/AboutUs.xaml.cs:
--------------------------------------------------------------------------------
1 | //Copyright(c) XFP Group and Contributors. All rights reserved.
2 | //Licensed under the MIT License.
3 |
4 | namespace XFP.ICora.Controls
5 | {
6 | ///
7 | /// AboutUs.xaml 的交互逻辑
8 | ///
9 | public partial class AboutUs : UserControl
10 | {
11 | public AboutUs()
12 | {
13 | InitializeComponent();
14 | }
15 |
16 | private void GetICora_Click(object sender, RoutedEventArgs e)
17 | {
18 | Process.Start("explorer.exe", "https://gitee.com/XFP-Group/Impact_Ultimate/");
19 | }
20 |
21 | private void GetICora_Github_Click(object sender, RoutedEventArgs e)
22 | {
23 | Process.Start("explorer.exe", "https://github.com/GashByte/ICora");
24 | }
25 |
26 | private void ContentUs_Click(object sender, RoutedEventArgs e)
27 | {
28 | Growl.Info("加入群聊获取资讯!群聊QQ号已经被复制到粘贴板上咯");
29 | Clipboard.SetDataObject("811979687");
30 | }
31 |
32 | private void PrivacyPolicy_Click(object sender, RoutedEventArgs e)
33 | {
34 | Process.Start("explorer.exe", "https://gitee.com/MasterGashByte/impact_ultimate_issues/blob/master/PrivacyPolicy.md");
35 | }
36 |
37 | private void UserUseAgreement_Click(object sender, RoutedEventArgs e)
38 | {
39 | Process.Start("explorer.exe", "https://gitee.com/MasterGashByte/impact_ultimate_issues/blob/master/UserUseAgreement.md");
40 | }
41 |
42 | private void FeedBackQ_Click(object sender, RoutedEventArgs e)
43 | {
44 | Process.Start("explorer.exe", "https://gitee.com/MasterGashByte/impact_ultimate_issues/issues");
45 | }
46 |
47 | private void ICoraIndex_Click(object sender, RoutedEventArgs e)
48 | {
49 | Process.Start("explorer.exe", "https://gashbyte.github.io/ICoraIndex/");
50 | }
51 |
52 | private void afadian_Click(object sender, RoutedEventArgs e)
53 | {
54 | Growl.Clear();
55 | Growl.Success("唔噜!UwU!");
56 | Process.Start("explorer.exe", "https://afdian.net/a/XFP-Group");
57 | }
58 |
59 | private void GithubLink_Click(object sender, RoutedEventArgs e)
60 | {
61 | Process.Start("explorer.exe", "https://github.com/GashByte/ICora");
62 | }
63 |
64 | private void VisitWebsite_Click(object sender, RoutedEventArgs e)
65 | {
66 | Process.Start("explorer.exe", "https://gashbyte.github.io/ICoraIndex/");
67 | }
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Controls/Basic/LoginFormMihoyo.xaml:
--------------------------------------------------------------------------------
1 |
5 |
17 |
18 |
19 |
20 |
23 |
32 |
35 |
38 |
41 |
42 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Controls/Basic/LoginFormMihoyo.xaml.cs:
--------------------------------------------------------------------------------
1 | //Copyright (c) XFP Group and Contributors. All rights resvered.
2 | //Licensed under the MIT License.
3 |
4 | using System.Threading.Tasks;
5 |
6 | namespace XFP.ICora.Controls.Basic
7 | {
8 | ///
9 | /// LoginFormMihoyo.xaml 的交互逻辑
10 | ///
11 |
12 | public partial class LoginFormMihoyo : UserControl
13 | {
14 | DataProvider data = new();
15 |
16 | public LoginFormMihoyo()
17 | {
18 | InitializeComponent();
19 | Loaded += LoginFormMihoyo_Loaded;
20 |
21 | Growl.Clear();
22 | Growl.Info("由于存储方式的问题 目前只支持单次存储 所以目前只能保存一个米哈游账户 我们会想办法解决这个问题的!");
23 |
24 | if (!Directory.Exists(data.HoyolabAccountData))
25 | {
26 | Directory.CreateDirectory(data.HoyolabAccountData);
27 | }
28 | }
29 |
30 | private async void LoginFormMihoyo_Loaded(object sender, RoutedEventArgs e)
31 | {
32 | try
33 | {
34 | await _WebView2.EnsureCoreWebView2Async();
35 | var manager = _WebView2.CoreWebView2.CookieManager;
36 | var cookies = await manager.GetCookiesAsync("https://user.mihoyo.com/#/login/captcha");
37 | foreach (var item in cookies)
38 | {
39 | manager.DeleteCookie(item);
40 | }
41 | _WebView2.CoreWebView2.Navigate("https://user.mihoyo.com/#/login/captcha");
42 | }
43 | catch (Exception ex)
44 | {
45 | Growl.Error($"初始化页面失败:{ex.Message}");
46 | }
47 | }
48 |
49 | private async void Logined_Click(object sender, RoutedEventArgs e)
50 | {
51 | await FinishAndAddCookie().ConfigureAwait(false);
52 | }
53 |
54 | public async Task FinishAndAddCookie(string str = null, bool FormHoyolabAccount = false)
55 | {
56 | try
57 | {
58 | if (!FormHoyolabAccount)
59 | {
60 | var manager = _WebView2?.CoreWebView2.CookieManager;
61 | var cookies = await manager.GetCookiesAsync("https://user.mihoyo.com/#/account/home");
62 | str = string.Join(";", cookies.Select(x => $"{x.Name}={x.Value}"));
63 | Growl.Success("正在验证Cookie");
64 |
65 | if (str == string.Empty)
66 | {
67 | Growl.Clear();
68 | Growl.Error("你的cookie为空 请重新验证");
69 | return;
70 | }
71 | }
72 |
73 | _WebView2.Source = new Uri("https://gashbyte.github.io/ICoraIndex");
74 |
75 | var user = await new HoyolabClient().GetHoyolabUserInfoAsync(str);
76 | var roles = await new HoyolabClient().GetGenshinRoleInfoListAsync(str);
77 |
78 | HoyolabUserInfo hoyolabUserInfo = user;
79 | GenshinRoleInfo genshinRoleInfo = roles.FirstOrDefault();
80 |
81 | string userMaskId = user.Uid.ToString().Substring(0, 3)
82 | + "***" + user.Uid.ToString().Substring(user.Uid.ToString().Length - 3);
83 | string RoleMaskId = genshinRoleInfo.Uid.ToString().Substring(0, 3)
84 | + "***" + genshinRoleInfo.Uid.ToString().Substring(genshinRoleInfo.Uid.ToString().Length - 3);
85 |
86 | Growl.Clear();
87 | Growl.Success($"载入成功!\n米游社通行证ID: {userMaskId}\n玩家Uid: {RoleMaskId}");
88 |
89 | Properties.Settings.Default.UserCookie
90 | = genshinRoleInfo.Cookie;
91 | Properties.Settings.Default.LastUid
92 | = user.Uid;
93 | Properties.Settings.Default.Save();
94 | Properties.Settings.Default.Upgrade();
95 |
96 | if (FormHoyolabAccount)
97 | {
98 | new HoyolabAccount().InitializeUserInfo();
99 | }
100 | }
101 | catch (Exception ex)
102 | {
103 | if (ex.Message == "Object reference not set to an instance of an object.")
104 | {
105 | Growl.Error("无法验证此Cookie 请重新登录");
106 | /*
107 | Properties.Settings.Default.UserCookie
108 | = string.Empty;
109 | Properties.Settings.Default.LastUid
110 | = 0;
111 | Properties.Settings.Default.Save();
112 | Properties.Settings.Default.Upgrade();
113 | */
114 | _WebView2.Source = new Uri("https://user.mihoyo.com/#/login/captcha");
115 | return;
116 | }
117 | Growl.Error(ex.Message);
118 |
119 | _WebView2.Source = new Uri("https://user.mihoyo.com/#/login/captcha");
120 | }
121 | }
122 | }
123 | }
124 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Controls/Basic/Settings.xaml.cs:
--------------------------------------------------------------------------------
1 | //Copyright(c) XFP Group and Contributors. All rights reserved.
2 | //Licensed under the MIT License.
3 |
4 | using System.Management;
5 |
6 | namespace XFP.ICora.Controls.Basic
7 | {
8 | ///
9 | /// Settings.xaml 的交互逻辑
10 | ///
11 | public partial class Settings : UserControl
12 | {
13 | public Settings()
14 | {
15 | InitializeComponent();
16 | FileInfo fi = new FileInfo(Environment.CurrentDirectory + "\\XFP.ICora.exe");
17 | try
18 | {
19 | UserICoraID.Text = "ICoraID" + getMNum() + " 设备ID在用户绑定数据库数据时起到重要关键";
20 | ICoraVersion.Text = new DataProvider().ModeVersion + " V " + new DataProvider().Version;
21 | LastUpdate.Text = fi.LastWriteTime.ToString();
22 | }
23 | catch { }
24 | }
25 |
26 | private void FeedBackUs_Click(object sender, RoutedEventArgs e)
27 | => Process.Start("explorer.exe", "https://gitee.com/MasterGashByte/impact_ultimate_issues/issues");
28 |
29 | private void ReadUUA_Click(object sender, RoutedEventArgs e)
30 | => Process.Start("explorer.exe", "https://gitee.com/MasterGashByte/impact_ultimate_issues/blob/master/UserUseAgreement.md");
31 |
32 | private void ReadPP_Click(object sender, RoutedEventArgs e)
33 | => Process.Start("explorer.exe", "https://gitee.com/MasterGashByte/impact_ultimate_issues/blob/master/PrivacyPolicy.md");
34 |
35 | private void CheckVersion_Click(object sender, RoutedEventArgs e)
36 | {
37 | var LocalVersion = new GetFormUrl().Get("https://gitee.com/MasterGashByte/updates/raw/master/Checker/Version");
38 | if (LocalVersion != new DataProvider().Version)
39 | {
40 | Growl.Clear();
41 | Growl.Warning($"当前版本:{new DataProvider().Version}\n发行版本:{LocalVersion}\n请前往官网或QQ群聊获取最新版\n您也可以手动打开Updater.exe来自动下载最新版");
42 | }
43 | else
44 | {
45 | Growl.Clear();
46 | Growl.Success($"当前版本:{new DataProvider().Version}\n发行版本:{LocalVersion}\n已经是最新版本啦!");
47 | }
48 | }
49 |
50 | private void CheckICoraID_Click(object sender, RoutedEventArgs e)
51 | {
52 | MessageBox.Show($"您的设备ID{getMNum()}");
53 | }
54 |
55 | ///
56 | /// 取得设备硬盘的卷标号
57 | ///
58 | ///
59 | public string GetDiskVolumeSerialNumber()
60 | {
61 | ManagementObject disk = new ManagementObject("win32_logicaldisk.deviceid=\"c:\"");
62 | disk.Get();
63 | return disk.GetPropertyValue("VolumeSerialNumber").ToString();
64 | }
65 |
66 | ///
67 | /// 获得CPU的序列号
68 | ///
69 | ///
70 | public string getCpu()
71 | {
72 | string strCpu = null;
73 | ManagementClass myCpu = new("win32_Processor");
74 | ManagementObjectCollection myCpuConnection = myCpu.GetInstances();
75 | foreach (ManagementObject myObject in myCpuConnection)
76 | {
77 | strCpu = myObject.Properties["Processorid"].Value.ToString();
78 | break;
79 | }
80 | return strCpu;
81 | }
82 |
83 | ///
84 | /// 生成机器码
85 | ///
86 | ///
87 | public string getMNum()
88 | {
89 | string strNum = getCpu() + GetDiskVolumeSerialNumber();
90 | string strMNum = strNum.Substring(0, 24);
91 | return strMNum;
92 | }
93 |
94 | private void JoinDevPlan_Click(object sender, RoutedEventArgs e)
95 | => Growl.Info("更多咨询请联系作者或访问主页加入QQ群聊\nHomePage : https://gashbyte.github.io/ICoraIndex");
96 |
97 | private void CopyICoraID_Click(object sender, RoutedEventArgs e)
98 | {
99 | Clipboard.SetDataObject(getMNum());
100 | Growl.Clear();
101 | Growl.Success("复制成功");
102 | }
103 | }
104 | }
105 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Controls/CustomNote.xaml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
15 |
18 |
21 |
24 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Controls/CustomNote.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 | using System.Windows.Data;
9 | using System.Windows.Documents;
10 | using System.Windows.Input;
11 | using System.Windows.Media;
12 | using System.Windows.Media.Imaging;
13 | using System.Windows.Navigation;
14 | using System.Windows.Shapes;
15 |
16 | namespace XFP.ICora.Controls
17 | {
18 | ///
19 | /// CustomNote.xaml 的交互逻辑
20 | ///
21 | public partial class CustomNote : UserControl
22 | {
23 | public CustomNote()
24 | {
25 | InitializeComponent();
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Controls/Game/Utils/CommandLineBuilder.cs:
--------------------------------------------------------------------------------
1 | //Copyright(c) XFP Group and Contributors. All rights reserved.
2 | //Licensed under the MIT License.
3 |
4 | using System.Text;
5 |
6 | namespace XFP.ICora.Controls.Game.Utils
7 | {
8 | ///
9 | /// Toke from Snap.Data.Utility
10 | ///
11 | public class CommandLineBuilder
12 | {
13 | private const char WhiteSpace = ' ';
14 | private readonly Dictionary options = new();
15 |
16 | public CommandLineBuilder AppendIf(string name, bool condition, object? value = null)
17 | {
18 | return condition ? Append(name, value) : this;
19 | }
20 |
21 | public CommandLineBuilder Append(string name, object? value = null)
22 | {
23 | options.Add(name, value?.ToString());
24 | return this;
25 | }
26 |
27 | public string Build()
28 | {
29 | return ToString();
30 | }
31 |
32 | public override string ToString()
33 | {
34 | StringBuilder s = new();
35 | foreach ((string key, string? value) in options)
36 | {
37 | s.Append(WhiteSpace);
38 | s.Append(key);
39 | if (!string.IsNullOrEmpty(value))
40 | {
41 | s.Append(WhiteSpace);
42 | s.Append(value);
43 | }
44 | }
45 | return s.ToString();
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Controls/NonClientAreaContent.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
35 |
42 |
45 |
46 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Controls/NonClientAreaContent.xaml.cs:
--------------------------------------------------------------------------------
1 | //Copyright(c) XFP Group and Contributors. All rights reserved.
2 | //Licensed under the MIT License.
3 |
4 | namespace XFP.ICora.Controls
5 | {
6 | ///
7 | /// NonClientAreaContent.xaml 的交互逻辑
8 | ///
9 | public partial class NonClientAreaContent
10 | {
11 | public NonClientAreaContent()
12 | {
13 | InitializeComponent();
14 | Icon.Source = new BitmapImage(new Uri("https://img.icons8.com/nolan/512/genshin-impact-logo.png"));
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Controls/WishExport.xaml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
15 |
18 |
21 |
24 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Controls/WishExport.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace XFP.ICora.Controls
2 | {
3 | ///
4 | /// WishExport.xaml 的交互逻辑
5 | ///
6 | public partial class WishExport : UserControl
7 | {
8 | public WishExport()
9 | {
10 | InitializeComponent();
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/GashByte-透明.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GashByte/ICora/75aab93fba19cf4e6771ae7d38f7073100f7cc0e/XFP.Impact_Ultimate/XFP.Cora/GashByte-透明.ico
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/GlobalUsing.cs:
--------------------------------------------------------------------------------
1 | // ---------------- global using ---------------- //
2 | global using HandyControl.Controls;
3 | global using Microsoft.Win32;
4 | global using System;
5 | global using System.Collections.Generic;
6 | global using System.Collections.ObjectModel;
7 | global using System.Diagnostics;
8 | global using System.IO;
9 | global using System.Linq;
10 | global using System.Net;
11 | global using System.Security.AccessControl;
12 | global using System.Text.Json;
13 | global using System.Text.Json.Serialization;
14 | global using System.Threading;
15 | global using System.Threading.Tasks;
16 | global using System.Windows;
17 | global using System.Windows.Controls;
18 | global using System.Windows.Input;
19 | global using System.Windows.Media.Animation;
20 | global using System.Windows.Media.Imaging;
21 | global using UI;
22 | global using XFP.ICora.Controls;
23 | global using XFP.ICora.Controls.Basic;
24 | global using XFP.ICora.Hoyolab;
25 | global using XFP.ICora.Hoyolab.Account;
26 | global using XFP.ICora.Hoyolab.Core;
27 | global using XFP.ICora.Model;
28 | global using XFP.ICora.Utils;
29 | global using XFP.ICora.Utils.Base;
30 | global using XFP.ICora.Utils.Log;
31 | global using XFP.ICora.Utils.Model;
32 | global using System.Runtime.InteropServices;
33 | global using System.Text;
34 | global using System.Text.RegularExpressions;
35 | global using XFP.ICora.Controls.Game.Utils;
36 | global using XFP.ICora.Utils.Model.Files;
37 | global using System.Security.Principal;
38 | // ---------------- global using as ---------------- //
39 | global using MessageBox = System.Windows.MessageBox;
40 | global using Window = System.Windows.Window;
41 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/Account/GenshinRoleInfo.cs:
--------------------------------------------------------------------------------
1 | //Copyright (c) XFP Group and Contributors. All rights resvered.
2 | //Licensed under the MIT License.
3 |
4 | namespace XFP.ICora.Hoyolab.Account
5 | {
6 | public class GenshinRoleInfo
7 | {
8 | [JsonPropertyName("game_biz")]
9 | public string GameBiz { get; set; }
10 |
11 |
12 | [JsonPropertyName("region"), JsonConverter(typeof(JsonStringEnumConverter))]
13 | public Core.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 | }
44 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/Account/GenshinRoleInfoWrapper.cs:
--------------------------------------------------------------------------------
1 | //Copyright (c) XFP Group and Contributors. All rights resvered.
2 | //Licensed under the MIT License.
3 |
4 | namespace XFP.ICora.Hoyolab.Account
5 | {
6 | public class GenshinRoleInfoWrapper
7 | {
8 | [JsonPropertyName("list")]
9 | public List? List { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/Account/HoyolabUserInfo.cs:
--------------------------------------------------------------------------------
1 | //Copyright (c) XFP Group and Contributors. All rights resvered.
2 | //Licensed under the MIT License.
3 |
4 | namespace XFP.ICora.Hoyolab.Account
5 | {
6 | public class HoyolabUserInfo
7 | {
8 | ///
9 | /// 通行证 ID
10 | ///
11 | [JsonPropertyName("uid"), JsonNumberHandling(JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)]
12 | public int Uid { get; set; }
13 |
14 | ///
15 | /// 昵称
16 | ///
17 | [JsonPropertyName("nickname")]
18 | public string? Nickname { get; set; }
19 |
20 | ///
21 | /// 介绍
22 | ///
23 | [JsonPropertyName("introduce")]
24 | public string? Introduce { get; set; }
25 |
26 | ///
27 | /// 头像 ID
28 | ///
29 | [JsonPropertyName("avatar")]
30 | public string? Avatar { get; set; }
31 |
32 | ///
33 | /// 性别 0/1/2
34 | ///
35 | [JsonPropertyName("gender")]
36 | public int Gender { get; set; }
37 |
38 | ///
39 | /// 头像
40 | ///
41 | [JsonPropertyName("avatar_url")]
42 | public string? AvatarUrl { get; set; }
43 |
44 | ///
45 | /// 头像框
46 | ///
47 | [JsonPropertyName("pendant")]
48 | public string? Pendant { get; set; }
49 |
50 | ///
51 | /// 与此账号相关联的 Cookie
52 | ///
53 | [JsonIgnore]
54 | public string? Cookie { get; set; }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/Account/HoyolabUserInfoWrapper.cs:
--------------------------------------------------------------------------------
1 | //Copyright (c) XFP Group and Contributors. All rights resvered.
2 | //Licensed under the MIT License.
3 |
4 | namespace XFP.ICora.Hoyolab.Account
5 | {
6 | public class HoyolabUserInfoWrapper
7 | {
8 | [JsonPropertyName("user_info")]
9 | public HoyolabUserInfo HoyolabUserInfo { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/Account/IWrapper.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 |
3 | namespace XFP.ICora.Hoyolab.Account
4 | {
5 | public class IWrapper
6 | {
7 | ///
8 | /// 用户Uid
9 | ///
10 | [JsonProperty("Uid")]
11 | public string Uid { get; set; }
12 |
13 | ///
14 | /// 用户名称
15 | ///
16 | [JsonProperty("Name")]
17 | public string NickName { get; set; }
18 |
19 | ///
20 | /// 用户等级
21 | ///
22 | [JsonProperty("Level")]
23 | public string Level { get; set; }
24 |
25 | ///
26 | /// 用户Cookie
27 | ///
28 | [JsonProperty("Cookie")]
29 | public string Cookie { get; set; }
30 |
31 | ///
32 | /// GameBiz
33 | ///
34 | [JsonProperty("GameBiz")]
35 | public string GameBiz { get; set; }
36 |
37 | ///
38 | /// IsChosen
39 | ///
40 | [JsonProperty("IsChosen")]
41 | public string IsChosen { get; set; }
42 |
43 | ///
44 | /// IsOfficial
45 | ///
46 | [JsonProperty("IsOfficial")]
47 | public string IsOfficial { get; set; }
48 |
49 | ///
50 | /// 服务器名称
51 | ///
52 | [JsonProperty("RegionName")]
53 | public string RegionName { get; set; }
54 |
55 | ///
56 | /// 服务器
57 | ///
58 | [JsonProperty("Region")]
59 | public string Region { get; set; }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/Account/SignInInfo.cs:
--------------------------------------------------------------------------------
1 | namespace XFP.ICora.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 | }
40 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/Account/SignInRisk.cs:
--------------------------------------------------------------------------------
1 | namespace XFP.ICora.Hoyolab.Account
2 | {
3 | public class SignInRisk
4 | {
5 | [JsonPropertyName("code")]
6 | public string Code { get; set; }
7 |
8 | [JsonPropertyName("risk_code")]
9 | public int RiskCode { get; set; }
10 |
11 | [JsonPropertyName("gt")]
12 | public string GT { get; set; }
13 |
14 | [JsonPropertyName("challenge")]
15 | public string Challenge { get; set; }
16 |
17 | [JsonPropertyName("success")]
18 | public int Success { get; set; }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/Account/SignTodayJsonConverter.cs:
--------------------------------------------------------------------------------
1 | namespace XFP.ICora.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 | }
24 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/Avatar/AvatarInfo.cs:
--------------------------------------------------------------------------------
1 | namespace XFP.ICora.Hoyolab.Avatar
2 | {
3 | public class AvatarInfo
4 | {
5 | [JsonPropertyName("id")]
6 | public int Id { get; set; }
7 |
8 | ///
9 | /// 名称
10 | ///
11 | [JsonPropertyName("name")]
12 | public string Name { get; set; }
13 |
14 | ///
15 | /// 元素类型
16 | ///
17 | [JsonPropertyName("element"), JsonConverter(typeof(JsonStringEnumConverter))]
18 | public Core.ElementType Element { get; set; }
19 |
20 | ///
21 | /// 半身肖像
22 | ///
23 | ///
24 | [JsonPropertyName("image")]
25 | public string Image { get; set; }
26 |
27 | ///
28 | /// 半身肖像(带有卡片边框)
29 | ///
30 | ///
31 | [JsonPropertyName("card_image")]
32 | public string CardImage { get; set; }
33 |
34 | ///
35 | /// 好感度
36 | ///
37 | [JsonPropertyName("fetter")]
38 | public int Fetter { get; set; }
39 |
40 | ///
41 | /// 等级
42 | ///
43 | [JsonPropertyName("level")]
44 | public int Level { get; set; }
45 |
46 | ///
47 | /// 稀有度
48 | ///
49 | [JsonPropertyName("rarity")]
50 | public int Rarity { get; set; }
51 |
52 | ///
53 | /// 已激活名座数
54 | ///
55 | [JsonPropertyName("actived_constellation_num")]
56 | public int ActivedConstellationNumber { get; set; }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/Core/ElementType.cs:
--------------------------------------------------------------------------------
1 | namespace XFP.ICora.Hoyolab.Core
2 | {
3 | public enum ElementType
4 | {
5 | ///
6 | /// 未知
7 | ///
8 | None = 0,
9 |
10 | ///
11 | /// 物理
12 | ///
13 | Physics = 1,
14 |
15 | ///
16 | /// 火
17 | ///
18 | Pyro = 2,
19 | Fire = 2,
20 |
21 | ///
22 | /// 水
23 | ///
24 | Hydro = 4,
25 | Water = 4,
26 |
27 | ///
28 | /// 风
29 | ///
30 | Anemo = 8,
31 | Wind = 8,
32 |
33 | ///
34 | /// 雷
35 | ///
36 | Electro = 16,
37 |
38 | ///
39 | /// 草
40 | ///
41 | Dendro = 32,
42 | Grass = 32,
43 |
44 | ///
45 | /// 冰
46 | ///
47 | Cryo = 64,
48 | Ice = 64,
49 |
50 | ///
51 | /// 岩
52 | ///
53 | Geo = 128,
54 | Rock = 128,
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/Core/RegionType.cs:
--------------------------------------------------------------------------------
1 | namespace XFP.ICora.Hoyolab.Core
2 | {
3 | public enum RegionType
4 | {
5 | None = 0,
6 |
7 | cn_gf01 = 1,
8 |
9 | cn_qd01 = 5,
10 |
11 | os_usa = 6,
12 |
13 | os_euro = 7,
14 |
15 | os_asia = 8,
16 |
17 | os_cht = 9,
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/DailyNote/DailyNoteInfo.cs:
--------------------------------------------------------------------------------
1 | namespace XFP.ICora.Hoyolab.DailyNote
2 | {
3 | public class DailyNoteInfo
4 | {
5 | [JsonIgnore]
6 | public int Id { get; set; }
7 |
8 | [JsonIgnore]
9 | public int Uid { get; set; }
10 |
11 | [JsonIgnore]
12 | public string Nickname { get; set; }
13 |
14 | ///
15 | /// 获取实时便笺时的时间
16 | ///
17 | [JsonIgnore]
18 | public DateTimeOffset NowTime { get; init; } = DateTimeOffset.Now;
19 |
20 | ///
21 | /// 当前树脂
22 | ///
23 | [JsonPropertyName("current_resin")]
24 | public int CurrentResin { get; set; }
25 |
26 | ///
27 | /// 最大树脂
28 | ///
29 | [JsonPropertyName("max_resin")]
30 | public int MaxResin { get; set; }
31 |
32 | ///
33 | /// 树脂剩余恢复时间
34 | ///
35 | [JsonPropertyName("resin_recovery_time"), JsonConverter(typeof(RecoveryTimeJsonConverter))]
36 | public TimeSpan ResinRecoveryTime { get; set; }
37 |
38 | ///
39 | /// 树脂是否恢复满
40 | ///
41 | [JsonIgnore]
42 | public bool IsResinFull => ResinRecoveryTime == TimeSpan.Zero;
43 |
44 | ///
45 | /// 树脂恢复满的时刻
46 | ///
47 | [JsonIgnore]
48 | public DateTimeOffset ResinFullTime => NowTime + ResinRecoveryTime;
49 |
50 | ///
51 | /// 委托完成数
52 | ///
53 | [JsonPropertyName("finished_task_num")]
54 | public int FinishedTaskNumber { get; set; }
55 |
56 | ///
57 | /// 委托总数
58 | ///
59 | [JsonPropertyName("total_task_num")]
60 | public int TotalTaskNumber { get; set; }
61 |
62 | ///
63 | /// 4次委托额外奖励是否领取
64 | ///
65 | [JsonPropertyName("is_extra_task_reward_received")]
66 | public bool IsExtraTaskRewardReceived { get; set; }
67 |
68 | ///
69 | /// 剩余周本树脂减半次数
70 | ///
71 | [JsonPropertyName("remain_resin_discount_num")]
72 | public int RemainResinDiscountNumber { get; set; }
73 |
74 | ///
75 | /// 周本树脂减半总次数
76 | ///
77 | [JsonPropertyName("resin_discount_num_limit")]
78 | public int ResinDiscountLimitedNumber { get; set; }
79 |
80 | ///
81 | /// 当前派遣数
82 | ///
83 | [JsonPropertyName("current_expedition_num")]
84 | public int CurrentExpeditionNumber { get; set; }
85 |
86 | ///
87 | /// 已完成派遣数
88 | ///
89 | [JsonIgnore]
90 | public int FinishedExpeditionNumber => Expeditions?.Count(x => x.IsFinished) ?? 0;
91 |
92 | ///
93 | /// 最大派遣数
94 | ///
95 | [JsonPropertyName("max_expedition_num")]
96 | public int MaxExpeditionNumber { get; set; }
97 |
98 | ///
99 | /// 探索派遣
100 | ///
101 | [JsonPropertyName("expeditions")]
102 | public List Expeditions { get; set; }
103 |
104 | ///
105 | /// 当前洞天宝钱
106 | ///
107 | [JsonPropertyName("current_home_coin")]
108 | public int CurrentHomeCoin { get; set; }
109 |
110 | ///
111 | /// 最大洞天宝钱
112 | ///
113 | [JsonPropertyName("max_home_coin")]
114 | public int MaxHomeCoin { get; set; }
115 |
116 | ///
117 | /// 洞天宝钱剩余恢复时间
118 | ///
119 | [JsonPropertyName("home_coin_recovery_time"), JsonConverter(typeof(RecoveryTimeJsonConverter))]
120 | public TimeSpan HomeCoinRecoveryTime { get; set; }
121 |
122 | ///
123 | /// 参量质变仪
124 | ///
125 | [JsonPropertyName("transformer")]
126 | public Transformer Transformer { get; set; }
127 |
128 | ///
129 | /// 洞天宝钱是否已满
130 | ///
131 | [JsonIgnore]
132 | public bool IsHomeCoinFull => HomeCoinRecoveryTime == TimeSpan.Zero;
133 |
134 | ///
135 | /// 洞天宝钱攒满时刻
136 | ///
137 | [JsonIgnore]
138 | public DateTimeOffset HomeCoinFullTime => NowTime + HomeCoinRecoveryTime;
139 | }
140 | }
141 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/DailyNote/Expedition.cs:
--------------------------------------------------------------------------------
1 | namespace XFP.ICora.Hoyolab.DailyNote
2 | {
3 | public class Expedition
4 | {
5 | ///
6 | /// 角色侧面图
7 | ///
8 | [JsonPropertyName("avatar_side_icon")]
9 | public string AvatarSideIcon { get; set; }
10 |
11 | ///
12 | /// 状态 Ongoing:派遣中 Finished:已完成
13 | ///
14 | [JsonPropertyName("status")]
15 | public string Status { get; set; }
16 |
17 | [JsonIgnore]
18 | public DateTimeOffset NowTime { get; init; } = DateTimeOffset.Now;
19 |
20 | ///
21 | /// 剩余时间
22 | ///
23 | [JsonPropertyName("remained_time"), JsonConverter(typeof(RecoveryTimeJsonConverter))]
24 | public TimeSpan RemainedTime { get; set; }
25 |
26 | ///
27 | /// 探索派遣是否完成
28 | ///
29 | [JsonIgnore]
30 | public bool IsFinished => RemainedTime == TimeSpan.Zero;
31 |
32 | ///
33 | /// 完成时刻
34 | ///
35 | [JsonIgnore]
36 | public DateTimeOffset FinishedTime => NowTime + RemainedTime;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/DailyNote/RecoveryTimeJsonConverter.cs:
--------------------------------------------------------------------------------
1 | namespace XFP.ICora.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 | }
24 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/DailyNote/Transformer.cs:
--------------------------------------------------------------------------------
1 | namespace XFP.ICora.Hoyolab.DailyNote
2 | {
3 | public class Transformer
4 | {
5 | ///
6 | /// 是否获得
7 | ///
8 | [JsonPropertyName("obtained")]
9 | public bool Obtained { get; set; }
10 |
11 | ///
12 | /// 剩余时间
13 | ///
14 | [JsonPropertyName("recovery_time")]
15 | public TransformerRecoveryTime RecoveryTime { get; set; }
16 |
17 | ///
18 | /// Wiki url
19 | ///
20 | [JsonPropertyName("wiki")]
21 | public string Wiki { get; set; }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/DailyNote/TransformerRecoveryTime.cs:
--------------------------------------------------------------------------------
1 | namespace XFP.ICora.Hoyolab.DailyNote
2 | {
3 | public class TransformerRecoveryTime
4 | {
5 | [JsonPropertyName("Day")]
6 | public int Day { get; set; }
7 |
8 | [JsonPropertyName("Hour")]
9 | public int Hour { get; set; }
10 |
11 | [JsonPropertyName("Minute")]
12 | public int Minute { get; set; }
13 |
14 | [JsonPropertyName("Second")]
15 | public int Second { get; set; }
16 |
17 | ///
18 | /// 是否可再次使用
19 | ///
20 | [JsonPropertyName("reached")]
21 | public bool Reached { get; set; }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/DynamicSecret.cs:
--------------------------------------------------------------------------------
1 | //Copyright (c) XFP Group and Contributors. All rights resvered.
2 | //Licensed under the MIT License.
3 |
4 | using System.Security.Cryptography;
5 | using System.Text;
6 |
7 | namespace XFP.ICora.Hoyolab
8 | {
9 | public abstract class DynamicSecret
10 | {
11 | private static readonly string ApiSalt = "N50pqm7FSy2AkFz2B3TqtuZMJ5TOl3Ep";
12 |
13 | private static readonly string ApiSalt2 = "xV8v4Qu54lUKrEYFZkJhB8cuOh9Asafs";
14 |
15 |
16 | public static string CreateSecret()
17 | {
18 | var t = (int)DateTimeOffset.UtcNow.ToUnixTimeSeconds();
19 | string r = GetRandomString(t);
20 | var bytes = MD5.HashData(Encoding.UTF8.GetBytes($"salt={ApiSalt}&t={t}&r={r}"));
21 | var check = Convert.ToHexString(bytes).ToLower();
22 | return $"{t},{r},{check}";
23 | }
24 |
25 | public static string CreateSecret2(string url, object? postBody = null)
26 | {
27 | int t = (int)DateTimeOffset.UtcNow.ToUnixTimeSeconds();
28 | string r = Random.Shared.Next(100000, 200000).ToString();
29 | string b = postBody is null ? "" : JsonSerializer.Serialize(postBody);
30 | string q = "";
31 | string[] urls = url.Split('?');
32 | if (urls.Length == 2)
33 | {
34 | string[] queryParams = urls[1].Split('&').OrderBy(x => x).ToArray();
35 | q = string.Join("&", queryParams);
36 | }
37 | var bytes = MD5.HashData(Encoding.UTF8.GetBytes($"salt={ApiSalt2}&t={t}&r={r}&b={b}&q={q}"));
38 | var check = Convert.ToHexString(bytes).ToLower();
39 | string result = $"{t},{r},{check}";
40 | return result;
41 | }
42 |
43 |
44 | private static string GetRandomString(int timestamp)
45 | {
46 | var sb = new StringBuilder(6);
47 | var random = new Random((int)timestamp);
48 | for (int i = 0; i < 6; i++)
49 | {
50 | int v8 = random.Next(0, 32768) % 26;
51 | int v9 = 87;
52 | if (v8 < 10)
53 | {
54 | v9 = 48;
55 | }
56 | _ = sb.Append((char)(v8 + v9));
57 | }
58 | return sb.ToString();
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/GameRecord/GameRecordSummary.cs:
--------------------------------------------------------------------------------
1 | using XFP.ICora.Hoyolab.Avatar;
2 |
3 | namespace XFP.ICora.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 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/GameRecord/PlayerRiskStats.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 |
3 | namespace XFP.ICora.Hoyolab.GameRecord
4 | {
5 | public class PlayerRiskStats
6 | {
7 | ///
8 | /// 活跃天数
9 | ///
10 | [JsonPropertyName("active_day_number")]
11 | [Description("活跃天数")]
12 | public int ActiveDayNumber { get; set; }
13 |
14 | ///
15 | /// 成就达成数
16 | ///
17 | [JsonPropertyName("achievement_number")]
18 | [Description("成就达成数")]
19 | public int AchievementNumber { get; set; }
20 |
21 | ///
22 | /// 获得角色数
23 | ///
24 | [JsonPropertyName("avatar_number")]
25 | [Description("获得角色数")]
26 | public int AvatarNumber { get; set; }
27 |
28 | ///
29 | /// 解锁传送点
30 | ///
31 | [JsonPropertyName("way_point_number")]
32 | [Description("解锁传送点")]
33 | public int WayPointNumber { get; set; }
34 |
35 | ///
36 | /// 风神瞳
37 | ///
38 | [JsonPropertyName("anemoculus_number")]
39 | [Description("风神瞳")]
40 | public int AnemoculusNumber { get; set; }
41 |
42 | ///
43 | /// 岩神瞳
44 | ///
45 | [JsonPropertyName("geoculus_number")]
46 | [Description("岩神瞳")]
47 | public int GeoculusNumber { get; set; }
48 |
49 | ///
50 | /// 雷神瞳
51 | ///
52 | [JsonPropertyName("electroculus_number")]
53 | [Description("雷神瞳")]
54 | public int ElectroculusNumber { get; set; }
55 |
56 | ///
57 | /// 草神瞳
58 | ///
59 | [JsonPropertyName("dendroculus_number")]
60 | [Description("草神瞳")]
61 | public int DendroculusNumber { get; set; }
62 |
63 | ///
64 | /// 解锁秘境
65 | ///
66 | [JsonPropertyName("domain_number")]
67 | [Description("解锁秘境")]
68 | public int DomainNumber { get; set; }
69 |
70 | ///
71 | /// 深境螺旋
72 | ///
73 | [JsonPropertyName("spiral_abyss")]
74 | [Description("深境螺旋")]
75 | public string SpiralAbyss { get; set; }
76 |
77 | ///
78 | /// 华丽宝箱
79 | ///
80 | [JsonPropertyName("luxurious_chest_number")]
81 | [Description("华丽宝箱")]
82 | public int LuxuriousChestNumber { get; set; }
83 |
84 | ///
85 | /// 珍贵宝箱
86 | ///
87 | [JsonPropertyName("precious_chest_number")]
88 | [Description("珍贵宝箱")]
89 | public int PreciousChestNumber { get; set; }
90 |
91 | ///
92 | /// 精致宝箱
93 | ///
94 | [JsonPropertyName("exquisite_chest_number")]
95 | [Description("精致宝箱")]
96 | public int ExquisiteChestNumber { get; set; }
97 |
98 | ///
99 | /// 普通宝箱
100 | ///
101 | [JsonPropertyName("common_chest_number")]
102 | [Description("普通宝箱")]
103 | public int CommonChestNumber { get; set; }
104 |
105 | ///
106 | /// 奇馈宝箱
107 | ///
108 | [JsonPropertyName("magic_chest_number")]
109 | [Description("奇馈宝箱")]
110 | public int MagicChestNumber { get; set; }
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/GameRecord/PotHome.cs:
--------------------------------------------------------------------------------
1 | namespace XFP.ICora.Hoyolab.GameRecord
2 | {
3 | public class PotHome
4 | {
5 | ///
6 | /// 信任等阶
7 | ///
8 | [JsonPropertyName("level")]
9 | public int Level { get; set; }
10 |
11 | ///
12 | /// 历史访客数
13 | ///
14 | [JsonPropertyName("visit_num")]
15 | public int VisitNumber { get; set; }
16 |
17 | ///
18 | /// 最高洞天仙力
19 | ///
20 | [JsonPropertyName("comfort_num")]
21 | public int ComfortNumber { get; set; }
22 |
23 | ///
24 | /// 摆设数
25 | ///
26 | [JsonPropertyName("item_num")]
27 | public int ItemNumber { get; set; }
28 |
29 | ///
30 | /// 洞天名称
31 | ///
32 | [JsonPropertyName("name")]
33 | public string Name { get; set; }
34 |
35 | ///
36 | /// 洞天图片
37 | ///
38 | ///
39 | [JsonPropertyName("icon")]
40 | public string Icon { get; set; }
41 |
42 | ///
43 | /// 仙力等级名称
44 | ///
45 | [JsonPropertyName("comfort_level_name")]
46 | public string ComfortLevelName { get; set; }
47 |
48 | ///
49 | /// 仙力等级图标
50 | ///
51 | ///
52 | [JsonPropertyName("comfort_level_icon")]
53 | public string ComfortLevelIcon { get; set; }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/GameRecord/WorldExploration.cs:
--------------------------------------------------------------------------------
1 | namespace XFP.ICora.Hoyolab.GameRecord
2 | {
3 | public class WorldExploration
4 | {
5 | [JsonPropertyName("id")]
6 | public int Id { get; set; }
7 |
8 | ///
9 | /// 地区名称
10 | ///
11 | [JsonPropertyName("name")]
12 | public string Name { get; set; }
13 |
14 | ///
15 | /// 探索等级
16 | ///
17 | [JsonPropertyName("level")]
18 | public int Level { get; set; }
19 |
20 | ///
21 | /// 探索度,满值 1000
22 | ///
23 | [JsonPropertyName("exploration_percentage")]
24 | public int ExplorationPercentage { get; set; }
25 |
26 | ///
27 | /// 地区卡片背景图
28 | ///
29 | ///
30 | [JsonPropertyName("background_image")]
31 | public string BackgroundImage { get; set; }
32 |
33 | ///
34 | /// 地区封面背景图
35 | ///
36 | ///
37 | [JsonPropertyName("cover")]
38 | public string Cover { get; set; }
39 |
40 | ///
41 | /// 地区图标(白色)
42 | ///
43 | ///
44 | [JsonPropertyName("icon")]
45 | public string Icon { get; set; }
46 |
47 | ///
48 | /// 地区图标(黑色)
49 | ///
50 | ///
51 | [JsonPropertyName("inner_icon")]
52 | public string InnerIcon { get; set; }
53 |
54 | ///
55 | /// 米游社地图
56 | ///
57 | ///
58 | [JsonPropertyName("map_url")]
59 | public string MapUrl { get; set; }
60 |
61 |
62 | ///
63 | /// 地区探索奖励类型(声望,贡品)
64 | ///
65 | [JsonPropertyName("type"), JsonConverter(typeof(JsonStringEnumConverter))]
66 | public WorldExplorationRewardType Type { get; set; }
67 |
68 | ///
69 | /// 地区贡品等级
70 | ///
71 | [JsonPropertyName("offerings")]
72 | public List Offerings { get; set; }
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/GameRecord/WorldExplorationOffering.cs:
--------------------------------------------------------------------------------
1 | namespace XFP.ICora.Hoyolab.GameRecord
2 | {
3 | public class WorldExplorationOffering
4 | {
5 | [JsonPropertyName("name")]
6 | public string Name { get; set; }
7 |
8 |
9 | [JsonPropertyName("level")]
10 | public int Level { get; set; }
11 |
12 |
13 | [JsonPropertyName("icon")]
14 | public string Icon { get; set; }
15 | }
16 | }
17 |
18 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/GameRecord/WorldExplorationRewardType.cs:
--------------------------------------------------------------------------------
1 | namespace XFP.ICora.Hoyolab.GameRecord
2 | {
3 | public enum WorldExplorationRewardType
4 | {
5 | ///
6 | /// 声望
7 | ///
8 | Reputation,
9 |
10 | ///
11 | /// 贡品
12 | ///
13 | Offering,
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/HoyolabBaseWrapper.cs:
--------------------------------------------------------------------------------
1 | //Copyright (c) XFP Group and Contributors. All rights resvered.
2 | //Licensed under the MIT License.
3 |
4 | namespace XFP.ICora.Hoyolab
5 | {
6 | public class HoyolabBaseWrapper where T : class
7 | {
8 | [JsonPropertyName("returncode")]
9 | public int ReturnCode { get; set; }
10 |
11 | [JsonPropertyName("message")]
12 | public string? Message { get; set; }
13 |
14 | [JsonPropertyName("data")]
15 | public T Data { get; set; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/HoyolabClient.cs:
--------------------------------------------------------------------------------
1 | //Copyright (c) XFP Group and Contributors. All rights resvered.
2 | //Licensed under the MIT License.
3 |
4 | using System.Net.Http;
5 | using System.Net.Http.Json;
6 | using System.Threading.Tasks;
7 | using XFP.ICora.Hoyolab.DailyNote;
8 | using XFP.ICora.Hoyolab.GameRecord;
9 | using XFP.ICora.Hoyolab.TravelNotes;
10 | using XFP.ICora.ICoraException;
11 |
12 | namespace XFP.ICora.Hoyolab
13 | {
14 | public class HoyolabClient
15 | {
16 | #region Header
17 | private const string Accept = "Accept";
18 | private const string Cookie = "Cookie";
19 | private const string UserAgent = "User-Agent";
20 | private const string X_Reuqest_With = "X-Requested-With";
21 | private const string DS = "DS";
22 | private const string Referer = "Referer";
23 | private const string Application_Json = "application/json";
24 | private const string com_mihoyo_hyperion = "com.mihoyo.hyperion";
25 | private const string x_rpc_app_version = "x-rpc-app_version";
26 | private const string x_rpc_device_id = "x-rpc-device_id";
27 | private const string x_rpc_client_type = "x-rpc-client_type";
28 | private const string UAContent = $"Mozilla/5.0 miHoYoBBS/{AppVersion}";
29 | private const string AppVersion = "2.35.2";
30 | private static readonly string DeviceId = Guid.NewGuid().ToString("D");
31 | #endregion
32 |
33 | private readonly HttpClient httpClient;
34 |
35 | ///
36 | /// 构造一个新的hoyolabclient
37 | ///
38 | ///
39 | public HoyolabClient(HttpClient? httpClient = null)
40 | {
41 | this.httpClient = httpClient ?? new(new HttpClientHandler { AutomaticDecompression = DecompressionMethods.All });
42 | }
43 |
44 | private async Task CommonSendAsync(
45 | HttpRequestMessage request,
46 | CancellationToken? cancellationToken = null) where T : class
47 | {
48 | request.Headers.Add(Accept, Application_Json);
49 | request.Headers.Add(UserAgent, UAContent);
50 | var response = await httpClient.SendAsync(request, cancellationToken ?? CancellationToken.None);
51 | response.EnsureSuccessStatusCode();
52 | var content = await response.Content.ReadAsStringAsync();
53 | var responseData = JsonSerializer.Deserialize>(content);
54 | if (responseData is null)
55 | {
56 | Growl.Clear();
57 | Growl.Error("Can not parse the response body. (-1)");
58 | }
59 | if (responseData.ReturnCode != 0)
60 | {
61 | Growl.Clear();
62 | Growl.Error($"Ex: {responseData.Message} ({responseData.ReturnCode})");
63 | }
64 | return responseData.Data;
65 | }
66 |
67 | ///
68 | /// 更新米游社数据
69 | ///
70 | ///
71 | public async Task UpdateAllAccountsAsync()
72 | {
73 | try
74 | {
75 | await GetHoyolabUserInfoAsync(Properties.Settings.Default.UserCookie!);
76 | await GetGenshinRoleInfoListAsync(Properties.Settings.Default.UserCookie!);
77 | }
78 | catch (Exception ex)
79 | {
80 | Growl.Clear();
81 | Growl.Error($"in update user account\n{ex.Message} (-2)");
82 | }
83 | }
84 |
85 | public async Task SignInAsync(GenshinRoleInfo role, bool skipCheckWhetherHaveSignedIn = false, CancellationToken? cancellationToken = null)
86 | {
87 | if (!skipCheckWhetherHaveSignedIn)
88 | {
89 | var signInfo = await GetSignInInfoAsync(role, cancellationToken);
90 | if (signInfo.IsSign)
91 | {
92 | return false;
93 | }
94 | }
95 | var obj = new { act_id = "e202009291139501", region = role.Region.ToString(), uid = role.Uid.ToString() };
96 | var request = new HttpRequestMessage(HttpMethod.Post, "https://api-takumi.mihoyo.com/event/bbs_sign_reward/sign");
97 | request.Headers.Add(Cookie, role.Cookie);
98 | request.Headers.Add(DS, DynamicSecret.CreateSecret());
99 | request.Headers.Add(x_rpc_app_version, AppVersion);
100 | request.Headers.Add(x_rpc_device_id, DeviceId);
101 | request.Headers.Add(x_rpc_client_type, "5");
102 | request.Headers.Add(X_Reuqest_With, com_mihoyo_hyperion);
103 | request.Headers.Add(Referer, "https://webstatic.mihoyo.com/bbs/event/signin-ys/index.html?bbs_auth_required=true&act_id=e202009291139501&utm_source=bbs&utm_medium=mys&utm_campaign=icon");
104 | request.Content = JsonContent.Create(obj);
105 | var risk = await CommonSendAsync(request, cancellationToken);
106 | if (risk is null or { RiskCode: 0, Success: 0 })
107 | {
108 | return true;
109 | }
110 | else
111 | {
112 | Growl.Clear();
113 | Growl.Warning($"账户 {role.Nickname} 受到风控限制 请手动签到");
114 | return false;
115 | }
116 | }
117 |
118 | ///
119 | /// 实时便笺
120 | ///
121 | ///
122 | ///
123 | ///
124 | public async Task GetDailyNoteAsync(GenshinRoleInfo role, CancellationToken? cancellationToken = null)
125 | {
126 | var url = $"https://api-takumi-record.mihoyo.com/game_record/app/genshin/api/dailyNote?server={role.Region}&role_id={role.Uid}";
127 | var request = new HttpRequestMessage(HttpMethod.Get, url);
128 | request.Headers.Add(Cookie, role.Cookie);
129 | request.Headers.Add(DS, DynamicSecret.CreateSecret2(url));
130 | request.Headers.Add(Referer, "https://webstatic.mihoyo.com/app/community-game-records/?game_id=2&utm_source=bbs&utm_medium=mys&utm_campaign=box");
131 | request.Headers.Add(x_rpc_app_version, AppVersion);
132 | request.Headers.Add(x_rpc_client_type, "5");
133 | request.Headers.Add(X_Reuqest_With, com_mihoyo_hyperion);
134 | var data = await CommonSendAsync(request);
135 | data.Uid = role.Uid;
136 | data.Nickname = role.Nickname;
137 | return data;
138 | }
139 |
140 | ///
141 | /// 旅行札记总览
142 | ///
143 | ///
144 | /// 0 当前月
145 | ///
146 | ///
147 | public async Task GetTravelNotesSummaryAsync(GenshinRoleInfo role, int month = 0, CancellationToken? cancellationToken = null)
148 | {
149 | var url = $"https://hk4e-api.mihoyo.com/event/ys_ledger/monthInfo?month={month}&bind_uid={role.Uid}&bind_region={role.Region}&bbs_presentation_style=fullscreen&bbs_auth_required=true&utm_source=bbs&utm_medium=mys&utm_campaign=icon";
150 | var request = new HttpRequestMessage(HttpMethod.Get, url);
151 | request.Headers.Add(Cookie, role.Cookie);
152 | request.Headers.Add(Referer, "https://webstatic.mihoyo.com/ys/event/e20200709ysjournal/index.html?bbs_presentation_style=fullscreen&bbs_auth_required=true&utm_source=bbs&utm_medium=mys&utm_campaign=icon");
153 | request.Headers.Add(X_Reuqest_With, com_mihoyo_hyperion);
154 | return await CommonSendAsync(request);
155 | }
156 |
157 | ///
158 | /// 账号的签到信息
159 | ///
160 | ///
161 | ///
162 | public async Task GetSignInInfoAsync(GenshinRoleInfo role, CancellationToken? cancellationToken = null)
163 | {
164 | var request = new HttpRequestMessage(HttpMethod.Get, $"https://api-takumi.mihoyo.com/event/bbs_sign_reward/info?act_id=e202009291139501®ion={role.Region}&uid={role.Uid}");
165 | request.Headers.Add(Cookie, role.Cookie);
166 | request.Headers.Add(x_rpc_device_id, DeviceId);
167 | request.Headers.Add(X_Reuqest_With, com_mihoyo_hyperion);
168 | request.Headers.Add(Referer, "https://webstatic.mihoyo.com/bbs/event/signin-ys/index.html?bbs_auth_required=true&act_id=e202009291139501&utm_source=bbs&utm_medium=mys&utm_campaign=icon");
169 | return await CommonSendAsync(request, cancellationToken);
170 | }
171 |
172 | ///
173 | /// 米游社账号信息
174 | ///
175 | ///
176 | public async Task GetHoyolabUserInfoAsync(string cookie, CancellationToken? cancellationToken = null)
177 | {
178 | if (string.IsNullOrWhiteSpace(cookie))
179 | {
180 | new ContentEmptyException().ContentIsEmpty(cookie, -1);
181 | }
182 | var request = new HttpRequestMessage(HttpMethod.Get, "https://bbs-api.mihoyo.com/user/wapi/getUserFullInfo?gids=2");
183 | request.Headers.Add(Cookie, cookie);
184 | request.Headers.Add(Referer, "https://bbs.mihoyo.com/");
185 | request.Headers.Add(DS, DynamicSecret.CreateSecret());
186 | request.Headers.Add(x_rpc_app_version, AppVersion);
187 | request.Headers.Add(x_rpc_device_id, DeviceId);
188 | request.Headers.Add(x_rpc_client_type, "5");
189 | var data = await CommonSendAsync(request, cancellationToken);
190 | data.HoyolabUserInfo.Cookie = cookie;
191 | return data.HoyolabUserInfo;
192 | }
193 |
194 | ///
195 | /// 获取原神账号信息
196 | ///
197 | ///
198 | public async Task> GetGenshinRoleInfoListAsync(string cookie, CancellationToken? cancellationToken = null)
199 | {
200 | if (string.IsNullOrWhiteSpace(cookie))
201 | {
202 | new ContentEmptyException().ContentIsEmpty(cookie, -1);
203 | }
204 | var url = "https://api-takumi.mihoyo.com/binding/api/getUserGameRolesByCookie?game_biz=hk4e_cn";
205 | var request = new HttpRequestMessage(HttpMethod.Get, url);
206 | request.Headers.Add(Cookie, cookie);
207 | request.Headers.Add(DS, DynamicSecret.CreateSecret2(url));
208 | request.Headers.Add(X_Reuqest_With, com_mihoyo_hyperion);
209 | request.Headers.Add(x_rpc_app_version, AppVersion);
210 | request.Headers.Add(x_rpc_client_type, "5");
211 | request.Headers.Add(Referer, "https://webstatic.mihoyo.com/app/community-game-records/?game_id=2&utm_source=bbs&utm_medium=mys&utm_campaign=box");
212 | var data = await CommonSendAsync(request, cancellationToken);
213 | data.List?.ForEach(x => x.Cookie = cookie);
214 | return data.List ?? new List();
215 | }
216 |
217 | ///
218 | /// 获取用户战绩
219 | ///
220 | ///
221 | ///
222 | ///
223 | public async Task GetGameRecordAsync(GenshinRoleInfo role, CancellationToken? cancellationToken = null)
224 | {
225 | var url = $"https://api-takumi-record.mihoyo.com/game_record/app/genshin/api/index?server={role.Region}&role_id={role.Uid}";
226 | var request = new HttpRequestMessage(HttpMethod.Get, url);
227 | request.Headers.Add(Cookie, role.Cookie);
228 | request.Headers.Add(DS, DynamicSecret.CreateSecret2(url));
229 | request.Headers.Add(Referer, "https://webstatic.mihoyo.com/app/community-game-records/?game_id=2&utm_source=bbs&utm_medium=mys&utm_campaign=box");
230 | request.Headers.Add(x_rpc_app_version, AppVersion);
231 | request.Headers.Add(x_rpc_client_type, "5");
232 | request.Headers.Add(X_Reuqest_With, com_mihoyo_hyperion);
233 | return await CommonSendAsync(request);
234 | }
235 | }
236 | }
237 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/TravelNotes/TravelNotesBase.cs:
--------------------------------------------------------------------------------
1 | namespace XFP.ICora.Hoyolab.TravelNotes
2 | {
3 | public class TravelNotesBase
4 | {
5 | [JsonPropertyName("uid")]
6 | public int Uid { get; set; }
7 |
8 |
9 | [JsonPropertyName("region"), JsonConverter(typeof(JsonStringEnumConverter))]
10 | public RegionType Region { get; set; }
11 |
12 | ///
13 | /// 米游社 ID
14 | ///
15 | [JsonPropertyName("account_id")]
16 | public int AccountId { get; set; }
17 |
18 |
19 | [JsonPropertyName("nickname")]
20 | public string Nickname { get; set; }
21 |
22 | ///
23 | /// 当前日期
24 | ///
25 | [JsonPropertyName("date"), JsonConverter(typeof(TravelNotesDateJsonConverter))]
26 | public DateTime Date { get; set; }
27 |
28 | ///
29 | /// 当前月
30 | ///
31 | [JsonPropertyName("month")]
32 | public int CurrentMonth { get; set; }
33 |
34 | ///
35 | /// 可查询月份
36 | ///
37 | [JsonPropertyName("optional_month")]
38 | public List OptionalMonth { get; set; }
39 |
40 | ///
41 | /// 获取的数据所在的月份
42 | ///
43 | [JsonPropertyName("data_month")]
44 | public int DataMonth { get; set; }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/TravelNotes/TravelNotesDateJsonConverter.cs:
--------------------------------------------------------------------------------
1 | namespace XFP.ICora.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 | }
15 | }
16 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/TravelNotes/TravelNotesDayData.cs:
--------------------------------------------------------------------------------
1 | namespace XFP.ICora.Hoyolab.TravelNotes
2 | {
3 | public class TravelNotesDayData
4 | {
5 | [JsonPropertyName("current_primogems")]
6 | public int CurrentPrimogems { get; set; }
7 |
8 |
9 | [JsonPropertyName("current_mora")]
10 | public int CurrentMora { get; set; }
11 |
12 |
13 | [JsonPropertyName("last_primogems")]
14 | public int LastPrimogems { get; set; }
15 |
16 |
17 | [JsonPropertyName("last_mora")]
18 | public int LastMora { get; set; }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/TravelNotes/TravelNotesMonthData.cs:
--------------------------------------------------------------------------------
1 | namespace XFP.ICora.Hoyolab.TravelNotes
2 | {
3 | public class TravelNotesMonthData
4 | {
5 | public int Uid { get; set; }
6 |
7 | public int Year { get; set; }
8 |
9 | public int Month { get; set; }
10 |
11 |
12 | ///
13 | /// 查询月原石数
14 | ///
15 | [JsonPropertyName("current_primogems")]
16 | public int CurrentPrimogems { get; set; }
17 |
18 | ///
19 | /// 查询月摩拉数
20 | ///
21 | [JsonPropertyName("current_mora")]
22 | public int CurrentMora { get; set; }
23 |
24 | ///
25 | /// 查询月上一月原石数
26 | ///
27 | [JsonPropertyName("last_primogems")]
28 | public int LastPrimogems { get; set; }
29 |
30 | ///
31 | /// 查询月上一月摩拉数
32 | ///
33 | [JsonPropertyName("last_mora")]
34 | public int LastMora { get; set; }
35 |
36 | ///
37 | /// 不知道什么意思
38 | ///
39 | [JsonPropertyName("current_primogems_level")]
40 | public int CurrentPrimogemsLevel { get; set; }
41 |
42 | ///
43 | /// 相比于上一月原石的增长率,单位为百分数
44 | ///
45 | [JsonPropertyName("primogems_rate")]
46 | public int PrimogemsChangeRate { get; set; }
47 |
48 | ///
49 | /// 相比于上一月摩拉的增长率,单位为百分数
50 | ///
51 | [JsonPropertyName("mora_rate")]
52 | public int MoraChangeRate { get; set; }
53 |
54 | ///
55 | /// 原石获取来源分组统计
56 | ///
57 | [JsonPropertyName("group_by")]
58 | public List PrimogemsGroupBy { get; set; }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/TravelNotes/TravelNotesPrimogemsMonthGroupStats.cs:
--------------------------------------------------------------------------------
1 | namespace XFP.ICora.Hoyolab.TravelNotes
2 | {
3 | public class TravelNotesPrimogemsMonthGroupStats
4 | {
5 | [JsonIgnore]
6 | public int Id { get; set; }
7 |
8 | public int Uid { get; set; }
9 |
10 | public int Year { get; set; }
11 |
12 | public int Month { get; set; }
13 |
14 |
15 | [JsonPropertyName("action_id")]
16 | public int ActionId { get; set; }
17 |
18 |
19 | [JsonPropertyName("action")]
20 | public string? ActionName { get; set; }
21 |
22 |
23 | [JsonPropertyName("num")]
24 | public int Number { get; set; }
25 |
26 |
27 | [JsonPropertyName("percent")]
28 | public int Percent { get; set; }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Hoyolab/TravelNotes/TravelNotesSummary.cs:
--------------------------------------------------------------------------------
1 | namespace XFP.ICora.Hoyolab.TravelNotes
2 | {
3 | public class TravelNotesSummary : TravelNotesBase, IJsonOnDeserialized
4 | {
5 | ///
6 | /// 查询月份的上个月
7 | ///
8 | [JsonPropertyName("data_last_month")]
9 | public int DataLastMonth { get; set; }
10 |
11 | ///
12 | /// 今日数据,查询月份不是当前月时,数据内容均为0
13 | ///
14 | [JsonPropertyName("day_data")]
15 | public TravelNotesDayData DayData { get; set; }
16 |
17 | ///
18 | /// 查询月数据
19 | ///
20 | [JsonPropertyName("month_data")]
21 | public TravelNotesMonthData MonthData { get; set; }
22 |
23 | ///
24 | /// 不知道是什么
25 | ///
26 | [JsonPropertyName("lantern")]
27 | public bool Lantern { get; set; }
28 |
29 | public void OnDeserialized()
30 | {
31 | var year = DataMonth > Date.Month ? Date.Year - 1 : Date.Year;
32 | MonthData.Uid = Uid;
33 | MonthData.Year = year;
34 | MonthData.Month = DataMonth;
35 | foreach (var item in MonthData.PrimogemsGroupBy)
36 | {
37 | item.Uid = Uid;
38 | item.Year = year;
39 | item.Month = DataMonth;
40 | }
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/ICoraException/ContentEmptyException.cs:
--------------------------------------------------------------------------------
1 | //Copyright(C) XFP Group and Contributors. All rights resvered.
2 | //Licensed under the MIT Licensed.
3 |
4 | namespace XFP.ICora.ICoraException
5 | {
6 | public class ContentEmptyException
7 | {
8 | private int ReturnCode { get; set; }
9 |
10 | public void ContentIsEmpty(string content, int returnCode)
11 | {
12 | returnCode = ReturnCode;
13 | Growl.Clear();
14 | Growl.Error($"Throw Exception : The content is empty || {content}\n Return Code{returnCode}");
15 | }
16 |
17 | public void UserInfoIsEmpty(string content, int returnCode)
18 | {
19 | returnCode = ReturnCode;
20 | Growl.Clear();
21 | Growl.Error($"Throw Exception : The User info is empty || {content}\n Return Code{returnCode}");
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/ICoraException/DirectoryNotFound.cs:
--------------------------------------------------------------------------------
1 | //Copyright(c) XFP Group and Contributors. All rights reserved.
2 | //Licensed under the MIT License.
3 |
4 | namespace XFP.ICora.ICoraException
5 | {
6 | public class DirectoryNotFound
7 | {
8 | ///
9 | /// File directory not found
10 | ///
11 | /// Directory name that does not exist
12 | public DirectoryNotFound(string DirectoryName)
13 | {
14 | Growl.Error("Throw Exception: Directory Not Found\n Directory Name:" + DirectoryName);
15 | }
16 |
17 | ///
18 | /// File directory not found
19 | /// Create directory selectively
20 | ///
21 | /// Directory name that does not exist
22 | /// Selectively create the current directory
23 | public DirectoryNotFound(string DirectoryName, bool CreateDirectory)
24 | {
25 | Growl.Warning("Throw Exception: Directory Not Found\n Directory Name:" + DirectoryName);
26 | if (CreateDirectory == true)
27 | {
28 | Directory.CreateDirectory(DirectoryName);
29 | }
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/ICoraException/HoyolabException.cs:
--------------------------------------------------------------------------------
1 | namespace XFP.ICora.ICoraException
2 | {
3 | public class HoyolabException : Exception
4 | {
5 | public int ReturnCode { get; init; }
6 |
7 | public HoyolabException(int returnCode, string message) : base($"{message}({returnCode})")
8 | {
9 | ReturnCode = returnCode;
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/ICoraException/IncompleteFile.cs:
--------------------------------------------------------------------------------
1 | //Copyright(c) XFP Group and Contributors. All rights reserved.
2 | //Licensed under the MIT License.
3 |
4 | namespace XFP.ICora.ICoraException
5 | {
6 | public class IncompleteFile
7 | {
8 | LogWriter log = new();
9 |
10 | ///
11 | /// Incomplete file
12 | ///
13 | /// File Name
14 | public void FileIsNotComplete(string FileName)
15 | {
16 | Growl.Error("Throw Exception: File Is Not Found\n File Name:" + FileName);
17 | log.ErrorLog("Throw Exception: File Is Not Found\n File Name:" + FileName, -10);
18 | }
19 |
20 | ///
21 | /// Target File Not Found
22 | ///
23 | /// Target File
24 | public void FileNotFound(string TargetFile)
25 | {
26 | Growl.Error("Throw Exception: Target File Not Found\n Target File Name:" + TargetFile);
27 | log.ErrorLog("Throw Exception: Target File Not Found\n Target File Name:" + TargetFile, -10);
28 | }
29 |
30 | ///
31 | /// Target File Not Found
32 | /// Create directory selectively
33 | ///
34 | /// Target File
35 | /// Selectively create the current directory
36 | public void FileNotFound(string TargetFile, bool CreateTargetFile)
37 | {
38 | Growl.Warning("Throw Exception: Target File Not Found\n Target File Name:" + TargetFile);
39 | log.ErrorLog("Throw Exception: Target File Not Found\n Target File Name:" + TargetFile, -10);
40 | if (CreateTargetFile == true)
41 | {
42 | File.Create(TargetFile);
43 | log.TempLog("Create File" + TargetFile);
44 | }
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/ICoraException/UnKnownChoose.cs:
--------------------------------------------------------------------------------
1 | //Copyright(c) XFP Group and Contributors. All rights reserved.
2 | //Licensed under the MIT License.
3 |
4 | namespace XFP.ICora.ICoraException
5 | {
6 | public class UnKnownChoose
7 | {
8 | LogWriter log = new();
9 |
10 | ///
11 | /// Unknown user selection
12 | ///
13 | ///
14 | public UnKnownChoose(string UserChoose)
15 | {
16 | Growl.Error("Throw Exception Un Known Choose : " + UserChoose);
17 | log.ErrorLog("Throw Exception Un Known Choose : " + UserChoose, -10);
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
20 |
21 |
22 |
23 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | //Copyright(c) XFP Group and Contributors. All rights reserved.
2 | //Licensed under the MIT License.
3 |
4 | namespace XFP.ICora
5 | {
6 | ///
7 | /// MainWindow.xaml 的交互逻辑
8 | ///
9 | public partial class MainWindow
10 | {
11 | #region initialization
12 |
13 | DataProvider data = new();
14 | LogWriter log = new();
15 | GetFormUrl GetFormUrl = new GetFormUrl();
16 |
17 | #endregion
18 |
19 | RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software", true).CreateSubKey("Impact_Ultimate");
20 |
21 | private ObservableCollection _MenuList;
22 | public ObservableCollection MenuList
23 | {
24 | get { return _MenuList; }
25 | set { _MenuList = value; }
26 | }
27 |
28 | private ObservableCollection _settingsMenu;
29 | public ObservableCollection settingsMenu
30 | {
31 | get { return _settingsMenu; }
32 | set { _settingsMenu = value; }
33 | }
34 |
35 | public MainWindow() => Initialization();
36 |
37 | private void Initialization()
38 | {
39 | if (key.GetValue("UserAgree") == null)
40 | {
41 | if (HandyControl.Controls.MessageBox.Show("你好旅行者!欢迎来到ICora\nICora是一款免费使用的原神工具箱 如果您是付费买来的 您已经被骗了\n由于ICora内置Dll注入的模块 所以可能会遭受到一定程度的倒卖 如果您是免费使用的 不妨查看一下下面的内容\nICora提供服务的QQ群:\n\t原神交流一群 811979687 || 原神交流二群 590566763\nICora用户隐私协议:https://gitee.com/MasterGashByte/impact_ultimate_issues/blob/master/PrivacyPolicy.md\nICora用户使用协议:https://gitee.com/MasterGashByte/impact_ultimate_issues/blob/master/UserUseAgreement.md\n点击 [是] 则代表同意以上条款并继续使用ICora\n\t\t(此弹窗不会弹出第二次)", "欢迎你 旅行者!", MessageBoxButton.YesNo, MessageBoxImage.Question) != MessageBoxResult.Yes)
42 | {
43 | Environment.Exit(0);
44 | }
45 | else
46 | {
47 | key.SetValue("UserAgree", "True");
48 | }
49 | }
50 |
51 | InitializeComponent();
52 |
53 | // 初始化数据
54 | new DataProvider();
55 | new DataProvider().Initialize();
56 |
57 | // 窗口居中
58 | WindowStartupLocation = WindowStartupLocation.CenterScreen;
59 |
60 | // 用于绘制标题栏
61 | NonClientAreaContent = new NonClientAreaContent();
62 |
63 | // 实例化
64 | MenuList = new ObservableCollection();
65 | settingsMenu = new ObservableCollection();
66 |
67 | #region Basic
68 | MenuList.Add(new MenuInfo()
69 | {
70 | Name = "主页",
71 | GroupName = ControlType.基础功能.ToString(),
72 | });
73 | MenuList.Add(new MenuInfo()
74 | {
75 | Name = "开始游戏",
76 | GroupName = ControlType.基础功能.ToString(),
77 | });
78 | #endregion
79 |
80 | #region Form
81 | MenuList.Add(new MenuInfo()
82 | {
83 | Name = "祈愿记录",
84 | GroupName = ControlType.更多功能.ToString(),
85 | });
86 | MenuList.Add(new MenuInfo()
87 | {
88 | Name = "角色练度",
89 | GroupName = ControlType.更多功能.ToString(),
90 | });
91 | MenuList.Add(new MenuInfo()
92 | {
93 | Name = "螺旋深渊",
94 | GroupName = ControlType.更多功能.ToString(),
95 | });
96 | MenuList.Add(new MenuInfo()
97 | {
98 | Name = "养成计划",
99 | GroupName = ControlType.更多功能.ToString(),
100 | });
101 | MenuList.Add(new MenuInfo()
102 | {
103 | Name = "成就管理",
104 | GroupName = ControlType.更多功能.ToString(),
105 | });
106 | MenuList.Add(new MenuInfo()
107 | {
108 | Name = "活动公告",
109 | GroupName = ControlType.更多功能.ToString(),
110 | });
111 | MenuList.Add(new MenuInfo()
112 | {
113 | Name = "图鉴管理",
114 | GroupName = ControlType.更多功能.ToString(),
115 | });
116 | MenuList.Add(new MenuInfo()
117 | {
118 | Name = "过场动画",
119 | GroupName = ControlType.更多功能.ToString(),
120 | });
121 | MenuList.Add(new MenuInfo()
122 | {
123 | Name = "游戏公告",
124 | GroupName = ControlType.更多功能.ToString(),
125 | });
126 | MenuList.Add(new MenuInfo()
127 | {
128 | Name = "米哈游账户",
129 | GroupName = ControlType.更多功能.ToString(),
130 | });
131 | MenuList.Add(new MenuInfo()
132 | {
133 | Name = "自定义便签",
134 | GroupName = ControlType.更多功能.ToString(),
135 | });
136 |
137 | #endregion
138 |
139 | #region View
140 | MenuList.Add(new MenuInfo()
141 | {
142 | Name = "关于我们",
143 | GroupName = ControlType.关于.ToString(),
144 | });
145 | MenuList.Add(new MenuInfo()
146 | {
147 | Name = "友商论坛",
148 | GroupName = ControlType.关于.ToString(),
149 | });
150 | #endregion
151 |
152 | #region other
153 | settingsMenu.Add(new MenuInfo()
154 | {
155 | Name = "设置",
156 | });
157 | settingsMenu.Add(new MenuInfo()
158 | {
159 | Name = "登录",
160 | });
161 | #endregion
162 |
163 | menu.ItemsSource = MenuList;
164 | SettingsMenu.ItemsSource = settingsMenu;
165 |
166 | ControlPanel.Content = new HomePage();
167 |
168 | menu.SelectionChanged += menu_SelectionChanged;
169 | SettingsMenu.SelectionChanged += SettingsMenu_SelectionChanged;
170 |
171 | Growl.SuccessGlobal("岁月不居 时节如流 我们再一次迎来了新的一年\n我代表XFP全体团员 在此祝您\n兔年大吉!心想事成!万事如意!财源广进!四季平安!");
172 |
173 | new Thread(() =>
174 | {
175 | bool _Info = false;
176 | var _ServerVesion = string.Empty;
177 | while (true)
178 | {
179 | var ServerVesion =
180 | GetFormUrl.Get("https://gitee.com/MasterGashByte/updates/raw/master/Checker/Version");
181 | var version = new DataProvider().Version;
182 | if (version != ServerVesion)
183 | {
184 | var MustUpdate =
185 | GetFormUrl.Get("https://gitee.com/MasterGashByte/updates/raw/master/Checker/MustUpdate");
186 | if (MustUpdate == "true")
187 | {
188 | MessageBox.Show("这是一个必须更新的版本 正在打开 [更新助手]");
189 |
190 | var localpath = Environment.CurrentDirectory;
191 | if (File.Exists(localpath + "\\Updater.exe")
192 | && File.Exists(localpath + "\\Updater.deps.json")
193 | && File.Exists(localpath + "\\Updater.dll")
194 | && File.Exists(localpath + "\\Updater.runtimeconfig.json"))
195 | {
196 | Process.Start(localpath + "\\Updater.exe");
197 | }
198 | else
199 | {
200 | MessageBox.Show("您的ICora仿佛不齐全 请前往群中重新下载");
201 | log.ErrorLog("DetectionSystem: ICora is incomplete", -0, "您的ICora不是完整的 您可以前往群中获取完整的ICora");
202 | }
203 |
204 | Environment.Exit(0);
205 | }
206 |
207 |
208 | if (_ServerVesion != ServerVesion)
209 | {
210 | if (!_Info)
211 | {
212 | Growl.InfoGlobal($"ICora找到新版本啦!\n发现新版本啦,快去更新吧~(版本号:{ServerVesion})");
213 | _ServerVesion = ServerVesion;
214 | _Info = true;
215 | }
216 | }
217 | _Info = false;
218 | }
219 | Thread.Sleep(1800000);
220 | }
221 | }).Start();
222 | }
223 |
224 | private void SettingsMenu_SelectionChanged(object sender, SelectionChangedEventArgs e)
225 | {
226 | if (SettingsMenu.SelectedItem != null)
227 | {
228 | menu.SelectedItem = null;
229 | MenuInfo info = SettingsMenu.SelectedItem as MenuInfo;
230 | switch (info.Name)
231 | {
232 | case "设置":
233 | ControlPanel.Content = new Controls.Basic.Settings();
234 | break;
235 | case "登录":
236 | ControlPanel.Content = new Controls.Basic.LoginFormMihoyo();
237 | break;
238 | }
239 | }
240 | }
241 |
242 | private void menu_SelectionChanged(object sender, SelectionChangedEventArgs e)
243 | {
244 | if (menu.SelectedItem != null)
245 | {
246 | SettingsMenu.SelectedItem = null;
247 | MenuInfo info = menu.SelectedItem as MenuInfo;
248 | switch (info.Name)
249 | {
250 | case "主页":
251 | ControlPanel.Content = new HomePage();
252 | break;
253 | case "开始游戏":
254 | ControlPanel.Content = new AkebiPage();
255 | break;
256 | case "友商论坛":
257 | Growl.Clear();
258 | Growl.SuccessGlobal("即将访问入梦论坛~");
259 | Process.Start("explorer.exe", "https://www.rmlt.xyz/");
260 | break;
261 | case "关于我们":
262 | ControlPanel.Content = new AboutUs();
263 | break;
264 | case "祈愿记录":
265 | ControlPanel.Content = new WishExport();
266 | break;
267 | case "自定义便签":
268 | ControlPanel.Content = new CustomNote();
269 | break;
270 | case "米哈游账户":
271 | ControlPanel.Content = new HoyolabAccount();
272 | break;
273 | default:
274 | ControlPanel.Content = new HomePage();
275 | Growl.Clear();
276 | Growl.Warning("暂未开发\n请期待下个版本");
277 | break;
278 | }
279 | }
280 | }
281 |
282 | protected override void OnClosed(EventArgs e)
283 | {
284 | Environment.Exit(0);
285 | base.OnClosed(e);
286 | }
287 |
288 | private void UpdateButton_Click(object sender, RoutedEventArgs e)
289 | {
290 | var localpath = Environment.CurrentDirectory;
291 | if (File.Exists(localpath + "\\Updater.exe")
292 | && File.Exists(localpath + "\\Updater.deps.json")
293 | && File.Exists(localpath + "\\Updater.dll")
294 | && File.Exists(localpath + "\\Updater.runtimeconfig.json"))
295 | {
296 | Process.Start("explorer.exe", localpath + "\\Updater.exe");
297 | Environment.Exit(0);
298 | }
299 | else
300 | {
301 | Growl.Error("您的ICora仿佛不完整");
302 | log.ErrorLog("DetectionSystem: Impact_Ultimate is incomplete", -0, "您的Impact_Ultimate不是完整的 您可以前往群中获取完整的Impact_Ultiamte");
303 | }
304 | }
305 | }
306 |
307 | public enum ControlType
308 | {
309 | 基础功能,
310 | 更多功能,
311 | 关于,
312 | }
313 | }
314 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // 有关程序集的一般信息由以下
5 | // 控制。更改这些特性值可修改
6 | // 与程序集关联的信息。
7 | [assembly: AssemblyTitle("Impact_Ultimate")]
8 | [assembly: AssemblyDescription("由XFP团队全体开发的多功能的原神启动器")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("XFP-Group")]
11 | [assembly: AssemblyProduct("XFP.ICora")]
12 | [assembly: AssemblyCopyright("Copyright © 2022 . GashByte")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // 将 ComVisible 设置为 false 会使此程序集中的类型
17 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
18 | //请将此类型的 ComVisible 特性设置为 true。
19 | [assembly: ComVisible(false)]
20 |
21 | //若要开始生成可本地化的应用程序,请设置
22 | //.csproj 文件中的 CultureYouAreCodingWith
23 | //例如,如果您在源文件中使用的是美国英语,
24 | //使用的是美国英语,请将 设置为 en-US。 然后取消
25 | //对以下 NeutralResourceLanguage 特性的注释。 更新
26 | //以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
27 |
28 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
29 |
30 |
31 | [assembly: ThemeInfo(
32 | ResourceDictionaryLocation.None, //主题特定资源词典所处位置
33 | //(未在页面中找到资源时使用,
34 | //或应用程序资源字典中找到时使用)
35 | ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
36 | //(未在页面中找到资源时使用,
37 | //、应用程序或任何主题专用资源字典中找到时使用)
38 | )]
39 |
40 |
41 | // 程序集的版本信息由下列四个值组成:
42 | //
43 | // 主版本
44 | // 次版本
45 | // 生成号
46 | // 修订号
47 | //
48 | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
49 | //通过使用 "*",如下所示:
50 | // [assembly: AssemblyVersion("1.0.*")]
51 | [assembly: AssemblyVersion("0.0.1.0")]
52 | [assembly: AssemblyFileVersion("0.0.1.0")]
53 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本: 4.0.30319.42000
5 | //
6 | // 对此文件的更改可能导致不正确的行为,如果
7 | // 重新生成代码,则所做更改将丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace XFP.ICora.Properties
12 | {
13 |
14 |
15 | ///
16 | /// 强类型资源类,用于查找本地化字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// 返回此类使用的缓存 ResourceManager 实例。
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("XFP.ICora.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// 重写当前线程的 CurrentUICulture 属性,对
56 | /// 使用此强类型资源类的所有资源查找执行重写。
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 | ..\Resources\DailyTask.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
123 |
124 |
125 | ..\Resources\Domain.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
126 |
127 |
128 | ..\Resources\HomeCoin.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
129 |
130 |
131 | ..\Resources\Mora.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
132 |
133 |
134 | ..\Resources\PaimonEmotion.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
135 |
136 |
137 | ..\Resources\Primogems.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
138 |
139 |
140 | ..\Resources\Resin.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
141 |
142 |
143 | ..\Resources\ResinFull.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
144 |
145 |
146 | ..\Resources\Transformer.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
147 |
148 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace XFP.ICora.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 |
26 | [global::System.Configuration.UserScopedSettingAttribute()]
27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
28 | [global::System.Configuration.DefaultSettingValueAttribute("")]
29 | public string UserCookie {
30 | get {
31 | return ((string)(this["UserCookie"]));
32 | }
33 | set {
34 | this["UserCookie"] = value;
35 | }
36 | }
37 |
38 | [global::System.Configuration.UserScopedSettingAttribute()]
39 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
40 | [global::System.Configuration.DefaultSettingValueAttribute("0")]
41 | public int LastUid {
42 | get {
43 | return ((int)(this["LastUid"]));
44 | }
45 | set {
46 | this["LastUid"] = value;
47 | }
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | 0
10 |
11 |
12 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/README.md:
--------------------------------------------------------------------------------
1 | ## Cora Open Source!
2 | ## XFP.Impace_Ultimate.Cora V1.3.10(Now Version)
3 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Resources/DailyTask.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GashByte/ICora/75aab93fba19cf4e6771ae7d38f7073100f7cc0e/XFP.Impact_Ultimate/XFP.Cora/Resources/DailyTask.png
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Resources/Domain.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GashByte/ICora/75aab93fba19cf4e6771ae7d38f7073100f7cc0e/XFP.Impact_Ultimate/XFP.Cora/Resources/Domain.png
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Resources/HarmonyOS_Sans_SC_Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GashByte/ICora/75aab93fba19cf4e6771ae7d38f7073100f7cc0e/XFP.Impact_Ultimate/XFP.Cora/Resources/HarmonyOS_Sans_SC_Regular.ttf
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Resources/HomeCoin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GashByte/ICora/75aab93fba19cf4e6771ae7d38f7073100f7cc0e/XFP.Impact_Ultimate/XFP.Cora/Resources/HomeCoin.png
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Resources/Mora.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GashByte/ICora/75aab93fba19cf4e6771ae7d38f7073100f7cc0e/XFP.Impact_Ultimate/XFP.Cora/Resources/Mora.png
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Resources/PaimonEmotion.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GashByte/ICora/75aab93fba19cf4e6771ae7d38f7073100f7cc0e/XFP.Impact_Ultimate/XFP.Cora/Resources/PaimonEmotion.png
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Resources/Primogems.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GashByte/ICora/75aab93fba19cf4e6771ae7d38f7073100f7cc0e/XFP.Impact_Ultimate/XFP.Cora/Resources/Primogems.png
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Resources/Resin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GashByte/ICora/75aab93fba19cf4e6771ae7d38f7073100f7cc0e/XFP.Impact_Ultimate/XFP.Cora/Resources/Resin.png
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Resources/ResinFull.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GashByte/ICora/75aab93fba19cf4e6771ae7d38f7073100f7cc0e/XFP.Impact_Ultimate/XFP.Cora/Resources/ResinFull.png
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Resources/Transformer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GashByte/ICora/75aab93fba19cf4e6771ae7d38f7073100f7cc0e/XFP.Impact_Ultimate/XFP.Cora/Resources/Transformer.png
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Service/HoyolabService.cs:
--------------------------------------------------------------------------------
1 | //Copyright (c) XFP Group and Contributors. All rights resvered.
2 | //Licensed under the MIT License.
3 |
4 | using System.Threading.Tasks;
5 |
6 | namespace XFP.ICora.Hoyolab.Service
7 | {
8 | public class HoyolabService
9 | {
10 | private HoyolabClient hoyolabClient;
11 |
12 | public HoyolabService(HoyolabClient hoyolabClient)
13 | {
14 | this.hoyolabClient = hoyolabClient;
15 | }
16 |
17 | public async Task GetHoyolabUserInfoAsync(string cookie)
18 | {
19 | var user = await hoyolabClient.GetHoyolabUserInfoAsync(cookie);
20 | return user;
21 | }
22 |
23 | public async Task> GetGenshinRoleInfoListAsync(string cookie)
24 | {
25 | var roles = await hoyolabClient.GetGenshinRoleInfoListAsync(cookie);
26 | return roles;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Utlis/Base/ModuleVersion.cs:
--------------------------------------------------------------------------------
1 | //Copyright(c) XFP Group and Contributors. All rights reserved.
2 | //Licensed under the MIT License.
3 |
4 | namespace XFP.ICora.Utils.Base
5 | {
6 | public enum ModuleVersion
7 | {
8 | ///
9 | /// 无版本
10 | ///
11 | None = 0,
12 |
13 | ///
14 | /// 基础版本 ICora正常发布的用户版本
15 | ///
16 | BasicEdition = 1,
17 |
18 | ///
19 | /// Beta版本 打钱获取QWQ
20 | ///
21 | BetaEdition = 2,
22 |
23 | ///
24 | /// 开发者版本 就你小子也想有开发者版本?
25 | ///
26 | DevelopmentEdition = 3,
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Utlis/DataProvider.cs:
--------------------------------------------------------------------------------
1 | //Copyright(c) XFP Group and Contributors. All rights reserved.
2 | //Licensed under the MIT License.
3 |
4 | namespace XFP.ICora.Utils
5 | {
6 | public class DataProvider
7 | {
8 | KeySetter key = new();
9 |
10 | #region definition
11 | #region public:
12 | public string Version => "1.3.10";
13 | public string DataBasePath = Environment.CurrentDirectory + "\\DataBase";
14 | public string DataLog = Environment.CurrentDirectory + "\\DataBase\\DataLog.log";
15 | public string TempLog = Environment.CurrentDirectory + "\\DataBase\\TempLog.log";
16 | public string ErrorLog = Environment.CurrentDirectory + "\\DataBase\\ErrorLog.log";
17 | public string SettingsData = Environment.CurrentDirectory + "\\DataBase\\Settings.log";
18 | public ModuleVersion ModeVersion = ModuleVersion.DevelopmentEdition;
19 | public string HoyolabAccountData = Environment.CurrentDirectory + "\\DataBase\\HoyolabAccountData";
20 | public string EncryptKey = "ICORAHASX41HBL42KVGO992MLLAS6DJ0";
21 | #endregion
22 |
23 | #region private:
24 | private bool IsFristCreateFile = false;
25 | #endregion
26 | #endregion
27 |
28 | public DataProvider()
29 | {
30 | #region 初始化载入文件
31 | if (!Directory.Exists(DataBasePath))
32 | Directory.CreateDirectory(DataBasePath);
33 | if (!File.Exists(DataLog))
34 | {
35 | File.Create(DataLog);
36 | IsFristCreateFile = true;
37 | key.sk("Initialized", "False");
38 | }
39 | if (!File.Exists(TempLog))
40 | {
41 | File.Create(TempLog);
42 | IsFristCreateFile = true;
43 | key.sk("Initialized", "False");
44 | }
45 | if (!File.Exists(ErrorLog))
46 | {
47 | File.Create(ErrorLog);
48 | IsFristCreateFile = true;
49 | key.sk("Initialized", "False");
50 | }
51 | if (!File.Exists(SettingsData))
52 | {
53 | File.Create(SettingsData);
54 | IsFristCreateFile = true;
55 | key.sk("Initialized", "False");
56 | }
57 | #endregion
58 | Initialize();
59 | }
60 |
61 | public void Initialize()
62 | {
63 | #region 基础数据写入
64 | if (IsFristCreateFile == true
65 | || key.gk("Initialized") == string.Empty
66 | || key.gk("Initialized") == "False")
67 | {
68 | try
69 | {
70 | #region DataLog Basic Log
71 | using (StreamWriter sw = new StreamWriter(DataLog, false))
72 | {
73 | sw.WriteLine("#this file will save some user basic log");
74 | sw.WriteLine("#If you deleted it, it means you will lose some data");
75 | sw.WriteLine();
76 | sw.WriteLine("UserModuleVersion=" + ModuleVersion.BasicEdition.ToString());
77 | sw.WriteLine("UserVersion=" + Version);
78 | sw.WriteLine("_Initialized=true");
79 | }
80 | #endregion
81 |
82 | #region TempLog
83 | using (StreamWriter sw = new StreamWriter(TempLog, true))
84 | {
85 | sw.WriteLine("#this file will save some user temp log");
86 | sw.WriteLine("#If you delete it any time If you want to clean up the space");
87 | sw.WriteLine();
88 | }
89 | #endregion
90 |
91 | #region ErrorLog
92 | using (StreamWriter sw = new StreamWriter(ErrorLog, true))
93 | {
94 | sw.WriteLine("#this file will save some user error log");
95 | sw.WriteLine("#It will store all problems If you encounter any problems you can send it to the administrator for repair");
96 | sw.WriteLine();
97 | }
98 | #endregion
99 |
100 | #region SettingsLog
101 | using (StreamWriter sw = new StreamWriter(SettingsData, true))
102 | {
103 | sw.WriteLine("#this file will save some user settings");
104 | sw.WriteLine("#If you delete it, it means you will lose some of your own settings");
105 | }
106 | #endregion
107 |
108 | key.sk("Initialized", "True");
109 | }
110 | catch { return; }
111 | }
112 | #endregion
113 | }
114 | }
115 | }
116 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Utlis/DllUtils.cs:
--------------------------------------------------------------------------------
1 | //Copyright(c) XFP Group and Contributors. All rights reserved.
2 | //Licensed under the MIT License.
3 |
4 | using System.Runtime.InteropServices;
5 |
6 | namespace XFP.ICora.Utils
7 | {
8 | public class DllUtils
9 | {
10 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
11 | public struct STARTUPINFO
12 | {
13 | public int cb;
14 | public string lpReserved;
15 | public string lpDesktop;
16 | public string lpTitle;
17 | public int dwX;
18 | public int dwY;
19 | public int dwXSize;
20 | public int dwYSize;
21 | public int dwXCountChars;
22 | public int dwYCountChars;
23 | public int dwFillAttribute;
24 | public int dwFlags;
25 | public int wShowWindow;
26 | public int cbReserved2;
27 | public IntPtr lpReserved2;
28 | public IntPtr hStdInput;
29 | public IntPtr hStdOutput;
30 | public IntPtr hStdError;
31 | }
32 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
33 | public struct STARTUPINFOEX
34 | {
35 | public STARTUPINFO StartupInfo;
36 | public IntPtr lpAttributeList;
37 | }
38 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
39 | public struct PROCESS_INFORMATION
40 | {
41 | public IntPtr hProcess;
42 | public IntPtr hThread;
43 | public uint dwProcessId;
44 | public uint dwThreadId;
45 | }
46 | [DllImport("kernel32.dll", SetLastError = true)]
47 | public static extern IntPtr GetModuleHandle(string lpModuleName);
48 | [DllImport("kernel32.dll", SetLastError = true)]
49 | public static extern IntPtr OpenProcess(uint dwDesiredAccess, bool bInheritHandle, uint dwProcessId);
50 | [DllImport("kernel32.dll", SetLastError = true)]
51 | public static extern IntPtr GetProcAddress(IntPtr hModule, string procName);
52 | [DllImport("kernel32.dll", SetLastError = true)]
53 | public static extern uint ResumeThread(IntPtr hThread);
54 | [DllImport("kernel32.dll", SetLastError = true)]
55 | public static extern IntPtr VirtualAllocEx(IntPtr hProcess, IntPtr lpAddress, uint dwSize, uint flAllocationType, uint flProtect);
56 | [DllImport("kernel32.dll", SetLastError = true)]
57 | public static extern bool VirtualFreeEx(IntPtr hProcess, IntPtr lpAddress, uint dwSize, uint dwFreeType);
58 | [DllImport("kernel32.dll", SetLastError = true)]
59 | public static extern bool WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, byte[] lpBuffer, uint nSize, out int lpNumberOfBytesWritten);
60 | [DllImport("kernel32.dll", SetLastError = true)]
61 | public static extern IntPtr CreateRemoteThread(IntPtr hProcess, IntPtr lpThreadAttributes, uint dwStackSize, IntPtr lpStartAddress, IntPtr lpParameter, uint dwCreationFlags, IntPtr lpThreadId);
62 | [DllImport("kernel32.dll", SetLastError = true)]
63 | public static extern IntPtr WaitForSingleObject(IntPtr hProcess, uint dwMilliseconds);
64 | [DllImport("kernel32.dll", SetLastError = true)]
65 | public static extern bool CloseHandle(IntPtr handle);
66 | [DllImport("kernel32.dll", SetLastError = true)]
67 | public static extern uint GetLastError();
68 | [DllImport("kernel32.dll", SetLastError = true)]
69 | public static extern IntPtr GetCurrentProcess();
70 | [DllImport("advapi32.dll")]
71 | public static extern bool OpenProcessToken(IntPtr ProcessHandle, uint DesiredAccess, out IntPtr TokenHandle);
72 | [DllImport("kernel32.dll", SetLastError = true)]
73 | [return: MarshalAs(UnmanagedType.Bool)]
74 | public static extern bool InitializeProcThreadAttributeList(IntPtr lpAttributeList, uint dwAttributeCount, uint dwFlags, ref IntPtr lpSize);
75 | [DllImport("kernel32.dll", SetLastError = true)]
76 | [return: MarshalAs(UnmanagedType.Bool)]
77 | public static extern bool UpdateProcThreadAttribute(IntPtr lpAttributeList, uint dwFlags, IntPtr Attribute, IntPtr lpValue, IntPtr cbSize, IntPtr lpPreviousValue, IntPtr lpReturnSize);
78 | [DllImport("kernel32.dll", SetLastError = true)]
79 | [return: MarshalAs(UnmanagedType.Bool)]
80 | public static extern bool DeleteProcThreadAttributeList(IntPtr lpAttributeList);
81 | [DllImport("advapi32.dll", EntryPoint = "CreateProcessAsUser", SetLastError = true, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
82 | public static extern bool CreateProcessAsUser(IntPtr hToken, String lpApplicationName, String lpCommandLine, IntPtr lpProcessAttributes, IntPtr lpThreadAttributes, bool bInheritHandle, uint dwCreationFlags, IntPtr lpEnvironment, String lpCurrentDirectory, ref STARTUPINFO lpStartupInfo, out PROCESS_INFORMATION lpProcessInformation);
83 |
84 | internal static bool WriteProcessMemory(IntPtr hProc, IntPtr pDllPath, char[] chars, uint v, out int _)
85 | {
86 | throw new NotImplementedException();
87 | }
88 |
89 | internal static bool WriteProcessMemory(IntPtr hProc, IntPtr pDllPath, object value, uint v, out int _)
90 | {
91 | throw new NotImplementedException();
92 | }
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Utlis/GetFormUrl.cs:
--------------------------------------------------------------------------------
1 | //Copyright(c) XFP Group and Contributors. All rights reserved.
2 | //Licensed under the MIT License.
3 |
4 | namespace XFP.ICora.Utils
5 | {
6 | public class GetFormUrl
7 | {
8 | public string Get(string url)
9 | {
10 | try
11 | {
12 | string strBuff = "";
13 | int byteRead = 0;
14 | char[] cbuffer = new char[256];
15 | HttpWebRequest httpReq = (HttpWebRequest)WebRequest.Create(new Uri(url));
16 | HttpWebResponse httpResp = (HttpWebResponse)httpReq.GetResponse();
17 | Stream respStream = httpResp.GetResponseStream();
18 | StreamReader respStreamReader = new StreamReader(respStream, System.Text.Encoding.UTF8);
19 | byteRead = respStreamReader.Read(cbuffer, 0, 256);
20 | while (byteRead != 0)
21 | {
22 | string strResp = new string(cbuffer, 0, byteRead);
23 | strBuff = strBuff + strResp;
24 | byteRead = respStreamReader.Read(cbuffer, 0, 256);
25 | }
26 | respStream.Close();
27 | return strBuff;
28 | }
29 | catch (Exception ex)
30 | {
31 | return ex.Message;
32 | }
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Utlis/KeySetter.cs:
--------------------------------------------------------------------------------
1 | //Copyright(c) XFP Group and Contributors. All rights reserved.
2 | //Licensed under the MIT License.
3 |
4 | namespace XFP.ICora.Utils
5 | {
6 | public class KeySetter
7 | {
8 | RegistryKey key = Registry.CurrentUser.OpenSubKey("Software", true).CreateSubKey("Impact_Ultimate");
9 |
10 | public void sk(string name, string value)
11 | {
12 | key.SetValue(name, value);
13 | }
14 |
15 | public string gk(string name)
16 | {
17 | return (string)key.GetValue(name);
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Utlis/Log/LogWriter.cs:
--------------------------------------------------------------------------------
1 | //Copyright(c) XFP Group and Contributors. All rights reserved.
2 | //Licensed under the MIT License.
3 |
4 | namespace XFP.ICora.Utils.Log
5 | {
6 | public class LogWriter
7 | {
8 | DataProvider data = new();
9 |
10 | public void ErrorLog(string ErrorMessage, int returnCode, string Solution)
11 | {
12 | var LogPath = data.ErrorLog;
13 | try
14 | {
15 | using (StreamWriter sw = new StreamWriter(LogPath, true))
16 | {
17 | sw.WriteLine();
18 | sw.WriteLine("##################### Error Log #####################");
19 | sw.WriteLine("Error Message: ");
20 | sw.WriteLine(ErrorMessage);
21 | sw.WriteLine("Return Code:");
22 | sw.WriteLine(returnCode);
23 | sw.WriteLine("Time");
24 | DateTime dt = DateTime.Now;
25 | sw.WriteLine(dt.ToString());
26 | sw.WriteLine("Solution:");
27 | sw.WriteLine(Solution);
28 | sw.WriteLine("##################### Error Log #####################");
29 | }
30 | }
31 | catch (Exception ex)
32 | {
33 | ErrorLog(ex.Message, -1, "这是未知的问题");
34 | }
35 | }
36 |
37 | public void ErrorLog(string ErrorMessage, int returnCode)
38 | {
39 | var LogPath = data.ErrorLog;
40 | try
41 | {
42 | using (StreamWriter sw = new StreamWriter(LogPath, true))
43 | {
44 | sw.WriteLine();
45 | sw.WriteLine("##################### Error Log #####################");
46 | sw.WriteLine("Error Message: ");
47 | sw.WriteLine(ErrorMessage);
48 | sw.WriteLine("Return Code:");
49 | sw.WriteLine(returnCode);
50 | sw.WriteLine("Time");
51 | DateTime dt = DateTime.Now;
52 | sw.WriteLine(dt.ToString());
53 | sw.WriteLine("##################### Error Log #####################");
54 | }
55 | }
56 | catch (Exception ex)
57 | {
58 | ErrorLog(ex.Message, -1, "这是未知的问题");
59 | }
60 | }
61 |
62 | public void TempLog(string TempMessage)
63 | {
64 | var LogPath = data.TempLog;
65 | try
66 | {
67 | using (StreamWriter sw = new StreamWriter(LogPath, true))
68 | {
69 | sw.WriteLine();
70 | sw.WriteLine(TempMessage);
71 | }
72 | }
73 | catch (Exception ex)
74 | {
75 | ErrorLog(ex.Message, -1, "这是未知的问题");
76 | }
77 | }
78 |
79 | public void DataLog(string DataMessage)
80 | {
81 | var LogPath = data.DataLog;
82 | try
83 | {
84 | using (StreamWriter sw = new StreamWriter(LogPath, false))
85 | {
86 | sw.WriteLine(DataMessage);
87 | }
88 | }
89 | catch (Exception ex)
90 | {
91 | ErrorLog(ex.Message, -1, "这是未知的问题");
92 | }
93 | }
94 | }
95 | }
96 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Utlis/MenuInfo.cs:
--------------------------------------------------------------------------------
1 | //Copyright(c) XFP Group and Contributors. All rights reserved.
2 | //Licensed under the MIT License.
3 |
4 | namespace XFP.ICora.Model
5 | {
6 | public class MenuInfo
7 | {
8 | private string _Name;
9 |
10 | public string Name
11 | {
12 | get { return _Name; }
13 | set { _Name = value; }
14 | }
15 |
16 | private string _GroupId;
17 |
18 | public string GroupId
19 | {
20 | get { return _GroupId; }
21 | set { _GroupId = value; }
22 | }
23 |
24 | private string _GroupName;
25 |
26 | public string GroupName
27 | {
28 | get { return _GroupName; }
29 | set { _GroupName = value; }
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Utlis/Model/DeveloperOption.cs:
--------------------------------------------------------------------------------
1 | //Copyright(c) XFP Group and Contributors. All rights reserved.
2 | //Licensed under the MIT License.
3 |
4 | namespace XFP.ICora.Utils.Model
5 | {
6 | public class DeveloperOption
7 | {
8 | #region define
9 |
10 | public bool UseDeveloperOptions = false;
11 |
12 | #endregion
13 |
14 | public DeveloperOption()
15 | {
16 |
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Utlis/Model/Files/DocumentSerializer.cs:
--------------------------------------------------------------------------------
1 | using System.Xml.Serialization;
2 |
3 | namespace XFP.ICora.Utlis.Model.Files
4 | {
5 | public class DocumentSerializer
6 | {
7 | ///
8 | /// 序列化数据
9 | ///
10 | /// 对象类型
11 | /// 对象
12 | ///
13 | public string Serializer(T t)
14 | {
15 | using (StringWriter sw = new())
16 | {
17 | XmlSerializer serializer = new XmlSerializer(typeof(T));
18 | serializer.Serialize(sw, t);
19 | return sw.ToString();
20 | }
21 | }
22 |
23 | ///
24 | /// 反序列化
25 | ///
26 | /// 对象类型
27 | /// 序列化后的数据
28 | ///
29 | public object Deserialize(Type type, string document)
30 | {
31 | using (StringReader sr = new(document))
32 | {
33 | XmlSerializer serializer = new XmlSerializer(type);
34 | return serializer.Deserialize(sr);
35 | }
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Utlis/Model/Files/INIFiles.cs:
--------------------------------------------------------------------------------
1 | //Copyright(c) XFP Group and Contributors. All rights reserved.
2 | //Licensed under the MIT License.
3 |
4 | namespace XFP.ICora.Utils.Model.Files
5 | {
6 | public class INIFiles
7 | {
8 | // 声明INI文件的写操作函数 WritePrivateProfileString()
9 | [System.Runtime.InteropServices.DllImport("kernel32")]
10 | private static extern long WritePrivateProfileString(string section, string key, string val, string filePath);
11 |
12 | // 声明INI文件的读操作函数 GetPrivateProfileString()
13 | [System.Runtime.InteropServices.DllImport("kernel32")]
14 | private static extern int GetPrivateProfileString(string section, string key, string def, System.Text.StringBuilder retVal, int size, string filePath);
15 |
16 |
17 | /// 写入INI的方法
18 | public void INIWrite(string section, string key, string value, string path)
19 | {
20 | // section=配置节点名称,key=键名,value=返回键值,path=路径
21 | WritePrivateProfileString(section, key, value, path);
22 | }
23 |
24 | //读取INI的方法
25 | public string INIRead(string section, string key, string path)
26 | {
27 | // 每次从ini中读取多少字节
28 | System.Text.StringBuilder temp = new System.Text.StringBuilder(255);
29 |
30 | // section=配置节点名称,key=键名,temp=上面,path=路径
31 | GetPrivateProfileString(section, key, "", temp, 255, path);
32 | return temp.ToString();
33 |
34 | }
35 |
36 | //删除一个INI文件
37 | public void INIDelete(string FilePath)
38 | {
39 | File.Delete(FilePath);
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Utlis/PrimaryScreen.cs:
--------------------------------------------------------------------------------
1 | //Copyright(c) XFP Group and Contributors. All rights reserved.
2 | //Licensed under the MIT License.
3 |
4 | using System.Drawing;
5 | using System.Runtime.InteropServices;
6 | using Size = System.Drawing.Size;
7 |
8 | namespace XFP.ICora.Utils
9 | {
10 |
11 | public class PrimaryScreen
12 | {
13 | #region Win32 API
14 | [DllImport("user32.dll")]
15 | static extern IntPtr GetDC(IntPtr ptr);
16 | [DllImport("gdi32.dll")]
17 | static extern int GetDeviceCaps(
18 | IntPtr hdc, // handle to DC
19 | int nIndex // index of capability
20 | );
21 | [DllImport("user32.dll", EntryPoint = "ReleaseDC")]
22 | static extern IntPtr ReleaseDC(IntPtr hWnd, IntPtr hDc);
23 | #endregion
24 | #region DeviceCaps常量
25 | const int HORZRES = 8;
26 | const int VERTRES = 10;
27 | const int LOGPIXELSX = 88;
28 | const int LOGPIXELSY = 90;
29 | const int DESKTOPVERTRES = 117;
30 | const int DESKTOPHORZRES = 118;
31 | #endregion
32 |
33 | #region 属性
34 | ///
35 | /// 获取屏幕分辨率当前物理大小
36 | ///
37 | public Size WorkingArea
38 | {
39 | get
40 | {
41 | IntPtr hdc = GetDC(IntPtr.Zero);
42 | Size size = new Size();
43 | size.Width = GetDeviceCaps(hdc, HORZRES);
44 | size.Height = GetDeviceCaps(hdc, VERTRES);
45 | ReleaseDC(IntPtr.Zero, hdc);
46 | return size;
47 | }
48 | }
49 | ///
50 | /// 当前系统DPI_X 大小 一般为96
51 | ///
52 | public int DpiX
53 | {
54 | get
55 | {
56 | IntPtr hdc = GetDC(IntPtr.Zero);
57 | int DpiX = GetDeviceCaps(hdc, LOGPIXELSX);
58 | ReleaseDC(IntPtr.Zero, hdc);
59 | return DpiX;
60 | }
61 | }
62 | ///
63 | /// 当前系统DPI_Y 大小 一般为96
64 | ///
65 | public int DpiY
66 | {
67 | get
68 | {
69 | IntPtr hdc = GetDC(IntPtr.Zero);
70 | int DpiX = GetDeviceCaps(hdc, LOGPIXELSY);
71 | ReleaseDC(IntPtr.Zero, hdc);
72 | return DpiX;
73 | }
74 | }
75 | ///
76 | /// 获取真实设置的桌面分辨率大小
77 | ///
78 | public Size DESKTOP
79 | {
80 | get
81 | {
82 | IntPtr hdc = GetDC(IntPtr.Zero);
83 | Size size = new Size();
84 | size.Width = GetDeviceCaps(hdc, DESKTOPHORZRES);
85 | size.Height = GetDeviceCaps(hdc, DESKTOPVERTRES);
86 | ReleaseDC(IntPtr.Zero, hdc);
87 | return size;
88 | }
89 | }
90 |
91 | ///
92 | /// 获取宽度缩放百分比
93 | ///
94 | public float ScaleX
95 | {
96 | get
97 | {
98 | IntPtr hdc = GetDC(IntPtr.Zero);
99 | int t = GetDeviceCaps(hdc, DESKTOPHORZRES);
100 | int d = GetDeviceCaps(hdc, HORZRES);
101 | float ScaleX = (float)GetDeviceCaps(hdc, DESKTOPHORZRES) / (float)GetDeviceCaps(hdc, HORZRES);
102 | ReleaseDC(IntPtr.Zero, hdc);
103 | return ScaleX;
104 | }
105 | }
106 | ///
107 | /// 获取高度缩放百分比
108 | ///
109 | public float ScaleY
110 | {
111 | get
112 | {
113 | IntPtr hdc = GetDC(IntPtr.Zero);
114 | float ScaleY = (float)(float)GetDeviceCaps(hdc, DESKTOPVERTRES) / (float)GetDeviceCaps(hdc, VERTRES);
115 | ReleaseDC(IntPtr.Zero, hdc);
116 | return ScaleY;
117 | }
118 | }
119 | #endregion
120 | }
121 | }
122 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/Utlis/YSAccount.cs:
--------------------------------------------------------------------------------
1 | //Copyright(c) XFP Group and Contributors. All rights reserved.
2 | //Licensed under the MIT License.
3 |
4 | using Newtonsoft.Json;
5 | using System.Text;
6 |
7 | namespace XFP.ICora.Utils
8 | {
9 | [Serializable]
10 | public class YSAccount
11 | {
12 | public string Name { get; set; }
13 |
14 | public string MIHOYOSDK_ADL_PROD_CN_h3123967166 { get; set; }
15 |
16 | public string GENERAL_DATA_h2389025596 { get; set; }
17 |
18 | public static YSAccount ReadFromDisk(string name)
19 | {
20 | string p = Path.Combine(Environment.CurrentDirectory, "UserData", name);
21 | string json = File.ReadAllText(p);
22 | YSAccount acct = JsonConvert.DeserializeObject(json);
23 | return acct;
24 | }
25 |
26 | public void WriteToDisk()
27 | {
28 | File.WriteAllText(Path.Combine(Environment.CurrentDirectory, "UserData", Name), JsonConvert.SerializeObject(this));
29 | }
30 |
31 | public static void DeleteFromDisk(string name)
32 | {
33 | File.Delete(Path.Combine(Environment.CurrentDirectory, "UserData", name));
34 | }
35 |
36 | public static YSAccount ReadFromRegedit(bool needSettings)
37 | {
38 | YSAccount acct = new YSAccount();
39 | acct.MIHOYOSDK_ADL_PROD_CN_h3123967166 = GetStringFromRegedit("MIHOYOSDK_ADL_PROD_CN_h3123967166");
40 | if (needSettings)
41 | {
42 | acct.GENERAL_DATA_h2389025596 = GetStringFromRegedit("GENERAL_DATA_h2389025596");
43 | }
44 | return acct;
45 | }
46 |
47 | public void WriteToRegedit()
48 | {
49 | if (string.IsNullOrWhiteSpace(MIHOYOSDK_ADL_PROD_CN_h3123967166))
50 | {
51 | //保存账户内容为空
52 | }
53 | else
54 | {
55 | SetStringToRegedit("MIHOYOSDK_ADL_PROD_CN_h3123967166", MIHOYOSDK_ADL_PROD_CN_h3123967166);
56 | if (!string.IsNullOrWhiteSpace(GENERAL_DATA_h2389025596))
57 | {
58 | SetStringToRegedit("GENERAL_DATA_h2389025596", GENERAL_DATA_h2389025596);
59 | }
60 |
61 | }
62 | }
63 |
64 | private static string GetStringFromRegedit(string key)
65 | {
66 | object value = Registry.GetValue(@"HKEY_CURRENT_USER\Software\miHoYo\原神", key, "");
67 | return Encoding.UTF8.GetString((byte[])value);
68 | }
69 |
70 | private static void SetStringToRegedit(string key, string value)
71 | {
72 | Registry.SetValue(@"HKEY_CURRENT_USER\Software\miHoYo\原神", key, Encoding.UTF8.GetBytes(value));
73 | }
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/XFP.ICora.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | net7.0-windows
4 | WinExe
5 | false
6 | True
7 | true
8 |
9 |
10 | GashByte-透明.ico
11 |
12 |
13 | app1.manifest
14 | XFP.ICora.App
15 | x64
16 | False
17 | bin\
18 | obj\
19 | False
20 | OnBuildSuccess
21 | False
22 |
23 |
24 |
25 |
26 |
27 | True
28 | XFP.ICora
29 | XFP.ICora
30 | XFPGroup
31 | x3zF
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | Never
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 | all
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 | Never
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 | True
98 | True
99 | Settings.settings
100 |
101 |
102 |
103 |
104 | SettingsSingleFileGenerator
105 | Settings.Designer.cs
106 |
107 |
108 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/XFP.ICora.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | false
5 |
6 |
7 | publish\
8 |
9 |
10 |
11 |
12 |
13 | zh-CN
14 | false
15 |
16 |
17 |
18 | Code
19 |
20 |
21 | Code
22 |
23 |
24 | Code
25 |
26 |
27 | Code
28 |
29 |
30 | Code
31 |
32 |
33 | Code
34 |
35 |
36 | Code
37 |
38 |
39 |
40 |
41 | Designer
42 |
43 |
44 | Designer
45 |
46 |
47 | Designer
48 |
49 |
50 | Designer
51 |
52 |
53 | Designer
54 |
55 |
56 | Designer
57 |
58 |
59 | Designer
60 |
61 |
62 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/app.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
54 |
62 |
63 |
64 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.Cora/app1.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
54 |
62 |
63 |
64 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.ICora.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.4.33110.190
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "XFPGroup", "XFPGroup", "{D94FFF44-B60E-4F58-AE5C-9DDCF5563BBE}"
7 | EndProject
8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XFP.Updater", "Updater\XFP.Updater.csproj", "{C38A4ED2-E352-40F3-918A-D02ABB34BE49}"
9 | EndProject
10 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XFP.CLDownloader", "CLDownloader\XFP.CLDownloader.csproj", "{E8BCE43F-BFE9-4BEF-BEDA-F4F1BAD1D0F4}"
11 | EndProject
12 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XFP.ICora", "XFP.ICora\XFP.ICora.csproj", "{2D1E3FCA-7BDA-4725-A64D-D1BE93A83CBB}"
13 | EndProject
14 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XFP.UnInstaller", "XFP.UnInstaller\XFP.UnInstaller.csproj", "{600BC6E7-58AF-424D-91F4-04F16DC86BDF}"
15 | EndProject
16 | Global
17 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
18 | Debug|Any CPU = Debug|Any CPU
19 | Debug|x64 = Debug|x64
20 | Debug|x86 = Debug|x86
21 | Release|Any CPU = Release|Any CPU
22 | Release|x64 = Release|x64
23 | Release|x86 = Release|x86
24 | EndGlobalSection
25 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
26 | {C38A4ED2-E352-40F3-918A-D02ABB34BE49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27 | {C38A4ED2-E352-40F3-918A-D02ABB34BE49}.Debug|Any CPU.Build.0 = Debug|Any CPU
28 | {C38A4ED2-E352-40F3-918A-D02ABB34BE49}.Debug|x64.ActiveCfg = Debug|Any CPU
29 | {C38A4ED2-E352-40F3-918A-D02ABB34BE49}.Debug|x64.Build.0 = Debug|Any CPU
30 | {C38A4ED2-E352-40F3-918A-D02ABB34BE49}.Debug|x86.ActiveCfg = Debug|Any CPU
31 | {C38A4ED2-E352-40F3-918A-D02ABB34BE49}.Debug|x86.Build.0 = Debug|Any CPU
32 | {C38A4ED2-E352-40F3-918A-D02ABB34BE49}.Release|Any CPU.ActiveCfg = Release|Any CPU
33 | {C38A4ED2-E352-40F3-918A-D02ABB34BE49}.Release|Any CPU.Build.0 = Release|Any CPU
34 | {C38A4ED2-E352-40F3-918A-D02ABB34BE49}.Release|x64.ActiveCfg = Release|Any CPU
35 | {C38A4ED2-E352-40F3-918A-D02ABB34BE49}.Release|x64.Build.0 = Release|Any CPU
36 | {C38A4ED2-E352-40F3-918A-D02ABB34BE49}.Release|x86.ActiveCfg = Release|Any CPU
37 | {C38A4ED2-E352-40F3-918A-D02ABB34BE49}.Release|x86.Build.0 = Release|Any CPU
38 | {E8BCE43F-BFE9-4BEF-BEDA-F4F1BAD1D0F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
39 | {E8BCE43F-BFE9-4BEF-BEDA-F4F1BAD1D0F4}.Debug|Any CPU.Build.0 = Debug|Any CPU
40 | {E8BCE43F-BFE9-4BEF-BEDA-F4F1BAD1D0F4}.Debug|x64.ActiveCfg = Debug|Any CPU
41 | {E8BCE43F-BFE9-4BEF-BEDA-F4F1BAD1D0F4}.Debug|x64.Build.0 = Debug|Any CPU
42 | {E8BCE43F-BFE9-4BEF-BEDA-F4F1BAD1D0F4}.Debug|x86.ActiveCfg = Debug|Any CPU
43 | {E8BCE43F-BFE9-4BEF-BEDA-F4F1BAD1D0F4}.Debug|x86.Build.0 = Debug|Any CPU
44 | {E8BCE43F-BFE9-4BEF-BEDA-F4F1BAD1D0F4}.Release|Any CPU.ActiveCfg = Release|Any CPU
45 | {E8BCE43F-BFE9-4BEF-BEDA-F4F1BAD1D0F4}.Release|Any CPU.Build.0 = Release|Any CPU
46 | {E8BCE43F-BFE9-4BEF-BEDA-F4F1BAD1D0F4}.Release|x64.ActiveCfg = Release|Any CPU
47 | {E8BCE43F-BFE9-4BEF-BEDA-F4F1BAD1D0F4}.Release|x64.Build.0 = Release|Any CPU
48 | {E8BCE43F-BFE9-4BEF-BEDA-F4F1BAD1D0F4}.Release|x86.ActiveCfg = Release|Any CPU
49 | {E8BCE43F-BFE9-4BEF-BEDA-F4F1BAD1D0F4}.Release|x86.Build.0 = Release|Any CPU
50 | {2D1E3FCA-7BDA-4725-A64D-D1BE93A83CBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
51 | {2D1E3FCA-7BDA-4725-A64D-D1BE93A83CBB}.Debug|Any CPU.Build.0 = Debug|Any CPU
52 | {2D1E3FCA-7BDA-4725-A64D-D1BE93A83CBB}.Debug|x64.ActiveCfg = Debug|Any CPU
53 | {2D1E3FCA-7BDA-4725-A64D-D1BE93A83CBB}.Debug|x64.Build.0 = Debug|Any CPU
54 | {2D1E3FCA-7BDA-4725-A64D-D1BE93A83CBB}.Debug|x86.ActiveCfg = Debug|Any CPU
55 | {2D1E3FCA-7BDA-4725-A64D-D1BE93A83CBB}.Debug|x86.Build.0 = Debug|Any CPU
56 | {2D1E3FCA-7BDA-4725-A64D-D1BE93A83CBB}.Release|Any CPU.ActiveCfg = Release|Any CPU
57 | {2D1E3FCA-7BDA-4725-A64D-D1BE93A83CBB}.Release|Any CPU.Build.0 = Release|Any CPU
58 | {2D1E3FCA-7BDA-4725-A64D-D1BE93A83CBB}.Release|x64.ActiveCfg = Release|Any CPU
59 | {2D1E3FCA-7BDA-4725-A64D-D1BE93A83CBB}.Release|x64.Build.0 = Release|Any CPU
60 | {2D1E3FCA-7BDA-4725-A64D-D1BE93A83CBB}.Release|x86.ActiveCfg = Release|Any CPU
61 | {2D1E3FCA-7BDA-4725-A64D-D1BE93A83CBB}.Release|x86.Build.0 = Release|Any CPU
62 | {600BC6E7-58AF-424D-91F4-04F16DC86BDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
63 | {600BC6E7-58AF-424D-91F4-04F16DC86BDF}.Debug|Any CPU.Build.0 = Debug|Any CPU
64 | {600BC6E7-58AF-424D-91F4-04F16DC86BDF}.Debug|x64.ActiveCfg = Debug|Any CPU
65 | {600BC6E7-58AF-424D-91F4-04F16DC86BDF}.Debug|x64.Build.0 = Debug|Any CPU
66 | {600BC6E7-58AF-424D-91F4-04F16DC86BDF}.Debug|x86.ActiveCfg = Debug|Any CPU
67 | {600BC6E7-58AF-424D-91F4-04F16DC86BDF}.Debug|x86.Build.0 = Debug|Any CPU
68 | {600BC6E7-58AF-424D-91F4-04F16DC86BDF}.Release|Any CPU.ActiveCfg = Release|Any CPU
69 | {600BC6E7-58AF-424D-91F4-04F16DC86BDF}.Release|Any CPU.Build.0 = Release|Any CPU
70 | {600BC6E7-58AF-424D-91F4-04F16DC86BDF}.Release|x64.ActiveCfg = Release|Any CPU
71 | {600BC6E7-58AF-424D-91F4-04F16DC86BDF}.Release|x64.Build.0 = Release|Any CPU
72 | {600BC6E7-58AF-424D-91F4-04F16DC86BDF}.Release|x86.ActiveCfg = Release|Any CPU
73 | {600BC6E7-58AF-424D-91F4-04F16DC86BDF}.Release|x86.Build.0 = Release|Any CPU
74 | EndGlobalSection
75 | GlobalSection(SolutionProperties) = preSolution
76 | HideSolutionNode = FALSE
77 | EndGlobalSection
78 | GlobalSection(NestedProjects) = preSolution
79 | {C38A4ED2-E352-40F3-918A-D02ABB34BE49} = {D94FFF44-B60E-4F58-AE5C-9DDCF5563BBE}
80 | {E8BCE43F-BFE9-4BEF-BEDA-F4F1BAD1D0F4} = {D94FFF44-B60E-4F58-AE5C-9DDCF5563BBE}
81 | {2D1E3FCA-7BDA-4725-A64D-D1BE93A83CBB} = {D94FFF44-B60E-4F58-AE5C-9DDCF5563BBE}
82 | {600BC6E7-58AF-424D-91F4-04F16DC86BDF} = {D94FFF44-B60E-4F58-AE5C-9DDCF5563BBE}
83 | EndGlobalSection
84 | GlobalSection(ExtensibilityGlobals) = postSolution
85 | SolutionGuid = {23E69633-DC88-4278-B3E4-8549964E56F3}
86 | EndGlobalSection
87 | EndGlobal
88 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.UnInstaller/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.UnInstaller/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 |
9 | namespace XFP.UnInstaller
10 | {
11 | ///
12 | /// Interaction logic for App.xaml
13 | ///
14 | public partial class App : Application
15 | {
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.UnInstaller/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 |
3 | [assembly: ThemeInfo(
4 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
5 | //(used if a resource is not found in the page,
6 | // or application resource dictionaries)
7 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
8 | //(used if a resource is not found in the page,
9 | // app, or any theme specific resource dictionaries)
10 | )]
11 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.UnInstaller/GashByte-透明.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GashByte/ICora/75aab93fba19cf4e6771ae7d38f7073100f7cc0e/XFP.Impact_Ultimate/XFP.UnInstaller/GashByte-透明.ico
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.UnInstaller/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.UnInstaller/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Win32;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Diagnostics;
5 | using System.IO;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows;
10 | using System.Windows.Controls;
11 | using System.Windows.Data;
12 | using System.Windows.Documents;
13 | using System.Windows.Input;
14 | using System.Windows.Media;
15 | using System.Windows.Media.Imaging;
16 | using System.Windows.Navigation;
17 | using System.Windows.Shapes;
18 |
19 | namespace XFP.UnInstaller
20 | {
21 | ///
22 | /// Interaction logic for MainWindow.xaml
23 | ///
24 | public partial class MainWindow : Window
25 | {
26 | public MainWindow()
27 | {
28 | InitializeComponent();
29 |
30 | if (MessageBox.Show
31 | ("您确定要卸载您的ICora 这是完全不可逆的操作?", "防误触提示",
32 | MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
33 | {
34 | try
35 | {
36 | var count = Directory.GetFiles(Environment.CurrentDirectory).Length;
37 | for (int i = 0; i < count; i++)
38 | {
39 | DirectoryInfo dir = new DirectoryInfo(Environment.CurrentDirectory);
40 | if (dir.Exists)
41 | {
42 | DirectoryInfo[] childs = dir.GetDirectories();
43 | foreach (DirectoryInfo child in childs)
44 | {
45 | child.Delete(true);
46 | }
47 | dir.Delete(true);
48 | }
49 | count--;
50 | }
51 | }
52 | catch
53 | {
54 | RegistryKey key = Registry.CurrentUser.OpenSubKey("Software", true);
55 | key.CreateSubKey("Impact_Ultimate");
56 | key.DeleteSubKey("Impact_Ultimate");
57 |
58 | MessageBox.Show("卸载成功 如果ICora依然存在 请手动打开 UnInstaller");
59 | ProcessStartInfo psi = new ProcessStartInfo("cmd.exe", "/C ping 1.1.1.1 -n 1 -w 1000 > Nul & Del " + Environment.CurrentDirectory + "\\XFP.UnInstaller.exe");
60 | psi.WindowStyle = ProcessWindowStyle.Hidden;
61 | psi.CreateNoWindow = true;
62 | Process.Start(psi);
63 | ProcessStartInfo psi2 = new ProcessStartInfo("cmd.exe", "/C ping 1.1.1.1 -n 1 -w 1000 > Nul & Del " + Environment.CurrentDirectory + "\\XFP.UnInstaller.dll");
64 | psi2.WindowStyle = ProcessWindowStyle.Hidden;
65 | psi2.CreateNoWindow = true;
66 | Process.Start(psi2);
67 | Environment.Exit(0);
68 | }
69 | }
70 | else
71 | {
72 | Environment.Exit(0);
73 | }
74 | }
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.UnInstaller/XFP.UnInstaller.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | WinExe
5 | net7.0-windows
6 | enable
7 | true
8 | GashByte-透明.ico
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/XFP.UnInstaller/XFP.UnInstaller.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Designer
7 |
8 |
9 |
10 |
11 | Designer
12 |
13 |
14 |
--------------------------------------------------------------------------------
/XFP.Impact_Ultimate/赶紧删库跑路吧.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GashByte/ICora/75aab93fba19cf4e6771ae7d38f7073100f7cc0e/XFP.Impact_Ultimate/赶紧删库跑路吧.jpg
--------------------------------------------------------------------------------