Commit 51dc32ec authored by 潘栩锋's avatar 潘栩锋 🚴

1.添加 吸料的寄存器地址表

2.修改 称重服务器画面
parent 05ac8097
<NavigationWindow x:Class="FLY.Weight.UI.Server.MainWindow" <NavigationWindow x:Class="FLY.Weight.UI.Server.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" ResizeMode="NoResize" SizeToContent="WidthAndHeight" MinWidth="400" MinHeight="200" Title="MainWindow" SizeToContent="WidthAndHeight" MinWidth="400" MinHeight="200"
ShowsNavigationUI="False" ShowsNavigationUI="False"
Loaded="NavigationWindow_Loaded"> Loaded="NavigationWindow_Loaded">
</NavigationWindow> </NavigationWindow>
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:FLY.Weight.UI.Server" xmlns:local="clr-namespace:FLY.Weight.UI.Server"
mc:Ignorable="d" mc:Ignorable="d"
Title="PgMain" Height="270" Width="765"> Title="PgMain" MinHeight="270" Width="765">
<Page.Resources> <Page.Resources>
<local:PgMainVmUt x:Key="viewModel"/> <local:PgMainVmUt x:Key="viewModel"/>
</Page.Resources> </Page.Resources>
...@@ -15,8 +15,6 @@ ...@@ -15,8 +15,6 @@
<RowDefinition Height="auto"/> <RowDefinition Height="auto"/>
<RowDefinition/> <RowDefinition/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid x:Name="grid_plc"/>
<Grid x:Name="grid_plcos"/>
<Grid x:Name="grid_WeightSystem"/> <Grid x:Name="grid_WeightSystem"/>
<Grid Margin="5"> <Grid Margin="5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
...@@ -36,8 +34,8 @@ ...@@ -36,8 +34,8 @@
</Grid> </Grid>
<Grid Grid.Row="1"> <Grid Grid.Row="1">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition/> <ColumnDefinition />
<ColumnDefinition/> <ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<GroupBox Header="称重"> <GroupBox Header="称重">
<Grid> <Grid>
...@@ -45,7 +43,8 @@ ...@@ -45,7 +43,8 @@
<RowDefinition/> <RowDefinition/>
<RowDefinition Height="auto"/> <RowDefinition Height="auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<ItemsControl x:Name="itemcontrol" ItemsSource="{Binding PLCs}"> <ScrollViewer>
<ItemsControl x:Name="itemcontrol_weighter" >
<ItemsControl.ItemTemplate> <ItemsControl.ItemTemplate>
<DataTemplate> <DataTemplate>
<StackPanel> <StackPanel>
...@@ -81,18 +80,20 @@ ...@@ -81,18 +80,20 @@
</DataTemplate> </DataTemplate>
</ItemsControl.ItemTemplate> </ItemsControl.ItemTemplate>
</ItemsControl> </ItemsControl>
</ScrollViewer>
<StackPanel Grid.Row="1" Orientation="Horizontal"> <StackPanel Grid.Row="1" Orientation="Horizontal">
<Button Content="配置" Padding="20,5" Margin="5" HorizontalAlignment="Left" Click="btnSetupClick"></Button> <Button Content="称重配置" Padding="20,5" Margin="5" HorizontalAlignment="Left" Click="btnSetupClick"></Button>
<Button x:Name="btnFeederSetup" Content="吸料配置" Padding="20,5" Margin="5" HorizontalAlignment="Left" Click="btnFeederSetupClick"></Button>
</StackPanel> </StackPanel>
</Grid> </Grid>
</GroupBox> </GroupBox>
<GroupBox Header="吸料" Grid.Column="1"> <GroupBox x:Name="grpFeeder" Header="吸料" Grid.Column="1">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition/> <RowDefinition/>
<RowDefinition Height="auto"/> <RowDefinition Height="auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<ItemsControl x:Name="itemcontrol_feeder" ItemsSource="{Binding PLCs}"> <ItemsControl x:Name="itemcontrol_feeder" >
<ItemsControl.ItemTemplate> <ItemsControl.ItemTemplate>
<DataTemplate> <DataTemplate>
<StackPanel> <StackPanel>
...@@ -128,9 +129,10 @@ ...@@ -128,9 +129,10 @@
</DataTemplate> </DataTemplate>
</ItemsControl.ItemTemplate> </ItemsControl.ItemTemplate>
</ItemsControl> </ItemsControl>
<Button Grid.Row="1" Content="配置" Padding="20,5" Margin="5" HorizontalAlignment="Left" Click="btnFeederSetupClick"></Button> <StackPanel Grid.Row="1" Orientation="Horizontal">
<Button Grid.Row="1" Content="吸料配置" Padding="20,5" Margin="5" HorizontalAlignment="Left" Click="btnFeederSetupClick"></Button>
</StackPanel>
</Grid> </Grid>
</GroupBox> </GroupBox>
</Grid> </Grid>
......
...@@ -30,16 +30,19 @@ namespace FLY.Weight.UI.Server ...@@ -30,16 +30,19 @@ namespace FLY.Weight.UI.Server
public void Init(TDGage gage) public void Init(TDGage gage)
{ {
this.gage = gage; this.gage = gage;
var plsos = gage.mData.PLCos as FLY.OBJComponents.Server.PLCProxySystem;
//grid_plcos.DataContext = plsos;
//grid_plc.DataContext = plsos.PLCs[0];
grid_WeightSystem.DataContext = gage.mData; grid_WeightSystem.DataContext = gage.mData;
this.itemcontrol.ItemsSource = plsos.PLCs;
sp_sysParam.DataContext = gage.mSysParam; sp_sysParam.DataContext = gage.mSysParam;
itemcontrol_weighter.ItemsSource = gage.mData.plcos.PLCs;
if (gage.mFeederSystem != null) { if (gage.mFeederSystem != null)
{
btnFeederSetup.Visibility = Visibility.Collapsed;
this.itemcontrol_feeder.ItemsSource = gage.mFeederSystem.plcos.PLCs; this.itemcontrol_feeder.ItemsSource = gage.mFeederSystem.plcos.PLCs;
} }
else {
grpFeeder.Visibility = Visibility.Collapsed;
}
} }
private void btnSetupClick(object sender, RoutedEventArgs e) private void btnSetupClick(object sender, RoutedEventArgs e)
{ {
......
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