⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 controls.xml

📁 cShap控制云台运动
💻 XML
📖 第 1 页 / 共 5 页
字号:
<?xml version="1.0" encoding="utf-8"?>
<vg version="702" gridsize="10" activesheetIndex="1" range="0,0,1024,712" backcolor="$8000000F">
<page name="Page" bounds="0,0,793.70088,1122.141863" visible="false"/>
<sheet name="Static" bounds="0,0,40,16">
<text name="Text1" bounds="0,0,40,16" origin="4,10" backcolor="$8000000F" autosize="true" border="$0" fontname="瀹嬩綋" fontsize="12" fontcolor="$80000008" wordwrap="false" multiline="false" textalign="4" text="Static"/>
<programe>
property Caption read GetCaption write SetCaption
property Enable read GetEnable write SetEnable editor Bool
property FocusedUnit read FFocusedUnit write FFocusedUnit editor GetFocusedUnit
private function GetCaption()
return Text1.Text
end function
private function GetEnable()
return Enabled
end function
public function GetFocusedUnit()
i=0
FocusedUnits.Clear()
while i &lt; Parent.UnitCount
  d = Parent.Units[i]
  if d.HasProperty( &quot;Focused&quot; ) then
    FocusedUnits[FocusedUnits.Count] = d.Name
  end if
  i = i + 1
wend
return FocusedUnits
end function
private function Initialize(Sender)
FFocusedUnit = &quot;&quot;
FocusedUnits = Array( 10 )
end function
private function SetCaption(AValue)
Text1.Text = AValue
Refresh()
end function
private function SetEnable(AValue)
if AValue
  Text1.FontColor = $80000008
else
  Text1.FontColor = $80000011
end if
Enabled = AValue
end function
</programe>
</sheet>
<sheet name="ListBox" bounds="1,1,226,20" origin="260,122">
<borderB name="Element1" bounds="1,1,223,19" origin="196,234">
<rect name="rect1" bounds="1,1,223,19" origin="65,25" linecolor="$80000006" pattern="1"/>
</borderB>
<element name="Item1" bounds="2,2,226,17" origin="150.5,96.75" visible="false" protect="32" Focused="false" Selected="false">
<text name="Text1" bounds="2,2,226,17" origin="148,20" linecolor="$80000005" backcolor="$80000005" pattern="1" fontname="瀹嬩綋" fontsize="12" fontcolor="$80000008" wordwrap="false" textalign="4"/>
<rect name="Rect2" bounds="2,2,226,17" origin="86.5,-33.5" linetype="0" linewidth="0" backcolor="$80000005"/>
<programe>
property Focused read FFocused write SetFocused editor bool
private function GetValue()
return Text1.Text
end function
private function Initialize(Sender)
FSelected = false
FFocused = false
end function
private function OnResize(Sender)
Rect2.SetBounds( Left, Top, Width, Height )
Text1.SetBounds( Left,Top,Width,Height)
end function
property Selected read FSelected write SetSelected editor Bool
private function SetFocused(AValue)
FFocused = AValue
if FFocused then
  Rect2.LineType = 15
else
  Rect2.LineType = 0
end if
end function
private function SetSelected(AValue)
FSelected = AValue
if FSelected then
  Text1.BackColor = $8000000D
  Text1.LineColor = $8000000D
	Text1.FontColor = $8000000E
else
	Text1.BackColor = $80000005
  Text1.LineColor = $80000005
	Text1.FontColor = $80000008
end if
end function
private function SetValue(AValue)
Text1.Text = AValue
end function
property Value read FValue write SetValue
</programe>
</element>
<VScrollBar name="VScrollBar1" bounds="208,1,225,18" origin="216.5,72" visible="false" Enable="true" Max="100" Page="10" Pos="0">
<rect name="Line1" bounds="208,1,225,10" origin="256,29" linetype="0" backcolor="$80000000" frontcolor="$80000014" pattern="8">
<programe>
published function OnLButtonDown(Sender,X,Y)
if Y &gt; Element3.Top then
  Line2.SetBounds( Line1.Left, Element3.Top + Element3.Height, Line1.Width, Element1.Top - Element3.Top - Element3.Height )
  Line1.Tag = 1
else
  Line2.SetBounds( Line1.Left, Line1.Top, Line1.Width, Element3.Top - Line1.Top )
  Line1.Tag = -1
end if
Line2.Visible = true
SetPos( FPos + Line1.Tag * FPage )
FTimerInterval = 300
FTimer=CreateTimer( this, &quot;OnTimer&quot;, FTimerInterval )
end function
published function OnLButtonUp(Sender,X,Y)
Line2.Visible = false
OnDestroy( Sender )
end function
</programe>
</rect>
<rect name="Line2" bounds="208,1,225,1" origin="256,35" visible="false" linetype="0" backcolor="$80000010" pattern="1">
<programe>
published function OnLButtonDown(Sender,X,Y)
FTimer=CreateTimer(this,&quot;OnTimer&quot;,100)
if Y &gt; Element3.Top then
	Sender.Id = FPage
