├── CSUL
├── Dependences
│ └── handle.exe
├── Resources
│ ├── Icons
│ │ ├── cog.png
│ │ ├── map.png
│ │ ├── mod.png
│ │ ├── asset.png
│ │ ├── close.png
│ │ ├── earth.png
│ │ ├── play.png
│ │ ├── save.png
│ │ ├── minimize.png
│ │ ├── map_black.png
│ │ ├── mod_black.png
│ │ ├── asset_black.png
│ │ ├── earth_black.png
│ │ ├── folder_black.png
│ │ ├── remove_black.png
│ │ └── check_file_black.png
│ └── Imgs
│ │ ├── logo1.png
│ │ ├── csul_logo.png
│ │ ├── win_logo.ico
│ │ ├── win_logo.png
│ │ ├── back_image.png
│ │ ├── cslbbs_logo.png
│ │ ├── csl_logo_low.png
│ │ └── cslbbs_logo_low.png
├── FodyWeavers.xml
├── Languages
│ ├── switch.txt
│ ├── language.xaml
│ └── en-us.xaml
├── App.xaml.cs
├── Properties
│ └── launchSettings.json
├── CSUL.licenseheader
├── Views
│ ├── SetView.xaml.cs
│ ├── MapView.xaml.cs
│ ├── SaveView.xaml.cs
│ ├── AssetView.xaml.cs
│ ├── ModPlayerView.xaml.cs
│ ├── PlayView.xaml.cs
│ ├── PlayView.xaml
│ ├── MapView.xaml
│ ├── SaveView.xaml
│ ├── AssetView.xaml
│ └── SetView.xaml
├── Models
│ ├── Local
│ │ ├── Game
│ │ │ ├── GameDataFileType.cs
│ │ │ ├── InstalledGameDataFiles.cs
│ │ │ ├── GameDataFileInfo.cs
│ │ │ └── GameDataFile.cs
│ │ ├── ModPlayer
│ │ │ ├── ModPlayerType.cs
│ │ │ ├── ModPlayerData.cs
│ │ │ ├── IModData.cs
│ │ │ ├── NullModPlayer.cs
│ │ │ ├── ModPlayerManager.cs
│ │ │ ├── BaseModPlayer.cs
│ │ │ ├── Pmod
│ │ │ │ ├── PmodData.cs
│ │ │ │ └── PmodPlayer.cs
│ │ │ └── BepInEx
│ │ │ │ └── BepModData.cs
│ │ ├── RegistryNotFoundException.cs
│ │ ├── GameEx
│ │ │ ├── GameDataManager.cs
│ │ │ └── Chinesization.cs
│ │ ├── TempDirectory.cs
│ │ └── Cities2Path.cs
│ ├── Network
│ │ ├── NetBepInfo.cs
│ │ └── NetworkData.cs
│ ├── ExceptionEx.cs
│ ├── ProcessEx.cs
│ ├── DirectoryEx.cs
│ ├── FileEx.cs
│ └── ConfigActivator.cs
├── Styles
│ ├── Paths.xaml
│ └── BaseStyle.xaml
├── AssemblyInfo.cs
├── ExControls
│ ├── CButtonType.cs
│ ├── CButton.cs
│ ├── ContentControlEx.cs
│ └── ListViewEx.cs
├── App.xaml
├── Windows
│ ├── StartInfoBox.xaml.cs
│ ├── ModPlayerCteator.xaml.cs
│ ├── ModCompatibilityBox.xaml.cs
│ ├── StartInfoBox.xaml
│ ├── CbResourceInstaller.xaml
│ ├── ModPlayerCteator.xaml
│ └── CbResourceInstaller.xaml.cs
├── ViewModels
│ ├── BaseViewModel.cs
│ ├── RelayCommand.cs
│ ├── SetViewModels
│ │ └── SetModel.cs
│ ├── AssetViewModels
│ │ └── AssetModel.cs
│ ├── MainModel.cs
│ ├── MapViewModels
│ │ └── MapModel.cs
│ ├── SaveViewModels
│ │ └── SaveModel.cs
│ └── ModPlayerCreatorViewModels
│ │ └── ModPlayerCreatorModel.cs
├── UserControls
│ └── DragFiles
│ │ ├── DragFile.xaml
│ │ ├── DragFileData.cs
│ │ └── DragFile.xaml.cs
├── app.manifest
├── ViceCommand.cs
├── CSUL.csproj
└── MainWindow.xaml
├── testEnvironments.json
├── README.md
├── CSUL.sln
└── .gitattributes
/CSUL/Dependences/handle.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sci-fiBrain/CSUL/HEAD/CSUL/Dependences/handle.exe
--------------------------------------------------------------------------------
/CSUL/Resources/Icons/cog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sci-fiBrain/CSUL/HEAD/CSUL/Resources/Icons/cog.png
--------------------------------------------------------------------------------
/CSUL/Resources/Icons/map.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sci-fiBrain/CSUL/HEAD/CSUL/Resources/Icons/map.png
--------------------------------------------------------------------------------
/CSUL/Resources/Icons/mod.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sci-fiBrain/CSUL/HEAD/CSUL/Resources/Icons/mod.png
--------------------------------------------------------------------------------
/CSUL/Resources/Icons/asset.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sci-fiBrain/CSUL/HEAD/CSUL/Resources/Icons/asset.png
--------------------------------------------------------------------------------
/CSUL/Resources/Icons/close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sci-fiBrain/CSUL/HEAD/CSUL/Resources/Icons/close.png
--------------------------------------------------------------------------------
/CSUL/Resources/Icons/earth.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sci-fiBrain/CSUL/HEAD/CSUL/Resources/Icons/earth.png
--------------------------------------------------------------------------------
/CSUL/Resources/Icons/play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sci-fiBrain/CSUL/HEAD/CSUL/Resources/Icons/play.png
--------------------------------------------------------------------------------
/CSUL/Resources/Icons/save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sci-fiBrain/CSUL/HEAD/CSUL/Resources/Icons/save.png
--------------------------------------------------------------------------------
/CSUL/Resources/Imgs/logo1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sci-fiBrain/CSUL/HEAD/CSUL/Resources/Imgs/logo1.png
--------------------------------------------------------------------------------
/CSUL/Resources/Icons/minimize.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sci-fiBrain/CSUL/HEAD/CSUL/Resources/Icons/minimize.png
--------------------------------------------------------------------------------
/CSUL/Resources/Imgs/csul_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sci-fiBrain/CSUL/HEAD/CSUL/Resources/Imgs/csul_logo.png
--------------------------------------------------------------------------------
/CSUL/Resources/Imgs/win_logo.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sci-fiBrain/CSUL/HEAD/CSUL/Resources/Imgs/win_logo.ico
--------------------------------------------------------------------------------
/CSUL/Resources/Imgs/win_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sci-fiBrain/CSUL/HEAD/CSUL/Resources/Imgs/win_logo.png
--------------------------------------------------------------------------------
/CSUL/Resources/Icons/map_black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sci-fiBrain/CSUL/HEAD/CSUL/Resources/Icons/map_black.png
--------------------------------------------------------------------------------
/CSUL/Resources/Icons/mod_black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sci-fiBrain/CSUL/HEAD/CSUL/Resources/Icons/mod_black.png
--------------------------------------------------------------------------------
/CSUL/Resources/Imgs/back_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sci-fiBrain/CSUL/HEAD/CSUL/Resources/Imgs/back_image.png
--------------------------------------------------------------------------------
/CSUL/Resources/Imgs/cslbbs_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sci-fiBrain/CSUL/HEAD/CSUL/Resources/Imgs/cslbbs_logo.png
--------------------------------------------------------------------------------
/CSUL/Resources/Icons/asset_black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sci-fiBrain/CSUL/HEAD/CSUL/Resources/Icons/asset_black.png
--------------------------------------------------------------------------------
/CSUL/Resources/Icons/earth_black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sci-fiBrain/CSUL/HEAD/CSUL/Resources/Icons/earth_black.png
--------------------------------------------------------------------------------
/CSUL/Resources/Icons/folder_black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sci-fiBrain/CSUL/HEAD/CSUL/Resources/Icons/folder_black.png
--------------------------------------------------------------------------------
/CSUL/Resources/Icons/remove_black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sci-fiBrain/CSUL/HEAD/CSUL/Resources/Icons/remove_black.png
--------------------------------------------------------------------------------
/CSUL/Resources/Imgs/csl_logo_low.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sci-fiBrain/CSUL/HEAD/CSUL/Resources/Imgs/csl_logo_low.png
--------------------------------------------------------------------------------
/CSUL/Resources/Imgs/cslbbs_logo_low.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sci-fiBrain/CSUL/HEAD/CSUL/Resources/Imgs/cslbbs_logo_low.png
--------------------------------------------------------------------------------
/CSUL/Resources/Icons/check_file_black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sci-fiBrain/CSUL/HEAD/CSUL/Resources/Icons/check_file_black.png
--------------------------------------------------------------------------------
/CSUL/FodyWeavers.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/CSUL/Languages/switch.txt:
--------------------------------------------------------------------------------
1 | Language switching method:
2 |
3 | Change the corresponding language file to language.xaml
4 |
5 | For example, renaming "en-us.xaml" to "language.xaml"
--------------------------------------------------------------------------------
/CSUL/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 |
3 | namespace CSUL
4 | {
5 | ///
6 | /// Interaction logic for App.xaml
7 | ///
8 | public partial class App : Application
9 | {
10 | }
11 | }
--------------------------------------------------------------------------------
/CSUL/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "CSUL": {
4 | "commandName": "Project",
5 | "remoteDebugEnabled": false,
6 | "remoteDebugMachine": "WIN-DRO4QEGBMKF:4026",
7 | "authenticationMode": "Windows"
8 | }
9 | }
10 | }
--------------------------------------------------------------------------------
/CSUL/CSUL.licenseheader:
--------------------------------------------------------------------------------
1 | extensions: .cs
2 | /* CSUL 标准文件头注释
3 | * --------------------------------------
4 | * 文件名称: %FileName%
5 | * 创建时间: %CreationYear%年%CreationMonth%月%CreationDay%日 %CreationTime%
6 | * 创建开发:
7 | * 文件介绍:
8 | * --------------------------------------
9 | */
--------------------------------------------------------------------------------
/CSUL/Views/SetView.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Controls;
2 |
3 | namespace CSUL.Views
4 | {
5 | ///
6 | /// SetView.xaml 的交互逻辑
7 | ///
8 | public partial class SetView : UserControl
9 | {
10 | public SetView()
11 | {
12 | InitializeComponent();
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/CSUL/Models/Local/Game/GameDataFileType.cs:
--------------------------------------------------------------------------------
1 | namespace CSUL.Models.Local.Game
2 | {
3 | ///
4 | /// 游戏文件类型
5 | ///
6 | public enum GameDataFileType
7 | {
8 | Unknown,
9 | Save,
10 | Map,
11 |
12 | ///
13 | /// 资产
14 | ///
15 | Asset,
16 | }
17 | }
--------------------------------------------------------------------------------
/testEnvironments.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "1",
3 | "environments": [
4 | // 请参阅 https://aka.ms/remotetesting 获取更多信息
5 | // 了解如何配置远程环境。
6 | //{
7 | // "name": "WSL Ubuntu",
8 | // "type": "wsl",
9 | // "wslDistribution": "Ubuntu"
10 | //},
11 | //{
12 | // "name": "Docker dotnet/sdk",
13 | // "type": "docker",
14 | // "dockerImage": "mcr.microsoft.com/dotnet/sdk"
15 | //}
16 | ]
17 | }
--------------------------------------------------------------------------------
/CSUL/Views/MapView.xaml.cs:
--------------------------------------------------------------------------------
1 | using CSUL.UserControls.DragFiles;
2 | using System.Windows.Controls;
3 |
4 | namespace CSUL.Views
5 | {
6 | ///
7 | /// MapView.xaml 的交互逻辑
8 | ///
9 | public partial class MapView : UserControl
10 | {
11 | public MapView()
12 | {
13 | InitializeComponent();
14 | DragFile.FileNameWithTypes = DefaultDragFilesType.GameFile;
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/CSUL/Views/SaveView.xaml.cs:
--------------------------------------------------------------------------------
1 | using CSUL.UserControls.DragFiles;
2 | using System.Windows.Controls;
3 |
4 | namespace CSUL.Views
5 | {
6 | ///
7 | /// MapView.xaml 的交互逻辑
8 | ///
9 | public partial class SaveView : UserControl
10 | {
11 | public SaveView()
12 | {
13 | InitializeComponent();
14 | DragFile.FileNameWithTypes = DefaultDragFilesType.GameFile;
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/CSUL/Views/AssetView.xaml.cs:
--------------------------------------------------------------------------------
1 | using CSUL.UserControls.DragFiles;
2 | using System.Windows.Controls;
3 |
4 | namespace CSUL.Views
5 | {
6 | ///
7 | /// AssetView.xaml 的交互逻辑
8 | ///
9 | public partial class AssetView : UserControl
10 | {
11 | public AssetView()
12 | {
13 | InitializeComponent();
14 | DragFile.FileNameWithTypes = DefaultDragFilesType.GameFile;
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/CSUL/Views/ModPlayerView.xaml.cs:
--------------------------------------------------------------------------------
1 | using CSUL.UserControls.DragFiles;
2 | using System.Windows.Controls;
3 |
4 | namespace CSUL.Views
5 | {
6 | ///
7 | /// ModPlayerView.xaml 的交互逻辑
8 | ///
9 | public partial class ModPlayerView : UserControl
10 | {
11 | public ModPlayerView()
12 | {
13 | InitializeComponent();
14 | DragFile.FileNameWithTypes = DefaultDragFilesType.BepModFile;
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/CSUL/Models/Local/ModPlayer/ModPlayerType.cs:
--------------------------------------------------------------------------------
1 | /* CSUL 标准文件头注释
2 | * --------------------------------------
3 | * 文件名称: ModPlayerType.cs
4 | * 创建时间: 2023年12月16日 19:33
5 | * 创建开发: ScifiBrain
6 | * 文件介绍: 模组播放集类型
7 | * --------------------------------------
8 | */
9 |
10 | namespace CSUL.Models.Local.ModPlayer
11 | {
12 | ///
13 | /// 模组播放集类型
14 | ///
15 | internal enum ModPlayerType
16 | {
17 | None,
18 | BepInEx,
19 | Pmod
20 | }
21 | }
--------------------------------------------------------------------------------
/CSUL/Styles/Paths.xaml:
--------------------------------------------------------------------------------
1 |
3 | M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z
4 | M17 3H5C3.89 3 3 3.9 3 5V19C3 20.1 3.89 21 5 21H19C20.1 21 21 20.1 21 19V7L17 3M19 19H5V5H16.17L19 7.83V19M12 12C10.34 12 9 13.34 9 15S10.34 18 12 18 15 16.66 15 15 13.66 12 12 12M6 6H15V10H6V6Z
5 |
--------------------------------------------------------------------------------
/CSUL/Views/PlayView.xaml.cs:
--------------------------------------------------------------------------------
1 | using CSUL.ViewModels.PlayViewModels;
2 | using System.Windows;
3 | using System.Windows.Controls;
4 |
5 | namespace CSUL.Views
6 | {
7 | ///
8 | /// PlayView.xaml 的交互逻辑
9 | ///
10 | public partial class PlayView : UserControl
11 | {
12 | public PlayView()
13 | {
14 | InitializeComponent();
15 | }
16 |
17 | private void UserControl_Loaded(object sender, RoutedEventArgs e)
18 | { //加载完成后
19 | (DataContext as PlayModel)?.SetWindow(Window.GetWindow(this));
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/CSUL/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 | )]
--------------------------------------------------------------------------------
/CSUL/ExControls/CButtonType.cs:
--------------------------------------------------------------------------------
1 | namespace CSUL.ExControls
2 | {
3 | ///
4 | /// 的类型枚举
5 | ///
6 | public enum CButtonType
7 | {
8 | ///
9 | /// 图像按钮
10 | ///
11 | Icon,
12 |
13 | ///
14 | /// 不旋转的图像按钮
15 | ///
16 | IconUnRotate,
17 |
18 | ///
19 | /// 纯文本按钮
20 | ///
21 | Text,
22 |
23 | ///
24 | /// 图标带文本按钮
25 | ///
26 | IconText,
27 |
28 | ///
29 | /// 路径按钮
30 | ///
31 | Path
32 | }
33 | }
--------------------------------------------------------------------------------
/CSUL/Models/Local/RegistryNotFoundException.cs:
--------------------------------------------------------------------------------
1 | /* CSUL 标准文件头注释
2 | * --------------------------------------
3 | * 文件名称: RegistryNotFoundException.cs
4 | * 创建时间: 2023年12月14日 12:20
5 | * 创建开发: ScifiBrain
6 | * 文件介绍: 注册表未找到的异常
7 | * --------------------------------------
8 | */
9 |
10 | using System;
11 |
12 | namespace CSUL.Models.Local
13 | {
14 | ///
15 | /// 注册表未找到的异常
16 | ///
17 | internal class RegistryNotFoundException : Exception
18 | {
19 | ///
20 | /// 实例化对象
21 | ///
22 | /// 未找到的注册表名称
23 | public RegistryNotFoundException(string? name) : base($"Couldn't fint {name}") { }
24 | }
25 | }
--------------------------------------------------------------------------------
/CSUL/App.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/CSUL/Windows/StartInfoBox.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 | using static System.Net.Mime.MediaTypeNames;
3 |
4 | namespace CSUL.Windows
5 | {
6 | ///
7 | /// StartInfo.xaml 的交互逻辑
8 | ///
9 | public partial class StartInfoBox : Window
10 | {
11 | public StartInfoBox()
12 | {
13 | InitializeComponent();
14 | }
15 |
16 | public string? Text
17 | {
18 | get => text.Content.ToString();
19 | set
20 | {
21 | text.Content = value;
22 | SubText = "";
23 | }
24 | }
25 |
26 | public string? SubText
27 | {
28 | get => subtext.Content.ToString();
29 | set => subtext.Content = value;
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/CSUL/Models/Local/ModPlayer/ModPlayerData.cs:
--------------------------------------------------------------------------------
1 | /* CSUL 标准文件头注释
2 | * --------------------------------------
3 | * 文件名称: ModPlayerData.cs
4 | * 创建时间: 2023年12月23日 0:36
5 | * 创建开发: ScifiBrain
6 | * 文件介绍: 模组播放器装载后的信息
7 | * --------------------------------------
8 | */
9 |
10 | using System.Collections.Generic;
11 |
12 | namespace CSUL.Models.Local.ModPlayer
13 | {
14 | ///
15 | /// 模组播放集装载后的信息
16 | ///
17 | internal class ModPlayerData
18 | {
19 | ///
20 | /// 装载的文件 =>> 卸载时应该被删除的文件
21 | ///
22 | public required IEnumerable Files { get; set; }
23 |
24 | ///
25 | /// 装载的文件夹 =>> 卸载时应该被删除的文件夹
26 | ///
27 | public required IEnumerable Directories { get; set; }
28 | }
29 | }
--------------------------------------------------------------------------------
/CSUL/Models/Network/NetBepInfo.cs:
--------------------------------------------------------------------------------
1 | /* CSUL 标准文件头注释
2 | * --------------------------------------
3 | * 文件名称: NetBepInfo.cs
4 | * 创建时间: 2023年12月14日 0:01
5 | * 创建开发: ScifiBrain
6 | * 文件介绍: 单个BepInEx文件信息的结构体
7 | * --------------------------------------
8 | */
9 |
10 | namespace CSUL.Models.Network
11 | {
12 | ///
13 | /// 单个BepInEx文件信息
14 | ///
15 | internal struct NetBepInfo
16 | {
17 | ///
18 | /// 版本号
19 | ///
20 | public string Version { get; set; }
21 |
22 | ///
23 | /// 是否为测试版
24 | ///
25 | public bool IsBeta { get; set; }
26 |
27 | ///
28 | /// 文件名
29 | ///
30 | public string FileName { get; set; }
31 |
32 | ///
33 | /// 下载链接
34 | ///
35 | public string Uri { get; set; }
36 | }
37 | }
--------------------------------------------------------------------------------
/CSUL/Windows/ModPlayerCteator.xaml.cs:
--------------------------------------------------------------------------------
1 | using CSUL.ViewModels.ModPlayerCreatorViewModels;
2 | using System.Windows;
3 | using System.Windows.Input;
4 |
5 | namespace CSUL.Windows
6 | {
7 | ///
8 | /// ModPlayerCteator.xaml 的交互逻辑
9 | ///
10 | public partial class ModPlayerCteator : Window
11 | {
12 | internal ModPlayerCteator()
13 | {
14 | InitializeComponent();
15 | ModPlayerCreatorModel? vm = DataContext as ModPlayerCreatorModel;
16 | if (vm is not null) vm.Window = this;
17 | }
18 |
19 | private void Border_MouseMove(object sender, MouseEventArgs e)
20 | {
21 | if (e.LeftButton == MouseButtonState.Pressed)
22 | {
23 | DragMove();
24 | }
25 | }
26 |
27 | private void Close_Click(object sender, RoutedEventArgs e)
28 | {
29 | Close();
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Cities: Skylines II Universal Launcher
2 | Cities: Skylines II Universal Launcher 都市天际线2万能启动器(简称CSUL)是 [CSLBBS都市天际线2中文论坛](https://www.cslbbs.net/) 旗下一款功能丰富强大、外观简洁大方的天际线综合资源管理器。主要实现了模组存档地图等资源的导入管理等功能,并且仍在不断发展和完善,旨在为广大天际线2玩家提供便利的一键资源管理和游戏启动功能。
3 |
4 | 为避免用户受病毒、漏洞等恶意代码的危害,在分享本启动器时应使用[CSLBBS官方发布页面](https://www.cslbbs.net/csul/)或[Github仓库链接](https://github.com/Sci-fiBrain/CSUL/)。
5 |
6 | ## 已实现功能
7 | - BepInEx、模组、地图存档一键安装/卸载(支持多种格式导入)
8 | - 模组兼容性检测,并对不同问题进行归类,便于排查
9 | - 自定义游戏目录/数据目录(兼容不同游戏平台)Steam平台自动检测
10 | - 一键启动游戏,以开发者模式、以Steam兼容模式启动游戏
11 | - 在线检测启动器更新
12 | - 模组播放集(可选用不同的模组搭配)
13 | - 一键自动安装论坛模组
14 | - 在线检测模组版本更新
15 | - 游戏错误日志解析
16 | - 内置[喵小夕全局汉化](https://github.com/thx114/mio-i18-cn) (自动更新)
17 |
18 | ## 待完成功能
19 | - [ ] 多语言支持(Multi-Language)
20 | - [ ] 一键跳过P社启动器启动游戏
21 | - [ ] 自定义启动器主题色、背景图
22 | - [ ] 自动检测Xbox、微软商店游戏路径
23 |
24 | ## 目前已知问题
25 | 暂无
26 |
27 | ## 鸣谢
28 | [@科幻大脑](https://github.com/Sci-fiBrain) 程序开发
29 |
30 | [@YYT](https://github.com/SuperYYT) 功能策划
31 |
32 | [@喵小夕](https://space.bilibili.com/209728596/) 提供模组相关协助
33 |
--------------------------------------------------------------------------------
/CSUL/Models/Local/Game/InstalledGameDataFiles.cs:
--------------------------------------------------------------------------------
1 | /* CSUL 标准文件头注释
2 | * --------------------------------------
3 | * 文件名称: InstalledGameDataFiles.cs
4 | * 创建时间: 2023年12月14日 13:20
5 | * 创建开发: ScifiBrain
6 | * 文件介绍: 安装完成的游戏数据文件路径
7 | * --------------------------------------
8 | */
9 |
10 | using System.Collections.Generic;
11 |
12 | namespace CSUL.Models.Local.Game
13 | {
14 | ///
15 | /// 安装完成的游戏数据文件路径
16 | ///
17 | public readonly struct InstalledGameDataFiles
18 | {
19 | public InstalledGameDataFiles()
20 | {
21 | }
22 |
23 | ///
24 | /// 已安装的地图名称
25 | ///
26 | public List MapNames { get; init; } = new();
27 |
28 | ///
29 | /// 已安装的存档名称
30 | ///
31 | public List SaveNames { get; init; } = new();
32 |
33 | ///
34 | /// 已安装的资产名称
35 | ///
36 | public List AssetNames { get; init; } = new();
37 | }
38 | }
--------------------------------------------------------------------------------
/CSUL/ViewModels/BaseViewModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using System.Reflection;
4 | using System.Runtime.CompilerServices;
5 |
6 | namespace CSUL.ViewModels
7 | {
8 | ///
9 | /// ViewModel的基类
10 | ///
11 | public class BaseViewModel : INotifyPropertyChanged
12 | {
13 | #pragma warning disable CA1822
14 |
15 | ///
16 | /// 获取当前CSUL版本
17 | ///
18 | public Version? CsulVersion { get => Assembly.GetExecutingAssembly().GetName().Version; }
19 |
20 | #pragma warning restore CA1822
21 |
22 | ///
23 | /// 指示属性发生改变的事件
24 | ///
25 | public event PropertyChangedEventHandler? PropertyChanged;
26 |
27 | ///
28 | /// 指示属性值发生了改变
29 | ///
30 | ///
31 | internal void OnPropertyChanged([CallerMemberName] string? propertyName = null)
32 | {
33 | PropertyChangedEventArgs args = new(propertyName);
34 | PropertyChanged?.Invoke(this, args);
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/CSUL/UserControls/DragFiles/DragFile.xaml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/CSUL/Models/Local/ModPlayer/IModData.cs:
--------------------------------------------------------------------------------
1 | /* CSUL 标准文件头注释
2 | * --------------------------------------
3 | * 文件名称: IModData.cs
4 | * 创建时间: 2023年12月16日 18:36
5 | * 创建开发: ScifiBrain
6 | * 文件介绍: 模组数据接口
7 | * --------------------------------------
8 | */
9 |
10 | namespace CSUL.Models.Local.ModPlayer
11 | {
12 | ///
13 | /// 模组数据接口
14 | ///
15 | internal interface IModData
16 | {
17 | ///
18 | /// 模组名称
19 | ///
20 | public string Name { get; }
21 |
22 | ///
23 | /// 模组路径
24 | ///
25 | public string ModPath { get; }
26 |
27 | ///
28 | /// 是否启用该模组
29 | ///
30 | public bool IsEnabled { get; set; }
31 |
32 | ///
33 | /// 模组版本
34 | ///
35 | public string? ModVersion { get; }
36 |
37 | ///
38 | /// 模组最新版本
39 | ///
40 | public string? LatestVersion { get; }
41 |
42 | ///
43 | /// 模组描述
44 | ///
45 | public string? Description { get; }
46 |
47 | ///
48 | /// 模组地址
49 | ///
50 | public string? ModUrl { get; }
51 | }
52 | }
--------------------------------------------------------------------------------
/CSUL/ViewModels/RelayCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Input;
3 |
4 | namespace CSUL.ViewModels
5 | {
6 | ///
7 | /// Command调用类
8 | ///
9 | internal class RelayCommand : ICommand
10 | {
11 | //命令执行时要调用的方法
12 | private readonly Action