Commit 370ee2d5 by wangonghui

提交修改Clock代码

parent e06f9c9a
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="650"> d:DesignHeight="300" d:DesignWidth="650">
<Grid> <Grid VerticalAlignment="Top">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="500"/> <ColumnDefinition Width="500"/>
<ColumnDefinition Width="150"/> <ColumnDefinition Width="150"/>
...@@ -14,13 +14,13 @@ ...@@ -14,13 +14,13 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Height="300"> <StackPanel Height="300" >
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="150"/> <RowDefinition Height="150"/>
<RowDefinition Height="80"/> <RowDefinition Height="80"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<StackPanel Grid.Row="0"> <StackPanel Grid.Row="0">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
...@@ -29,10 +29,10 @@ ...@@ -29,10 +29,10 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition/> <ColumnDefinition Width="100"/>
<ColumnDefinition/> <ColumnDefinition Width="150"/>
<ColumnDefinition/> <ColumnDefinition Width="100"/>
<ColumnDefinition/> <ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
...@@ -78,8 +78,8 @@ ...@@ -78,8 +78,8 @@
<Button Content="START" Height="40" Width="75" Grid.Column="0" Command="{Binding StartCommand}"/> <Button Content="START" Height="40" Width="75" Grid.Column="0" Command="{Binding StartCommand}"/>
<Button Content="STOP" Height="40" Width="75" Grid.Column="1" Command="{Binding StopCommand}"/> <Button Content="STOP" Height="40" Width="75" Grid.Column="1" Command="{Binding StopCommand}"/>
<Button Content="CONT" Height="40" Width="75" Grid.Column="2" Command="{Binding ContCommand}"/> <Button Content="CONT" Height="40" Width="75" Grid.Column="2" Command="{Binding ContCommand}"/>
<Button Content="FREEZE" Height="40" Width="70" Grid.Column="3" Command="{Binding FreezeCommand}"/> <Button Content="FREEZE" Height="40" Width="70" Grid.Column="3" Command="{Binding FreezeCommand}" Visibility="Hidden"/>
<Button Content="UNFREEZE" Height="40" Grid.Column="4" Command="{Binding UnFreezeCommand}"/> <Button Content="UNFREEZE" Height="40" Grid.Column="4" Command="{Binding UnFreezeCommand}" Visibility="Hidden"/>
</Grid> </Grid>
</GroupBox> </GroupBox>
......
...@@ -29,7 +29,7 @@ namespace VIZ.Package.Module ...@@ -29,7 +29,7 @@ namespace VIZ.Package.Module
public override string GetFieldValue() public override string GetFieldValue()
{ {
throw new NotImplementedException(); return this.ControlField.Value;
} }
...@@ -67,6 +67,17 @@ namespace VIZ.Package.Module ...@@ -67,6 +67,17 @@ namespace VIZ.Package.Module
/// </summary> /// </summary>
private void Start() 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");
}
} }
...@@ -80,6 +91,17 @@ namespace VIZ.Package.Module ...@@ -80,6 +91,17 @@ namespace VIZ.Package.Module
/// </summary> /// </summary>
private void Stop() 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");
}
} }
...@@ -93,7 +115,17 @@ namespace VIZ.Package.Module ...@@ -93,7 +115,17 @@ namespace VIZ.Package.Module
/// </summary> /// </summary>
private void Cont() private void Cont()
{ {
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 CONT");
}
} }
/// <summary> /// <summary>
/// 冻结命令 /// 冻结命令
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment