tkinter-TinUI-xml实战(12)应用组启动器
tkinter-TinUI-xml实战(12)应用组启动器
- 引言
- 主界面
- 单独条目
- 编辑框
- 命令行指令
- 子任务指令
- 演示
- 题外话
引言
应用快捷启动器有很多现成软件,但是大多都是将常用软件分类,或者建立一个个包含一套工作、学习环境的软件类区,由用户选择启动里面的若干应用,需要一个一个点击。而像自动化软件可以一键启动多个软件,直接形成软件工作区,但我只想使用这个功能的话,自动化软件又太臃肿。
因此,我就打算写一个应用组启动器,包含如下功能:
- 能够增、删、改每一个条目
- 每一个条目包含若干指令、任务
- 每一个指令是适用于命令行
start
的命令 - 每一个任务就是已经存在的条目
由于当前功能并不完善,且主要用来演示TinUI,因此不会有大量逻辑源码
我将这个软件命名:QuickUp
QuickUp下载体验
主界面
主界面主要由三部分组成:
- 搜索框(暂未实现)
- 工具按钮(目前主要是增加条目)
- 条目列表(包含所有当前可用任务条目)
<tinui>
<!--700 x 900-->
<line><entry width="350">taskEntry</entry><button2 icon="" text="" font="{Segoe Fluent Icons} 16" command="self.funcs['create_task']"></button2><button2 icon="" text="" font="{Segoe Fluent Icons} 16">settingbutton</button2><button2 icon="" text="" font="{Segoe Fluent Icons} 16" command="self.funcs['about']"></button2>
</line>
<line><listview width="480" height="650" num="1">taskView</listview>
</line>
</tinui>
单独条目
单独条目是每个任务的视觉化体现,包含任务名称,同时应该有运行、打开编辑、删除的功能按钮。
<tinui>
<!-- 任务列表元素 -->
<line x="5" y="40" anchor="w"><title text="%TITLENAME%"></title>
</line>
<line x="475" y="40" lineanchor="e"><button2 icon="" text="" font="{Segoe Fluent Icons} 16" command="self.funcs['run_task']"></button2><button2 icon="" text="" font="{Segoe Fluent Icons} 16" command="self.funcs['edit_task']"></button2><button2 icon="" text="" font="{Segoe Fluent Icons} 16" command="self.funcs['delete_task']"></button2>
</line>
</tinui>
编辑框
编辑框是任务条目点击编辑按钮后展现的界面,包含三个部分:
- 任务命名输入框
- 命令、子任务添加按钮
- 运行指令列表
<tinui>
<!-- QuickUp Editor -->
<line><entry width="260">entry</entry><button2 icon="" text="" font="{Segoe Fluent Icons} 16" command="self.funcs['save_task']"></button2><button2 text="添加命令" command="self.funcs['add_task_cmd']"></button2><button2 text="添加任务" command="self.funcs['add_task_task']"></button2>
</line>
<line><listview width="480" height="540" num="0" linew="100">view</listview>
</line>
</tinui>
命令行指令
命令行指令是适用于cmd中start
命令的指令,主要由以下部分构成:
- 命令行目标应用
- 参数
- 管理员复选框(当前只作为演示,没有什么好的实现方法)
- 删除键
<tinui>
<!-- QuickUp Editor cmd part-->
<line y="25" anchor="w" lineanchor="w"><paragraph text="目标"></paragraph><entry width="360">targetEntry</entry>
</line>
<line y="75" anchor="w" lineanchor="w"><paragraph text="参数"></paragraph><entry width="320">argsEntry</entry>
</line>
<line x="475" y="25" anchor="e"><button2 icon="" text="" font="{Segoe Fluent Icons} 16" command="self.funcs['delete_task']"></button2>
</line>
<line x="475" y="75" anchor="e"><checkbutton text="管理员" command="self.funcs['run_as_admin']">checkbox</checkbutton>
</line>
</tinui>
子任务指令
子任务指令是运行当前已经存在任务条目的指令。
假设当前已经存在任务条目A,用来启动一组应用。而当我想搭建同样的学习软件组环境时,还想额外打开电子书文档,就可以使用如下指令:
- 运行A
- 用PDF阅读器打开电子书文档
这样就可以省略重复编写。
<tinui>
<!-- QuickUp Editor task part-->
<line y="15"><paragraph text="任务名称(填写已经存在的任务的名称)"></paragraph>
</line>
<line><entry width="400">taskEntry</entry>
</line>
<line x="475" y="50" anchor="e"><button2 icon="" text="" font="{Segoe Fluent Icons} 16" command="self.funcs['delete_task']"></button2>
</line>
</tinui>
不能循环启用(软件不限制,但肯定死机),这个指令不是在【启动anythingllm】条目里,而是在另一个条目里。
演示
QuickUp - TinUI界面演示
题外话
我发现还可以把这个用作待办事项🤣。