SVG組態
# Smart之SVG組態
# 1. 說明
SVG是一種可縮放向量圖形,其使用XML來描述形狀特徵,關於SVG的說明等資訊可參考https://developer.mozilla.org/zh-CN/docs/Web/SVG (opens new window)。由於其向量圖的特性,在進行編輯縮放等相關操作后,圖形不失真,可廣泛用於圖形展示的場合。組態界面由於其圖形的特性,非常適合使用SVG來展示。
通過範例學習,可以掌握使用SVG來展示組態的界面,並通過控制元件來實現組態界面的動態顯示。
# 2. 設計明細
開啟Smart智慧控制平臺,分別加入下插圖之控制元件。或者通過點選功能表欄[檔案]
-[打開專案]
選擇專案打開該範例。
1:TPanel元件,控制元件名稱為Panel1
。
2:TAbClock元件,控制元件名稱為AbClock1
。
3:TAbDBLED元件,控制元件名稱為AbDBLED7
。
4:TAbDBLED元件,控制元件名稱為AbDBLED8
。
5:TAbDBLED元件,控制元件名稱為AbDBLED5
。
6:TAbDBLED元件,控制元件名稱為AbDBLED1
。
7:TAbDBToggleSwitch元件,控制元件名稱為AbDBToggleSwitch1
。
8:TAbDBToggleSwitch元件,控制元件名稱為AbDBToggleSwitch2
。
9:TAbDBLED元件,控制元件名稱為AbDBLED2
。
10:TAbDBLED元件,控制元件名稱為AbDBLED3
。
11:TAbDBToggleSwitch元件,控制元件名稱為AbDBToggleSwitch3
。
12:TAbDBToggleSwitch元件,控制元件名稱為AbDBToggleSwitch4
。
13:TAbDBLED元件,控制元件名稱為AbDBLED4
。
14:TAbDBLED元件,控制元件名稱為AbDBLED6
。
15:TRSSVGImageList元件,控制元件名稱為RSSVGImageList1
。
16:TRSSVGImageList元件,控制元件名稱為RSSVGImageList2
。
TRSSVGThreadImage元件用於產生各界面顯示用的元件。
Main窗體屬性設定
ClientHeight
:窗體客戶區高度=550
。ClientWidth
:窗體客戶區寬度=720
。
1:Panel1屬性設定
Align
:設定對齊的方式,設定為alTop
。Caption
:設定顯示的字幕內容,設定為反應塔流程圖
。Height
:設定高度,設定為41
。Font
:設定字型資訊。
點選右側的
[...]
,打開字型設定界面,點選設定字型內容。3:AbDBLED7屬性設定
Caption
:設定顯示的字幕內容,設定為增壓泵3
。
4:AbDBLED8屬性設定
Caption
:設定顯示的字幕內容,設定為增壓泵4
。
5:AbDBLED5屬性設定
Caption
:設定顯示的字幕內容,設定為增壓泵1
。
6:AbDBLED1屬性設定
Caprtion
:設定顯示的字幕內容,設定為一號機組
。
7:AbDBToggleSwitch1屬性設定
TextOff
:設定關閉狀態顯示的字幕內容,設定為關
。TextOn
:設定開啟狀態顯示的字幕內容,設定為開
。
8:AbDBToggleSwitch2屬性設定
TextOff
:設定關閉狀態顯示的字幕內容,設定為關
。TextOn
:設定開啟狀態顯示的字幕內容,設定為開
。
9:AbDBLED2屬性設定
Caprtion
:設定顯示的字幕內容,設定為二號機組
。
10:AbDBLED3屬性設定
Caption
:設定顯示的字幕內容,設定為三號機組
。
11:AbDBToggleSwitch3屬性設定
TextOff
:設定關閉狀態顯示的字幕內容,設定為關
。TextOn
:設定開啟狀態顯示的字幕內容,設定為開
。
12:AbDBToggleSwitch4屬性設定
TextOff
:設定關閉狀態顯示的字幕內容,設定為關
。TextOn
:設定開啟狀態顯示的字幕內容,設定為開
。
13:AbDBLED4屬性設定
Caption
:設定顯示的字幕內容,設定為四號機組
。
14:AbDBLED6屬性設定
Caption
:設定顯示的字幕內容,設定為增壓泵2
。
15:RSSVGImageList1屬性設定
點選
Items
屬性右側的[...]
,打開列表,新增兩個編輯列表,分別設定Lines
屬性。<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"[]><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="64px" height="64px" viewBox="0 0 125.921 121.105" enable-background="new 0 0 125.921 121.105" xml:space="preserve"> <g id="Group_OutletPort"> <linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="119.3706" y1="-412.0227" x2="119.3706" y2="-361.6145" gradientTransform="matrix(1 0 0 -1 0 -360.895)"> <stop offset="0" style="stop-color:#4D4D4D" /> <stop offset="0.21" style="stop-color:#717171" /> <stop offset="0.54" style="stop-color:#A6A6A6" /> <stop offset="0.64" style="stop-color:#9F9F9F" /> <stop offset="0.79" style="stop-color:#8C8C8C" /> <stop offset="0.97" style="stop-color:#6D6D6D" /> <stop offset="1" style="stop-color:#666666" /> </linearGradient> <rect x="112.821" y="0.719" fill="url(#SVGID_1_)" stroke="#B3B3B3" stroke-width="0.5" width="13.101" height="50.408" /> <linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="83.0708" y1="76.9197" x2="83.0708" y2="115.9207" gradientTransform="matrix(1 0 0 -1 0 122.105)"> <stop offset="0" style="stop-color:#4D4D4D" /> <stop offset="0.52" style="stop-color:#B2B2B2" /> <stop offset="1" style="stop-color:#666666" /> </linearGradient> <polyline fill="url(#SVGID_2_)" points="53.235,6.184 112.907,6.184 112.907,45.185 102.517,45.185 " /> </g> <g id="Group_Legs"> <linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="52.5283" y1="1094.1335" x2="52.5283" y2="1058.2527" gradientTransform="matrix(1 0 0 1 0 -973.75)"> <stop offset="0" style="stop-color:#999999" /> <stop offset="1" style="stop-color:#666666" /> </linearGradient> <path fill="url(#SVGID_3_)" stroke="#999999" stroke-width="0.396" d="M11.321,120.384l10.254-35.881h61.908l10.252,35.881H72.966 L52.462,89.497l-20.769,30.887H11.321z" /> </g> <g id="Group_LegBase"> <path fill="#999999" stroke="#B3B3B3" stroke-width="0.5" d="M0.76,115.851h37.533v5.254H0.76V115.851z" /> <path fill="#999999" stroke="#B3B3B3" stroke-width="0.5" d="M66.603,115.851h37.929v5.254H66.603V115.851L66.603,115.851z" /> </g> <g id="Group_PumpBody"> <radialGradient id="SVGID_4_" cx="126.48" cy="837.1521" r="51.5659" gradientTransform="matrix(0.9999 0.0069 -0.0069 0.9999 -67.9976 -780.2224)" gradientUnits="userSpaceOnUse"> <stop offset="0.18" style="stop-color:#333333" /> <stop offset="0.26" style="stop-color:#383838" /> <stop offset="0.35" style="stop-color:#454545" /> <stop offset="0.44" style="stop-color:#5C5C5C" /> <stop offset="0.54" style="stop-color:#7B7B7B" /> <stop offset="0.64" style="stop-color:#A4A4A4" /> <stop offset="0.72" style="stop-color:#CCCCCC" /> <stop offset="0.81" style="stop-color:#B1B1B1" /> <stop offset="0.99" style="stop-color:#6B6B6B" /> <stop offset="1" style="stop-color:#666666" /> </radialGradient> <path fill="url(#SVGID_4_)" d="M53.047,6.158c28.477,0.196,51.402,23.439,51.207,51.917c-0.195,28.475-23.438,51.398-51.914,51.204 C23.862,109.086,0.938,85.841,1.133,57.364C1.326,28.889,24.573,5.963,53.047,6.158z" /> </g> <g id="Group_CenterShade"> <radialGradient id="SVGID_5_" cx="52.4468" cy="-418.7268" r="27.2441" gradientTransform="matrix(1 0 0 -1 0 -360.895)" gradientUnits="userSpaceOnUse"> <stop offset="0" style="stop-color:#000000" /> <stop offset="1" style="stop-color:#333333" /> </radialGradient> <path fill="url(#SVGID_5_)" d="M38.399,81.168C25.508,73.407,21.35,56.67,29.111,43.78c7.762-12.888,24.502-17.045,37.385-9.285 c12.891,7.761,17.047,24.498,9.289,37.393C68.021,84.769,51.286,88.928,38.399,81.168z" /> </g> <g id="Group_Impeller"> <linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="101.9819" y1="125.5398" x2="106.1411" y2="125.5342" gradientTransform="matrix(0.9889 0.1484 0.1484 -0.9889 -69.6528 166.4384)"> <stop offset="0.01" style="stop-color:#666666" /> <stop offset="0.51" style="stop-color:#B8B8B8" /> <stop offset="1" style="stop-color:#666666" /> </linearGradient> <path fill="url(#SVGID_6_)" d="M51.014,77.055c-0.642,4.14-2.024,7.351-3.166,7.187c-1.139-0.165-1.545-3.651-0.902-7.789 l0.014-0.081l5.874-37.983c0.64-4.139,1.986-7.314,3.125-7.149c1.142,0.163,1.507,3.623,0.866,7.76L51.014,77.055z" /> <linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="-277.9653" y1="21.0618" x2="-273.8071" y2="21.0562" gradientTransform="matrix(0.6317 -0.7752 -0.7752 -0.6317 243.0495 -142.3917)"> <stop offset="0.01" style="stop-color:#666666" /> <stop offset="0.51" style="stop-color:#B8B8B8" /> <stop offset="1" style="stop-color:#666666" /> </linearGradient> <path fill="url(#SVGID_7_)" d="M68.625,68.765c3.234,2.659,5.291,5.485,4.57,6.387c-0.724,0.895-3.931-0.533-7.162-3.193 l-0.063-0.053L36.284,47.493c-3.234-2.66-5.28-5.437-4.559-6.333c0.722-0.898,3.884,0.55,7.117,3.21L68.625,68.765z" /> <linearGradient id="SVGID_8_" gradientUnits="userSpaceOnUse" x1="216.7651" y1="433.1179" x2="220.9233" y2="433.1123" gradientTransform="matrix(0.4225 0.9064 0.9064 -0.4225 -432.8737 42.0522)"> <stop offset="0.01" style="stop-color:#666666" /> <stop offset="0.51" style="stop-color:#B8B8B8" /> <stop offset="1" style="stop-color:#666666" /> </linearGradient> <path fill="url(#SVGID_8_)" d="M35.58,67.368c-3.803,1.752-7.245,2.373-7.739,1.332c-0.491-1.041,2.193-3.306,5.994-5.057 l0.076-0.033L68.82,47.527c3.805-1.752,7.195-2.384,7.686-1.345c0.494,1.041-2.188,3.258-5.99,5.008L35.58,67.368z" /> <radialGradient id="SVGID_9_" cx="51.9766" cy="64.4246" r="6.541" gradientTransform="matrix(1 0 0 -1 0 122.105)" gradientUnits="userSpaceOnUse"> <stop offset="0" style="stop-color:#B8B8B8" /> <stop offset="0.47" style="stop-color:#B6B6B6" /> <stop offset="0.64" style="stop-color:#AFAFAF" /> <stop offset="0.76" style="stop-color:#A3A3A3" /> <stop offset="0.85" style="stop-color:#929292" /> <stop offset="0.94" style="stop-color:#7D7D7D" /> <stop offset="1" style="stop-color:#666666" /> </radialGradient> <path fill="url(#SVGID_9_)" d="M53.274,51.269c3.543,0.718,5.829,4.168,5.11,7.709c-0.717,3.544-4.167,5.83-7.71,5.113 c-3.536-0.719-5.824-4.171-5.105-7.711C46.284,52.844,49.739,50.552,53.274,51.269z" /> </g> </svg>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg version="1.1" id="Layer_1" width="64px" height="64px" viewBox="0 0 125.921 121.105" enable-background="new 0 0 125.921 121.105" xml:space="preserve" sodipodi:docname="Cool pump Horz 45.svg" inkscape:version="1.1 (c68e22c387, 2021-05-23)" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs122" /><sodipodi:namedview id="namedview120" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageshadow="2" inkscape:pageopacity="0.0" inkscape:pagecheckerboard="0" showgrid="false" inkscape:zoom="12.984375" inkscape:cx="31.961492" inkscape:cy="31.961492" inkscape:window-width="2560" inkscape:window-height="1377" inkscape:window-x="1912" inkscape:window-y="-8" inkscape:window-maximized="1" inkscape:current-layer="Layer_1" /> <g id="Group_OutletPort"> <linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="119.3706" y1="-412.0227" x2="119.3706" y2="-361.6145" gradientTransform="matrix(1 0 0 -1 0 -360.895)"> <stop offset="0" style="stop-color:#4D4D4D" id="stop2" /> <stop offset="0.21" style="stop-color:#717171" id="stop4" /> <stop offset="0.54" style="stop-color:#A6A6A6" id="stop6" /> <stop offset="0.64" style="stop-color:#9F9F9F" id="stop8" /> <stop offset="0.79" style="stop-color:#8C8C8C" id="stop10" /> <stop offset="0.97" style="stop-color:#6D6D6D" id="stop12" /> <stop offset="1" style="stop-color:#666666" id="stop14" /> </linearGradient> <rect x="112.821" y="0.719" fill="url(#SVGID_1_)" stroke="#B3B3B3" stroke-width="0.5" width="13.101" height="50.408" id="rect17" /> <linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="83.0708" y1="76.9197" x2="83.0708" y2="115.9207" gradientTransform="matrix(1 0 0 -1 0 122.105)"> <stop offset="0" style="stop-color:#4D4D4D" id="stop19" /> <stop offset="0.52" style="stop-color:#B2B2B2" id="stop21" /> <stop offset="1" style="stop-color:#666666" id="stop23" /> </linearGradient> <polyline fill="url(#SVGID_2_)" points="53.235,6.184 112.907,6.184 112.907,45.185 102.517,45.185 " id="polyline26" /> </g> <g id="Group_Legs"> <linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="52.5283" y1="1094.1335" x2="52.5283" y2="1058.2527" gradientTransform="matrix(1 0 0 1 0 -973.75)"> <stop offset="0" style="stop-color:#999999" id="stop29" /> <stop offset="1" style="stop-color:#666666" id="stop31" /> </linearGradient> <path fill="url(#SVGID_3_)" stroke="#999999" stroke-width="0.396" d="M11.321,120.384l10.254-35.881h61.908l10.252,35.881H72.966 L52.462,89.497l-20.769,30.887H11.321z" id="path34" /> </g> <g id="Group_LegBase"> <path fill="#999999" stroke="#B3B3B3" stroke-width="0.5" d="M0.76,115.851h37.533v5.254H0.76V115.851z" id="path37" /> <path fill="#999999" stroke="#B3B3B3" stroke-width="0.5" d="M66.603,115.851h37.929v5.254H66.603V115.851L66.603,115.851z" id="path39" /> </g> <g id="Group_PumpBody"> <radialGradient id="SVGID_4_" cx="126.48" cy="837.1521" r="51.5659" gradientTransform="matrix(0.9999 0.0069 -0.0069 0.9999 -67.9976 -780.2224)" gradientUnits="userSpaceOnUse"> <stop offset="0.18" style="stop-color:#333333" id="stop42" /> <stop offset="0.26" style="stop-color:#383838" id="stop44" /> <stop offset="0.35" style="stop-color:#454545" id="stop46" /> <stop offset="0.44" style="stop-color:#5C5C5C" id="stop48" /> <stop offset="0.54" style="stop-color:#7B7B7B" id="stop50" /> <stop offset="0.64" style="stop-color:#A4A4A4" id="stop52" /> <stop offset="0.72" style="stop-color:#CCCCCC" id="stop54" /> <stop offset="0.81" style="stop-color:#B1B1B1" id="stop56" /> <stop offset="0.99" style="stop-color:#6B6B6B" id="stop58" /> <stop offset="1" style="stop-color:#666666" id="stop60" /> </radialGradient> <path fill="url(#SVGID_4_)" d="M53.047,6.158c28.477,0.196,51.402,23.439,51.207,51.917c-0.195,28.475-23.438,51.398-51.914,51.204 C23.862,109.086,0.938,85.841,1.133,57.364C1.326,28.889,24.573,5.963,53.047,6.158z" id="path63" /> </g> <g id="Group_CenterShade"> <radialGradient id="SVGID_5_" cx="52.4468" cy="-418.7268" r="27.2441" gradientTransform="matrix(1 0 0 -1 0 -360.895)" gradientUnits="userSpaceOnUse"> <stop offset="0" style="stop-color:#000000" id="stop66" /> <stop offset="1" style="stop-color:#333333" id="stop68" /> </radialGradient> <path fill="url(#SVGID_5_)" d="M38.399,81.168C25.508,73.407,21.35,56.67,29.111,43.78c7.762-12.888,24.502-17.045,37.385-9.285 c12.891,7.761,17.047,24.498,9.289,37.393C68.021,84.769,51.286,88.928,38.399,81.168z" id="path71" /> </g> <g id="Group_Impeller" transform="rotate(45,52.173848,57.740931)"> <linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="101.9819" y1="125.5398" x2="106.1411" y2="125.5342" gradientTransform="matrix(0.9889,0.1484,0.1484,-0.9889,-69.6528,166.4384)"> <stop offset="0.01" style="stop-color:#666666" id="stop74" /> <stop offset="0.51" style="stop-color:#B8B8B8" id="stop76" /> <stop offset="1" style="stop-color:#666666" id="stop78" /> </linearGradient> <path fill="url(#SVGID_6_)" d="m 51.014,77.055 c -0.642,4.14 -2.024,7.351 -3.166,7.187 -1.139,-0.165 -1.545,-3.651 -0.902,-7.789 l 0.014,-0.081 5.874,-37.983 c 0.64,-4.139 1.986,-7.314 3.125,-7.149 1.142,0.163 1.507,3.623 0.866,7.76 z" id="path81" style="fill:url(#SVGID_6_)" /> <linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="-277.9653" y1="21.0618" x2="-273.8071" y2="21.0562" gradientTransform="matrix(0.6317,-0.7752,-0.7752,-0.6317,243.0495,-142.3917)"> <stop offset="0.01" style="stop-color:#666666" id="stop83" /> <stop offset="0.51" style="stop-color:#B8B8B8" id="stop85" /> <stop offset="1" style="stop-color:#666666" id="stop87" /> </linearGradient> <path fill="url(#SVGID_7_)" d="m 68.625,68.765 c 3.234,2.659 5.291,5.485 4.57,6.387 -0.724,0.895 -3.931,-0.533 -7.162,-3.193 L 65.97,71.906 36.284,47.493 c -3.234,-2.66 -5.28,-5.437 -4.559,-6.333 0.722,-0.898 3.884,0.55 7.117,3.21 z" id="path90" style="fill:url(#SVGID_7_)" /> <linearGradient id="SVGID_8_" gradientUnits="userSpaceOnUse" x1="216.76511" y1="433.11789" x2="220.92329" y2="433.1123" gradientTransform="matrix(0.4225,0.9064,0.9064,-0.4225,-432.8737,42.0522)"> <stop offset="0.01" style="stop-color:#666666" id="stop92" /> <stop offset="0.51" style="stop-color:#B8B8B8" id="stop94" /> <stop offset="1" style="stop-color:#666666" id="stop96" /> </linearGradient> <path fill="url(#SVGID_8_)" d="m 35.58,67.368 c -3.803,1.752 -7.245,2.373 -7.739,1.332 -0.491,-1.041 2.193,-3.306 5.994,-5.057 L 33.911,63.61 68.82,47.527 c 3.805,-1.752 7.195,-2.384 7.686,-1.345 0.494,1.041 -2.188,3.258 -5.99,5.008 z" id="path99" style="fill:url(#SVGID_8_)" /> <radialGradient id="SVGID_9_" cx="51.976601" cy="64.424599" r="6.5409999" gradientTransform="matrix(1,0,0,-1,0,122.105)" gradientUnits="userSpaceOnUse"> <stop offset="0" style="stop-color:#B8B8B8" id="stop101" /> <stop offset="0.47" style="stop-color:#B6B6B6" id="stop103" /> <stop offset="0.64" style="stop-color:#AFAFAF" id="stop105" /> <stop offset="0.76" style="stop-color:#A3A3A3" id="stop107" /> <stop offset="0.85" style="stop-color:#929292" id="stop109" /> <stop offset="0.94" style="stop-color:#7D7D7D" id="stop111" /> <stop offset="1" style="stop-color:#666666" id="stop113" /> </radialGradient> <path fill="url(#SVGID_9_)" d="m 53.274,51.269 c 3.543,0.718 5.829,4.168 5.11,7.709 -0.717,3.544 -4.167,5.83 -7.71,5.113 -3.536,-0.719 -5.824,-4.171 -5.105,-7.711 0.715,-3.536 4.17,-5.828 7.705,-5.111 z" id="path116" style="fill:url(#SVGID_9_)" /> </g> </svg>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
35916:RSSVGImageList2屬性設定
點選
Items
屬性右側的[...]
,打開列表,新增兩個編輯列表,分別設定Lines
屬性。<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="64px" height="64px" viewBox="0 0 125.921 121.105" enable-background="new 0 0 125.921 121.105" xml:space="preserve"> <g id="Group_OutletPort"> <linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="119.3706" y1="-412.0227" x2="119.3706" y2="-361.6145" gradientTransform="matrix(1 0 0 -1 0 -360.895)"> <stop offset="0" style="stop-color:#004C00" /> <stop offset="0.21" style="stop-color:#007000" /> <stop offset="0.54" style="stop-color:#4BA54B" /> <stop offset="0.64" style="stop-color:#3D9E3D" /> <stop offset="0.79" style="stop-color:#178B17" /> <stop offset="0.97" style="stop-color:#006C00" /> <stop offset="1" style="stop-color:#006500" /> </linearGradient> <rect x="112.821" y="0.719" fill="url(#SVGID_1_)" stroke="#B3B3B3" stroke-width="0.5" width="13.101" height="50.408" /> <linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="83.0708" y1="76.9197" x2="83.0708" y2="115.9207" gradientTransform="matrix(1 0 0 -1 0 122.105)"> <stop offset="0" style="stop-color:#004C00" /> <stop offset="0.52" style="stop-color:#63B163" /> <stop offset="1" style="stop-color:#006500" /> </linearGradient> <polyline fill="url(#SVGID_2_)" points="53.235,6.184 112.907,6.184 112.907,45.185 102.517,45.185 " /> </g> <g id="Group_Legs"> <linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="52.5283" y1="1094.1335" x2="52.5283" y2="1058.2527" gradientTransform="matrix(1 0 0 1 0 -973.75)"> <stop offset="0" style="stop-color:#319831" /> <stop offset="1" style="stop-color:#006500" /> </linearGradient> <path fill="url(#SVGID_3_)" stroke="#999999" stroke-width="0.396" d="M11.321,120.384l10.254-35.881h61.908l10.252,35.881H72.966 L52.462,89.497l-20.769,30.887H11.321z" /> </g> <g id="Group_LegBase"> <path fill="#319831" stroke="#B3B3B3" stroke-width="0.5" d="M0.76,115.851h37.533v5.254H0.76V115.851z" /> <path fill="#319831" stroke="#B3B3B3" stroke-width="0.5" d="M66.603,115.851h37.929v5.254H66.603V115.851L66.603,115.851z" /> </g> <g id="Group_PumpBody"> <radialGradient id="SVGID_4_" cx="126.48" cy="837.1521" r="51.5659" gradientTransform="matrix(0.9999 0.0069 -0.0069 0.9999 -67.9976 -780.2224)" gradientUnits="userSpaceOnUse"> <stop offset="0.18" style="stop-color:#003200" /> <stop offset="0.26" style="stop-color:#003700" /> <stop offset="0.35" style="stop-color:#004400" /> <stop offset="0.44" style="stop-color:#005B00" /> <stop offset="0.54" style="stop-color:#007A00" /> <stop offset="0.64" style="stop-color:#47A347" /> <stop offset="0.72" style="stop-color:#97CB97" /> <stop offset="0.81" style="stop-color:#61B061" /> <stop offset="0.99" style="stop-color:#006A00" /> <stop offset="1" style="stop-color:#006500" /> </radialGradient> <path fill="url(#SVGID_4_)" d="M53.047,6.158c28.477,0.196,51.402,23.439,51.207,51.917c-0.195,28.475-23.438,51.398-51.914,51.204 C23.862,109.086,0.938,85.841,1.133,57.364C1.326,28.889,24.573,5.963,53.047,6.158z" /> </g> <g id="Group_CenterShade"> <radialGradient id="SVGID_5_" cx="52.4468" cy="-418.7268" r="27.2441" gradientTransform="matrix(1 0 0 -1 0 -360.895)" gradientUnits="userSpaceOnUse"> <stop offset="0" style="stop-color:#000000" /> <stop offset="1" style="stop-color:#003200" /> </radialGradient> <path fill="url(#SVGID_5_)" d="M38.399,81.168C25.508,73.407,21.35,56.67,29.111,43.78c7.762-12.888,24.502-17.045,37.385-9.285 c12.891,7.761,17.047,24.498,9.289,37.393C68.021,84.769,51.286,88.928,38.399,81.168z" /> </g> <g id="Group_Impeller"> <linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="101.9819" y1="125.5398" x2="106.1411" y2="125.5342" gradientTransform="matrix(0.9889 0.1484 0.1484 -0.9889 -69.6528 166.4384)"> <stop offset="0.01" style="stop-color:#006500" /> <stop offset="0.51" style="stop-color:#6FB76F" /> <stop offset="1" style="stop-color:#006500" /> </linearGradient> <path fill="url(#SVGID_6_)" d="M51.014,77.055c-0.642,4.14-2.024,7.351-3.166,7.187c-1.139-0.165-1.545-3.651-0.902-7.789 l0.014-0.081l5.874-37.983c0.64-4.139,1.986-7.314,3.125-7.149c1.142,0.163,1.507,3.623,0.866,7.76L51.014,77.055z" /> <linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="-277.9653" y1="21.0618" x2="-273.8071" y2="21.0562" gradientTransform="matrix(0.6317 -0.7752 -0.7752 -0.6317 243.0495 -142.3917)"> <stop offset="0.01" style="stop-color:#006500" /> <stop offset="0.51" style="stop-color:#6FB76F" /> <stop offset="1" style="stop-color:#006500" /> </linearGradient> <path fill="url(#SVGID_7_)" d="M68.625,68.765c3.234,2.659,5.291,5.485,4.57,6.387c-0.724,0.895-3.931-0.533-7.162-3.193 l-0.063-0.053L36.284,47.493c-3.234-2.66-5.28-5.437-4.559-6.333c0.722-0.898,3.884,0.55,7.117,3.21L68.625,68.765z" /> <linearGradient id="SVGID_8_" gradientUnits="userSpaceOnUse" x1="216.7651" y1="433.1179" x2="220.9233" y2="433.1123" gradientTransform="matrix(0.4225 0.9064 0.9064 -0.4225 -432.8737 42.0522)"> <stop offset="0.01" style="stop-color:#006500" /> <stop offset="0.51" style="stop-color:#6FB76F" /> <stop offset="1" style="stop-color:#006500" /> </linearGradient> <path fill="url(#SVGID_8_)" d="M35.58,67.368c-3.803,1.752-7.245,2.373-7.739,1.332c-0.491-1.041,2.193-3.306,5.994-5.057 l0.076-0.033L68.82,47.527c3.805-1.752,7.195-2.384,7.686-1.345c0.494,1.041-2.188,3.258-5.99,5.008L35.58,67.368z" /> <radialGradient id="SVGID_9_" cx="51.9766" cy="64.4246" r="6.541" gradientTransform="matrix(1 0 0 -1 0 122.105)" gradientUnits="userSpaceOnUse"> <stop offset="0" style="stop-color:#6FB76F" /> <stop offset="0.47" style="stop-color:#6BB56B" /> <stop offset="0.64" style="stop-color:#5DAE5D" /> <stop offset="0.76" style="stop-color:#45A245" /> <stop offset="0.85" style="stop-color:#239123" /> <stop offset="0.94" style="stop-color:#007C00" /> <stop offset="1" style="stop-color:#006500" /> </radialGradient> <path fill="url(#SVGID_9_)" d="M53.274,51.269c3.543,0.718,5.829,4.168,5.11,7.709c-0.717,3.544-4.167,5.83-7.71,5.113 c-3.536-0.719-5.824-4.171-5.105-7.711C46.284,52.844,49.739,50.552,53.274,51.269z" /> </g> </svg>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg version="1.1" id="Layer_1" width="64px" height="64px" viewBox="0 0 125.921 121.105" enable-background="new 0 0 125.921 121.105" xml:space="preserve" sodipodi:docname="Cool pump 45.svg" inkscape:version="1.1 (c68e22c387, 2021-05-23)" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs122" /><sodipodi:namedview id="namedview120" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageshadow="2" inkscape:pageopacity="0.0" inkscape:pagecheckerboard="0" showgrid="false" inkscape:zoom="12.984375" inkscape:cx="32.038508" inkscape:cy="32.038508" inkscape:window-width="1920" inkscape:window-height="1017" inkscape:window-x="-8" inkscape:window-y="-8" inkscape:window-maximized="1" inkscape:current-layer="Layer_1" /> <g id="Group_OutletPort"> <linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="119.3706" y1="-412.0227" x2="119.3706" y2="-361.6145" gradientTransform="matrix(1 0 0 -1 0 -360.895)"> <stop offset="0" style="stop-color:#004C00" id="stop2" /> <stop offset="0.21" style="stop-color:#007000" id="stop4" /> <stop offset="0.54" style="stop-color:#4BA54B" id="stop6" /> <stop offset="0.64" style="stop-color:#3D9E3D" id="stop8" /> <stop offset="0.79" style="stop-color:#178B17" id="stop10" /> <stop offset="0.97" style="stop-color:#006C00" id="stop12" /> <stop offset="1" style="stop-color:#006500" id="stop14" /> </linearGradient> <rect x="112.821" y="0.719" fill="url(#SVGID_1_)" stroke="#B3B3B3" stroke-width="0.5" width="13.101" height="50.408" id="rect17" /> <linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="83.0708" y1="76.9197" x2="83.0708" y2="115.9207" gradientTransform="matrix(1 0 0 -1 0 122.105)"> <stop offset="0" style="stop-color:#004C00" id="stop19" /> <stop offset="0.52" style="stop-color:#63B163" id="stop21" /> <stop offset="1" style="stop-color:#006500" id="stop23" /> </linearGradient> <polyline fill="url(#SVGID_2_)" points="53.235,6.184 112.907,6.184 112.907,45.185 102.517,45.185 " id="polyline26" /> </g> <g id="Group_Legs"> <linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="52.5283" y1="1094.1335" x2="52.5283" y2="1058.2527" gradientTransform="matrix(1 0 0 1 0 -973.75)"> <stop offset="0" style="stop-color:#319831" id="stop29" /> <stop offset="1" style="stop-color:#006500" id="stop31" /> </linearGradient> <path fill="url(#SVGID_3_)" stroke="#999999" stroke-width="0.396" d="M11.321,120.384l10.254-35.881h61.908l10.252,35.881H72.966 L52.462,89.497l-20.769,30.887H11.321z" id="path34" /> </g> <g id="Group_LegBase"> <path fill="#319831" stroke="#B3B3B3" stroke-width="0.5" d="M0.76,115.851h37.533v5.254H0.76V115.851z" id="path37" /> <path fill="#319831" stroke="#B3B3B3" stroke-width="0.5" d="M66.603,115.851h37.929v5.254H66.603V115.851L66.603,115.851z" id="path39" /> </g> <g id="Group_PumpBody"> <radialGradient id="SVGID_4_" cx="126.48" cy="837.1521" r="51.5659" gradientTransform="matrix(0.9999 0.0069 -0.0069 0.9999 -67.9976 -780.2224)" gradientUnits="userSpaceOnUse"> <stop offset="0.18" style="stop-color:#003200" id="stop42" /> <stop offset="0.26" style="stop-color:#003700" id="stop44" /> <stop offset="0.35" style="stop-color:#004400" id="stop46" /> <stop offset="0.44" style="stop-color:#005B00" id="stop48" /> <stop offset="0.54" style="stop-color:#007A00" id="stop50" /> <stop offset="0.64" style="stop-color:#47A347" id="stop52" /> <stop offset="0.72" style="stop-color:#97CB97" id="stop54" /> <stop offset="0.81" style="stop-color:#61B061" id="stop56" /> <stop offset="0.99" style="stop-color:#006A00" id="stop58" /> <stop offset="1" style="stop-color:#006500" id="stop60" /> </radialGradient> <path fill="url(#SVGID_4_)" d="M53.047,6.158c28.477,0.196,51.402,23.439,51.207,51.917c-0.195,28.475-23.438,51.398-51.914,51.204 C23.862,109.086,0.938,85.841,1.133,57.364C1.326,28.889,24.573,5.963,53.047,6.158z" id="path63" /> </g> <g id="Group_CenterShade"> <radialGradient id="SVGID_5_" cx="52.4468" cy="-418.7268" r="27.2441" gradientTransform="matrix(1 0 0 -1 0 -360.895)" gradientUnits="userSpaceOnUse"> <stop offset="0" style="stop-color:#000000" id="stop66" /> <stop offset="1" style="stop-color:#003200" id="stop68" /> </radialGradient> <path fill="url(#SVGID_5_)" d="M38.399,81.168C25.508,73.407,21.35,56.67,29.111,43.78c7.762-12.888,24.502-17.045,37.385-9.285 c12.891,7.761,17.047,24.498,9.289,37.393C68.021,84.769,51.286,88.928,38.399,81.168z" id="path71" /> </g> <g id="Group_Impeller" transform="rotate(30,52.173848,57.740931)"> <linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="101.9819" y1="125.5398" x2="106.1411" y2="125.5342" gradientTransform="matrix(0.9889,0.1484,0.1484,-0.9889,-69.6528,166.4384)"> <stop offset="0.01" style="stop-color:#006500" id="stop74" /> <stop offset="0.51" style="stop-color:#6FB76F" id="stop76" /> <stop offset="1" style="stop-color:#006500" id="stop78" /> </linearGradient> <path fill="url(#SVGID_6_)" d="m 51.014,77.055 c -0.642,4.14 -2.024,7.351 -3.166,7.187 -1.139,-0.165 -1.545,-3.651 -0.902,-7.789 l 0.014,-0.081 5.874,-37.983 c 0.64,-4.139 1.986,-7.314 3.125,-7.149 1.142,0.163 1.507,3.623 0.866,7.76 z" id="path81" style="fill:url(#SVGID_6_)" /> <linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="-277.9653" y1="21.0618" x2="-273.8071" y2="21.0562" gradientTransform="matrix(0.6317,-0.7752,-0.7752,-0.6317,243.0495,-142.3917)"> <stop offset="0.01" style="stop-color:#006500" id="stop83" /> <stop offset="0.51" style="stop-color:#6FB76F" id="stop85" /> <stop offset="1" style="stop-color:#006500" id="stop87" /> </linearGradient> <path fill="url(#SVGID_7_)" d="m 68.625,68.765 c 3.234,2.659 5.291,5.485 4.57,6.387 -0.724,0.895 -3.931,-0.533 -7.162,-3.193 L 65.97,71.906 36.284,47.493 c -3.234,-2.66 -5.28,-5.437 -4.559,-6.333 0.722,-0.898 3.884,0.55 7.117,3.21 z" id="path90" style="fill:url(#SVGID_7_)" /> <linearGradient id="SVGID_8_" gradientUnits="userSpaceOnUse" x1="216.76511" y1="433.11789" x2="220.92329" y2="433.1123" gradientTransform="matrix(0.4225,0.9064,0.9064,-0.4225,-432.8737,42.0522)"> <stop offset="0.01" style="stop-color:#006500" id="stop92" /> <stop offset="0.51" style="stop-color:#6FB76F" id="stop94" /> <stop offset="1" style="stop-color:#006500" id="stop96" /> </linearGradient> <path fill="url(#SVGID_8_)" d="m 35.58,67.368 c -3.803,1.752 -7.245,2.373 -7.739,1.332 -0.491,-1.041 2.193,-3.306 5.994,-5.057 L 33.911,63.61 68.82,47.527 c 3.805,-1.752 7.195,-2.384 7.686,-1.345 0.494,1.041 -2.188,3.258 -5.99,5.008 z" id="path99" style="fill:url(#SVGID_8_)" /> <radialGradient id="SVGID_9_" cx="51.976601" cy="64.424599" r="6.5409999" gradientTransform="matrix(1,0,0,-1,0,122.105)" gradientUnits="userSpaceOnUse"> <stop offset="0" style="stop-color:#6FB76F" id="stop101" /> <stop offset="0.47" style="stop-color:#6BB56B" id="stop103" /> <stop offset="0.64" style="stop-color:#5DAE5D" id="stop105" /> <stop offset="0.76" style="stop-color:#45A245" id="stop107" /> <stop offset="0.85" style="stop-color:#239123" id="stop109" /> <stop offset="0.94" style="stop-color:#007C00" id="stop111" /> <stop offset="1" style="stop-color:#006500" id="stop113" /> </radialGradient> <path fill="url(#SVGID_9_)" d="m 53.274,51.269 c 3.543,0.718 5.829,4.168 5.11,7.709 -0.717,3.544 -4.167,5.83 -7.71,5.113 -3.536,-0.719 -5.824,-4.171 -5.105,-7.711 0.715,-3.536 4.17,-5.828 7.705,-5.111 z" id="path116" style="fill:url(#SVGID_9_)" /> </g> </svg>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359RSSVGThreadImage屬性設定
雙擊建立的控制元件,打開圖形選擇界面,在界面種選擇圖形,其中泵型別的圖形位於Pumps
分組中,管道型別的位於Pipes
分組中,閥門位於Valves
分組中,可根據需求自行選擇與組合。
本示例中的部分圖形是根據相簿中的範例圖形進行顏色變更、旋轉、映象翻轉等操作後生成的。不能直接使用,可點選[SVG編輯...]
按鈕,打開編輯器進行自定義編輯的操作。
# 3. 程式設計
# 3.1. 程式初始設定
該程式無初始設定。
# 3.2. 事件設定
- 7:AbDBToggleSwitch1-OnClick事件設定
點選以切換一號機組的開關顯示。
procedure TMyHandler.AbDBToggleSwitch1Click;
//一號機組
begin
if FThis.AbDBToggleSwitch1.Checked then
begin
FThis.SVGThreadImage33.ThreadEnabled := True;
FThis.AbDBLED1.Checked := True;
end
else
begin
FThis.SVGThreadImage33.ThreadEnabled := False;
FThis.AbDBLED1.Checked := False;
end;
if (FThis.SVGThreadImage33.ThreadEnabled) or (FThis.SVGThreadImage44.ThreadEnabled) then
begin
FThis.SVGThreadImage16.ThreadEnabled := True;
FThis.SVGThreadImage31.ThreadEnabled := True;
FThis.AbDBLED5.Checked := True;
FThis.AbDBLED8.Checked := True;
end
else
begin
FThis.SVGThreadImage16.ThreadEnabled := False;
FThis.SVGThreadImage31.ThreadEnabled := False;
FThis.AbDBLED5.Checked := False;
FThis.AbDBLED8.Checked := False;
end;
end;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
- 8:AbDBToggleSwitch2-OnClick事件設定
點選以切換二號機組的開關顯示。
procedure TMyHandler.AbDBToggleSwitch2Click;
//二號機組
begin
if FThis.AbDBToggleSwitch2.Checked then
begin
FThis.SVGThreadImage44.ThreadEnabled := True;
FThis.AbDBLED2.Checked := True;
end
else
begin
FThis.SVGThreadImage44.ThreadEnabled := False;
FThis.AbDBLED2.Checked := False;
end;
if (FThis.SVGThreadImage33.ThreadEnabled) or (FThis.SVGThreadImage44.ThreadEnabled) then
begin
FThis.SVGThreadImage16.ThreadEnabled := True;
FThis.SVGThreadImage31.ThreadEnabled := True;
FThis.AbDBLED5.Checked := True;
FThis.AbDBLED8.Checked := True;
end
else
begin
FThis.SVGThreadImage16.ThreadEnabled := False;
FThis.SVGThreadImage31.ThreadEnabled := False;
FThis.AbDBLED5.Checked := False;
FThis.AbDBLED8.Checked := False;
end;
end;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
- 11:AbDBToggleSwitch3-OnClick事件設定
點選以切換三號機組的開關顯示。
procedure TMyHandler.AbDBToggleSwitch3Click;
//三號機組
begin
if FThis.AbDBToggleSwitch3.Checked then
begin
FThis.SVGThreadImage74.ThreadEnabled := True;
FThis.AbDBLED3.Checked := True;
end
else
begin
FThis.SVGThreadImage74.ThreadEnabled := False;
FThis.AbDBLED3.Checked := False;
end;
if (FThis.SVGThreadImage74.ThreadEnabled) or (FThis.SVGThreadImage70.ThreadEnabled) then
begin
FThis.SVGThreadImage2.ThreadEnabled := True;
FThis.SVGThreadImage67.ThreadEnabled := True;
FThis.AbDBLED6.Checked := True;
FThis.AbDBLED7.Checked := True;
end
else
begin
FThis.SVGThreadImage2.ThreadEnabled := False;
FThis.SVGThreadImage67.ThreadEnabled := False;
FThis.AbDBLED6.Checked := False;
FThis.AbDBLED7.Checked := False;
end;
end;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
- 12:AbDBToggleSwitch4-OnClick事件設定
點選以切換四號機組的開關顯示。
procedure TMyHandler.AbDBToggleSwitch4Click;
//四號機組
begin
if FThis.AbDBToggleSwitch4.Checked then
begin
FThis.SVGThreadImage70.ThreadEnabled := True;
FThis.AbDBLED4.Checked := True;
end
else
begin
FThis.SVGThreadImage70.ThreadEnabled := False;
FThis.AbDBLED4.Checked := False;
end;
if (FThis.SVGThreadImage74.ThreadEnabled) or (FThis.SVGThreadImage70.ThreadEnabled) then
begin
FThis.SVGThreadImage2.ThreadEnabled := True;
FThis.SVGThreadImage67.ThreadEnabled := True;
FThis.AbDBLED6.Checked := True;
FThis.AbDBLED7.Checked := True;
end
else
begin
FThis.SVGThreadImage2.ThreadEnabled := False;
FThis.SVGThreadImage67.ThreadEnabled := False;
FThis.AbDBLED6.Checked := False;
FThis.AbDBLED7.Checked := False;
end;
end;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# 4. 運行結果
使用滑鼠點選工具欄運行(Run),測試運行結果。
通過工具欄儲存,將程式儲存為 sdb 專案檔案。
當開啟機組的開關時,泵的指示燈亮,同時泵的扇葉開始轉動。