else
	Sender.Id = -FPage
end if
Sender.Tag=Y
end function
published function OnLButtonUp(Sender,X,Y)
if FTimer &lt;&gt; 0 then
	DestroyTimer(FTimer)
  FTimer = 0
end if
end function
</programe>
</rect>
<element name="Element3" bounds="208,1,224,17" origin="216,28" visible="false" protect="32">
<line name="Line5" origin="216,9" linecolor="$80000016">
<points>
208,17,6
208,1,2
224,1,2
</points>
</line>
<line name="Line6" origin="216,9" linecolor="$80000015">
<points>
208,17,6
224,17,2
224,1,2
</points>
</line>
<line name="Line7" origin="217,10" linecolor="$80000014">
<points>
209,16.111111,6
209,1.888889,2
223,1.888889,2
</points>
</line>
<line name="Line8" origin="217,10" linecolor="$80000010">
<points>
209,16.111111,6
223,16.111111,2
223,1.888889,2
</points>
</line>
<rect name="Rect2" bounds="210,2.777778,222,15.222222" origin="216,10" linecolor="$8000000F" backcolor="$8000000F" pattern="1"/>
<programe>
published function OnLButtonDown(Sender,X,Y)
Sender.Tag=Y-Sender.Top
end function
published function OnLButtonUp(Sender,X,Y)
Sender.Tag=0
end function
published function OnMouseMove(Sender,X,Y)
if Sender.Tag &gt; 0 then
  SetPos( ( Y - Sender.Tag - Line1.Top ) / ( Line1.Height - Sender.Height ) * FMax )
end if
end function
</programe>
</element>
<element name="Element1" bounds="208,10,224,18" origin="216,132" protect="32" Enable="true">
<line name="Line5" origin="216,18.5" linecolor="$80000016">
<points>
208,18,6
208,10,2
224,10,2
</points>
</line>
<line name="Line6" origin="216,18.5" linecolor="$80000015">
<points>
208,18,6
224,18,2
224,10,2
</points>
</line>
<line name="Line7" origin="217,19.5" linecolor="$80000014">
<points>
209,17.555556,6
209,10.444444,2
223,10.444444,2
</points>
</line>
<line name="Line8" origin="217,19.5" linecolor="$80000010">
<points>
209,17.555556,6
223,17.555556,2
223,10.444444,2
</points>
</line>
<rect name="Rect2" bounds="210,10.888889,222,17.111111" origin="216,19.5" linecolor="$8000000F" backcolor="$8000000F" pattern="1"/>
<line name="Line9" origin="216,21.5" linecolor="$80000012" backcolor="$80000012" pattern="1">
<points>
216,14.888889,6
219,13.555556,2
213,13.555556,3
</points>
</line>
<programe>
property Enable read GetEnable write SetEnable editor Bool
private function GetEnable()
return Enabled
end function
private function Initialize(Sender)
FTimer=0
FTimerInterval = 300
end function
published function OnClick(Sender)
SetPos( FPos + 1 )
end function
private function OnDestroy(Sender)
if FTimer &lt;&gt; 0 then
  DestroyTimer( FTimer )
  FTimer = 0
end if
end function
private function OnLButtonDown(Sender,X,Y)
Line7.LineColor = $80000010
Line8.LineColor = $80000014
FTimerInterval = 300
FTimer=CreateTimer( Sender, &quot;OnTimer&quot;, FTimerInterval )
end function
private function OnLButtonUp(Sender,X,Y)
Line7.LineColor = $80000014
Line8.LineColor = $80000010
OnDestroy( Sender )
end function
private function OnTimer(Sender)
OnClick( Sender )
if FTimerInterval = 300 then
	OnDestroy( Sender )
	FTimerInterval = 100
	FTimer=CreateTimer( Sender, &quot;OnTimer&quot;, FTimerInterval )
end if
end function
private function SetEnable(AValue)
if AValue then
  Line9.BackColor = $80000012
  Line9.LineColor = $80000012
else
  Line9.BackColor = $80000011
  Line9.LineColor = $80000011
