關機工具舊版本從 1.3 重新設計(舊版本號同時廢止),使用新界面框架來完成腳本化界面繪制工作,界面布局請看軟件主程序同目錄下的 XML 文件。后續功能會慢慢完善,包括交互功能。
界面腳本基于 xml 標記語言;<form> 部分描述啟動窗體大小、樣式、行為,<item> 部分描述啟動窗體時載入的元素,<string> 部分為保留的內部語言字符串。典型的腳本文件主體部分應該包含類似如下內容來說明窗體與元素:
<!-- 窗體配置 -->
<!-- caption/title1/title2 屬性,設置窗體標題欄文字 -->
<form caption="關機工具 測試版" title1="關機工具" title2="移動影音轉換專家" />
<!-- width/height 屬性,窗體繪制區域尺寸,單位為像素 -->
<!-- fontname 屬性,設置窗體繪制字體 -->
<!-- backcolor 屬性,Long 值,如需使用十六進位值需將字符 "&" 轉義為 "&" 如 "&HFFFFFF" -->
<form width="540" height="200" fontname="微軟雅黑" backcolor="16775160" />
<!-- 窗體啟動位置,-1 自動、0 屏幕中間、1 任務欄左側、2 任務欄右側、3 任務欄中間 -->
<form windowstartupposition="-1" />
<!-- 當窗體失去焦點時嘗試退出 -->
<form exitwhenlosingfocus="true" />
<!-- 啟用分層窗體 -->
<form layeredWindow="true" />
<!-- 控件配置 -->
<!-- onmouseclick 事件,提示并延遲 3 秒立即執行的可選動作:shutdown/restart/logoff/setsuspendstate_hibernate_true/setsuspendstate_hibernate_false -->
<!-- onmouseclick 事件,提示并等待選擇執行的可選動作:fastshutdown/fastrestart -->
<!-- onmouseclick 事件,立即執行的可選動作:lockworkstation/monitorpoweroff -->
<!-- onmouseclick 事件,其他可選動作:startbutton/cmd/controlpanel/devicemanager/taskmanager/mycomputer/screensave -->
<!-- index 屬性,范圍為 -1 到 9999 -->
<!-- left/top/width/height 屬性,設置控件在窗體中的位置及大小 -->
<!-- type 屬性,設置控件類型,可用類型:button -->
<!-- caption/comment/tip 屬性,設置控件文字 -->
<!-- fontname 屬性,設置控件繪制字體 -->
<!-- forecolor/backcolor 屬性,Long 值,如需使用十六進位值需將字符 "&" 轉義為 "&" 如 "&HFFFFFF" -->
<item onmouseclick="startbutton" index="0" left="25" top="65" width="115" height="65" type="button" caption="開始" comment="Start" tip="" fontname="微軟雅黑" forecolor="14864850" backcolor="13395456" />
<item onmouseclick="taskmanager" index="1" left="145" top="65" width="70" height="45" type="button" caption="任務" comment="Taskmanager" tip="" fontname="微軟雅黑" forecolor="14864850" backcolor="1698" />
<item onmouseclick="lockworkstation" index="2" left="220" top="65" width="70" height="45" type="button" caption="鎖定" comment="Lock" tip="" fontname="微軟雅黑" forecolor="14864850" backcolor="1698" />
<item onmouseclick="logoff" index="3" left="295" top="65" width="70" height="45" type="button" caption="注銷" comment="Logoff" tip="" fontname="微軟雅黑" forecolor="14864850" backcolor="1698" />
<item onmouseclick="restart" index="4" left="370" top="65" width="70" height="45" type="button" caption="重啟" comment="Restart" tip="" fontname="微軟雅黑" forecolor="14864850" backcolor="1698" />
<item onmouseclick="shutdown" index="5" left="445" top="65" width="70" height="45" type="button" caption="關機" comment="Shutdown" tip="" fontname="微軟雅黑" forecolor="14864850" backcolor="1698" />
<item onmouseclick="monitorpoweroff" index="6" left="145" top="110" width="70" height="20" type="button" caption="關閉顯示器" comment="" tip="" fontname="微軟雅黑" forecolor="14864850" backcolor="6443346" />
<item onmouseclick="screensave" index="7" left="220" top="110" width="70" height="20" type="button" caption="啟動屏幕保護" comment="" tip="" fontname="微軟雅黑" forecolor="14864850" backcolor="6443346" />
<item onmouseclick="cmd" index="8" left="295" top="110" width="70" height="20" type="button" caption="啟動命令行" comment="" tip="" fontname="微軟雅黑" forecolor="14864850" backcolor="6443346" />
<item onmouseclick="setsuspendstate_hibernate_true" index="9" left="370" top="110" width="70" height="20" type="button" caption="休眠" comment="" tip="" fontname="微軟雅黑" forecolor="14864850" backcolor="6443346" />
<item onmouseclick="setsuspendstate_hibernate_false" index="10" left="445" top="110" width="70" height="20" type="button" caption="待機" comment="" tip="" fontname="微軟雅黑" forecolor="14864850" backcolor="6443346" />
<item onmouseclick="fastshutdown" index="11" left="25" top="135" width="94" height="20" type="button" caption="快速關機" comment="" tip="" fontname="微軟雅黑" forecolor="14864850" backcolor="225" />
<item onmouseclick="fastrestart" index="12" left="124" top="135" width="94" height="20" type="button" caption="快速重啟" comment="" tip="" fontname="微軟雅黑" forecolor="14864850" backcolor="225" />
<item onmouseclick="controlpanel" index="13" left="223" top="135" width="94" height="20" type="button" caption="控制面板" comment="" tip="" fontname="微軟雅黑" forecolor="14864850" backcolor="8153964" />
<item onmouseclick="devicemanager" index="14" left="322" top="135" width="94" height="20" type="button" caption="設備管理器" comment="" tip="" fontname="微軟雅黑" forecolor="14864850" backcolor="8153964" />
<item onmouseclick="mycomputer" index="15" left="421" top="135" width="94" height="20" type="button" caption="我的電腦" comment="" tip="" fontname="微軟雅黑" forecolor="14864850" backcolor="8153964" />
<!-- 界面語言字符串,僅用于不同語言翻譯,index 范圍為 0 到 999。 -->
<string index="0" text="無法初始化界面支持框架!" />
<string index="1" text="無法初始化 GDIPLUS!" />
<string index="2" text="" />
<string index="3" text="" />
<string index="4" text="" />
<string index="5" text="" />
<string index="6" text="" />
<string index="7" text="" />
<string index="8" text="是否立即執行?" />
<string index="9" text="已經完成。" />
<string index="10" text="無法完成。" />
<string index="11" text="關機" />
<string index="12" text="重啟" />
<string index="13" text="注銷" />
<string index="14" text="鎖定" />
<string index="15" text="休眠" />
<string index="16" text="待機" />
<string index="17" text="關閉屏幕" />
<string index="18" text="瞬間關機" />
<string index="19" text="瞬間重啟" />
<string index="20" text="" />
軟件無法下載?不知道解壓密碼?微信關注訂閱號"閃電下載"獲取
本帖長期更新最新版 請收藏下載!版權聲明:本站提的序列號、注冊碼、注冊機、破解補丁等均來自互聯網,僅供學習交流之用,請在下載后24小時內刪除。