mirror of
https://github.com/zs-yg/kortapp-z.git
synced 2025-12-07 00:20:43 +08:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
24a352f67b | ||
|
|
9dfa777c6d | ||
|
|
30d1c0c8c6 |
25
MainForm.cs
25
MainForm.cs
@@ -419,6 +419,31 @@ namespace AppStore
|
||||
"RIME",
|
||||
"https://objects.githubusercontent.com/github-production-release-asset-2e65be/3777237/08e5cfdc-492c-444a-80b3-f8d8caeb5a2a?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20250614%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250614T012552Z&X-Amz-Expires=300&X-Amz-Signature=9d6c9431a037a9e520d506c917b0286f904a538ee6f95063783939b4c9cf9307&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Dweasel-0.17.4.0-installer.exe&response-content-type=application%2Foctet-stream",
|
||||
"img/png/RIME.png"));
|
||||
|
||||
flowPanel.Controls.Add(CreateAppCard(
|
||||
"PyDebloatX",
|
||||
"https://ghproxy.net/https://github.com/Teraskull/PyDebloatX/releases/download/1.12.0/PyDebloatX_setup.exe",
|
||||
"img/ico/PyDebloatX.ico"));
|
||||
|
||||
flowPanel.Controls.Add(CreateAppCard(
|
||||
"DropPoint",
|
||||
"https://ghproxy.net/https://github.com/GameGodS3/DropPoint/releases/download/v1.2.1/DropPoint-Setup-1.2.1.exe",
|
||||
"img/png/DropPoint.png"));
|
||||
|
||||
flowPanel.Controls.Add(CreateAppCard(
|
||||
"Dnest",
|
||||
"https://ghproxy.net/https://github.com/davidkane0526/Dnest/releases/download/V1.3.0/Dnest.exe",
|
||||
"img/png/Dnest.png"));
|
||||
|
||||
flowPanel.Controls.Add(CreateAppCard(
|
||||
"lockpass",
|
||||
"https://ghproxy.net/https://github.com/ftyszyx/lockpass/releases/download/v0.0.14/lockpass-0.0.14-win32-x64-setup.exe",
|
||||
"img/png/lockpass.png"));
|
||||
|
||||
flowPanel.Controls.Add(CreateAppCard(
|
||||
"WinMerge",
|
||||
"https://downloads.sourceforge.net/winmerge/WinMerge-2.16.48.2-x64-Setup.exe",
|
||||
"img/png/winmerge.png"));
|
||||
}
|
||||
|
||||
private FlowLayoutPanel downloadsFlowPanel = new FlowLayoutPanel();
|
||||
|
||||
BIN
img/ico/PyDebloatX.ico
Normal file
BIN
img/ico/PyDebloatX.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 104 KiB |
BIN
img/png/Dnest.png
Normal file
BIN
img/png/Dnest.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.8 KiB |
BIN
img/png/DropPoint.png
Normal file
BIN
img/png/DropPoint.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
BIN
img/png/Winmerge.png
Normal file
BIN
img/png/Winmerge.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
BIN
img/png/lockpass.png
Normal file
BIN
img/png/lockpass.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.5 KiB |
@@ -1,18 +1,14 @@
|
||||
#include <iostream>
|
||||
#include <filesystem>
|
||||
#include <chrono>
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
int main() {
|
||||
try {
|
||||
auto start = std::chrono::high_resolution_clock::now();
|
||||
|
||||
// 定义日志目录路径
|
||||
fs::path logDir = "logs";
|
||||
size_t deletedCount = 0;
|
||||
size_t errorCount = 0;
|
||||
|
||||
// 检查目录是否存在
|
||||
if (fs::exists(logDir) && fs::is_directory(logDir)) {
|
||||
// 遍历并删除所有日志文件
|
||||
@@ -31,19 +27,15 @@ int main() {
|
||||
std::cout << "日志目录不存在,无需清理" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
auto end = std::chrono::high_resolution_clock::now();
|
||||
auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(end - start);
|
||||
|
||||
std::cout << "日志清理完成: " << std::endl;
|
||||
std::cout << "删除文件数: " << deletedCount << std::endl;
|
||||
std::cout << "错误数: " << errorCount << std::endl;
|
||||
std::cout << "耗时: " << duration.count() << " 毫秒" << std::endl;
|
||||
|
||||
} catch (const std::exception& e) {
|
||||
std::cerr << "发生错误: " << e.what() << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace AppStore
|
||||
{
|
||||
public static class Logger
|
||||
{
|
||||
private static readonly string LogsDirectory = "logs";
|
||||
private static readonly object LockObject = new object();
|
||||
|
||||
static Logger()
|
||||
{
|
||||
// 确保logs目录存在
|
||||
@@ -17,7 +15,6 @@ namespace AppStore
|
||||
Directory.CreateDirectory(LogsDirectory);
|
||||
}
|
||||
}
|
||||
|
||||
public static void Log(string message)
|
||||
{
|
||||
lock (LockObject)
|
||||
@@ -26,7 +23,6 @@ namespace AppStore
|
||||
{
|
||||
string fileName = $"{DateTime.Now:yyyyMMddHHmmss}.log";
|
||||
string filePath = Path.Combine(LogsDirectory, fileName);
|
||||
|
||||
using (StreamWriter writer = new StreamWriter(filePath, true, Encoding.UTF8))
|
||||
{
|
||||
writer.WriteLine($"[{DateTime.Now:yyyy-MM-dd HH:mm:ss}] {message}");
|
||||
@@ -39,7 +35,6 @@ namespace AppStore
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void LogError(string message, Exception? ex = null)
|
||||
{
|
||||
string errorMessage = $"ERROR: {message}";
|
||||
|
||||
Reference in New Issue
Block a user