无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站投放广告、加入VIP会员,请联系 微信:wuyouceo
楼主: piaomusic
打印 上一主题 下一主题

[原创] 我的工具箱(含源码) v2025.08.08

    [复制链接]
451#
发表于 昨天 21:55 | 只看该作者
回复

使用道具 举报

452#
发表于 昨天 22:24 | 只看该作者
支持原创sss
回复

使用道具 举报

453#
发表于 昨天 23:43 | 只看该作者
​参数支持​:可为每个工具设置启动参数......具体怎么写参数???

点评

参数自己设置啊  详情 回复 发表于 15 小时前
回复

使用道具 举报

454#
 楼主| 发表于 15 小时前 | 只看该作者
yesfei 发表于 2025-8-9 23:43
​参数支持​:可为每个工具设置启动参数......具体怎么写参数???

参数自己设置啊

2025-08-10_00-29-10.png (25.36 KB, 下载次数: 0)

2025-08-10_00-29-10.png

2025-08-10_00-28-50.png (29.17 KB, 下载次数: 0)

2025-08-10_00-28-50.png
回复

使用道具 举报

455#
发表于 6 小时前 | 只看该作者
高危操作(如驱动签名相关)会有安全警告
回复

使用道具 举报

456#
发表于 6 小时前 | 只看该作者
看起来不错嗷
回复

使用道具 举报

457#
发表于 5 小时前 | 只看该作者
不会只有一个模板吗
回复

使用道具 举报

458#
发表于 5 小时前 | 只看该作者
谢谢大佬分享佳作
回复

使用道具 举报

459#
发表于 5 小时前 | 只看该作者
谢谢分享!!!!!!!!!!!
回复

使用道具 举报

460#
发表于 4 小时前 | 只看该作者
感谢分享,能不能加个排序功能,包括分类排序。

点评

分类排序 def _show_navigation_context_menu( self, event: tk.Event, button: ttk.Button, section: str ): """显示导航栏右键菜单""" self.selected_nav_button = button self.selec  详情 回复 发表于 2 小时前
设置工具编号,就是排序功能啊。  详情 回复 发表于 2 小时前
回复

使用道具 举报

461#
发表于 4 小时前 | 只看该作者
感谢老师分享
回复

使用道具 举报

462#
 楼主| 发表于 2 小时前 | 只看该作者
wssln 发表于 2025-8-10 11:19
感谢分享,能不能加个排序功能,包括分类排序。

设置工具编号,就是排序功能啊。
回复

使用道具 举报

463#
发表于 2 小时前 | 只看该作者
这个好都集成了。
回复

使用道具 举报

464#
 楼主| 发表于 2 小时前 | 只看该作者
wssln 发表于 2025-8-10 11:19
感谢分享,能不能加个排序功能,包括分类排序。

分类排序



def _show_navigation_context_menu(
    self, event: tk.Event, button: ttk.Button, section: str
):
    """显示导航栏右键菜单"""
    self.selected_nav_button = button
    self.selected_nav_section = section

    # 更新菜单项状态
    sections = list(self.tools.keys())
    current_index = sections.index(section)

    # 启用/禁用上移下移菜单项
    self.nav_menu.entryconfig("上移", state=tk.NORMAL if current_index > 0 else tk.DISABLED)
    self.nav_menu.entryconfig("下移", state=tk.NORMAL if current_index < len(sections) - 1 else tk.DISABLED)

    try:
        self.nav_menu.tk_popup(event.x_root, event.y_root)
    finally:
        self.nav_menu.grab_release()

def _move_category_up(self):
    """将当前选中的分类上移"""
    if not hasattr(self, "selected_nav_section") or not self.selected_nav_section:
        return

    sections = list(self.tools.keys())
    current_index = sections.index(self.selected_nav_section)

    if current_index > 0:
        # 交换字典中的顺序
        prev_section = sections[current_index - 1]
        self.tools = {k: v for k, v in zip(
            sections[:current_index - 1] +
            [self.selected_nav_section, prev_section] +
            sections[current_index + 1:],
            [self.tools[k] for k in
             sections[:current_index - 1] +
             [self.selected_nav_section, prev_section] +
             sections[current_index + 1:]]
        )}

        self._save_config()
        self._reload_config()

        # 更新选中状态
        self.selected_nav_section = self.selected_nav_section
        self.selected_nav_button = None  # 会在_reload_config中重建

def _move_category_down(self):
    """将当前选中的分类下移"""
    if not hasattr(self, "selected_nav_section") or not self.selected_nav_section:
        return

    sections = list(self.tools.keys())
    current_index = sections.index(self.selected_nav_section)

    if current_index < len(sections) - 1:
        # 交换字典中的顺序
        next_section = sections[current_index + 1]
        self.tools = {k: v for k, v in zip(
            sections[:current_index] +
            [next_section, self.selected_nav_section] +
            sections[current_index + 2:],
            [self.tools[k] for k in
             sections[:current_index] +
             [next_section, self.selected_nav_section] +
             sections[current_index + 2:]]
        )}

        self._save_config()
        self._reload_config()

        # 更新选中状态
        self.selected_nav_section = self.selected_nav_section
        self.selected_nav_button = None  


def _setup_navigation_context_menu(self):
    """设置导航栏右键菜单"""
    # 使用配置中的菜单字号
    menu_font = ("微软雅黑", self.config["菜单字号"])
    self.nav_menu = tk.Menu(self.master, tearoff=0, font=menu_font)
    for label, command in [
        ("上移", self._move_category_up),
        ("下移", self._move_category_down),
        None,  # 分隔符
        ("添加分类", self._add_category),
        ("删除分类", self._delete_category),
        ("重命名分类", self._rename_category),
    ]:
        if label is None:
            self.nav_menu.add_separator()
        else:
            self.nav_menu.add_command(label=label, command=command)





回复

使用道具 举报

465#
发表于 2 小时前 | 只看该作者
谢谢楼主
回复

使用道具 举报

466#
发表于 2 小时前 | 只看该作者
非常实用的工具,谢谢分享
回复

使用道具 举报

467#
发表于 1 小时前 | 只看该作者

谢谢分享
回复

使用道具 举报

468#
发表于 1 小时前 | 只看该作者
感谢你的分享!
回复

使用道具 举报

469#
发表于 1 小时前 | 只看该作者
谢谢分享
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2025-8-10 15:59

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表