end if
Enabled = AValue
end function
</programe>
</element>
<element name="Element2" bounds="208,1,224,9" origin="216,18" protect="32" Enable="true">
<line name="Line5" origin="216,9.5" linecolor="$80000016">
<points>
208,9,6
208,1,2
224,1,2
</points>
</line>
<line name="Line6" origin="216,9.5" linecolor="$80000015">
<points>
208,9,6
224,9,2
224,1,2
</points>
</line>
<line name="Line7" origin="217,10.5" linecolor="$80000014">
<points>
209,8.555556,6
209,1.444444,2
223,1.444444,2
</points>
</line>
<line name="Line8" origin="217,10.5" linecolor="$80000010">
<points>
209,8.555556,6
223,8.555556,2
223,1.444444,2
</points>
</line>
<rect name="Rect2" bounds="210,1.888889,222,8.111111" origin="216,10.5" linecolor="$8000000F" backcolor="$8000000F" pattern="1"/>
<line name="Line9" origin="216,9.5" linecolor="$80000012" backcolor="$80000012" pattern="1">
<points>
216,4.555556,6
219,5.888889,2
213,5.888889,3
</points>
</line>
<programe>
property Enable read GetEnable write SetEnable editor Bool
private function GetEnable()
return Enabled
end function
private function Initialize(Sender)
FTimer=0
FTimerInterval = 300
end function
published function OnClick(Sender)
SetPos( FPos - 1 )
end function
private function OnDestroy(Sender)
if FTimer &lt;&gt; 0 then
  DestroyTimer( FTimer )
  FTimer = 0
end if
end function
private function OnLButtonDown(Sender,X,Y)
Line7.LineColor = $80000010
Line8.LineColor = $80000014
FTimerInterval = 300
FTimer=CreateTimer( Sender, &quot;OnTimer&quot;, FTimerInterval )
end function
private function OnLButtonUp(Sender,X,Y)
Line7.LineColor = $80000014
Line8.LineColor = $80000010
OnDestroy( Sender )
end function
private function OnTimer(Sender)
OnClick( Sender )
if FTimerInterval = 300 then
	OnDestroy( Sender )
	FTimerInterval = 100
	FTimer=CreateTimer( Sender, &quot;OnTimer&quot;, FTimerInterval )
end if
end function
private function SetEnable(AValue)
if AValue then
  Line9.BackColor = $80000012
  Line9.LineColor = $80000012
else
  Line9.BackColor = $80000011
  Line9.LineColor = $80000011
end if
Enabled = AValue
end function
</programe>
</element>
<programe>
property Enable read GetEnable write SetEnable editor Bool
private function GetEnable()
return Enabled
end function
private function Initialize(Sender)
FPos=0
FPage=10
FMax=100
FTimer=0
FTimerInterval = 300
end function
property Max read FMax write SetMax
published function OnChange(Sender)
if IsLoaded() then
  i=0
  j=VScrollBar1.Pos
  while i &lt; Group1.UnitCount
    AUnit = Group1.Units[i]
    if i + j &lt; ar.Count then
      AUnit.Visible = true
      AUnit.Units[0].Text = ar[i + j]
    else
      AUnit.Visible = false
      AUnit.Units[0].Text = &quot;&quot;
    end if
    AUnit.Selected = ( i + j = FItemIndex )
    if AUnit.Selected and FFocused then
      AUnit.Focused = true
    else
      AUnit.Focused = false
    end if
    i = i + 1
  wend
end if
end function
published function OnClick(Sender)
&apos;
end function
private function OnDestroy(Sender)
if FTimer &lt;&gt; 0 then
  DestroyTimer( FTimer )
  FTimer = 0
end if
end function
private function OnResize(Sender)
if Height &lt;= 32 then
  h = ( Height - 1 ) / 2
  Element1.SetBounds( Left, Top+Height-h, Element1.Width, h )
  Element2.SetBounds( Left, Top, Element2.Width, h )
else
  Element1.SetBounds( Left, Top + Height - 16, Element1.Width, 16 )
  Element2.SetBounds( Left, Top, Element2.Width, 16 )
end if
Element3.Visible = Height &gt;= 48
if Element3.Visible then
  Element3.Top = Element2.Top + Element2.Height
else
  Element3.Top = Element2.Top
end if
Line1.SetBounds( Left, Element3.Top, Line1.Width, Element1.Top - Element3.Top )
Line2.SetBounds( Line1.Left, Line1.Top, Line1.Width, Line1.Height )
SetPos( FPos )
end function
private function OnTimer(Sender)
SetPos( FPos + Line1.Tag * FPage )
p = Point( 0, 0 )
GetCursorPos( p )
ScreenToClient( p )
ClientToView( p )
stop = false
if Line1.Tag &gt; 0 then
  if p.y &lt; Element3.Top + Element3.Height then
    stop = true
  end if
else
  if p.y &gt; Element3.Top then
    stop = true
  end if
end if
if stop then
  OnDestroy( Sender )
  Line2.Visible = false
else if FTimerInterval = 300 then
  OnDestroy( Sender )
  FTimerInterval = 100
  FTimer = CreateTimer( Sender, &quot;OnTimer&quot;, FTimerInterval )
end if
end function
property Page read FPage write SetPage

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -