初始化提交
This commit is contained in:
commit
dfabe611ba
BIN
.vs/ProjectEvaluation/quicklauncher.metadata.v9.bin
Normal file
BIN
.vs/ProjectEvaluation/quicklauncher.metadata.v9.bin
Normal file
Binary file not shown.
BIN
.vs/ProjectEvaluation/quicklauncher.projects.v9.bin
Normal file
BIN
.vs/ProjectEvaluation/quicklauncher.projects.v9.bin
Normal file
Binary file not shown.
BIN
.vs/ProjectEvaluation/quicklauncher.strings.v9.bin
Normal file
BIN
.vs/ProjectEvaluation/quicklauncher.strings.v9.bin
Normal file
Binary file not shown.
BIN
.vs/QuickLauncher/CopilotIndices/17.13.439.2385/CodeChunks.db
Normal file
BIN
.vs/QuickLauncher/CopilotIndices/17.13.439.2385/CodeChunks.db
Normal file
Binary file not shown.
Binary file not shown.
BIN
.vs/QuickLauncher/DesignTimeBuild/.dtbcache.v2
Normal file
BIN
.vs/QuickLauncher/DesignTimeBuild/.dtbcache.v2
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.vs/QuickLauncher/v17/.futdcache.v2
Normal file
BIN
.vs/QuickLauncher/v17/.futdcache.v2
Normal file
Binary file not shown.
BIN
.vs/QuickLauncher/v17/.suo
Normal file
BIN
.vs/QuickLauncher/v17/.suo
Normal file
Binary file not shown.
44
.vs/QuickLauncher/v17/DocumentLayout.backup.json
Normal file
44
.vs/QuickLauncher/v17/DocumentLayout.backup.json
Normal file
@ -0,0 +1,44 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "I:\\Desktop\\CusserCore\\ToolBox\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{8E5D0C31-935F-4C3B-8A56-8E8C1F9D9F5A}|QuickLauncher.csproj|i:\\desktop\\cussercore\\toolbox\\mainform.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
|
||||
"RelativeMoniker": "D:0:0:{8E5D0C31-935F-4C3B-8A56-8E8C1F9D9F5A}|QuickLauncher.csproj|solutionrelative:mainform.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 2,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{cce594b6-0c39-4442-ba28-10c64ac7e89f}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "MainForm.cs [\u8BBE\u8BA1]",
|
||||
"DocumentMoniker": "I:\\Desktop\\CusserCore\\ToolBox\\MainForm.cs",
|
||||
"RelativeDocumentMoniker": "MainForm.cs",
|
||||
"ToolTip": "I:\\Desktop\\CusserCore\\ToolBox\\MainForm.cs [\u8BBE\u8BA1]*",
|
||||
"RelativeToolTip": "MainForm.cs [\u8BBE\u8BA1]*",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-03-12T06:05:42.834Z",
|
||||
"EditorCaption": " [\u8BBE\u8BA1]"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
44
.vs/QuickLauncher/v17/DocumentLayout.json
Normal file
44
.vs/QuickLauncher/v17/DocumentLayout.json
Normal file
@ -0,0 +1,44 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "I:\\Desktop\\CusserCore\\ToolBox\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{8E5D0C31-935F-4C3B-8A56-8E8C1F9D9F5A}|QuickLauncher.csproj|i:\\desktop\\cussercore\\toolbox\\mainform.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
|
||||
"RelativeMoniker": "D:0:0:{8E5D0C31-935F-4C3B-8A56-8E8C1F9D9F5A}|QuickLauncher.csproj|solutionrelative:mainform.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 2,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{cce594b6-0c39-4442-ba28-10c64ac7e89f}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "MainForm.cs [\u8BBE\u8BA1]",
|
||||
"DocumentMoniker": "I:\\Desktop\\CusserCore\\ToolBox\\MainForm.cs",
|
||||
"RelativeDocumentMoniker": "MainForm.cs",
|
||||
"ToolTip": "I:\\Desktop\\CusserCore\\ToolBox\\MainForm.cs [\u8BBE\u8BA1]",
|
||||
"RelativeToolTip": "MainForm.cs [\u8BBE\u8BA1]",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-03-12T06:05:42.834Z",
|
||||
"EditorCaption": " [\u8BBE\u8BA1]"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
186
MainForm.Designer.cs
generated
Normal file
186
MainForm.Designer.cs
generated
Normal file
@ -0,0 +1,186 @@
|
||||
namespace QuickLauncher
|
||||
{
|
||||
partial class MainForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
|
||||
leftPanel = new Panel();
|
||||
rightPanel = new Panel();
|
||||
shortcutsPanel = new FlowLayoutPanel();
|
||||
toolPanel = new Panel();
|
||||
addButton = new Button();
|
||||
categoryLabel = new Label();
|
||||
menuStrip = new MenuStrip();
|
||||
fileMenu = new ToolStripMenuItem();
|
||||
addCategoryItem = new ToolStripMenuItem();
|
||||
deleteCategoryItem = new ToolStripMenuItem();
|
||||
rightPanel.SuspendLayout();
|
||||
toolPanel.SuspendLayout();
|
||||
menuStrip.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// leftPanel
|
||||
//
|
||||
leftPanel.AutoScroll = true;
|
||||
leftPanel.BackColor = Color.FromArgb(230, 255, 230);
|
||||
leftPanel.Dock = DockStyle.Left;
|
||||
leftPanel.Location = new Point(0, 36);
|
||||
leftPanel.Margin = new Padding(6, 6, 6, 6);
|
||||
leftPanel.Name = "leftPanel";
|
||||
leftPanel.Size = new Size(275, 1164);
|
||||
leftPanel.TabIndex = 0;
|
||||
//
|
||||
// rightPanel
|
||||
//
|
||||
rightPanel.BackColor = Color.White;
|
||||
rightPanel.Controls.Add(shortcutsPanel);
|
||||
rightPanel.Controls.Add(toolPanel);
|
||||
rightPanel.Dock = DockStyle.Fill;
|
||||
rightPanel.Location = new Point(275, 36);
|
||||
rightPanel.Margin = new Padding(6, 6, 6, 6);
|
||||
rightPanel.Name = "rightPanel";
|
||||
rightPanel.Size = new Size(1192, 1164);
|
||||
rightPanel.TabIndex = 1;
|
||||
//
|
||||
// shortcutsPanel
|
||||
//
|
||||
shortcutsPanel.AllowDrop = true;
|
||||
shortcutsPanel.AutoScroll = true;
|
||||
shortcutsPanel.BackColor = Color.White;
|
||||
shortcutsPanel.Dock = DockStyle.Fill;
|
||||
shortcutsPanel.Location = new Point(0, 80);
|
||||
shortcutsPanel.Margin = new Padding(6, 6, 6, 6);
|
||||
shortcutsPanel.Name = "shortcutsPanel";
|
||||
shortcutsPanel.Padding = new Padding(18, 20, 18, 20);
|
||||
shortcutsPanel.Size = new Size(1192, 1084);
|
||||
shortcutsPanel.TabIndex = 1;
|
||||
//
|
||||
// toolPanel
|
||||
//
|
||||
toolPanel.BackColor = Color.FromArgb(240, 240, 240);
|
||||
toolPanel.Controls.Add(addButton);
|
||||
toolPanel.Controls.Add(categoryLabel);
|
||||
toolPanel.Dock = DockStyle.Top;
|
||||
toolPanel.Location = new Point(0, 0);
|
||||
toolPanel.Margin = new Padding(6, 6, 6, 6);
|
||||
toolPanel.Name = "toolPanel";
|
||||
toolPanel.Padding = new Padding(9, 10, 9, 10);
|
||||
toolPanel.Size = new Size(1192, 80);
|
||||
toolPanel.TabIndex = 0;
|
||||
//
|
||||
// addButton
|
||||
//
|
||||
addButton.BackColor = Color.FromArgb(200, 255, 200);
|
||||
addButton.FlatStyle = FlatStyle.Flat;
|
||||
addButton.Location = new Point(18, 10);
|
||||
addButton.Margin = new Padding(6, 6, 6, 6);
|
||||
addButton.Name = "addButton";
|
||||
addButton.Size = new Size(183, 60);
|
||||
addButton.TabIndex = 0;
|
||||
addButton.Text = "添加程序";
|
||||
addButton.UseVisualStyleBackColor = false;
|
||||
addButton.Click += AddButton_Click;
|
||||
//
|
||||
// categoryLabel
|
||||
//
|
||||
categoryLabel.AutoSize = true;
|
||||
categoryLabel.Font = new Font("Microsoft YaHei UI", 10F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
categoryLabel.Location = new Point(220, 20);
|
||||
categoryLabel.Margin = new Padding(6, 0, 6, 0);
|
||||
categoryLabel.Name = "categoryLabel";
|
||||
categoryLabel.Size = new Size(0, 27);
|
||||
categoryLabel.TabIndex = 1;
|
||||
//
|
||||
// menuStrip
|
||||
//
|
||||
menuStrip.ImageScalingSize = new Size(24, 24);
|
||||
menuStrip.Items.AddRange(new ToolStripItem[] { fileMenu });
|
||||
menuStrip.Location = new Point(0, 0);
|
||||
menuStrip.Name = "menuStrip";
|
||||
menuStrip.Padding = new Padding(11, 4, 0, 4);
|
||||
menuStrip.Size = new Size(1467, 36);
|
||||
menuStrip.TabIndex = 2;
|
||||
//
|
||||
// fileMenu
|
||||
//
|
||||
fileMenu.DropDownItems.AddRange(new ToolStripItem[] { addCategoryItem, deleteCategoryItem });
|
||||
fileMenu.Name = "fileMenu";
|
||||
fileMenu.Size = new Size(62, 28);
|
||||
fileMenu.Text = "菜单";
|
||||
//
|
||||
// addCategoryItem
|
||||
//
|
||||
addCategoryItem.Name = "addCategoryItem";
|
||||
addCategoryItem.Size = new Size(218, 34);
|
||||
addCategoryItem.Text = "添加新分类";
|
||||
addCategoryItem.Click += AddCategory_Click;
|
||||
//
|
||||
// deleteCategoryItem
|
||||
//
|
||||
deleteCategoryItem.Name = "deleteCategoryItem";
|
||||
deleteCategoryItem.Size = new Size(218, 34);
|
||||
deleteCategoryItem.Text = "删除当前分类";
|
||||
deleteCategoryItem.Click += DeleteCategory_Click;
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(11F, 24F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(1467, 1200);
|
||||
Controls.Add(rightPanel);
|
||||
Controls.Add(leftPanel);
|
||||
Controls.Add(menuStrip);
|
||||
Icon = (Icon)resources.GetObject("$this.Icon");
|
||||
MainMenuStrip = menuStrip;
|
||||
Margin = new Padding(6, 6, 6, 6);
|
||||
Name = "MainForm";
|
||||
StartPosition = FormStartPosition.CenterScreen;
|
||||
Text = "快捷启动工具箱";
|
||||
rightPanel.ResumeLayout(false);
|
||||
toolPanel.ResumeLayout(false);
|
||||
toolPanel.PerformLayout();
|
||||
menuStrip.ResumeLayout(false);
|
||||
menuStrip.PerformLayout();
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Panel leftPanel;
|
||||
private System.Windows.Forms.Panel rightPanel;
|
||||
private System.Windows.Forms.Panel toolPanel;
|
||||
private System.Windows.Forms.Button addButton;
|
||||
private System.Windows.Forms.Label categoryLabel;
|
||||
private System.Windows.Forms.FlowLayoutPanel shortcutsPanel;
|
||||
private System.Windows.Forms.MenuStrip menuStrip;
|
||||
private System.Windows.Forms.ToolStripMenuItem fileMenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem addCategoryItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem deleteCategoryItem;
|
||||
}
|
||||
}
|
||||
999
MainForm.cs
Normal file
999
MainForm.cs
Normal file
@ -0,0 +1,999 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text.Json;
|
||||
using System.Linq;
|
||||
|
||||
namespace QuickLauncher
|
||||
{
|
||||
public partial class MainForm : Form
|
||||
{
|
||||
private Dictionary<string, List<ShortcutItem>> categories;
|
||||
private string dataFilePath = "shortcuts.json";
|
||||
private string settingsFilePath = "settings.json";
|
||||
private const int CATEGORY_BUTTON_HEIGHT = 40;
|
||||
private string currentCategory = "";
|
||||
private ContextMenuStrip categoryContextMenu;
|
||||
private ContextMenuStrip shortcutsPanelContextMenu;
|
||||
private ContextMenuStrip shortcutItemContextMenu;
|
||||
private int iconSize = 48; // 默认图标大小
|
||||
private const int MIN_ICON_SIZE = 24; // 最小图标大小
|
||||
private const int MAX_ICON_SIZE = 256; // 增加最大图标大小到256
|
||||
private const int ICON_SIZE_STEP = 16; // 增加每次缩放的步长
|
||||
|
||||
// 用于保存设置的类
|
||||
private class AppSettings
|
||||
{
|
||||
public string LastSelectedCategory { get; set; } = "";
|
||||
public string SortMode { get; set; } = "Name"; // Name, DateAdded
|
||||
public int IconSize { get; set; } = 48; // 保存图标大小
|
||||
}
|
||||
|
||||
private AppSettings settings = new AppSettings();
|
||||
|
||||
public MainForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
// 配置工具提示 - 调整为更合适的值
|
||||
toolTip1 = new ToolTip();
|
||||
toolTip1.AutoPopDelay = 5000;
|
||||
toolTip1.InitialDelay = 200; // 稍微增加初始延迟
|
||||
toolTip1.ReshowDelay = 200; // 稍微增加重新显示延迟
|
||||
toolTip1.ShowAlways = true;
|
||||
toolTip1.UseFading = true;
|
||||
toolTip1.IsBalloon = false; // 使用标准样式
|
||||
|
||||
SetupContextMenus();
|
||||
SetupEventHandlers();
|
||||
InitializeUI();
|
||||
LoadSettings();
|
||||
LoadData();
|
||||
SelectDefaultCategory();
|
||||
}
|
||||
|
||||
// 设置上下文菜单
|
||||
private void SetupContextMenus()
|
||||
{
|
||||
// 分类右键菜单
|
||||
categoryContextMenu = new ContextMenuStrip();
|
||||
categoryContextMenu.Items.Add("添加新分类", null, (s, e) => AddCategory_Click(s, e));
|
||||
categoryContextMenu.Items.Add("删除当前分类", null, (s, e) => DeleteCategory_Click(s, e));
|
||||
categoryContextMenu.Items.Add("重命名分类", null, (s, e) => RenameCategory_Click(s, e));
|
||||
|
||||
// 右侧面板右键菜单
|
||||
shortcutsPanelContextMenu = new ContextMenuStrip();
|
||||
shortcutsPanelContextMenu.Items.Add("添加程序", null, (s, e) => AddButton_Click(s, e));
|
||||
shortcutsPanelContextMenu.Items.Add("-"); // 分隔线
|
||||
shortcutsPanelContextMenu.Items.Add("按名称排序", null, (s, e) => SortShortcuts("Name"));
|
||||
shortcutsPanelContextMenu.Items.Add("按添加时间排序", null, (s, e) => SortShortcuts("DateAdded"));
|
||||
shortcutsPanelContextMenu.Items.Add("按使用频率排序", null, (s, e) => SortShortcuts("UsageCount"));
|
||||
shortcutsPanelContextMenu.Items.Add("-"); // 分隔线
|
||||
|
||||
// 添加图标大小调整菜单,增加更多选项
|
||||
var sizeMenu = new ToolStripMenuItem("图标大小");
|
||||
sizeMenu.DropDownItems.Add("超小图标 (24px)", null, (s, e) => { ResizeIcons(24); });
|
||||
sizeMenu.DropDownItems.Add("小图标 (48px)", null, (s, e) => { ResizeIcons(48); });
|
||||
sizeMenu.DropDownItems.Add("中图标 (64px)", null, (s, e) => { ResizeIcons(64); });
|
||||
sizeMenu.DropDownItems.Add("大图标 (96px)", null, (s, e) => { ResizeIcons(96); });
|
||||
sizeMenu.DropDownItems.Add("较大图标 (128px)", null, (s, e) => { ResizeIcons(128); });
|
||||
sizeMenu.DropDownItems.Add("超大图标 (192px)", null, (s, e) => { ResizeIcons(192); });
|
||||
sizeMenu.DropDownItems.Add("巨大图标 (256px)", null, (s, e) => { ResizeIcons(256); });
|
||||
shortcutsPanelContextMenu.Items.Add(sizeMenu);
|
||||
|
||||
// 快捷方式项目右键菜单
|
||||
shortcutItemContextMenu = new ContextMenuStrip();
|
||||
shortcutItemContextMenu.Items.Add("启动", null, (s, e) =>
|
||||
{
|
||||
if (s is ToolStripMenuItem menuItem && menuItem.Tag is ShortcutItem item)
|
||||
{
|
||||
LaunchApplication(item.Path);
|
||||
}
|
||||
});
|
||||
shortcutItemContextMenu.Items.Add("删除", null, (s, e) =>
|
||||
{
|
||||
if (s is ToolStripMenuItem menuItem && menuItem.Tag is ShortcutItem item)
|
||||
{
|
||||
DeleteShortcut(item);
|
||||
}
|
||||
});
|
||||
shortcutItemContextMenu.Items.Add("重命名", null, (s, e) =>
|
||||
{
|
||||
if (s is ToolStripMenuItem menuItem && menuItem.Tag is ShortcutItem item)
|
||||
{
|
||||
RenameShortcut(item);
|
||||
}
|
||||
});
|
||||
shortcutItemContextMenu.Items.Add("属性", null, (s, e) =>
|
||||
{
|
||||
if (s is ToolStripMenuItem menuItem && menuItem.Tag is ShortcutItem item)
|
||||
{
|
||||
ShowShortcutProperties(item);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 调整图标大小
|
||||
private void ResizeIcons(int newSize)
|
||||
{
|
||||
if (newSize >= MIN_ICON_SIZE && newSize <= MAX_ICON_SIZE)
|
||||
{
|
||||
iconSize = newSize;
|
||||
settings.IconSize = iconSize;
|
||||
SaveSettings();
|
||||
|
||||
if (!string.IsNullOrEmpty(currentCategory))
|
||||
{
|
||||
ShowCategoryItems(currentCategory);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 处理鼠标滚轮事件
|
||||
private void ShortcutsPanel_MouseWheel(object sender, MouseEventArgs e)
|
||||
{
|
||||
// 检查Ctrl键是否按下
|
||||
if (ModifierKeys == Keys.Control)
|
||||
{
|
||||
// 向上滚动,放大图标
|
||||
if (e.Delta > 0)
|
||||
{
|
||||
ResizeIcons(iconSize + ICON_SIZE_STEP);
|
||||
}
|
||||
// 向下滚动,缩小图标
|
||||
else if (e.Delta < 0)
|
||||
{
|
||||
ResizeIcons(iconSize - ICON_SIZE_STEP);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 重命名分类
|
||||
private void RenameCategory_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(currentCategory))
|
||||
{
|
||||
MessageBox.Show("请先选择要重命名的分类", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
return;
|
||||
}
|
||||
|
||||
using (var dialog = new Form())
|
||||
{
|
||||
dialog.Text = "重命名分类";
|
||||
dialog.Size = new Size(350, 150);
|
||||
dialog.StartPosition = FormStartPosition.CenterParent;
|
||||
dialog.FormBorderStyle = FormBorderStyle.FixedDialog;
|
||||
dialog.MaximizeBox = false;
|
||||
dialog.MinimizeBox = false;
|
||||
|
||||
var label = new Label() { Text = "新名称:", Location = new Point(10, 20) };
|
||||
var textBox = new TextBox() { Text = currentCategory, Location = new Point(120, 17), Width = 180 };
|
||||
var button = new Button() { Text = "确定", DialogResult = DialogResult.OK, Location = new Point(110, 60) };
|
||||
|
||||
dialog.Controls.AddRange(new Control[] { label, textBox, button });
|
||||
dialog.AcceptButton = button;
|
||||
|
||||
if (dialog.ShowDialog() == DialogResult.OK && !string.IsNullOrWhiteSpace(textBox.Text))
|
||||
{
|
||||
string newName = textBox.Text.Trim();
|
||||
if (newName != currentCategory && !categories.ContainsKey(newName))
|
||||
{
|
||||
var items = categories[currentCategory];
|
||||
categories.Remove(currentCategory);
|
||||
categories[newName] = items;
|
||||
|
||||
string oldCategory = currentCategory;
|
||||
currentCategory = newName;
|
||||
|
||||
SaveData();
|
||||
RefreshCategoryList();
|
||||
ShowCategoryItems(currentCategory);
|
||||
}
|
||||
else if (categories.ContainsKey(newName) && newName != currentCategory)
|
||||
{
|
||||
MessageBox.Show("该分类名称已存在", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 排序快捷方式
|
||||
private void SortShortcuts(string sortMode)
|
||||
{
|
||||
if (string.IsNullOrEmpty(currentCategory) || !categories.ContainsKey(currentCategory))
|
||||
return;
|
||||
|
||||
settings.SortMode = sortMode;
|
||||
SaveSettings();
|
||||
|
||||
switch (sortMode)
|
||||
{
|
||||
case "Name":
|
||||
categories[currentCategory] = categories[currentCategory].OrderBy(s => s.Name).ToList();
|
||||
break;
|
||||
case "DateAdded":
|
||||
categories[currentCategory] = categories[currentCategory].OrderByDescending(s => s.DateAdded).ToList();
|
||||
break;
|
||||
case "UsageCount":
|
||||
categories[currentCategory] = categories[currentCategory].OrderByDescending(s => s.UsageCount).ToList();
|
||||
break;
|
||||
}
|
||||
|
||||
SaveData();
|
||||
ShowCategoryItems(currentCategory);
|
||||
}
|
||||
|
||||
// 删除快捷方式
|
||||
private void DeleteShortcut(ShortcutItem item)
|
||||
{
|
||||
if (string.IsNullOrEmpty(currentCategory) || !categories.ContainsKey(currentCategory))
|
||||
return;
|
||||
|
||||
if (MessageBox.Show($"确定要删除 '{item.Name}' 吗?", "确认删除",
|
||||
MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
{
|
||||
categories[currentCategory].Remove(item);
|
||||
SaveData();
|
||||
ShowCategoryItems(currentCategory);
|
||||
}
|
||||
}
|
||||
|
||||
// 重命名快捷方式
|
||||
private void RenameShortcut(ShortcutItem item)
|
||||
{
|
||||
using (var dialog = new Form())
|
||||
{
|
||||
dialog.Text = "重命名快捷方式";
|
||||
dialog.Size = new Size(350, 150);
|
||||
dialog.StartPosition = FormStartPosition.CenterParent;
|
||||
dialog.FormBorderStyle = FormBorderStyle.FixedDialog;
|
||||
dialog.MaximizeBox = false;
|
||||
dialog.MinimizeBox = false;
|
||||
|
||||
var label = new Label() { Text = "新名称:", Location = new Point(10, 20) };
|
||||
var textBox = new TextBox() { Text = item.Name, Location = new Point(120, 17), Width = 180 };
|
||||
var button = new Button() { Text = "确定", DialogResult = DialogResult.OK, Location = new Point(110, 60) };
|
||||
|
||||
dialog.Controls.AddRange(new Control[] { label, textBox, button });
|
||||
dialog.AcceptButton = button;
|
||||
|
||||
if (dialog.ShowDialog() == DialogResult.OK && !string.IsNullOrWhiteSpace(textBox.Text))
|
||||
{
|
||||
item.Name = textBox.Text.Trim();
|
||||
SaveData();
|
||||
ShowCategoryItems(currentCategory);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 显示快捷方式属性
|
||||
private void ShowShortcutProperties(ShortcutItem item)
|
||||
{
|
||||
using (var dialog = new Form())
|
||||
{
|
||||
dialog.Text = "快捷方式属性";
|
||||
dialog.Size = new Size(400, 300);
|
||||
dialog.StartPosition = FormStartPosition.CenterParent;
|
||||
dialog.FormBorderStyle = FormBorderStyle.FixedDialog;
|
||||
dialog.MaximizeBox = false;
|
||||
dialog.MinimizeBox = false;
|
||||
|
||||
// 使用当前图标大小显示图标
|
||||
var icon = new PictureBox
|
||||
{
|
||||
Size = new Size(Math.Min(64, iconSize), Math.Min(64, iconSize)), // 限制属性对话框中的图标大小
|
||||
Location = new Point(20, 20),
|
||||
Image = item.Icon ?? SystemIcons.Application.ToBitmap(),
|
||||
SizeMode = PictureBoxSizeMode.StretchImage
|
||||
};
|
||||
|
||||
var nameLabel = new Label() { Text = "名称:", Location = new Point(20, 80), AutoSize = true };
|
||||
var nameValue = new Label() { Text = item.Name, Location = new Point(120, 80), AutoSize = true };
|
||||
|
||||
var pathLabel = new Label() { Text = "路径:", Location = new Point(20, 110), AutoSize = true };
|
||||
var pathValue = new Label() { Text = item.Path, Location = new Point(120, 110), Width = 250, AutoEllipsis = true };
|
||||
|
||||
var dateLabel = new Label() { Text = "添加日期:", Location = new Point(20, 140), AutoSize = true };
|
||||
var dateValue = new Label() { Text = item.DateAdded.ToString(), Location = new Point(120, 140), AutoSize = true };
|
||||
|
||||
var usageLabel = new Label() { Text = "使用次数:", Location = new Point(20, 170), AutoSize = true };
|
||||
var usageValue = new Label() { Text = item.UsageCount.ToString(), Location = new Point(120, 170), AutoSize = true };
|
||||
|
||||
var button = new Button() { Text = "确定", DialogResult = DialogResult.OK, Location = new Point(150, 220) };
|
||||
|
||||
dialog.Controls.AddRange(new Control[] { icon, nameLabel, nameValue, pathLabel, pathValue,
|
||||
dateLabel, dateValue, usageLabel, usageValue, button });
|
||||
dialog.AcceptButton = button;
|
||||
|
||||
dialog.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
// 选择默认分类
|
||||
private void SelectDefaultCategory()
|
||||
{
|
||||
// 如果没有分类,不做任何操作
|
||||
if (categories.Count == 0)
|
||||
return;
|
||||
|
||||
// 尝试选择上次选择的分类
|
||||
if (!string.IsNullOrEmpty(settings.LastSelectedCategory) &&
|
||||
categories.ContainsKey(settings.LastSelectedCategory))
|
||||
{
|
||||
currentCategory = settings.LastSelectedCategory;
|
||||
ShowCategoryItems(currentCategory);
|
||||
return;
|
||||
}
|
||||
|
||||
// 如果没有上次选择的分类或该分类不存在,选择第一个分类
|
||||
currentCategory = categories.Keys.First();
|
||||
ShowCategoryItems(currentCategory);
|
||||
}
|
||||
|
||||
// 保存设置
|
||||
private void SaveSettings()
|
||||
{
|
||||
try
|
||||
{
|
||||
settings.LastSelectedCategory = currentCategory;
|
||||
settings.IconSize = iconSize;
|
||||
var options = new JsonSerializerOptions
|
||||
{
|
||||
WriteIndented = true
|
||||
};
|
||||
var data = JsonSerializer.Serialize(settings, options);
|
||||
File.WriteAllText(settingsFilePath, data);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"保存设置失败: {ex.Message}", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
// 加载设置
|
||||
private void LoadSettings()
|
||||
{
|
||||
if (File.Exists(settingsFilePath))
|
||||
{
|
||||
try
|
||||
{
|
||||
var json = File.ReadAllText(settingsFilePath);
|
||||
settings = JsonSerializer.Deserialize<AppSettings>(json) ?? new AppSettings();
|
||||
iconSize = settings.IconSize; // 加载保存的图标大小
|
||||
}
|
||||
catch
|
||||
{
|
||||
settings = new AppSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SetupEventHandlers()
|
||||
{
|
||||
// 清除所有事件处理器 - 移除不存在的引用
|
||||
addButton.Click -= AddButton_Click;
|
||||
this.FormClosing -= MainForm_FormClosing;
|
||||
shortcutsPanel.MouseWheel -= ShortcutsPanel_MouseWheel;
|
||||
|
||||
// 只为shortcutsPanel添加拖放支持
|
||||
shortcutsPanel.AllowDrop = true;
|
||||
shortcutsPanel.DragEnter += ShortcutsPanel_DragEnter;
|
||||
shortcutsPanel.DragDrop += ShortcutsPanel_DragDrop;
|
||||
|
||||
// 添加鼠标滚轮事件处理
|
||||
shortcutsPanel.MouseWheel += ShortcutsPanel_MouseWheel;
|
||||
|
||||
// 为shortcutsPanel添加鼠标移动事件,用于处理空白区域的工具提示
|
||||
shortcutsPanel.MouseMove += ShortcutsPanel_MouseMove;
|
||||
|
||||
// 为shortcutsPanel添加右键菜单
|
||||
shortcutsPanel.ContextMenuStrip = shortcutsPanelContextMenu;
|
||||
|
||||
// 绑定添加程序按钮事件
|
||||
addButton.Click += AddButton_Click;
|
||||
|
||||
// 绑定窗体关闭事件,保存当前选择的分类
|
||||
this.FormClosing += MainForm_FormClosing;
|
||||
}
|
||||
|
||||
// 添加缺失的事件处理方法
|
||||
private void ShortcutsPanel_DragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
Console.WriteLine("DragEnter triggered");
|
||||
if (e.Data.GetDataPresent(DataFormats.FileDrop) && !string.IsNullOrEmpty(currentCategory))
|
||||
{
|
||||
e.Effect = DragDropEffects.Copy;
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Effect = DragDropEffects.None;
|
||||
}
|
||||
}
|
||||
|
||||
private void ShortcutsPanel_DragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
Console.WriteLine("DragDrop triggered");
|
||||
if (string.IsNullOrEmpty(currentCategory))
|
||||
{
|
||||
MessageBox.Show("请先选择一个分类", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.Data.GetDataPresent(DataFormats.FileDrop))
|
||||
{
|
||||
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
|
||||
bool addedAny = false;
|
||||
foreach (string file in files)
|
||||
{
|
||||
if (File.Exists(file))
|
||||
{
|
||||
AddNewShortcut(file, currentCategory);
|
||||
addedAny = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!addedAny)
|
||||
{
|
||||
MessageBox.Show("没有找到有效的文件", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
private void InitializeUI()
|
||||
{
|
||||
categories = new Dictionary<string, List<ShortcutItem>>();
|
||||
RefreshCategoryList();
|
||||
}
|
||||
|
||||
private void AddCategory_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (var dialog = new Form())
|
||||
{
|
||||
dialog.Text = "添加新分类";
|
||||
dialog.Size = new Size(350, 150);
|
||||
dialog.StartPosition = FormStartPosition.CenterParent;
|
||||
dialog.FormBorderStyle = FormBorderStyle.FixedDialog;
|
||||
dialog.MaximizeBox = false;
|
||||
dialog.MinimizeBox = false;
|
||||
|
||||
var label = new Label() { Text = "分类名称:", Location = new Point(10, 20) };
|
||||
var textBox = new TextBox() { Location = new Point(120, 17), Width = 180 };
|
||||
var button = new Button() { Text = "确定", DialogResult = DialogResult.OK, Location = new Point(110, 60) };
|
||||
|
||||
dialog.Controls.AddRange(new Control[] { label, textBox, button });
|
||||
dialog.AcceptButton = button;
|
||||
|
||||
if (dialog.ShowDialog() == DialogResult.OK && !string.IsNullOrWhiteSpace(textBox.Text))
|
||||
{
|
||||
string newCategory = textBox.Text.Trim();
|
||||
if (!categories.ContainsKey(newCategory))
|
||||
{
|
||||
categories[newCategory] = new List<ShortcutItem>();
|
||||
SaveData();
|
||||
RefreshCategoryList();
|
||||
|
||||
// 自动选择新创建的分类
|
||||
currentCategory = newCategory;
|
||||
ShowCategoryItems(currentCategory);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void DeleteCategory_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(currentCategory))
|
||||
{
|
||||
MessageBox.Show("请先选择要删除的分类", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
return;
|
||||
}
|
||||
|
||||
if (MessageBox.Show($"确定要删除分类 '{currentCategory}' 吗?", "确认删除",
|
||||
MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
{
|
||||
categories.Remove(currentCategory);
|
||||
SaveData();
|
||||
RefreshCategoryList();
|
||||
shortcutsPanel.Controls.Clear();
|
||||
currentCategory = "";
|
||||
|
||||
// 删除分类后,选择新的默认分类
|
||||
if (categories.Count > 0)
|
||||
{
|
||||
currentCategory = categories.Keys.First();
|
||||
ShowCategoryItems(currentCategory);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 如果没有分类了,清空右侧面板和标签
|
||||
shortcutsPanel.Controls.Clear();
|
||||
categoryLabel.Text = "当前分类: 无";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void RefreshCategoryList()
|
||||
{
|
||||
leftPanel.Controls.Clear();
|
||||
int buttonY = 10;
|
||||
|
||||
foreach (var category in categories.Keys)
|
||||
{
|
||||
var categoryPanel = new Panel
|
||||
{
|
||||
Width = leftPanel.Width - 5,
|
||||
Height = CATEGORY_BUTTON_HEIGHT,
|
||||
Location = new Point(0, buttonY)
|
||||
};
|
||||
|
||||
var btn = new Button
|
||||
{
|
||||
Text = category,
|
||||
Width = leftPanel.Width - 20,
|
||||
Height = CATEGORY_BUTTON_HEIGHT,
|
||||
Location = new Point(10, 0),
|
||||
FlatStyle = FlatStyle.Flat,
|
||||
BackColor = Color.FromArgb(200, 255, 200),
|
||||
Tag = category
|
||||
};
|
||||
|
||||
// 移除旧的事件处理器
|
||||
btn.Click -= null;
|
||||
btn.Click += (s, e) =>
|
||||
{
|
||||
currentCategory = category;
|
||||
ShowCategoryItems(category);
|
||||
};
|
||||
|
||||
// 添加右键菜单
|
||||
btn.ContextMenuStrip = categoryContextMenu;
|
||||
|
||||
categoryPanel.Controls.Add(btn);
|
||||
categoryPanel.AllowDrop = true;
|
||||
|
||||
// 移除旧的事件处理器
|
||||
categoryPanel.DragEnter -= null;
|
||||
categoryPanel.DragDrop -= null;
|
||||
|
||||
categoryPanel.DragEnter += (s, e) =>
|
||||
{
|
||||
if (e.Data.GetDataPresent(DataFormats.FileDrop))
|
||||
{
|
||||
e.Effect = DragDropEffects.Copy;
|
||||
}
|
||||
};
|
||||
categoryPanel.DragDrop += (s, e) =>
|
||||
{
|
||||
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
|
||||
foreach (string file in files)
|
||||
{
|
||||
if (File.Exists(file))
|
||||
{
|
||||
AddNewShortcut(file, category);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
leftPanel.Controls.Add(categoryPanel);
|
||||
buttonY += CATEGORY_BUTTON_HEIGHT + 5;
|
||||
}
|
||||
}
|
||||
|
||||
private void ShowCategoryItems(string category)
|
||||
{
|
||||
shortcutsPanel.Controls.Clear();
|
||||
if (categories.ContainsKey(category))
|
||||
{
|
||||
// 更新顶部分类标签
|
||||
categoryLabel.Text = $"当前分类: {category}";
|
||||
|
||||
// 根据设置的排序模式排序
|
||||
List<ShortcutItem> sortedItems = categories[category];
|
||||
switch (settings.SortMode)
|
||||
{
|
||||
case "Name":
|
||||
sortedItems = sortedItems.OrderBy(s => s.Name).ToList();
|
||||
break;
|
||||
case "DateAdded":
|
||||
sortedItems = sortedItems.OrderByDescending(s => s.DateAdded).ToList();
|
||||
break;
|
||||
case "UsageCount":
|
||||
sortedItems = sortedItems.OrderByDescending(s => s.UsageCount).ToList();
|
||||
break;
|
||||
}
|
||||
|
||||
foreach (var item in sortedItems)
|
||||
{
|
||||
AddShortcutControl(item, category);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void AddShortcutControl(ShortcutItem item, string category)
|
||||
{
|
||||
// 根据当前图标大小调整面板大小
|
||||
int panelWidth = Math.Max(80, iconSize + 10);
|
||||
int panelHeight = iconSize + 60;
|
||||
|
||||
var panel = new Panel
|
||||
{
|
||||
Width = panelWidth,
|
||||
Height = panelHeight,
|
||||
Margin = new Padding(5),
|
||||
Tag = item,
|
||||
BackColor = Color.Transparent // 初始背景色为透明
|
||||
};
|
||||
|
||||
var icon = new PictureBox
|
||||
{
|
||||
Size = new Size(iconSize, iconSize),
|
||||
Location = new Point((panel.Width - iconSize) / 2, 5),
|
||||
Image = item.Icon ?? SystemIcons.Application.ToBitmap(),
|
||||
SizeMode = PictureBoxSizeMode.StretchImage,
|
||||
Tag = item,
|
||||
Cursor = Cursors.Hand // 鼠标悬停时显示手型光标
|
||||
};
|
||||
|
||||
var label = new Label
|
||||
{
|
||||
Text = item.Name,
|
||||
AutoSize = false,
|
||||
TextAlign = ContentAlignment.MiddleCenter,
|
||||
Width = panel.Width,
|
||||
Height = 30,
|
||||
Location = new Point(0, iconSize + 10),
|
||||
Tag = item,
|
||||
Cursor = Cursors.Hand // 鼠标悬停时显示手型光标
|
||||
};
|
||||
|
||||
panel.Controls.Add(icon);
|
||||
panel.Controls.Add(label);
|
||||
|
||||
// 设置右键菜单
|
||||
panel.ContextMenuStrip = shortcutItemContextMenu;
|
||||
icon.ContextMenuStrip = shortcutItemContextMenu;
|
||||
label.ContextMenuStrip = shortcutItemContextMenu;
|
||||
|
||||
// 为右键菜单项设置Tag
|
||||
foreach (ToolStripItem menuItem in shortcutItemContextMenu.Items)
|
||||
{
|
||||
if (menuItem is ToolStripMenuItem)
|
||||
{
|
||||
menuItem.Tag = item;
|
||||
}
|
||||
}
|
||||
|
||||
// 移除旧的事件处理器并重新绑定
|
||||
panel.DoubleClick -= null;
|
||||
icon.DoubleClick -= null;
|
||||
label.DoubleClick -= null;
|
||||
|
||||
// 双击事件 - 启动应用程序
|
||||
panel.DoubleClick += (s, e) => LaunchApplication(item.Path);
|
||||
icon.DoubleClick += (s, e) => LaunchApplication(item.Path);
|
||||
label.DoubleClick += (s, e) => LaunchApplication(item.Path);
|
||||
|
||||
// 添加鼠标悬停效果
|
||||
panel.MouseEnter += Panel_MouseEnter;
|
||||
panel.MouseLeave += Panel_MouseLeave;
|
||||
icon.MouseEnter += Panel_MouseEnter;
|
||||
icon.MouseLeave += Panel_MouseLeave;
|
||||
label.MouseEnter += Panel_MouseEnter;
|
||||
label.MouseLeave += Panel_MouseLeave;
|
||||
|
||||
// 移除鼠标移动事件,避免频繁触发
|
||||
// panel.MouseMove += (s, e) => Panel_MouseEnter(s, e);
|
||||
// icon.MouseMove += (s, e) => Panel_MouseEnter(s, e);
|
||||
// label.MouseMove += (s, e) => Panel_MouseEnter(s, e);
|
||||
|
||||
// 添加鼠标点击效果
|
||||
panel.MouseDown += Panel_MouseDown;
|
||||
panel.MouseUp += Panel_MouseUp;
|
||||
icon.MouseDown += Panel_MouseDown;
|
||||
icon.MouseUp += Panel_MouseUp;
|
||||
label.MouseDown += Panel_MouseDown;
|
||||
label.MouseUp += Panel_MouseUp;
|
||||
|
||||
// 直接设置工具提示
|
||||
string tipText = $"名称: {item.Name}\n路径: {item.Path}\n双击启动";
|
||||
toolTip1.SetToolTip(panel, tipText);
|
||||
toolTip1.SetToolTip(icon, tipText);
|
||||
toolTip1.SetToolTip(label, tipText);
|
||||
|
||||
shortcutsPanel.Controls.Add(panel);
|
||||
}
|
||||
|
||||
// 鼠标进入面板时的效果
|
||||
private void Panel_MouseEnter(object sender, EventArgs e)
|
||||
{
|
||||
if (sender is Control control)
|
||||
{
|
||||
// 获取父面板
|
||||
Panel panel = control as Panel;
|
||||
if (panel == null && control.Parent is Panel)
|
||||
{
|
||||
panel = control.Parent as Panel;
|
||||
}
|
||||
|
||||
if (panel != null)
|
||||
{
|
||||
// 高亮显示
|
||||
panel.BackColor = Color.FromArgb(230, 230, 255); // 浅蓝色背景
|
||||
panel.BorderStyle = BorderStyle.FixedSingle; // 显示边框
|
||||
|
||||
// 显示工具提示
|
||||
if (panel.Tag is ShortcutItem item)
|
||||
{
|
||||
string tipText = $"名称: {item.Name}\n路径: {item.Path}\n双击启动";
|
||||
|
||||
// 为当前控件设置工具提示
|
||||
if (control is PictureBox || control is Label)
|
||||
{
|
||||
toolTip1.SetToolTip(control, tipText);
|
||||
}
|
||||
else
|
||||
{
|
||||
toolTip1.SetToolTip(panel, tipText);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 鼠标离开面板时的效果
|
||||
private void Panel_MouseLeave(object sender, EventArgs e)
|
||||
{
|
||||
if (sender is Control control)
|
||||
{
|
||||
// 获取父面板
|
||||
Panel panel = control as Panel;
|
||||
if (panel == null && control.Parent is Panel)
|
||||
{
|
||||
panel = control.Parent as Panel;
|
||||
}
|
||||
|
||||
if (panel != null)
|
||||
{
|
||||
// 恢复正常显示
|
||||
panel.BackColor = Color.Transparent;
|
||||
panel.BorderStyle = BorderStyle.None;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 鼠标按下时的效果
|
||||
private void Panel_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Left) // 只对左键点击响应
|
||||
{
|
||||
if (sender is Control control)
|
||||
{
|
||||
// 获取父面板
|
||||
Panel panel = control as Panel;
|
||||
if (panel == null && control.Parent is Panel)
|
||||
{
|
||||
panel = control.Parent as Panel;
|
||||
}
|
||||
|
||||
if (panel != null)
|
||||
{
|
||||
// 点击效果 - 深色背景
|
||||
panel.BackColor = Color.FromArgb(180, 180, 240); // 更深的蓝色
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 鼠标释放时的效果
|
||||
private void Panel_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Left) // 只对左键点击响应
|
||||
{
|
||||
if (sender is Control control)
|
||||
{
|
||||
// 获取父面板
|
||||
Panel panel = control as Panel;
|
||||
if (panel == null && control.Parent is Panel)
|
||||
{
|
||||
panel = control.Parent as Panel;
|
||||
}
|
||||
|
||||
if (panel != null)
|
||||
{
|
||||
// 恢复悬停效果
|
||||
panel.BackColor = Color.FromArgb(230, 230, 255);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 添加面板鼠标移动事件处理
|
||||
private void ShortcutsPanel_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
// 获取鼠标位置下的控件
|
||||
Control control = shortcutsPanel.GetChildAtPoint(e.Location);
|
||||
|
||||
// 如果鼠标不在任何子控件上,则隐藏工具提示
|
||||
if (control == null)
|
||||
{
|
||||
toolTip1.RemoveAll();
|
||||
}
|
||||
}
|
||||
|
||||
// 添加工具提示组件
|
||||
private ToolTip toolTip1 = new ToolTip();
|
||||
|
||||
private void AddButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(currentCategory))
|
||||
{
|
||||
MessageBox.Show("请先选择一个分类", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
return;
|
||||
}
|
||||
|
||||
using (OpenFileDialog dialog = new OpenFileDialog())
|
||||
{
|
||||
dialog.Filter = "应用程序|*.exe|所有文件|*.*";
|
||||
if (dialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
AddNewShortcut(dialog.FileName, currentCategory);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void AddNewShortcut(string filePath, string category)
|
||||
{
|
||||
// 放宽文件类型限制,允许任何文件类型
|
||||
var item = new ShortcutItem
|
||||
{
|
||||
Name = Path.GetFileNameWithoutExtension(filePath),
|
||||
Path = filePath,
|
||||
DateAdded = DateTime.Now,
|
||||
UsageCount = 0
|
||||
};
|
||||
item.LoadIcon();
|
||||
|
||||
categories[category].Add(item);
|
||||
SaveData();
|
||||
if (category == currentCategory)
|
||||
{
|
||||
ShowCategoryItems(category);
|
||||
}
|
||||
}
|
||||
|
||||
private void LaunchApplication(string path)
|
||||
{
|
||||
try
|
||||
{
|
||||
// 查找并更新使用次数
|
||||
if (!string.IsNullOrEmpty(currentCategory) && categories.ContainsKey(currentCategory))
|
||||
{
|
||||
var item = categories[currentCategory].FirstOrDefault(i => i.Path == path);
|
||||
if (item != null)
|
||||
{
|
||||
item.UsageCount++;
|
||||
item.LastUsed = DateTime.Now;
|
||||
SaveData();
|
||||
}
|
||||
}
|
||||
|
||||
var startInfo = new System.Diagnostics.ProcessStartInfo
|
||||
{
|
||||
FileName = path,
|
||||
UseShellExecute = true
|
||||
};
|
||||
System.Diagnostics.Process.Start(startInfo);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"启动程序失败: {ex.Message}", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void SaveData()
|
||||
{
|
||||
try
|
||||
{
|
||||
var options = new JsonSerializerOptions
|
||||
{
|
||||
WriteIndented = true
|
||||
};
|
||||
var data = JsonSerializer.Serialize(categories, options);
|
||||
File.WriteAllText(dataFilePath, data);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"保存配置失败: {ex.Message}", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadData()
|
||||
{
|
||||
if (File.Exists(dataFilePath))
|
||||
{
|
||||
try
|
||||
{
|
||||
var json = File.ReadAllText(dataFilePath);
|
||||
categories = JsonSerializer.Deserialize<Dictionary<string, List<ShortcutItem>>>(json);
|
||||
|
||||
// 加载所有图标
|
||||
foreach (var category in categories.Values)
|
||||
{
|
||||
foreach (var item in category)
|
||||
{
|
||||
item.LoadIcon();
|
||||
}
|
||||
}
|
||||
|
||||
RefreshCategoryList();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"加载配置失败: {ex.Message}", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
categories = new Dictionary<string, List<ShortcutItem>>();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// 如果没有数据文件,创建一个默认分类
|
||||
categories = new Dictionary<string, List<ShortcutItem>>();
|
||||
categories["默认分类"] = new List<ShortcutItem>();
|
||||
SaveData();
|
||||
RefreshCategoryList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ShortcutItem
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Path { get; set; }
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public Bitmap Icon { get; set; }
|
||||
public DateTime DateAdded { get; set; } = DateTime.Now;
|
||||
public DateTime LastUsed { get; set; } = DateTime.MinValue;
|
||||
public int UsageCount { get; set; } = 0;
|
||||
|
||||
// 用于序列化的构造函数
|
||||
public ShortcutItem()
|
||||
{
|
||||
}
|
||||
|
||||
// 加载图标的方法
|
||||
public void LoadIcon()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (File.Exists(Path))
|
||||
{
|
||||
using (System.Drawing.Icon icon = System.Drawing.Icon.ExtractAssociatedIcon(Path))
|
||||
{
|
||||
if (icon != null)
|
||||
{
|
||||
Icon = icon.ToBitmap();
|
||||
}
|
||||
else
|
||||
{
|
||||
Icon = SystemIcons.Application.ToBitmap();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Icon = SystemIcons.Application.ToBitmap();
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
Icon = SystemIcons.Application.ToBitmap();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
1508
MainForm.resx
Normal file
1508
MainForm.resx
Normal file
File diff suppressed because it is too large
Load Diff
12
Program.cs
Normal file
12
Program.cs
Normal file
@ -0,0 +1,12 @@
|
||||
namespace QuickLauncher
|
||||
{
|
||||
internal static class Program
|
||||
{
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
ApplicationConfiguration.Initialize();
|
||||
Application.Run(new MainForm());
|
||||
}
|
||||
}
|
||||
}
|
||||
17
QuickLauncher.csproj
Normal file
17
QuickLauncher.csproj
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<ApplicationIcon>Truice_Icon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="Truice_Icon.ico" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
9
QuickLauncher.csproj.user
Normal file
9
QuickLauncher.csproj.user
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
<ItemGroup>
|
||||
<Compile Update="MainForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
24
QuickLauncher.sln
Normal file
24
QuickLauncher.sln
Normal file
@ -0,0 +1,24 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31903.59
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QuickLauncher", "QuickLauncher.csproj", "{8E5D0C31-935F-4C3B-8A56-8E8C1F9D9F5A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{8E5D0C31-935F-4C3B-8A56-8E8C1F9D9F5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8E5D0C31-935F-4C3B-8A56-8E8C1F9D9F5A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8E5D0C31-935F-4C3B-8A56-8E8C1F9D9F5A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8E5D0C31-935F-4C3B-8A56-8E8C1F9D9F5A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {D2A9E0E7-9C1F-4B77-B6C4-9B2A5D3D2A1A}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
BIN
Truice_Icon.ico
Normal file
BIN
Truice_Icon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 81 KiB |
23
bin/Debug/net6.0-windows/QuickLauncher.deps.json
Normal file
23
bin/Debug/net6.0-windows/QuickLauncher.deps.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETCoreApp,Version=v6.0",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v6.0": {
|
||||
"QuickLauncher/1.0.0": {
|
||||
"runtime": {
|
||||
"QuickLauncher.dll": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"QuickLauncher/1.0.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
bin/Debug/net6.0-windows/QuickLauncher.dll
Normal file
BIN
bin/Debug/net6.0-windows/QuickLauncher.dll
Normal file
Binary file not shown.
BIN
bin/Debug/net6.0-windows/QuickLauncher.exe
Normal file
BIN
bin/Debug/net6.0-windows/QuickLauncher.exe
Normal file
Binary file not shown.
BIN
bin/Debug/net6.0-windows/QuickLauncher.pdb
Normal file
BIN
bin/Debug/net6.0-windows/QuickLauncher.pdb
Normal file
Binary file not shown.
15
bin/Debug/net6.0-windows/QuickLauncher.runtimeconfig.json
Normal file
15
bin/Debug/net6.0-windows/QuickLauncher.runtimeconfig.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"runtimeOptions": {
|
||||
"tfm": "net6.0",
|
||||
"frameworks": [
|
||||
{
|
||||
"name": "Microsoft.NETCore.App",
|
||||
"version": "6.0.0"
|
||||
},
|
||||
{
|
||||
"name": "Microsoft.WindowsDesktop.App",
|
||||
"version": "6.0.0"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
5
bin/Debug/net6.0-windows/settings.json
Normal file
5
bin/Debug/net6.0-windows/settings.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"LastSelectedCategory": "\u65B0AZ",
|
||||
"SortMode": "UsageCount",
|
||||
"IconSize": 256
|
||||
}
|
||||
32
bin/Debug/net6.0-windows/shortcuts.json
Normal file
32
bin/Debug/net6.0-windows/shortcuts.json
Normal file
@ -0,0 +1,32 @@
|
||||
{
|
||||
"\u65B0AZ": [
|
||||
{
|
||||
"Name": "4\u3001Game_wow335",
|
||||
"Path": "I:\\Desktop\\Gitea\\4\u3001Game_wow335.lnk",
|
||||
"DateAdded": "2025-03-12T13:58:03.3149744+08:00",
|
||||
"LastUsed": "2025-03-12T13:58:39.6693652+08:00",
|
||||
"UsageCount": 1
|
||||
},
|
||||
{
|
||||
"Name": "1\u3001AzerothCore.sln",
|
||||
"Path": "I:\\Desktop\\Gitea\\1\u3001AzerothCore.sln.lnk",
|
||||
"DateAdded": "2025-03-12T13:58:03.3249607+08:00",
|
||||
"LastUsed": "0001-01-01T00:00:00",
|
||||
"UsageCount": 0
|
||||
},
|
||||
{
|
||||
"Name": "2\u3001\u542F\u52A8MYSQL.bat",
|
||||
"Path": "I:\\Desktop\\Gitea\\2\u3001\u542F\u52A8MYSQL.bat.lnk",
|
||||
"DateAdded": "2025-03-12T13:58:03.2453763+08:00",
|
||||
"LastUsed": "0001-01-01T00:00:00",
|
||||
"UsageCount": 0
|
||||
},
|
||||
{
|
||||
"Name": "3\u3001navicat.exe",
|
||||
"Path": "I:\\Desktop\\Gitea\\3\u3001navicat.exe.lnk",
|
||||
"DateAdded": "2025-03-12T13:58:03.3022567+08:00",
|
||||
"LastUsed": "0001-01-01T00:00:00",
|
||||
"UsageCount": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
|
||||
25
obj/Debug/net6.0-windows/QuickLauncher.AssemblyInfo.cs
Normal file
25
obj/Debug/net6.0-windows/QuickLauncher.AssemblyInfo.cs
Normal file
@ -0,0 +1,25 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("QuickLauncher")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("QuickLauncher")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("QuickLauncher")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
|
||||
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
|
||||
|
||||
// 由 MSBuild WriteCodeFragment 类生成。
|
||||
|
||||
@ -0,0 +1 @@
|
||||
c6eb8c2f43ebdcdca383a66315f5396dd3847e53f909e5e7ec32d85eac2a583a
|
||||
@ -0,0 +1,22 @@
|
||||
is_global = true
|
||||
build_property.ApplicationManifest =
|
||||
build_property.StartupObject =
|
||||
build_property.ApplicationDefaultFont =
|
||||
build_property.ApplicationHighDpiMode =
|
||||
build_property.ApplicationUseCompatibleTextRendering =
|
||||
build_property.ApplicationVisualStyles =
|
||||
build_property.TargetFramework = net6.0-windows
|
||||
build_property.TargetPlatformMinVersion = 7.0
|
||||
build_property.UsingMicrosoftNETSdkWeb =
|
||||
build_property.ProjectTypeGuids =
|
||||
build_property.InvariantGlobalization =
|
||||
build_property.PlatformNeutralAssembly =
|
||||
build_property.EnforceExtendedAnalyzerRules =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = QuickLauncher
|
||||
build_property.ProjectDir = I:\Desktop\CusserCore\ToolBox\
|
||||
build_property.EnableComHosting =
|
||||
build_property.EnableGeneratedComInterfaceComImportInterop =
|
||||
build_property.CsWinRTUseWindowsUIXamlProjections = false
|
||||
build_property.EffectiveAnalysisLevelStyle = 6.0
|
||||
build_property.EnableCodeStyleSeverity =
|
||||
10
obj/Debug/net6.0-windows/QuickLauncher.GlobalUsings.g.cs
Normal file
10
obj/Debug/net6.0-windows/QuickLauncher.GlobalUsings.g.cs
Normal file
@ -0,0 +1,10 @@
|
||||
// <auto-generated/>
|
||||
global using global::System;
|
||||
global using global::System.Collections.Generic;
|
||||
global using global::System.Drawing;
|
||||
global using global::System.IO;
|
||||
global using global::System.Linq;
|
||||
global using global::System.Net.Http;
|
||||
global using global::System.Threading;
|
||||
global using global::System.Threading.Tasks;
|
||||
global using global::System.Windows.Forms;
|
||||
BIN
obj/Debug/net6.0-windows/QuickLauncher.MainForm.resources
Normal file
BIN
obj/Debug/net6.0-windows/QuickLauncher.MainForm.resources
Normal file
Binary file not shown.
BIN
obj/Debug/net6.0-windows/QuickLauncher.assets.cache
Normal file
BIN
obj/Debug/net6.0-windows/QuickLauncher.assets.cache
Normal file
Binary file not shown.
@ -0,0 +1 @@
|
||||
fd6f5d7af075caae0ee3e406c17ceaf8b00770f0debf612bee014817e3f2459d
|
||||
@ -0,0 +1,32 @@
|
||||
I:\Desktop\CusserCore\快捷启动工具箱\obj\Debug\net6.0-windows\QuickLauncher.MainForm.resources
|
||||
I:\Desktop\CusserCore\快捷启动工具箱\obj\Debug\net6.0-windows\QuickLauncher.csproj.GenerateResource.cache
|
||||
I:\Desktop\CusserCore\快捷启动工具箱\obj\Debug\net6.0-windows\QuickLauncher.GeneratedMSBuildEditorConfig.editorconfig
|
||||
I:\Desktop\CusserCore\快捷启动工具箱\obj\Debug\net6.0-windows\QuickLauncher.AssemblyInfoInputs.cache
|
||||
I:\Desktop\CusserCore\快捷启动工具箱\obj\Debug\net6.0-windows\QuickLauncher.AssemblyInfo.cs
|
||||
I:\Desktop\CusserCore\快捷启动工具箱\obj\Debug\net6.0-windows\QuickLauncher.csproj.CoreCompileInputs.cache
|
||||
I:\Desktop\CusserCore\快捷启动工具箱\bin\Debug\net6.0-windows\QuickLauncher.exe
|
||||
I:\Desktop\CusserCore\快捷启动工具箱\bin\Debug\net6.0-windows\QuickLauncher.deps.json
|
||||
I:\Desktop\CusserCore\快捷启动工具箱\bin\Debug\net6.0-windows\QuickLauncher.runtimeconfig.json
|
||||
I:\Desktop\CusserCore\快捷启动工具箱\bin\Debug\net6.0-windows\QuickLauncher.dll
|
||||
I:\Desktop\CusserCore\快捷启动工具箱\bin\Debug\net6.0-windows\QuickLauncher.pdb
|
||||
I:\Desktop\CusserCore\快捷启动工具箱\obj\Debug\net6.0-windows\QuickLauncher.dll
|
||||
I:\Desktop\CusserCore\快捷启动工具箱\obj\Debug\net6.0-windows\refint\QuickLauncher.dll
|
||||
I:\Desktop\CusserCore\快捷启动工具箱\obj\Debug\net6.0-windows\QuickLauncher.pdb
|
||||
I:\Desktop\CusserCore\快捷启动工具箱\obj\Debug\net6.0-windows\QuickLauncher.genruntimeconfig.cache
|
||||
I:\Desktop\CusserCore\快捷启动工具箱\obj\Debug\net6.0-windows\ref\QuickLauncher.dll
|
||||
I:\Desktop\CusserCore\ToolBox\bin\Debug\net6.0-windows\QuickLauncher.exe
|
||||
I:\Desktop\CusserCore\ToolBox\bin\Debug\net6.0-windows\QuickLauncher.deps.json
|
||||
I:\Desktop\CusserCore\ToolBox\bin\Debug\net6.0-windows\QuickLauncher.runtimeconfig.json
|
||||
I:\Desktop\CusserCore\ToolBox\bin\Debug\net6.0-windows\QuickLauncher.dll
|
||||
I:\Desktop\CusserCore\ToolBox\bin\Debug\net6.0-windows\QuickLauncher.pdb
|
||||
I:\Desktop\CusserCore\ToolBox\obj\Debug\net6.0-windows\QuickLauncher.MainForm.resources
|
||||
I:\Desktop\CusserCore\ToolBox\obj\Debug\net6.0-windows\QuickLauncher.csproj.GenerateResource.cache
|
||||
I:\Desktop\CusserCore\ToolBox\obj\Debug\net6.0-windows\QuickLauncher.GeneratedMSBuildEditorConfig.editorconfig
|
||||
I:\Desktop\CusserCore\ToolBox\obj\Debug\net6.0-windows\QuickLauncher.AssemblyInfoInputs.cache
|
||||
I:\Desktop\CusserCore\ToolBox\obj\Debug\net6.0-windows\QuickLauncher.AssemblyInfo.cs
|
||||
I:\Desktop\CusserCore\ToolBox\obj\Debug\net6.0-windows\QuickLauncher.csproj.CoreCompileInputs.cache
|
||||
I:\Desktop\CusserCore\ToolBox\obj\Debug\net6.0-windows\QuickLauncher.dll
|
||||
I:\Desktop\CusserCore\ToolBox\obj\Debug\net6.0-windows\refint\QuickLauncher.dll
|
||||
I:\Desktop\CusserCore\ToolBox\obj\Debug\net6.0-windows\QuickLauncher.pdb
|
||||
I:\Desktop\CusserCore\ToolBox\obj\Debug\net6.0-windows\QuickLauncher.genruntimeconfig.cache
|
||||
I:\Desktop\CusserCore\ToolBox\obj\Debug\net6.0-windows\ref\QuickLauncher.dll
|
||||
Binary file not shown.
11
obj/Debug/net6.0-windows/QuickLauncher.designer.deps.json
Normal file
11
obj/Debug/net6.0-windows/QuickLauncher.designer.deps.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETCoreApp,Version=v6.0",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v6.0": {}
|
||||
},
|
||||
"libraries": {}
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
{
|
||||
"runtimeOptions": {
|
||||
"tfm": "net6.0",
|
||||
"frameworks": [
|
||||
{
|
||||
"name": "Microsoft.NETCore.App",
|
||||
"version": "6.0.0"
|
||||
},
|
||||
{
|
||||
"name": "Microsoft.WindowsDesktop.App",
|
||||
"version": "6.0.0"
|
||||
}
|
||||
],
|
||||
"additionalProbingPaths": [
|
||||
"C:\\Users\\49009\\.dotnet\\store\\|arch|\\|tfm|",
|
||||
"C:\\Users\\49009\\.nuget\\packages",
|
||||
"D:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
|
||||
],
|
||||
"configProperties": {
|
||||
"Microsoft.NETCore.DotNetHostPolicy.SetAppPaths": true
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
obj/Debug/net6.0-windows/QuickLauncher.dll
Normal file
BIN
obj/Debug/net6.0-windows/QuickLauncher.dll
Normal file
Binary file not shown.
@ -0,0 +1 @@
|
||||
52bd08125dfe992db22dbaeb725f74f6d2e3774dab2cc358f22d7767115f87c2
|
||||
BIN
obj/Debug/net6.0-windows/QuickLauncher.pdb
Normal file
BIN
obj/Debug/net6.0-windows/QuickLauncher.pdb
Normal file
Binary file not shown.
BIN
obj/Debug/net6.0-windows/apphost.exe
Normal file
BIN
obj/Debug/net6.0-windows/apphost.exe
Normal file
Binary file not shown.
BIN
obj/Debug/net6.0-windows/ref/QuickLauncher.dll
Normal file
BIN
obj/Debug/net6.0-windows/ref/QuickLauncher.dll
Normal file
Binary file not shown.
BIN
obj/Debug/net6.0-windows/refint/QuickLauncher.dll
Normal file
BIN
obj/Debug/net6.0-windows/refint/QuickLauncher.dll
Normal file
Binary file not shown.
76
obj/QuickLauncher.csproj.nuget.dgspec.json
Normal file
76
obj/QuickLauncher.csproj.nuget.dgspec.json
Normal file
@ -0,0 +1,76 @@
|
||||
{
|
||||
"format": 1,
|
||||
"restore": {
|
||||
"I:\\Desktop\\CusserCore\\ToolBox\\QuickLauncher.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"I:\\Desktop\\CusserCore\\ToolBox\\QuickLauncher.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "I:\\Desktop\\CusserCore\\ToolBox\\QuickLauncher.csproj",
|
||||
"projectName": "QuickLauncher",
|
||||
"projectPath": "I:\\Desktop\\CusserCore\\ToolBox\\QuickLauncher.csproj",
|
||||
"packagesPath": "C:\\Users\\49009\\.nuget\\packages\\",
|
||||
"outputPath": "I:\\Desktop\\CusserCore\\ToolBox\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"fallbackFolders": [
|
||||
"D:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
|
||||
],
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\49009\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"net6.0-windows"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"net6.0-windows7.0": {
|
||||
"targetAlias": "net6.0-windows",
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
},
|
||||
"restoreAuditProperties": {
|
||||
"enableAudit": "true",
|
||||
"auditLevel": "low",
|
||||
"auditMode": "direct"
|
||||
},
|
||||
"SdkAnalysisLevel": "9.0.200"
|
||||
},
|
||||
"frameworks": {
|
||||
"net6.0-windows7.0": {
|
||||
"targetAlias": "net6.0-windows",
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"frameworkReferences": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"privateAssets": "all"
|
||||
},
|
||||
"Microsoft.WindowsDesktop.App.WindowsForms": {
|
||||
"privateAssets": "none"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.201\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
16
obj/QuickLauncher.csproj.nuget.g.props
Normal file
16
obj/QuickLauncher.csproj.nuget.g.props
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
|
||||
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
|
||||
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
|
||||
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
|
||||
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\49009\.nuget\packages\;D:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
|
||||
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.13.2</NuGetToolVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<SourceRoot Include="C:\Users\49009\.nuget\packages\" />
|
||||
<SourceRoot Include="D:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
2
obj/QuickLauncher.csproj.nuget.g.targets
Normal file
2
obj/QuickLauncher.csproj.nuget.g.targets
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
|
||||
82
obj/project.assets.json
Normal file
82
obj/project.assets.json
Normal file
@ -0,0 +1,82 @@
|
||||
{
|
||||
"version": 3,
|
||||
"targets": {
|
||||
"net6.0-windows7.0": {}
|
||||
},
|
||||
"libraries": {},
|
||||
"projectFileDependencyGroups": {
|
||||
"net6.0-windows7.0": []
|
||||
},
|
||||
"packageFolders": {
|
||||
"C:\\Users\\49009\\.nuget\\packages\\": {},
|
||||
"D:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {}
|
||||
},
|
||||
"project": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "I:\\Desktop\\CusserCore\\ToolBox\\QuickLauncher.csproj",
|
||||
"projectName": "QuickLauncher",
|
||||
"projectPath": "I:\\Desktop\\CusserCore\\ToolBox\\QuickLauncher.csproj",
|
||||
"packagesPath": "C:\\Users\\49009\\.nuget\\packages\\",
|
||||
"outputPath": "I:\\Desktop\\CusserCore\\ToolBox\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"fallbackFolders": [
|
||||
"D:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
|
||||
],
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\49009\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"net6.0-windows"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"net6.0-windows7.0": {
|
||||
"targetAlias": "net6.0-windows",
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
},
|
||||
"restoreAuditProperties": {
|
||||
"enableAudit": "true",
|
||||
"auditLevel": "low",
|
||||
"auditMode": "direct"
|
||||
},
|
||||
"SdkAnalysisLevel": "9.0.200"
|
||||
},
|
||||
"frameworks": {
|
||||
"net6.0-windows7.0": {
|
||||
"targetAlias": "net6.0-windows",
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"frameworkReferences": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"privateAssets": "all"
|
||||
},
|
||||
"Microsoft.WindowsDesktop.App.WindowsForms": {
|
||||
"privateAssets": "none"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.201\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
obj/project.nuget.cache
Normal file
8
obj/project.nuget.cache
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "vj/spU1Q8XY=",
|
||||
"success": true,
|
||||
"projectFilePath": "I:\\Desktop\\CusserCore\\ToolBox\\QuickLauncher.csproj",
|
||||
"expectedPackageFiles": [],
|
||||
"logs": []
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user