├── NativeMethods.txt ├── .editorconfig ├── Expanded Tutorial ├── WpfLibrary1.7z └── zh-CN.md ├── Views ├── GameSettings │ ├── GameSettingsPage.cs │ └── GameSettingsPage.xaml.cs ├── Settings │ ├── SettingsPage.cs │ ├── SettingsPage.xaml.cs │ └── SettingsPage.xaml ├── ModManager │ ├── AddUserGroupWindow.xaml.cs │ ├── ModManagerPage.cs │ ├── ModManagerPage.xaml.cs │ └── AddUserGroupWindow.xaml ├── Info │ ├── ChangeLogViewerWindow.xaml.cs │ ├── InfoPage.xaml.cs │ ├── ChangeLogViewerWindow.xaml │ └── InfoPage.xaml ├── CrashReporter │ ├── CrashReporterWindow.xaml.cs │ └── CrashReporterWindow.xaml └── Main │ └── MainWindow.xaml.cs ├── Models ├── Messages │ ├── ExtensionDebugPathRequestMessage.cs │ ├── GetMainMenuItemsRequestMessage.cs │ ├── AddUserGroupMessage.cs │ ├── ShowCrashReporterMessage.cs │ ├── ExtensionDebugPathErrorMessage.cs │ └── ExtensionDebugPathChangedMessage.cs ├── ST │ ├── STIcon.cs │ ├── ISTPage.cs │ ├── ST.cs │ ├── ExtensionInfo.cs │ └── STSettings.cs ├── ModTypeGroupItem.cs ├── ModInfo │ ├── IModInfo.cs │ ├── ModTypeGroupName.cs │ ├── ModInfos.cs │ ├── ModTypeGroup.cs │ └── ModInfo.cs ├── System │ └── SystemInfo.cs └── GameInfo │ ├── VanillaFactions.cs │ └── GameInfo.cs ├── ViewModels ├── Info │ ├── InfoPageVMController.cs │ └── InfoPageViewModel.cs ├── ModManager │ ├── AddUserGroupWindowViewModel.cs │ └── ModShowInfo.cs ├── CrashReporter │ └── CrashReporterWindowViewModel.cs ├── GameSettings │ └── GameSettingsPageVMController.cs └── Settings │ └── SettingsPageViewModel.cs ├── Themes ├── SystemColor.xaml ├── Dark.xaml ├── Light.xaml └── ColorStyles.xaml ├── Converters.xaml ├── Styles └── FontStyles.xaml ├── README └── zh-CN │ ├── GameSettings.md │ └── ModManager.md ├── App.xaml.cs ├── Resources ├── STResources.cs ├── NLog.config └── ModTypeGroup.toml ├── AssemblyInfo.cs ├── LICENSE.txt ├── StarsectorToolbox.sln ├── README.md ├── .gitattributes ├── CHANGELOG.md ├── Langs ├── Models │ ├── ModelsI18nRes.Designer.cs │ ├── ModelsI18nRes.resx │ └── ModelsI18nRes.en-US.resx ├── Pages │ ├── Info │ │ ├── InfoPageI18nRes.Designer.cs │ │ ├── InfoPageI18nRes.resx │ │ └── InfoPageI18nRes.en-US.resx │ ├── ModManager │ │ ├── AddUserGroupI18nRes.Designer.cs │ │ ├── AddUserGroupI18nRes.resx │ │ └── AddUserGroupI18nRes.en-US.resx │ └── Settings │ │ └── SettingsPageI18nRes.resx ├── MessageBoxXI18nRes.Designer.cs ├── MessageBoxXI18nRes.resx ├── MessageBoxXI18nRes.en-US.resx ├── Libs │ ├── GameInfoI18nRes.resx │ └── UtilsI18nRes.resx └── Windows │ └── CrashReporter │ └── CrashReporterI18nRes.resx ├── Libs └── MemoryMetrics.cs └── .gitignore /NativeMethods.txt: -------------------------------------------------------------------------------- 1 | GlobalMemoryStatusEx -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | [*.{cs,vb}] 2 | 3 | # IDE0017: 简化对象初始化 4 | dotnet_diagnostic.IDE0017.severity = silent 5 | -------------------------------------------------------------------------------- /Expanded Tutorial/WpfLibrary1.7z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hakoyu/StarsectorToolbox/HEAD/Expanded Tutorial/WpfLibrary1.7z -------------------------------------------------------------------------------- /Views/GameSettings/GameSettingsPage.cs: -------------------------------------------------------------------------------- 1 | namespace StarsectorToolbox.Views.GameSettings; 2 | 3 | internal partial class GameSettingsPage 4 | { 5 | } -------------------------------------------------------------------------------- /Models/Messages/ExtensionDebugPathRequestMessage.cs: -------------------------------------------------------------------------------- 1 | using CommunityToolkit.Mvvm.Messaging.Messages; 2 | 3 | namespace StarsectorToolbox.Models.Messages; 4 | 5 | internal sealed class ExtensionDebugPathRequestMessage : RequestMessage 6 | { 7 | } -------------------------------------------------------------------------------- /Views/Settings/SettingsPage.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Controls; 3 | using System.Windows.Media; 4 | using Microsoft.Xaml.Behaviors; 5 | 6 | namespace StarsectorToolbox.Views.Settings; 7 | 8 | internal partial class SettingsPage { } 9 | -------------------------------------------------------------------------------- /ViewModels/Info/InfoPageVMController.cs: -------------------------------------------------------------------------------- 1 | namespace StarsectorToolbox.ViewModels.Info; 2 | 3 | internal partial class InfoPageViewModel 4 | { 5 | private const string c_noIcon = "❎"; 6 | private const string c_yesIcon = "✅"; 7 | private const string c_runIcon = "💫"; 8 | } 9 | -------------------------------------------------------------------------------- /Models/Messages/GetMainMenuItemsRequestMessage.cs: -------------------------------------------------------------------------------- 1 | using CommunityToolkit.Mvvm.Messaging.Messages; 2 | using HKW.HKWViewModels.Controls; 3 | 4 | namespace StarsectorToolbox.Models.Messages; 5 | 6 | internal class GetMainMenuItemsRequestMessage : RequestMessage> { } 7 | -------------------------------------------------------------------------------- /Models/Messages/AddUserGroupMessage.cs: -------------------------------------------------------------------------------- 1 | using CommunityToolkit.Mvvm.Messaging.Messages; 2 | 3 | namespace StarsectorToolbox.Models.Messages; 4 | 5 | internal class AddUserGroupMessage : ValueChangedMessage 6 | { 7 | public AddUserGroupMessage(string value) : base(value) 8 | { 9 | } 10 | } -------------------------------------------------------------------------------- /Models/Messages/ShowCrashReporterMessage.cs: -------------------------------------------------------------------------------- 1 | using CommunityToolkit.Mvvm.Messaging.Messages; 2 | 3 | namespace StarsectorToolbox.Models.Messages; 4 | 5 | internal class ShowCrashReporterMessage : ValueChangedMessage 6 | { 7 | public ShowCrashReporterMessage(int value) 8 | : base(value) { } 9 | } 10 | -------------------------------------------------------------------------------- /Models/ST/STIcon.cs: -------------------------------------------------------------------------------- 1 | namespace StarsectorToolbox.Models.ST; 2 | 3 | /// 4 | /// 全局图标 5 | /// 6 | public static class STIcon 7 | { 8 | /// 菜单关闭 9 | public const string MenuCloseIcon = "📘"; 10 | 11 | /// 菜单打开 12 | public const string MenuOpenIcon = "📖"; 13 | } -------------------------------------------------------------------------------- /Models/Messages/ExtensionDebugPathErrorMessage.cs: -------------------------------------------------------------------------------- 1 | using CommunityToolkit.Mvvm.Messaging.Messages; 2 | 3 | namespace StarsectorToolbox.Models.Messages; 4 | 5 | internal class ExtensionDebugPathErrorMessage : ValueChangedMessage 6 | { 7 | public ExtensionDebugPathErrorMessage(string value) : base(value) 8 | { 9 | } 10 | } -------------------------------------------------------------------------------- /Models/Messages/ExtensionDebugPathChangedMessage.cs: -------------------------------------------------------------------------------- 1 | using CommunityToolkit.Mvvm.Messaging.Messages; 2 | 3 | namespace StarsectorToolbox.Models.Messages; 4 | 5 | internal sealed class ExtensionDebugPathChangedMessage : ValueChangedMessage 6 | { 7 | public ExtensionDebugPathChangedMessage(string value) : base(value) 8 | { 9 | } 10 | } -------------------------------------------------------------------------------- /Themes/SystemColor.xaml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | -------------------------------------------------------------------------------- /Views/ModManager/AddUserGroupWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace StarsectorToolbox.Views.ModManager; 4 | 5 | /// 6 | /// AddUserGroupWindow.xaml 的交互逻辑 7 | /// 8 | internal partial class AddUserGroupWindow : Window 9 | { 10 | internal AddUserGroupWindow() 11 | { 12 | InitializeComponent(); 13 | } 14 | } -------------------------------------------------------------------------------- /Views/Info/ChangeLogViewerWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using Panuon.WPF.UI; 2 | 3 | namespace StarsectorToolbox.Views.Info; 4 | 5 | /// 6 | /// ChangeLogViewerWindow.xaml 的交互逻辑 7 | /// 8 | internal partial class ChangeLogViewerWindow : WindowX 9 | { 10 | public ChangeLogViewerWindow() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Converters.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Styles/FontStyles.xaml: -------------------------------------------------------------------------------- 1 | 5 | 20 6 | 16 7 | 16 8 | 14 9 | -------------------------------------------------------------------------------- /Views/Info/InfoPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | using StarsectorToolbox.ViewModels.Info; 3 | 4 | namespace StarsectorToolbox.Views.Info; 5 | 6 | /// 7 | /// Description.xaml 的交互逻辑 8 | /// 9 | internal partial class InfoPage : Page 10 | { 11 | internal InfoPageViewModel ViewModel => (InfoPageViewModel)DataContext; 12 | 13 | internal InfoPage() 14 | { 15 | InitializeComponent(); 16 | DataContext = new InfoPageViewModel(true); 17 | } 18 | } -------------------------------------------------------------------------------- /Views/CrashReporter/CrashReporterWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using Panuon.WPF.UI; 2 | 3 | namespace StarsectorToolbox.Views.CrashReporter; 4 | 5 | /// 6 | /// CrashReporterWindow.xaml 的交互逻辑 7 | /// 8 | internal partial class CrashReporterWindow : WindowX 9 | { 10 | public CrashReporterWindow() 11 | { 12 | InitializeComponent(); 13 | } 14 | //protected override void OnClosing(CancelEventArgs e) 15 | //{ 16 | // if (CloseToHide is false) 17 | // return; 18 | // e.Cancel = true; 19 | // Hide(); 20 | //} 21 | } 22 | -------------------------------------------------------------------------------- /README/zh-CN/GameSettings.md: -------------------------------------------------------------------------------- 1 | # 游戏设置 2 | 3 | ![](https://s2.loli.net/2023/01/12/wR5JV7gS9qP2c6u.png) 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 | - 保留存档输入框,用于清理存档,为 0 或未填入时清理全部存档 31 | - 清理存档 32 | - 自定义分辨率 33 | - 自定义宽高 34 | - 可选无边框窗口 35 | - 重置 36 | 37 | --- 38 | -------------------------------------------------------------------------------- /Views/ModManager/ModManagerPage.cs: -------------------------------------------------------------------------------- 1 | using I18nRes = StarsectorToolbox.Langs.Pages.ModManager.ModManagerPageI18nRes; 2 | 3 | namespace StarsectorToolbox.Views.ModManager; 4 | 5 | internal partial class ModManagerPage 6 | { 7 | public void Save() 8 | { 9 | ViewModel.Save(); 10 | } 11 | 12 | public void Close() 13 | { 14 | ViewModel.Close(); 15 | } 16 | 17 | public string GetNameI18n() 18 | { 19 | return I18nRes.ModManager; 20 | } 21 | 22 | public string GetDescriptionI18n() 23 | { 24 | return I18nRes.ModManagerDescription; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Models/ST/ISTPage.cs: -------------------------------------------------------------------------------- 1 | namespace StarsectorToolbox.Models.ST; 2 | 3 | /// 4 | /// ST页面接口 5 | /// 6 | public interface ISTPage 7 | { 8 | /// 9 | /// 需要保存 10 | /// 11 | public bool NeedSave { get; } 12 | 13 | /// 14 | /// 保存 15 | /// 16 | public void Save(); 17 | 18 | /// 19 | /// 关闭 20 | /// 21 | public void Close(); 22 | 23 | /// 24 | /// 本地化名称 25 | /// 26 | public string GetNameI18n(); 27 | 28 | /// 29 | /// 本地化描述 30 | /// 31 | public string GetDescriptionI18n(); 32 | } -------------------------------------------------------------------------------- /Themes/Dark.xaml: -------------------------------------------------------------------------------- 1 | 2 | #FF202020 3 | #FF2B2B2B 4 | #FF1D1D1D 5 | #FF383838 6 | #FFFFFFFF 7 | #FFBFBFBF 8 | #FF747474 9 | #FF3D3D3D 10 | #FF323232 11 | #FF2D2D2D 12 | -------------------------------------------------------------------------------- /Themes/Light.xaml: -------------------------------------------------------------------------------- 1 | 2 | #FFF3F3F3 3 | #FFFBFBFB 4 | #FFE5E5E5 5 | #FFFEFEFE 6 | #FF1A1A1A 7 | #FF5C5C5C 8 | #FFB7B7B7 9 | #FFEAEAEA 10 | #FFEDEDED 11 | #FFEAEAEA 12 | -------------------------------------------------------------------------------- /App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Windows; 3 | using StarsectorToolbox.Models.ST; 4 | using StarsectorToolbox.Resources; 5 | 6 | namespace StarsectorToolbox; 7 | 8 | /// 9 | /// Interaction logic for App.xaml 10 | /// 11 | internal partial class App : Application 12 | { 13 | private static readonly NLog.Logger sr_logger = NLog.LogManager.GetCurrentClassLogger(); 14 | 15 | public App() 16 | { 17 | // 初始化日志配置文件 18 | if (File.Exists(STResources.NlogConfigFile) is false) 19 | { 20 | STResources.ResourceSave(STResources.NlogConfig, STResources.NlogConfigFile); 21 | } 22 | NLog.LogManager.Configuration = new NLog.Config.XmlLoggingConfiguration( 23 | STResources.NlogConfigFile 24 | ); 25 | // TODO: ToolInfo 26 | //sr_logger.Info($"软件版本: {ST.Version}"); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Resources/STResources.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Reflection; 3 | 4 | namespace StarsectorToolbox.Resources; 5 | 6 | internal class STResources 7 | { 8 | private static readonly Assembly sr_assembly = Assembly.GetExecutingAssembly(); 9 | public const string ModTypeGroup = "StarsectorToolbox.Resources.ModTypeGroup.toml"; 10 | public const string NlogConfig = "StarsectorToolbox.Resources.NLog.config"; 11 | public const string NlogConfigFile = "STCore\\NLog.config"; 12 | 13 | public static StreamReader GetResourceStream(string name) => 14 | new(sr_assembly.GetManifestResourceStream(name)!); 15 | 16 | public static void ResourceSave(string resourceName, string path) 17 | { 18 | using var sr = new StreamReader(sr_assembly.GetManifestResourceStream(resourceName)!); 19 | using var sw = new StreamWriter(path); 20 | sr.BaseStream.CopyTo(sw.BaseStream); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | // 程序信息 4 | //[sr_assembly: AssemblyTitle(nameof(StarsectorToolbox))] 5 | //[sr_assembly: AssemblyDescription(nameof(StarsectorToolbox))] 6 | //[sr_assembly: AssemblyConfiguration("")] 7 | //[sr_assembly: AssemblyCompany("")] 8 | //[sr_assembly: AssemblyProduct(nameof(StarsectorToolbox))] 9 | //[sr_assembly: AssemblyCopyright("Copyright ©2022-2023 HKW")] 10 | //[sr_assembly: AssemblyTrademark("")] 11 | //[sr_assembly: AssemblyCulture("")] 12 | 13 | // 版本信息 14 | //[sr_assembly: AssemblyVersion(ST.Version)] 15 | //[sr_assembly: AssemblyFileVersion(ST.Version)] 16 | 17 | [assembly: ThemeInfo( 18 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 19 | //(used if a resource is not found in the page, 20 | // or application resource dictionaries) 21 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 22 | //(used if a resource is not found in the page, 23 | // app, or any theme specific resource dictionaries) 24 | )] 25 | -------------------------------------------------------------------------------- /Models/ModTypeGroupItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using CommunityToolkit.Mvvm.ComponentModel; 7 | using HKW.HKWViewModels.Controls; 8 | 9 | namespace StarsectorToolbox.Models; 10 | 11 | /// 12 | /// 模组类型分组项 13 | /// 14 | public partial class ModTypeGroupItem : ObservableObject 15 | { 16 | /// 17 | /// 名称 18 | /// 19 | [ObservableProperty] 20 | [NotifyPropertyChangedFor(nameof(Show))] 21 | private string? _name; 22 | 23 | /// 24 | /// 数量 25 | /// 26 | [ObservableProperty] 27 | [NotifyPropertyChangedFor(nameof(Show))] 28 | [NotifyPropertyChangedFor(nameof(ShowCount))] 29 | private int _count; 30 | 31 | /// 32 | /// 显示所有信息 33 | /// 34 | public string? Show => $"{Name} ({Count})"; 35 | 36 | /// 37 | /// 显示数量信息 38 | /// 39 | public string? ShowCount => $"({Count})"; 40 | } 41 | -------------------------------------------------------------------------------- /Views/Info/ChangeLogViewerWindow.xaml: -------------------------------------------------------------------------------- 1 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) [2022] [StarsectorToolbox] 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Models/ModInfo/IModInfo.cs: -------------------------------------------------------------------------------- 1 | namespace StarsectorToolbox.Models.ModInfo; 2 | 3 | /// 4 | /// 模组信息接口 5 | /// 6 | public interface IModInfo 7 | { 8 | /// ID 9 | public string Id { get; } 10 | 11 | /// 名称 12 | public string Name { get; } 13 | 14 | /// 作者 15 | public string Author { get; } 16 | 17 | /// 版本 18 | public string Version { get; } 19 | 20 | /// 是功能性模组 21 | public bool IsUtility { get; } 22 | 23 | /// 描述 24 | public string Description { get; } 25 | 26 | /// 支持的游戏版本 27 | public string GameVersion { get; } 28 | 29 | /// 支持的游戏版本与当前游戏版本相同 30 | public bool IsSameToGameVersion { get; } 31 | 32 | /// 模组信息 33 | public string ModPlugin { get; } 34 | 35 | /// 模组文件夹 36 | public string ModDirectory { get; } 37 | 38 | /// 最后更新时间 39 | public DateTime LastUpdateTime { get; } 40 | 41 | /// 前置模组 42 | public IReadOnlySet? DependenciesSet { get; } 43 | } 44 | -------------------------------------------------------------------------------- /StarsectorToolbox.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.4.33103.184 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StarsectorToolbox", "StarsectorToolbox.csproj", "{F2B61177-9DE4-4ECF-A1D1-60A8249083D6}" 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 | {F2B61177-9DE4-4ECF-A1D1-60A8249083D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {F2B61177-9DE4-4ECF-A1D1-60A8249083D6}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {F2B61177-9DE4-4ECF-A1D1-60A8249083D6}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {F2B61177-9DE4-4ECF-A1D1-60A8249083D6}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | RESX_NeutralResourcesLanguage = zh-CN 24 | SolutionGuid = {7E28BF02-D431-45FA-B0C1-38C2CE89A939} 25 | EndGlobalSection 26 | EndGlobal 27 | -------------------------------------------------------------------------------- /Views/GameSettings/GameSettingsPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Text.RegularExpressions; 2 | using System.Windows.Controls; 3 | using System.Windows.Input; 4 | using StarsectorToolbox.Models.ST; 5 | using StarsectorToolbox.ViewModels.GameSettings; 6 | using I18nRes = StarsectorToolbox.Langs.Pages.GameSettings.GameSettingsPageI18nRes; 7 | 8 | namespace StarsectorToolbox.Views.GameSettings; 9 | 10 | /// 11 | /// GameSettings.xaml 的交互逻辑 12 | /// 13 | internal partial class GameSettingsPage : Page, ISTPage 14 | { 15 | internal GameSettingsPageViewModel ViewModel => (GameSettingsPageViewModel)DataContext; 16 | 17 | public bool NeedSave => false; 18 | 19 | /// 20 | /// 21 | /// 22 | public GameSettingsPage() 23 | { 24 | InitializeComponent(); 25 | DataContext = new GameSettingsPageViewModel(true); 26 | } 27 | 28 | private void TextBox_NumberInput(object sender, TextCompositionEventArgs e) => e.Handled = !Regex.IsMatch(e.Text, "[0-9]"); 29 | 30 | public void Save() 31 | { 32 | } 33 | 34 | public void Close() 35 | { 36 | } 37 | 38 | public string GetNameI18n() => I18nRes.GameSettings; 39 | 40 | public string GetDescriptionI18n() => I18nRes.GameSettingsDescription; 41 | } -------------------------------------------------------------------------------- /Models/ST/ST.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | 3 | namespace StarsectorToolbox.Models.ST; 4 | 5 | /// StarsectorToolbox数据 6 | public static class ST 7 | { 8 | /// 核心文件夹 9 | public const string CoreDirectory = "STCore"; 10 | 11 | /// 拓展目录 12 | public const string ExtensionDirectories = "STExtension"; 13 | 14 | /// 配置文件 15 | public const string SettingsTomlFile = $"{CoreDirectory}\\Settings.toml"; 16 | 17 | /// 日志文件 18 | public const string LogFile = $"{CoreDirectory}\\{nameof(StarsectorToolbox)}.log"; 19 | 20 | /// 调试模式日志文件 21 | public const string DebugLogFile = $"{CoreDirectory}\\{nameof(StarsectorToolbox)}.Debug.log"; 22 | 23 | /// 拓展信息文件 24 | public const string ExtensionInfoFile = "Extension.toml"; 25 | 26 | private static string s_version = string.Empty; 27 | 28 | /// 工具箱版本 29 | public static string Version => GetVersion(); 30 | 31 | private static string GetVersion() 32 | { 33 | if (string.IsNullOrWhiteSpace(s_version)) 34 | return s_version = Assembly.GetEntryAssembly()!.GetName().Version!.ToString()[..^2]; 35 | else 36 | return s_version; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Models/ModInfo/ModTypeGroupName.cs: -------------------------------------------------------------------------------- 1 | namespace StarsectorToolbox.Models.ModInfo; 2 | 3 | /// 模组分组类型名称 4 | public static class ModTypeGroupName 5 | { 6 | /// 全部模组 7 | public const string All = nameof(All); 8 | 9 | /// 已启用模组 10 | public const string Enabled = nameof(Enabled); 11 | 12 | /// 未启用模组 13 | public const string Disabled = nameof(Disabled); 14 | 15 | /// 前置模组 16 | public const string Libraries = nameof(Libraries); 17 | 18 | /// 大型模组 19 | public const string MegaMods = nameof(MegaMods); 20 | 21 | /// 派系模组 22 | public const string FactionMods = nameof(FactionMods); 23 | 24 | /// 内容模组 25 | public const string ContentExtensions = nameof(ContentExtensions); 26 | 27 | /// 功能模组 28 | public const string UtilityMods = nameof(UtilityMods); 29 | 30 | /// 闲杂模组 31 | public const string MiscellaneousMods = nameof(MiscellaneousMods); 32 | 33 | /// 美化模组 34 | public const string BeautifyMods = nameof(BeautifyMods); 35 | 36 | /// 全部模组 37 | public const string UnknownMods = nameof(UnknownMods); 38 | 39 | /// 已收藏模组 40 | public const string Collected = nameof(Collected); 41 | } 42 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # StarsectorToolbox 远行星号工具箱 2 | 3 | 环境: **[.NET6](https://dotnet.microsoft.com/zh-cn/download/dotnet/6.0)** 4 | 5 | ## 前言 6 | 7 | 对游戏 **远行星号** 提供如模组管理,游戏设置等诸多功能 8 | 并可以使用外部 API 来增加拓展插件以提供更多功能,对制作插件有兴趣可以查看 **[拓展教程](https://github.com/Hakoyu/StarsectorToolbox/blob/master/Expanded%20Tutorial/zh-CN.md)** 9 | 10 | 若有需求的功能或建议及意见,欢迎提交 **[issue](https://github.com/Hakoyu/StarsectorToolbox/issues)** 11 | 若在使用中遇到任何问题,请提交 **[issue](https://github.com/Hakoyu/StarsectorToolbox/issues)** ,并附带日志信息 12 | 若发现有模组在 **未分类模组** 中 ,请提交 **[issue](https://github.com/Hakoyu/StarsectorToolbox/issues)** ,并提供其 ID 及应该在的分类 13 | 14 | ## 下载 15 | 16 | **[站内链接](attach://26037.7z)** 17 | **[GitHub](https://github.com/Hakoyu/StarsectorToolbox/releases)** 18 | 19 | ## 已实装菜单 20 | 21 | ### [模组管理器](https://github.com/Hakoyu/StarsectorToolbox/README/zh-cn/ModManager.md) 22 | 23 | ![](https://s2.loli.net/2023/01/12/1k2z5yL9CYfrhmb.png) 24 | 25 | ### [游戏设置](https://github.com/Hakoyu/StarsectorToolbox/README/zh-cn/GameSettings.md) 26 | 27 | ![](https://s2.loli.net/2023/01/12/wR5JV7gS9qP2c6u.png) 28 | 29 | ### 异常信息收集工具 30 | 31 | ![](https://s2.loli.net/2023/04/13/JX6aTINGVxLmCg1.png) 32 | 33 | ## 插件列表 34 | 35 | **插件的使用方式:** 36 | 将插件压缩包解压至 **STExtension** 文件夹即可 37 | 38 | ### [肖像管理器](https://github.com/Hakoyu/StarsectorToolboxExtension.PortraitsManager/README.md) 39 | 40 | ![](https://s2.loli.net/2023/03/14/Xw8GhgVZHr6CNTn.png) 41 | -------------------------------------------------------------------------------- /ViewModels/ModManager/AddUserGroupWindowViewModel.cs: -------------------------------------------------------------------------------- 1 | using CommunityToolkit.Mvvm.ComponentModel; 2 | using CommunityToolkit.Mvvm.Input; 3 | using HKW.HKWViewModels.Controls; 4 | using StarsectorToolbox.Libs; 5 | 6 | namespace StarsectorToolbox.ViewModels.ModManager; 7 | 8 | internal partial class AddUserGroupWindowViewModel : WindowVM 9 | { 10 | [ObservableProperty] 11 | private string _userGroupIcon = string.Empty; 12 | 13 | [ObservableProperty] 14 | private string _userGroupName = string.Empty; 15 | 16 | public ComboBoxItemVM? BaseComboBoxItem; 17 | 18 | public AddUserGroupWindowViewModel() 19 | : base(new()) { } 20 | 21 | public AddUserGroupWindowViewModel(object window) 22 | : base(window) 23 | { 24 | DataContext = this; 25 | ShowDialogEvent += () => Utils.SetMainWindowBlurEffect(); 26 | HideEvent += () => 27 | { 28 | UserGroupIcon = string.Empty; 29 | UserGroupName = string.Empty; 30 | BaseComboBoxItem = null; 31 | Utils.RemoveMainWindowBlurEffect(); 32 | }; 33 | } 34 | 35 | [RelayCommand] 36 | private void OK() 37 | { 38 | OKEvent?.Invoke(); 39 | } 40 | 41 | [RelayCommand] 42 | private void Cancel() 43 | { 44 | CancelEvent?.Invoke(); 45 | } 46 | 47 | public delegate void DelegateHandler(); 48 | 49 | public event DelegateHandler? OKEvent; 50 | 51 | public event DelegateHandler? CancelEvent; 52 | } 53 | -------------------------------------------------------------------------------- /README/zh-CN/ModManager.md: -------------------------------------------------------------------------------- 1 | # 模组管理器 2 | 3 | ![](https://s2.loli.net/2023/01/12/1k2z5yL9CYfrhmb.png) 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 | - 模组列表 34 | - 列表项:收藏状态,启用状态,模组图标,名称,作者,版本,支持的游戏版本,是否为功能性模组,最后更新日期,用户描述 35 | - 双击模组项展开模组详情 36 | - 搜索模组,可搜索类型: 名称,ID,作者,模组描述,用户描述 37 | - 使用鼠标拖动选择多个模组 38 | - 使用键盘快捷键`Ctrl`,`Shift`等选择多个模组 39 | - 使用按钮收藏,取消收藏模组 _(可多选)_ 40 | - 使用按钮启用,禁用模组 _(可多选)_ 41 | - 右键菜单: 42 | - 启用/禁用模组 _(可多选)_ 43 | - 收藏/取消收藏模组 _(可多选)_ 44 | - 打开模组文件夹 45 | - 删除模组 46 | - 添加至用户分组 _(须用户分组存在,可多选)_ 47 | - 从用户分组删除 _(须位于用户分组内,可多选)_ 48 | - 已启用模组的前置检测 49 | - 拖入压缩包导入模组 _(可多个文件,支持 rar,zip,7z)_ 50 | 51 | --- 52 | 53 | - 模组详情 54 | - 图标 55 | - ID 56 | - 名称 57 | - 版本 58 | - 支持的游戏版本 59 | - 最后更新日期 60 | - 本地路径 61 | - 作者 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 | -------------------------------------------------------------------------------- /Resources/NLog.config: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 13 | 25 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /Views/Settings/SettingsPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | using HKW.HKWViewModels.Controls; 3 | using Microsoft.Win32; 4 | using Panuon.WPF.UI; 5 | using StarsectorToolbox.Models.ST; 6 | using StarsectorToolbox.ViewModels.Settings; 7 | using I18nRes = StarsectorToolbox.Langs.Pages.Settings.SettingsPageI18nRes; 8 | 9 | namespace StarsectorToolbox.Views.Settings; 10 | 11 | /// 12 | /// Settings.xaml 的交互逻辑 13 | /// 14 | internal partial class SettingsPage : Page 15 | { 16 | internal SettingsPageViewModel ViewModel => (SettingsPageViewModel)DataContext; 17 | 18 | internal SettingsPage() 19 | { 20 | InitializeComponent(); 21 | DataContext = new SettingsPageViewModel(true); 22 | } 23 | 24 | private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) 25 | { 26 | // TODO: 监视注册表以跟随系统的黑暗模式切换 27 | if (e.AddedItems[0] is not ComboBoxItemVM item) 28 | return; 29 | if (item.Tag is not string themeName) 30 | return; 31 | STSettings.Instance.Theme = themeName; 32 | STSettings.Save(); 33 | if (themeName == nameof(I18nRes.WindowsDefault)) 34 | themeName = WindowsThemeIsLight() ? nameof(I18nRes.Light) : nameof(I18nRes.Dark); 35 | GlobalSettings.ChangeTheme(themeName); 36 | } 37 | 38 | private static bool WindowsThemeIsLight() 39 | { 40 | var result = Registry.GetValue( 41 | "HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize", 42 | "AppsUseLightTheme", 43 | -1 44 | ); 45 | return Convert.ToBoolean(result); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Themes/ColorStyles.xaml: -------------------------------------------------------------------------------- 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 | 33 | -------------------------------------------------------------------------------- /ViewModels/CrashReporter/CrashReporterWindowViewModel.cs: -------------------------------------------------------------------------------- 1 | using CommunityToolkit.Mvvm.ComponentModel; 2 | using CommunityToolkit.Mvvm.Input; 3 | using HKW.HKWViewModels; 4 | using HKW.HKWViewModels.Controls; 5 | using StarsectorToolbox.Libs; 6 | using StarsectorToolbox.Models.GameInfo; 7 | 8 | namespace StarsectorToolbox.ViewModels.CrashReporter; 9 | 10 | internal partial class CrashReporterWindowViewModel : WindowVM 11 | { 12 | private static readonly NLog.Logger sr_logger = NLog.LogManager.GetCurrentClassLogger(); 13 | 14 | [ObservableProperty] 15 | private bool _closeToHide = true; 16 | 17 | [ObservableProperty] 18 | private string _crashReport = string.Empty; 19 | 20 | [ObservableProperty] 21 | private string _lastLog = string.Empty; 22 | 23 | public CrashReporterWindowViewModel() 24 | : base(new()) { } 25 | 26 | public CrashReporterWindowViewModel(object window) 27 | : base(window) 28 | { 29 | DataContext = this; 30 | Closing += (s, e) => 31 | { 32 | if (CloseToHide is false) 33 | return; 34 | e.Cancel = true; 35 | Hide(); 36 | }; 37 | } 38 | 39 | public void ForcedClose() 40 | { 41 | CloseToHide = false; 42 | Close(); 43 | } 44 | 45 | [RelayCommand] 46 | public void RefreshCrashReport() 47 | { 48 | SetCrashReport(); 49 | //CrashReport = CreateModsInfo(ModInfos.AllModInfos.OrderBy( 50 | // s => new Random(Guid.NewGuid().GetHashCode()).Next() 51 | //).Take(20).ToDictionary(i => i.Key, i => i.Value), ModInfos.AllEnabledModIds).ToString(); 52 | } 53 | 54 | [RelayCommand] 55 | private static void OpenGameLog() 56 | { 57 | Utils.OpenLink(GameInfo.LogFile); 58 | } 59 | 60 | [RelayCommand] 61 | private void CopyCrashReport() 62 | { 63 | ClipboardVM.SetText(CrashReport + LastLog); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /Views/ModManager/ModManagerPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Text.RegularExpressions; 2 | using System.Windows; 3 | using System.Windows.Controls; 4 | using System.Windows.Input; 5 | using StarsectorToolbox.Models.ST; 6 | using StarsectorToolbox.ViewModels.ModManager; 7 | 8 | namespace StarsectorToolbox.Views.ModManager; 9 | 10 | /// 11 | /// ModManager.xaml 的交互逻辑 12 | /// 13 | internal partial class ModManagerPage : Page, ISTPage 14 | { 15 | public bool NeedSave => ViewModel.IsRemindSave; 16 | 17 | internal ModManagerPageViewModel ViewModel => (ModManagerPageViewModel)DataContext; 18 | 19 | /// 20 | /// 21 | /// 22 | public ModManagerPage() 23 | { 24 | DataContext = new ModManagerPageViewModel(true); 25 | ViewModel.AddUserGroupWindow = new AddUserGroupWindowViewModel(new AddUserGroupWindow()); 26 | InitializeComponent(); 27 | } 28 | 29 | private void TextBox_NumberInput(object sender, TextCompositionEventArgs e) => 30 | e.Handled = !Regex.IsMatch(e.Text, "[0-9]"); 31 | 32 | private async void DataGrid_ModsShowList_Drop(object sender, DragEventArgs e) 33 | { 34 | if (e.Data.GetData(DataFormats.FileDrop) is Array fileArray) 35 | { 36 | // TODO:需要在ViewModel内部实现 37 | await ViewModel.DropFiles(fileArray); 38 | } 39 | } 40 | 41 | private void ListBox_PreviewMouseRightButtonDown(object sender, MouseButtonEventArgs e) 42 | { 43 | // 禁止右键项时会选中项 44 | e.Handled = true; 45 | } 46 | 47 | private void ListBox_PreviewMouseWheel(object sender, MouseWheelEventArgs e) 48 | { 49 | var eventArg = new MouseWheelEventArgs(e.MouseDevice, e.Timestamp, e.Delta) 50 | { 51 | RoutedEvent = MouseWheelEvent, 52 | Source = sender, 53 | }; 54 | if (sender is Control control && control.Parent is UIElement ui) 55 | ui.RaiseEvent(eventArg); 56 | e.Handled = true; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Models/ST/ExtensionInfo.cs: -------------------------------------------------------------------------------- 1 | using HKW.TOML.Attributes; 2 | using HKW.TOML.Interfaces; 3 | 4 | namespace StarsectorToolbox.Models.ST; 5 | 6 | /// 拓展信息 7 | internal class ExtensionInfo : ITomlClassComment 8 | { 9 | /// 10 | public string ClassComment { get; set; } = string.Empty; 11 | 12 | /// 13 | public Dictionary ValueComments { get; set; } = new(); 14 | 15 | /// 16 | /// ID 17 | /// 18 | [TomlPropertyOrder(0)] 19 | public string Id { get; set; } = string.Empty; 20 | 21 | /// 22 | /// 图标 23 | /// 24 | [TomlPropertyOrder(1)] 25 | public string Icon { get; set; } = string.Empty; 26 | 27 | /// 28 | /// 名称 29 | /// 30 | [TomlPropertyOrder(2)] 31 | public string Name { get; set; } = string.Empty; 32 | 33 | /// 34 | /// 作者 35 | /// 36 | [TomlPropertyOrder(3)] 37 | public string Author { get; set; } = string.Empty; 38 | 39 | /// 40 | /// 版本 41 | /// 42 | [TomlPropertyOrder(4)] 43 | public string Version { get; set; } = string.Empty; 44 | 45 | /// 46 | /// 支持的工具箱版本 47 | /// 48 | [TomlPropertyOrder(5)] 49 | public string ToolboxVersion { get; set; } = string.Empty; 50 | 51 | /// 52 | /// 描述 53 | /// 54 | [TomlPropertyOrder(6)] 55 | public string Description { get; set; } = string.Empty; 56 | 57 | /// 58 | /// 入口文件 59 | /// 60 | [TomlPropertyOrder(7)] 61 | public string ExtensionFile { get; set; } = string.Empty; 62 | 63 | /// 64 | /// 入口 65 | /// 66 | [TomlPropertyOrder(8)] 67 | public string ExtensionPublic { get; set; } = string.Empty; 68 | 69 | /// 源位置 70 | [TomlIgnore] 71 | public string FileFullName { get; set; } = null!; 72 | 73 | /// 拓展类型 74 | [TomlIgnore] 75 | public Type ExtensionType { get; set; } = null!; 76 | 77 | /// 拓展页面 78 | [TomlIgnore] 79 | public object ExtensionPage { get; set; } = null!; 80 | } 81 | -------------------------------------------------------------------------------- /Views/Info/InfoPage.xaml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 144 | 145 | -------------------------------------------------------------------------------- /Langs/Pages/ModManager/AddUserGroupI18nRes.en-US.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 | Set user group info 122 | 123 | 124 | Icon 125 | 126 | 127 | Name 128 | 129 | 130 | Preview 131 | 132 | 133 | Cancel 134 | 135 | 136 | Yes 137 | 138 | -------------------------------------------------------------------------------- /Langs/Windows/CrashReporter/CrashReporterI18nRes.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 61 | 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 | text/microsoft-resx 90 | 91 | 92 | 1.3 93 | 94 | 95 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 96 | 97 | 98 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 99 | 100 | 101 | 游戏信息 102 | 103 | 104 | 游戏版本 105 | 106 | 107 | 系统信息 108 | 109 | 110 | 操作系统 111 | 112 | 113 | 系统版本 114 | 115 | 116 | 系统架构 117 | 118 | 119 | 虚拟机参数 120 | 121 | 122 | Java版本 123 | 124 | 125 | Java路径 126 | 127 | 128 | 模组信息 129 | 130 | 131 | 模组名称 132 | 133 | 134 | 模组版本 135 | 136 | 137 | 模组已启用 138 | 139 | 140 | 模组Id 141 | 142 | 143 | 内存总量 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 以下模组存在于已启用列表中但未被安装 153 | 154 | 155 | 游戏非正常退出, 需要启用异常信息收集工具吗? 156 | 157 | 158 | 未找到日志文件 159 | 160 | -------------------------------------------------------------------------------- /Langs/Pages/Settings/SettingsPageI18nRes.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 61 | 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 | text/microsoft-resx 90 | 91 | 92 | 1.3 93 | 94 | 95 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 96 | 97 | 98 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 99 | 100 | 101 | 设置 102 | 103 | 104 | 打开日志文件 105 | 106 | 107 | 设置文件错误 108 | 109 | 110 | 调试 111 | 112 | 113 | 标准 114 | 115 | 116 | 警告 117 | 118 | 119 | 日志输出级别: 120 | 121 | 122 | 语言: 123 | 124 | 125 | 语言切换为 126 | 127 | 128 | 日志输出级别切换为 129 | 130 | 131 | 清除 132 | 133 | 134 | 设置 135 | 136 | 137 | 拓展调试路径 138 | 139 | 140 | 选择调试文件 141 | 142 | 143 | 文件 144 | 145 | 146 | 设置拓展调试目录 147 | 148 | 149 | 清除拓展调试目录 150 | 151 | 152 | 用于指定拓展的路径,方便开发者调试. 153 | 154 | 155 | 重新载入后生效,需要重载吗? 156 | 157 | 158 | ST设置 159 | 160 | 161 | 拓展调试路径设置 162 | 163 | 164 | 主题 165 | 166 | 167 | Windows默认 168 | 169 | 170 | 明亮 171 | 172 | 173 | 深色 174 | 175 | -------------------------------------------------------------------------------- /Models/GameInfo/GameInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | using System.IO; 3 | using System.Text.RegularExpressions; 4 | using HKW.HKWViewModels.Dialogs; 5 | using StarsectorToolbox.Libs; 6 | using I18nRes = StarsectorToolbox.Langs.Libs.UtilsI18nRes; 7 | 8 | namespace StarsectorToolbox.Models.GameInfo; 9 | 10 | /// 游戏信息 11 | public static class GameInfo 12 | { 13 | private static readonly NLog.Logger sr_logger = NLog.LogManager.GetCurrentClassLogger(); 14 | 15 | /// 游戏目录 16 | public static string BaseDirectory { get; private set; } = string.Empty; 17 | 18 | /// 游戏Core目录 19 | public static string CoreDirectory { get; private set; } = string.Empty; 20 | 21 | /// 游戏exe文件 22 | public static string ExeFile { get; private set; } = string.Empty; 23 | 24 | /// 游戏模组文件夹 25 | public static string ModsDirectory { get; private set; } = string.Empty; 26 | 27 | /// 游戏存档文件夹 28 | public static string SaveDirectory { get; private set; } = string.Empty; 29 | 30 | /// 游戏已启用模组文件 31 | public static string EnabledModsJsonFile { get; private set; } = string.Empty; 32 | 33 | /// 游戏日志文件 34 | public static string LogFile { get; private set; } = string.Empty; 35 | 36 | /// 游戏版本 37 | public static string Version { get; private set; } = string.Empty; 38 | 39 | /// 游戏设置文件 40 | public static string SettingsFile { get; private set; } = string.Empty; 41 | 42 | /// 虚拟机参数文件 43 | public static string VmparamsFile { get; private set; } = string.Empty; 44 | 45 | /// 爪洼文件 46 | public static string JavaFile { get; private set; } = string.Empty; 47 | 48 | /// 爪洼版本 49 | public static string JaveVersion { get; private set; } = string.Empty; 50 | 51 | private static readonly Regex s_checkLauncher = 52 | new(@"Starting Starsector [^ ]+ launcher", RegexOptions.Compiled); 53 | private static readonly Regex s_checkVersion = 54 | new(@"[0-9]+.[0-9]+[^ ]*", RegexOptions.Compiled); 55 | 56 | /// 57 | /// 设置游戏信息 58 | /// 59 | /// 游戏目录 60 | internal static bool SetGameData(string gameDirectory) 61 | { 62 | if (CheckGameDirectory(gameDirectory, out var exeFile) is false) 63 | { 64 | sr_logger.Error($"{I18nRes.GameDirectoryError} {I18nRes.Path}: {gameDirectory}"); 65 | MessageBoxVM.Show( 66 | new($"{I18nRes.GameDirectoryError}\n{I18nRes.Path}") 67 | { 68 | Icon = MessageBoxVM.Icon.Error 69 | } 70 | ); 71 | return false; 72 | } 73 | ExeFile = exeFile; 74 | JavaFile = TryGetJavaFile(gameDirectory); 75 | JaveVersion = TryGetJaveVersion(JavaFile); 76 | VmparamsFile = Path.Combine(gameDirectory, "vmparams"); 77 | BaseDirectory = gameDirectory; 78 | ModsDirectory = Path.Combine(gameDirectory, "mods"); 79 | SaveDirectory = Path.Combine(gameDirectory, "saves"); 80 | CoreDirectory = Path.Combine(gameDirectory, "starsector-core"); 81 | EnabledModsJsonFile = Path.Combine(ModsDirectory, "enabled_mods.json"); 82 | LogFile = Path.Combine(CoreDirectory, "starsector.log"); 83 | SettingsFile = Path.Combine(CoreDirectory, "data", "config", "settings.json"); 84 | Version = TryGetGameVersion(LogFile); 85 | if (string.IsNullOrWhiteSpace(Version)) 86 | { 87 | sr_logger.Info(I18nRes.GameVersionAccessFailed); 88 | MessageBoxVM.Show(new(I18nRes.GameVersionAccessFailedMessage)); 89 | } 90 | return true; 91 | } 92 | 93 | private static bool CheckGameDirectory(string gameDirectory, out string exeFile) 94 | { 95 | exeFile = string.Empty; 96 | if (string.IsNullOrWhiteSpace(gameDirectory)) 97 | return false; 98 | exeFile = Path.Combine(gameDirectory, "starsector.exe"); 99 | if (File.Exists(exeFile) is false) 100 | return false; 101 | return true; 102 | } 103 | 104 | private static string TryGetGameVersion(string logFile) 105 | { 106 | if (File.Exists(logFile) is false) 107 | { 108 | File.Create(logFile).Close(); 109 | return string.Empty; 110 | } 111 | try 112 | { 113 | if (CheckGameVersion(logFile) is string version) 114 | return version; 115 | for (int i = 1; i < 10; i++) 116 | { 117 | var gFile = $"{LogFile}.{i}"; 118 | if (File.Exists(gFile) is false) 119 | continue; 120 | if (CheckGameVersion(gFile) is string versionG) 121 | return versionG; 122 | } 123 | } 124 | catch (Exception ex) 125 | { 126 | sr_logger.Error(ex, I18nRes.GameVersionAccessFailed); 127 | } 128 | return string.Empty; 129 | 130 | static string? CheckGameVersion(string logFile) 131 | { 132 | // 因为游戏可能会处于运行状态,所以使用只读打开日志文件 133 | using var sr = Utils.StreamReaderOnReadOnly(logFile); 134 | foreach (var line in Utils.GetLinesOnStreamReader(sr)) 135 | { 136 | if ( 137 | s_checkLauncher.Match(line).Value is string launcherData 138 | && string.IsNullOrWhiteSpace(launcherData) is false 139 | ) 140 | return s_checkVersion.Match(launcherData).Value; 141 | } 142 | return null; 143 | } 144 | } 145 | 146 | /// 147 | /// 获取游戏目录 148 | /// 149 | /// 获取成功为,失败为 150 | internal static bool GetGameDirectory() 151 | { 152 | var fileNames = OpenFileDialogVM.Show( 153 | new() { Filter = $"Exe {I18nRes.File}|starsector.exe" } 154 | ); 155 | if (fileNames?.Any() is true && fileNames.First() is string fileName) 156 | { 157 | string directory = Path.GetDirectoryName(fileName)!; 158 | if (SetGameData(directory)) 159 | { 160 | sr_logger.Info($"{I18nRes.GameDirectorySetCompleted} {I18nRes.Path}: {directory}"); 161 | return true; 162 | } 163 | } 164 | return false; 165 | } 166 | 167 | private static string TryGetJavaFile(string baseDirectory) 168 | { 169 | string javeFile = Path.Combine(baseDirectory, "jre", "bin", "java.exe"); 170 | if (File.Exists(javeFile)) 171 | return javeFile; 172 | return string.Empty; 173 | } 174 | 175 | private static string TryGetJaveVersion(string javaFile) 176 | { 177 | if (string.IsNullOrWhiteSpace(javaFile)) 178 | return string.Empty; 179 | var psi = new ProcessStartInfo(); 180 | psi.FileName = javaFile; 181 | psi.CreateNoWindow = true; 182 | psi.RedirectStandardError = true; 183 | psi.Arguments = "-version"; 184 | using var p = Process.Start(psi); 185 | if (p is null) 186 | return string.Empty; 187 | var message = p.StandardError.ReadToEnd(); 188 | var version = Regex.Match(message, @"(?<=java version "")[^""]*").Value; 189 | p.WaitForExit(); 190 | return version; 191 | } 192 | } 193 | -------------------------------------------------------------------------------- /ViewModels/Settings/SettingsPageViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.ObjectModel; 2 | using System.Globalization; 3 | using System.IO; 4 | using System.Windows; 5 | using CommunityToolkit.Mvvm.ComponentModel; 6 | using CommunityToolkit.Mvvm.Input; 7 | using CommunityToolkit.Mvvm.Messaging; 8 | using HKW.HKWViewModels; 9 | using HKW.HKWViewModels.Controls; 10 | using HKW.HKWViewModels.Dialogs; 11 | using Microsoft.Win32; 12 | using StarsectorToolbox.Libs; 13 | using StarsectorToolbox.Models.Messages; 14 | using StarsectorToolbox.Models.ST; 15 | using I18nRes = StarsectorToolbox.Langs.Pages.Settings.SettingsPageI18nRes; 16 | 17 | namespace StarsectorToolbox.ViewModels.Settings; 18 | 19 | internal partial class SettingsPageViewModel : ObservableObject 20 | { 21 | private static readonly NLog.Logger sr_logger = NLog.LogManager.GetCurrentClassLogger(); 22 | 23 | [ObservableProperty] 24 | private ObservableI18n _i18n = ObservableI18n.Create(new()); 25 | 26 | [ObservableProperty] 27 | [NotifyCanExecuteChangedFor(nameof(ClearExtensionDebugPathCommand))] 28 | private string? _extensionDebugPath; 29 | 30 | [ObservableProperty] 31 | private ComboBoxVM _comboBox_Language = 32 | new( 33 | new ObservableCollection() 34 | { 35 | new() { Content = "English", ToolTip = "en-US" }, 36 | new() { Content = "简体中文", ToolTip = "zh-CN" }, 37 | } 38 | ); 39 | 40 | [ObservableProperty] 41 | private ComboBoxVM _comboBox_Theme = new(new Func>(() => 42 | { 43 | var items = new ObservableCollection(); 44 | var item = new ComboBoxItemVM(); 45 | item.Tag = nameof(I18nRes.WindowsDefault); 46 | item.Content = ObservableI18n.BindingValue( 47 | item, 48 | (value, taget) => taget.Content = value, 49 | () => I18nRes.WindowsDefault 50 | ); 51 | items.Add(item); 52 | item = new ComboBoxItemVM(); 53 | item.Tag = nameof(I18nRes.Light); 54 | item.Content = ObservableI18n.BindingValue( 55 | item, 56 | (value, taget) => taget.Content = value, 57 | () => I18nRes.Light 58 | ); 59 | items.Add(item); 60 | item = new ComboBoxItemVM(); 61 | item.Tag = nameof(I18nRes.Dark); 62 | item.Content = ObservableI18n.BindingValue( 63 | item, 64 | (value, taget) => taget.Content = value, 65 | () => I18nRes.Dark 66 | ); 67 | items.Add(item); 68 | return items; 69 | })()); 70 | 71 | public SettingsPageViewModel() 72 | { 73 | // https://github.com/CommunityToolkit/dotnet/issues/604 74 | // ExtensionDebugPath = WeakReferenceMessenger.Default.Send(); 75 | } 76 | 77 | public SettingsPageViewModel(bool noop) 78 | { 79 | I18n.AddCultureChangedAction(CultureChangedAction); 80 | ExtensionDebugPath = WeakReferenceMessenger.Default 81 | .Send() 82 | .Response; 83 | // 设置Language初始值 84 | ComboBox_Language.SelectedItem = ComboBox_Language.ItemsSource.FirstOrDefault( 85 | i => i.ToolTip is string language && language == ObservableI18n.CurrentCulture.Name, 86 | ComboBox_Language.ItemsSource[0] 87 | ); 88 | // 设置Theme初始值 89 | ComboBox_Theme.SelectedItem = ComboBox_Theme.ItemsSource.FirstOrDefault( 90 | i => i.Tag is string theme && theme == STSettings.Instance.Theme, 91 | ComboBox_Theme.ItemsSource[0] 92 | ); 93 | if (ComboBox_Theme.SelectedItem.Tag is string theme && theme != STSettings.Instance.Theme) 94 | { 95 | STSettings.Instance.Theme = nameof(I18nRes.WindowsDefault); 96 | STSettings.Save(); 97 | } 98 | // 注册事件 99 | ComboBox_Language.SelectionChangedEvent += ComboBox_Language_SelectionChangedEvent; 100 | WeakReferenceMessenger.Default.Register( 101 | this, 102 | ExtensionDebugPathErrorReceive 103 | ); 104 | } 105 | 106 | private void ExtensionDebugPathErrorReceive( 107 | object recipient, 108 | ExtensionDebugPathErrorMessage message 109 | ) 110 | { 111 | ExtensionDebugPath = string.Empty; 112 | } 113 | 114 | private void CultureChangedAction(CultureInfo cultureInfo) { } 115 | 116 | private void ComboBox_Language_SelectionChangedEvent(ComboBoxItemVM item) 117 | { 118 | var language = item.ToolTip!.ToString()!; 119 | if (ObservableI18n.CurrentCulture.Name == language) 120 | return; 121 | ObservableI18n.CurrentCulture = CultureInfo.GetCultureInfo(item.ToolTip!.ToString()!); 122 | STSettings.Instance.Language = ObservableI18n.CurrentCulture.Name; 123 | STSettings.Save(); 124 | sr_logger.Info($"{I18nRes.LanguageSwitch}: {ObservableI18n.CurrentCulture.Name}"); 125 | } 126 | 127 | //private void ComboBox_Theme_SelectionChangedEvent(ComboBoxItemVM item) 128 | //{ 129 | // if (item.Tag is not string themeName) 130 | // return; 131 | // STSettings.Instance.Theme = themeName; 132 | // STSettings.Save(); 133 | // if (themeName == nameof(I18nRes.WindowsDefault)) 134 | // themeName = WindowsThemeIsLight() ? nameof(I18nRes.Light) : nameof(I18nRes.Dark); 135 | // GlobalSettings.ChangeTheme(themeName); 136 | //} 137 | 138 | [RelayCommand] 139 | private void SetExtensionDebugPath() 140 | { 141 | var filesName = OpenFileDialogVM.Show( 142 | new() 143 | { 144 | Title = I18nRes.SelectDebugFile, 145 | Filter = $"Toml {I18nRes.File}|Extension.toml" 146 | } 147 | ); 148 | if (filesName is null || filesName.Any() is false) 149 | return; 150 | string path = Path.GetDirectoryName(filesName.First())!; 151 | ExtensionDebugPath = path; 152 | if ( 153 | MessageBoxVM.Show( 154 | new(I18nRes.EffectiveAfterReload) 155 | { 156 | Button = MessageBoxVM.Button.YesNo, 157 | Icon = MessageBoxVM.Icon.Question 158 | } 159 | ) is MessageBoxVM.Result.Yes 160 | ) 161 | { 162 | WeakReferenceMessenger.Default.Send( 163 | new(ExtensionDebugPath) 164 | ); 165 | sr_logger.Info($"{I18nRes.SetExtensionDebugPath}: {ExtensionDebugPath}"); 166 | } 167 | } 168 | 169 | [RelayCommand(CanExecute = nameof(ClearButtonCanExecute))] 170 | private void ClearExtensionDebugPath() 171 | { 172 | ExtensionDebugPath = string.Empty; 173 | if ( 174 | MessageBoxVM.Show( 175 | new(I18nRes.EffectiveAfterReload) 176 | { 177 | Button = MessageBoxVM.Button.YesNo, 178 | Icon = MessageBoxVM.Icon.Question 179 | } 180 | ) is MessageBoxVM.Result.Yes 181 | ) 182 | { 183 | WeakReferenceMessenger.Default.Send( 184 | new(ExtensionDebugPath) 185 | ); 186 | sr_logger.Info($"{I18nRes.ClearExtensionDebugPath}: {ExtensionDebugPath}"); 187 | } 188 | } 189 | 190 | private bool ClearButtonCanExecute() => !string.IsNullOrWhiteSpace(ExtensionDebugPath); 191 | 192 | [RelayCommand] 193 | private static void OpenLogFile() 194 | { 195 | Utils.OpenLink(ST.LogFile); 196 | } 197 | } 198 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Oo]ut/ 33 | [Ll]og/ 34 | [Ll]ogs/ 35 | 36 | # Visual Studio 2015/2017 cache/options directory 37 | .vs/ 38 | # Uncomment if you have tasks that create the project's static files in wwwroot 39 | #wwwroot/ 40 | 41 | # Visual Studio 2017 auto generated files 42 | Generated\ Files/ 43 | 44 | # MSTest test Results 45 | [Tt]est[Rr]esult*/ 46 | [Bb]uild[Ll]og.* 47 | 48 | # NUnit 49 | *.VisualState.xml 50 | TestResult.xml 51 | nunit-*.xml 52 | 53 | # Build Results of an ATL Project 54 | [Dd]ebugPS/ 55 | [Rr]eleasePS/ 56 | dlldata.c 57 | 58 | # Benchmark Results 59 | BenchmarkDotNet.Artifacts/ 60 | 61 | # .NET Core 62 | project.lock.json 63 | project.fragment.lock.json 64 | artifacts/ 65 | 66 | # ASP.NET Scaffolding 67 | ScaffoldingReadMe.txt 68 | 69 | # StyleCop 70 | StyleCopReport.xml 71 | 72 | # Files built by Visual Studio 73 | *_i.c 74 | *_p.c 75 | *_h.h 76 | *.ilk 77 | *.meta 78 | *.obj 79 | *.iobj 80 | *.pch 81 | *.pdb 82 | *.ipdb 83 | *.pgc 84 | *.pgd 85 | *.rsp 86 | *.sbr 87 | *.tlb 88 | *.tli 89 | *.tlh 90 | *.tmp 91 | *.tmp_proj 92 | *_wpftmp.csproj 93 | *.log 94 | *.vspscc 95 | *.vssscc 96 | .builds 97 | *.pidb 98 | *.svclog 99 | *.scc 100 | 101 | # Chutzpah Test files 102 | _Chutzpah* 103 | 104 | # Visual C++ cache files 105 | ipch/ 106 | *.aps 107 | *.ncb 108 | *.opendb 109 | *.opensdf 110 | *.sdf 111 | *.cachefile 112 | *.VC.db 113 | *.VC.VC.opendb 114 | 115 | # Visual Studio profiler 116 | *.psess 117 | *.vsp 118 | *.vspx 119 | *.sap 120 | 121 | # Visual Studio Trace Files 122 | *.e2e 123 | 124 | # TFS 2012 Local Workspace 125 | $tf/ 126 | 127 | # Guidance Automation Toolkit 128 | *.gpState 129 | 130 | # ReSharper is a .NET coding add-in 131 | _ReSharper*/ 132 | *.[Rr]e[Ss]harper 133 | *.DotSettings.user 134 | 135 | # TeamCity is a build add-in 136 | _TeamCity* 137 | 138 | # DotCover is a Code Coverage Tool 139 | *.dotCover 140 | 141 | # AxoCover is a Code Coverage Tool 142 | .axoCover/* 143 | !.axoCover/settings.json 144 | 145 | # Coverlet is a free, cross platform Code Coverage Tool 146 | coverage*.json 147 | coverage*.xml 148 | coverage*.info 149 | 150 | # Visual Studio code coverage results 151 | *.coverage 152 | *.coveragexml 153 | 154 | # NCrunch 155 | _NCrunch_* 156 | .*crunch*.local.xml 157 | nCrunchTemp_* 158 | 159 | # MightyMoose 160 | *.mm.* 161 | AutoTest.Net/ 162 | 163 | # Web workbench (sass) 164 | .sass-cache/ 165 | 166 | # Installshield output folder 167 | [Ee]xpress/ 168 | 169 | # DocProject is a documentation generator add-in 170 | DocProject/buildhelp/ 171 | DocProject/Help/*.HxT 172 | DocProject/Help/*.HxC 173 | DocProject/Help/*.hhc 174 | DocProject/Help/*.hhk 175 | DocProject/Help/*.hhp 176 | DocProject/Help/Html2 177 | DocProject/Help/html 178 | 179 | # Click-Once directory 180 | publish/ 181 | 182 | # Publish Web Output 183 | *.[Pp]ublish.xml 184 | *.azurePubxml 185 | # Note: Comment the next line if you want to checkin your web deploy settings, 186 | # but database connection strings (with potential passwords) will be unencrypted 187 | *.pubxml 188 | *.publishproj 189 | 190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 191 | # checkin your Azure Web App publish settings, but sensitive information contained 192 | # in these scripts will be unencrypted 193 | PublishScripts/ 194 | 195 | # NuGet Packages 196 | *.nupkg 197 | # NuGet Symbol Packages 198 | *.snupkg 199 | # The packages folder can be ignored because of Package Restore 200 | **/[Pp]ackages/* 201 | # except build/, which is used as an MSBuild target. 202 | !**/[Pp]ackages/build/ 203 | # Uncomment if necessary however generally it will be regenerated when needed 204 | #!**/[Pp]ackages/repositories.config 205 | # NuGet v3's project.json files produces more ignorable files 206 | *.nuget.props 207 | *.nuget.targets 208 | 209 | # Microsoft Azure Build Output 210 | csx/ 211 | *.build.csdef 212 | 213 | # Microsoft Azure Emulator 214 | ecf/ 215 | rcf/ 216 | 217 | # Windows Store app package directories and files 218 | AppPackages/ 219 | BundleArtifacts/ 220 | Package.StoreAssociation.xml 221 | _pkginfo.txt 222 | *.appx 223 | *.appxbundle 224 | *.appxupload 225 | 226 | # Visual Studio cache files 227 | # files ending in .cache can be ignored 228 | *.[Cc]ache 229 | # but keep track of directories ending in .cache 230 | !?*.[Cc]ache/ 231 | 232 | # Others 233 | ClientBin/ 234 | ~$* 235 | *~ 236 | *.dbmdl 237 | *.dbproj.schemaview 238 | *.jfm 239 | *.pfx 240 | *.publishsettings 241 | orleans.codegen.cs 242 | 243 | # Including strong name files can present a security risk 244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 245 | #*.snk 246 | 247 | # Since there are multiple workflows, uncomment next line to ignore bower_components 248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 249 | #bower_components/ 250 | 251 | # RIA/Silverlight projects 252 | Generated_Code/ 253 | 254 | # Backup & report files from converting an old project file 255 | # to a newer Visual Studio version. Backup files are not needed, 256 | # because we have git ;-) 257 | _UpgradeReport_Files/ 258 | Backup*/ 259 | UpgradeLog*.XML 260 | UpgradeLog*.htm 261 | ServiceFabricBackup/ 262 | *.rptproj.bak 263 | 264 | # SQL Server files 265 | *.mdf 266 | *.ldf 267 | *.ndf 268 | 269 | # Business Intelligence projects 270 | *.rdl.data 271 | *.bim.layout 272 | *.bim_*.settings 273 | *.rptproj.rsuser 274 | *- [Bb]ackup.rdl 275 | *- [Bb]ackup ([0-9]).rdl 276 | *- [Bb]ackup ([0-9][0-9]).rdl 277 | 278 | # Microsoft Fakes 279 | FakesAssemblies/ 280 | 281 | # GhostDoc plugin setting file 282 | *.GhostDoc.xml 283 | 284 | # Node.js Tools for Visual Studio 285 | .ntvs_analysis.dat 286 | node_modules/ 287 | 288 | # Visual Studio 6 build log 289 | *.plg 290 | 291 | # Visual Studio 6 workspace options file 292 | *.opt 293 | 294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 295 | *.vbw 296 | 297 | # Visual Studio LightSwitch build output 298 | **/*.HTMLClient/GeneratedArtifacts 299 | **/*.DesktopClient/GeneratedArtifacts 300 | **/*.DesktopClient/ModelManifest.xml 301 | **/*.Server/GeneratedArtifacts 302 | **/*.Server/ModelManifest.xml 303 | _Pvt_Extensions 304 | 305 | # Paket dependency manager 306 | .paket/paket.exe 307 | paket-files/ 308 | 309 | # FAKE - F# Make 310 | .fake/ 311 | 312 | # CodeRush personal settings 313 | .cr/personal 314 | 315 | # Python Tools for Visual Studio (PTVS) 316 | __pycache__/ 317 | *.pyc 318 | 319 | # Cake - Uncomment if you are using it 320 | # tools/** 321 | # !tools/packages.config 322 | 323 | # Tabs Studio 324 | *.tss 325 | 326 | # Telerik's JustMock configuration file 327 | *.jmconfig 328 | 329 | # BizTalk build output 330 | *.btp.cs 331 | *.btm.cs 332 | *.odx.cs 333 | *.xsd.cs 334 | 335 | # OpenCover UI analysis results 336 | OpenCover/ 337 | 338 | # Azure Stream Analytics local run output 339 | ASALocalRun/ 340 | 341 | # MSBuild Binary and Structured Log 342 | *.binlog 343 | 344 | # NVidia Nsight GPU debugger configuration file 345 | *.nvuser 346 | 347 | # MFractors (Xamarin productivity tool) working folder 348 | .mfractor/ 349 | 350 | # Local History for Visual Studio 351 | .localhistory/ 352 | 353 | # BeatPulse healthcheck temp database 354 | healthchecksdb 355 | 356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 357 | MigrationBackup/ 358 | 359 | # Ionide (cross platform F# VS Code tools) working folder 360 | .ionide/ 361 | 362 | # Fody - auto-generated XML schema 363 | FodyWeavers.xsd --------------------------------------------------------------------------------