-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
添加一些动图 添加Q&A页面 添加展开侧边栏小标题 添加缺失字体图标安装 添加某些元素中的图标 添加获取抽卡缓存链接功能 添加自动生成错误日志功能 添加几近完整的生成错误报告功能 添加了一些计划中的功能(功能选项不可用) 添加启动程序同时按下Shift强制启动控制台 修改代理按钮提示位置 修复抽卡分析代理与缓存链接冲突问题 修复关于页面版本号与更新界面冲突的问题 修复进入抽卡分析界面时会加载两次的问题 修复导入SRGF后需要重新切换界面才能显示的问题
- Loading branch information
Showing
27 changed files
with
668 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Windows.Storage; | ||
|
||
namespace SRTools.Depend | ||
{ | ||
public class ExceptionSave | ||
{ | ||
public static async Task Write(string message, int severity, string fileName) | ||
{ | ||
// 获取用户文档目录下的JSG-LLC\Panic目录 | ||
StorageFolder folder = await KnownFolders.DocumentsLibrary.CreateFolderAsync("JSG-LLC\\Panic", CreationCollisionOption.OpenIfExists); | ||
|
||
// 创建或覆盖log.txt文件 | ||
StorageFile file = await folder.CreateFileAsync(fileName, CreationCollisionOption.ReplaceExisting); | ||
|
||
// 将ex变量内容写入文件 | ||
using (StreamWriter writer = new StreamWriter(await file.OpenStreamForWriteAsync())) | ||
{ | ||
await writer.WriteLineAsync(DateTime.Now.ToString() + " [" + severity.ToString() + "] \n" + message); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Diagnostics; | ||
using System.IO; | ||
using System.IO.Compression; | ||
using System.Linq; | ||
using System.Runtime.InteropServices; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Windows.Storage; | ||
using Windows.System; | ||
|
||
namespace SRTools.Depend | ||
{ | ||
class InstallFont | ||
{ | ||
|
||
// Import the AddFontResource function from gdi32.dll | ||
[DllImport("gdi32.dll", EntryPoint = "AddFontResourceW", SetLastError = true)] | ||
public static extern int AddFontResource([In] [MarshalAs(UnmanagedType.LPWStr)] | ||
string lpFileName); | ||
|
||
// Import the SendMessage function from user32.dll | ||
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)] | ||
public static extern IntPtr SendMessageTimeout(IntPtr hWnd, int Msg, IntPtr wParam, | ||
IntPtr lParam, uint fuFlags, uint uTimeout, out IntPtr lpdwResult); | ||
|
||
public static async Task<int> SegoeFluentFontAsync() | ||
{ | ||
GetNetData getNetData; | ||
string UpdateFileFolder = "\\JSG-LLC\\Fonts\\"; | ||
string UpdateFileName = "SegoeFluentIcons.zip"; | ||
string userDocumentsFolderPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); | ||
string localFilePath = Path.Combine(userDocumentsFolderPath + UpdateFileFolder, UpdateFileName); | ||
var progress = new Progress<double>(); | ||
getNetData = new GetNetData(); | ||
try | ||
{ | ||
await getNetData.DownloadFileWithProgressAsync("https://aka.ms/SegoeFluentIcons", localFilePath, progress); | ||
} | ||
catch (Exception ex) | ||
{ | ||
throw new Exception(ex.Message); | ||
} | ||
|
||
string fontZipFile = Path.Combine(userDocumentsFolderPath + UpdateFileFolder, UpdateFileName); | ||
string tempFolder = Path.Combine(userDocumentsFolderPath + UpdateFileFolder, "temp"); | ||
// 创建临时文件夹 | ||
if (!Directory.Exists(tempFolder)) | ||
{ | ||
Directory.CreateDirectory(tempFolder); | ||
} | ||
Directory.Delete(tempFolder, true); | ||
// 解压 zip 文件到临时文件夹中 | ||
ZipFile.ExtractToDirectory(fontZipFile, tempFolder); | ||
|
||
// 获取字体文件路径 | ||
StorageFile fontFile = await StorageFile.GetFileFromPathAsync(tempFolder + "\\Segoe Fluent Icons.ttf"); | ||
|
||
if (fontFile != null) | ||
{ | ||
// 启动 Windows 默认的字体查看器 | ||
Process.Start("fontview", fontFile.Path); | ||
|
||
// 字体已成功安装 | ||
return 0; | ||
} | ||
else { return 1; } | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.