Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VIZ.Package
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘龙飞
VIZ.Package
Commits
6135859d
Commit
6135859d
authored
Mar 31, 2023
by
wangonghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设置字体颜色功能开发
parent
2ee39501
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
31 deletions
+39
-31
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ClockEdit/ClockEditPanelModel.cs
+14
-22
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ColorEdit/ColorEditPanel.xaml
+13
-7
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ColorEdit/ColorEditPanelModel.cs
+0
-0
VIZ.Package.Service/Viz/VizCommandControlObjectService.cs
+12
-2
No files found.
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ClockEdit/ClockEditPanelModel.cs
View file @
6135859d
...
...
@@ -67,17 +67,8 @@ namespace VIZ.Package.Module
/// </summary>
private
void
Start
()
{
var
pageModel
=
ApplicationDomainEx
.
CurrentPage
as
PageModel
;
ConnGroupModel
group
=
ApplicationDomainEx
.
ConnGroups
.
FirstOrDefault
(
p
=>
p
.
GroupID
==
pageModel
.
ConnGroupID
);
foreach
(
var
item
in
group
.
Items
)
{
if
(!
item
.
IsEnabled
||
!
item
.
IsConnected
)
continue
;
item
.
EndpointManager
.
Send
(
"CLOCK0 START"
);
}
SendTakeCmd
(
"CLOCK0 START"
);
}
...
...
@@ -91,17 +82,8 @@ namespace VIZ.Package.Module
/// </summary>
private
void
Stop
()
{
var
pageModel
=
ApplicationDomainEx
.
CurrentPage
as
PageModel
;
ConnGroupModel
group
=
ApplicationDomainEx
.
ConnGroups
.
FirstOrDefault
(
p
=>
p
.
GroupID
==
pageModel
.
ConnGroupID
);
foreach
(
var
item
in
group
.
Items
)
{
if
(!
item
.
IsEnabled
||
!
item
.
IsConnected
)
continue
;
item
.
EndpointManager
.
Send
(
"CLOCK0 STOP"
);
}
SendTakeCmd
(
"CLOCK0 STOP"
);
}
...
...
@@ -115,6 +97,16 @@ namespace VIZ.Package.Module
/// </summary>
private
void
Cont
()
{
SendTakeCmd
(
"CLOCK0 CONT"
);
}
/// <summary>
/// Viz发送命令Take命令行
/// </summary>
/// <param name="cmd"></param>
private
void
SendTakeCmd
(
string
cmd
)
{
var
pageModel
=
ApplicationDomainEx
.
CurrentPage
as
PageModel
;
ConnGroupModel
group
=
ApplicationDomainEx
.
ConnGroups
.
FirstOrDefault
(
p
=>
p
.
GroupID
==
pageModel
.
ConnGroupID
);
...
...
@@ -124,7 +116,7 @@ namespace VIZ.Package.Module
if
(!
item
.
IsEnabled
||
!
item
.
IsConnected
)
continue
;
item
.
EndpointManager
.
Send
(
"CLOCK0 CONT"
);
item
.
EndpointManager
.
Send
(
cmd
);
}
}
/// <summary>
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ColorEdit/ColorEditPanel.xaml
View file @
6135859d
...
...
@@ -7,7 +7,7 @@
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
mc:Ignorable="d"
x:Name="colorEditControl"
d:DesignHeight="300" d:DesignWidth="
38
0">
d:DesignHeight="300" d:DesignWidth="
40
0">
<UserControl.Resources>
<dx:ColorToBrushConverter x:Key="ColorToBrushConverter" />
...
...
@@ -53,7 +53,7 @@
</DataTemplate>
</UserControl.Resources>
<Grid>
<Grid
VerticalAlignment="Top"
>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="40"/>
...
...
@@ -71,7 +71,7 @@
<ColumnDefinition Width="85"/>
<ColumnDefinition Width="85"/>-->
<ColumnDefinition Width="340"/>
<ColumnDefinition Width="
4
0"/>
<ColumnDefinition Width="
6
0"/>
</Grid.ColumnDefinitions>
<dxe:ButtonEdit ShowText="False" AllowDefaultButton="False" IsEnabled="{Binding BtnGroupEnable,Mode=TwoWay}">
...
...
@@ -82,7 +82,7 @@
</dxe:ButtonEdit>
<CheckBox Content="
E
" Margin="10,0,0,0"
<CheckBox Content="
启用
" Margin="10,0,0,0"
ToolTip="Title Safe"
IsChecked="{Binding Path=IsEnabledAll,Mode=TwoWay}" Grid.Column="4">
</CheckBox>
...
...
@@ -124,7 +124,11 @@
<ColumnDefinition Width="80"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="Shininess" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<dxe:TextEdit Grid.Column="1" Text="{Binding Path=Shininess,Mode=TwoWay}" HorizontalAlignment="Left" Height="30" Width="80" VerticalAlignment="Center"/>
<dxe:TextEdit Grid.Column="1"
Text="{Binding Path=Shininess,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
HorizontalAlignment="Left" Height="30" Width="80"
Mask="[0-9]\d?|100" MaskType="RegEx" MaskUseAsDisplayFormat="True" ShowError="False"
VerticalAlignment="Center"/>
</Grid>
</WrapPanel>
...
...
@@ -139,8 +143,10 @@
<ColumnDefinition Width="80"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="Alpha" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<dxe:TextEdit Grid.Column="1" Text="{Binding Path=Alpha,Mode=TwoWay}" HorizontalAlignment="Left" Width="80" Height="30" VerticalAlignment="Center"/>
<dxe:TextEdit Grid.Column="1" Text="{Binding Path=Alpha,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left" Width="80" Height="30" ShowError="False"
VerticalAlignment="Center" Mask="[0-9]\d?|100" MaskType="RegEx"
MaskUseAsDisplayFormat="True"/>
</Grid>
</WrapPanel>
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ColorEdit/ColorEditPanelModel.cs
View file @
6135859d
This diff is collapsed.
Click to expand it.
VIZ.Package.Service/Viz/VizCommandControlObjectService.cs
View file @
6135859d
...
...
@@ -333,6 +333,16 @@ namespace VIZ.Package.Service
conn
.
EndpointManager
.
Send
(
str
);
}
/// <summary>
/// 设置时钟的发送命令字符串
/// </summary>
/// <param name="conn"></param>
/// <param name="scene"></param>
/// <param name="treeNodePath"></param>
/// <param name="fieldIdentifier"></param>
/// <param name="upValue"></param>
/// <param name="downValue"></param>
/// <param name="cmd"></param>
public
void
SetControlObjectClockCmd
(
ConnModel
conn
,
VizScene
scene
,
string
treeNodePath
,
string
fieldIdentifier
,
string
upValue
,
string
downValue
,
string
cmd
)
{
string
str
=
$"
{
scene
}
*TREE*
{
treeNodePath
}
*FUNCTION*ControlObject*in SET ON
{
fieldIdentifier
}
SET *TIME SET
{
upValue
}
,*LIMIT SET
{
downValue
}
,*DIRECTION SET
{
cmd
}
"
;
...
...
@@ -597,8 +607,8 @@ namespace VIZ.Package.Service
if
(
type
==
"clock"
)
return
VizControlFieldType
.
clock
;
//
if (type == "color")
//
return VizControlFieldType.color;
if
(
type
==
"color"
)
return
VizControlFieldType
.
color
;
return
VizControlFieldType
.
none
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment