Commit eb04ce77 authored by 潘栩锋's avatar 潘栩锋 🚴

正在完善 主界面的后台代码

parent fd85ec70
...@@ -202,6 +202,9 @@ ...@@ -202,6 +202,9 @@
<PackageReference Include="LiveCharts.Wpf"> <PackageReference Include="LiveCharts.Wpf">
<Version>0.9.7</Version> <Version>0.9.7</Version>
</PackageReference> </PackageReference>
<PackageReference Include="MahApps.Metro.IconPacks">
<Version>3.0.0-alpha0188</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json"> <PackageReference Include="Newtonsoft.Json">
<Version>12.0.2</Version> <Version>12.0.2</Version>
</PackageReference> </PackageReference>
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
</TransformGroup> </TransformGroup>
</Path.RenderTransform> </Path.RenderTransform>
</Path> </Path>
<TextBlock Text="IBC" /> <TextBlock Text="综合" />
</StackPanel> </StackPanel>
</Button> </Button>
</Grid> </Grid>
......
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
<Style TargetType="Path"> <Style TargetType="Path">
<Setter Property="Fill" Value="{StaticResource Color_theme_static}"/> <Setter Property="Fill" Value="{StaticResource Color_theme_static}"/>
<Style.Triggers> <Style.Triggers>
<DataTrigger Binding="{Binding IsRotaryForw}" Value="True"> <DataTrigger Binding="{Binding IsAirCushionOn}" Value="True">
<Setter Property="Fill" Value="{StaticResource Color_theme_activity}"/> <Setter Property="Fill" Value="{StaticResource Color_theme_activity}"/>
</DataTrigger> </DataTrigger>
</Style.Triggers> </Style.Triggers>
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
</Path> </Path>
<TextBlock Text="运行中" Style="{StaticResource TextBlockStyle_FieldHeader}" VerticalAlignment="Center"/> <TextBlock Text="运行中" Style="{StaticResource TextBlockStyle_FieldHeader}" VerticalAlignment="Center"/>
</StackPanel> </StackPanel>
<ToggleButton Style="{StaticResource ToggleButtonStyle02}" Tag="{StaticResource tbt_rs}" HorizontalAlignment="Right" Margin="5" IsChecked="{Binding IsAirCushionOn}"/> <ToggleButton Style="{StaticResource ToggleButtonStyle02}" Tag="{StaticResource tbt_rs}" HorizontalAlignment="Right" Margin="5" IsChecked="{Binding AirCushionOn}"/>
</StackPanel> </StackPanel>
</Grid> </Grid>
...@@ -207,10 +207,14 @@ ...@@ -207,10 +207,14 @@
<ColumnDefinition/> <ColumnDefinition/>
<ColumnDefinition Width="auto"/> <ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Margin="10,0,0,0"> <StackPanel>
<TextBox Text="{Binding RotaryFreq,StringFormat={}{0:F1}}" Style="{StaticResource TextBoxStyle_FieldContent}" Foreground="{StaticResource Color_theme_text_activity}" VerticalAlignment="Bottom" FontSize="48"/> <TextBlock Text="设定" FontSize="{StaticResource FontSize_title}" Margin="3,0" Foreground="{StaticResource Color_theme_activity}"/>
<TextBlock Text="Hz" Style="{StaticResource TextBlockStyle_FieldContent_mm}"/> <StackPanel Orientation="Horizontal" Margin="10,0,0,0">
<TextBox Text="{Binding RotaryFreq,StringFormat={}{0:F1}}" Style="{StaticResource TextBoxStyle_FieldContent}" Foreground="{StaticResource Color_theme_text_activity}" VerticalAlignment="Bottom" FontSize="48"/>
<TextBlock Text="Hz" Style="{StaticResource TextBlockStyle_FieldContent_mm}"/>
</StackPanel>
</StackPanel> </StackPanel>
<Button HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,-30,-30,0" Style="{StaticResource ButtonStyle_empty}" Background="Transparent" Click="button_rotaryBackw_Click" > <Button HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,-30,-30,0" Style="{StaticResource ButtonStyle_empty}" Background="Transparent" Click="button_rotaryBackw_Click" >
<Grid Style="{StaticResource GridStyle_ButtonShadow}"> <Grid Style="{StaticResource GridStyle_ButtonShadow}">
...@@ -455,8 +459,8 @@ ...@@ -455,8 +459,8 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Grid.Row="0" Grid.ColumnSpan="2" Orientation="Vertical"> <StackPanel Grid.ColumnSpan="2" >
<TextBlock Grid.Row="0" Grid.Column="0" Text="显示" FontSize="{StaticResource FontSize_title}" Margin="3,0" Foreground="{StaticResource Color_theme_static}"/> <TextBlock Text="显示" FontSize="{StaticResource FontSize_title}" Margin="3,0" Foreground="{StaticResource Color_theme_static}"/>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding InletAirFreq,StringFormat={}{0:F1}}" Style="{StaticResource TextBlockStyle_FieldContent}" FontSize="26" /> <TextBlock Text="{Binding InletAirFreq,StringFormat={}{0:F1}}" Style="{StaticResource TextBlockStyle_FieldContent}" FontSize="26" />
<TextBlock Text="Hz" Style="{StaticResource TextBlockStyle_FieldContent_mm}" FontSize="{StaticResource FontSize_unit}" /> <TextBlock Text="Hz" Style="{StaticResource TextBlockStyle_FieldContent_mm}" FontSize="{StaticResource FontSize_unit}" />
...@@ -477,10 +481,14 @@ ...@@ -477,10 +481,14 @@
<ColumnDefinition/> <ColumnDefinition/>
<ColumnDefinition Width="auto"/> <ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal"> <StackPanel>
<TextBox Text="{Binding InletAirFreqSet,StringFormat={}{0:F1}}" Style="{StaticResource TextBoxStyle_FieldContent}" Foreground="{StaticResource Color_theme_text_activity}" VerticalAlignment="Bottom" FontSize="48"/> <TextBlock Text="设定" FontSize="{StaticResource FontSize_title}" Margin="3,0" Foreground="{StaticResource Color_theme_activity}"/>
<TextBlock Text="Hz" Style="{StaticResource TextBlockStyle_FieldContent_mm}"/> <StackPanel Orientation="Horizontal">
<TextBox Text="{Binding InletAirFreqSet,StringFormat={}{0:F1}}" Style="{StaticResource TextBoxStyle_FieldContent}" Foreground="{StaticResource Color_theme_text_activity}" VerticalAlignment="Bottom" FontSize="48"/>
<TextBlock Text="Hz" Style="{StaticResource TextBlockStyle_FieldContent_mm}"/>
</StackPanel>
</StackPanel> </StackPanel>
<Button HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,-30,-30,0" Style="{StaticResource ButtonStyle_empty}" Background="Transparent" Click="button_inletAir_minus_Click" > <Button HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,-30,-30,0" Style="{StaticResource ButtonStyle_empty}" Background="Transparent" Click="button_inletAir_minus_Click" >
<Grid Style="{StaticResource GridStyle_ButtonShadow}"> <Grid Style="{StaticResource GridStyle_ButtonShadow}">
...@@ -533,10 +541,14 @@ ...@@ -533,10 +541,14 @@
<ColumnDefinition/> <ColumnDefinition/>
<ColumnDefinition Width="auto"/> <ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal"> <StackPanel>
<TextBox Text="{Binding OutletAirFreqSet,StringFormat={}{0:F1}}" Style="{StaticResource TextBoxStyle_FieldContent}" Foreground="{StaticResource Color_theme_text_activity}" VerticalAlignment="Bottom" FontSize="48"/> <TextBlock Text="设定" FontSize="{StaticResource FontSize_title}" Margin="3,0" Foreground="{StaticResource Color_theme_activity}"/>
<TextBlock Text="Hz" Style="{StaticResource TextBlockStyle_FieldContent_mm}" /> <StackPanel Orientation="Horizontal">
<TextBox Text="{Binding OutletAirFreqSet,StringFormat={}{0:F1}}" Style="{StaticResource TextBoxStyle_FieldContent}" Foreground="{StaticResource Color_theme_text_activity}" VerticalAlignment="Bottom" FontSize="48"/>
<TextBlock Text="Hz" Style="{StaticResource TextBlockStyle_FieldContent_mm}" />
</StackPanel>
</StackPanel> </StackPanel>
<Button HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,-30,-30,0" Style="{StaticResource ButtonStyle_empty}" Background="Transparent" Click="button_outletAir_minus_Click" > <Button HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,-30,-30,0" Style="{StaticResource ButtonStyle_empty}" Background="Transparent" Click="button_outletAir_minus_Click" >
<Grid Style="{StaticResource GridStyle_ButtonShadow}"> <Grid Style="{StaticResource GridStyle_ButtonShadow}">
...@@ -588,10 +600,14 @@ ...@@ -588,10 +600,14 @@
<ColumnDefinition/> <ColumnDefinition/>
<ColumnDefinition Width="auto"/> <ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal"> <StackPanel>
<TextBox Text="{Binding ExCoolFreqSet,StringFormat={}{0:F1}}" Style="{StaticResource TextBoxStyle_FieldContent}" Foreground="{StaticResource Color_theme_text_activity}" VerticalAlignment="Bottom" FontSize="48"/> <TextBlock Text="设定" FontSize="{StaticResource FontSize_title}" Margin="3,0" Foreground="{StaticResource Color_theme_activity}"/>
<TextBlock Text="Hz" Style="{StaticResource TextBlockStyle_FieldContent_mm}" /> <StackPanel Orientation="Horizontal">
<TextBox Text="{Binding ExCoolFreqSet,StringFormat={}{0:F1}}" Style="{StaticResource TextBoxStyle_FieldContent}" Foreground="{StaticResource Color_theme_text_activity}" VerticalAlignment="Bottom" FontSize="48"/>
<TextBlock Text="Hz" Style="{StaticResource TextBlockStyle_FieldContent_mm}" />
</StackPanel>
</StackPanel> </StackPanel>
<Button HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,-30,-30,0" Style="{StaticResource ButtonStyle_empty}" Background="Transparent" Click="button_ExCool_minus_Click" > <Button HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,-30,-30,0" Style="{StaticResource ButtonStyle_empty}" Background="Transparent" Click="button_ExCool_minus_Click" >
<Grid Style="{StaticResource GridStyle_ButtonShadow}"> <Grid Style="{StaticResource GridStyle_ButtonShadow}">
...@@ -611,6 +627,7 @@ ...@@ -611,6 +627,7 @@
</StackPanel> </StackPanel>
</Viewbox> </Viewbox>
</Border> </Border>
<local:IBCCtrlGraph x:Name="ibcCtrlGraph" Grid.Row="3" />
</Grid> </Grid>
</Page> </Page>
...@@ -30,12 +30,32 @@ namespace FLY.IntegratedControl.UI.Client.UIModule ...@@ -30,12 +30,32 @@ namespace FLY.IntegratedControl.UI.Client.UIModule
public void Init(int id) public void Init(int id)
{ {
iCSystemClient = TDGage.Current.mICSystemService; iCSystemClient = TDGage.Current.mICSystemService;
grid_ibc.DataContext = iCSystemClient.Item; this.DataContext = iCSystemClient.Item;
setPlan = new FLY.OBJComponents.Client.SetPLCUpdatePlan( setPlan = new FLY.OBJComponents.Client.SetPLCUpdatePlan(
iCSystemClient.PLCos, iCSystemClient.PLCos,
iCSystemClient.Item, iCSystemClient.Item,
new string[] { new string[] {
"TractionVelocity",
"TractionVelocitySet",
"IsTractionOn",
"TractionOn",
"IsAirCushionOn",
"AirCushionOn",
"RotaryFreqSet",
"RotaryFreq",
"IsRotaryOn",
"IsRotaryForw",
"IsRotaryBackw",
"IsRotaryForwTurn",
"IsRotaryOrgSign",
"IsRotaryBackwTurn",
"IsRotaryForwLimit",
"IsRotaryBackwLimit",
"IsIBCAuto", "IsIBCAuto",
"FilmWidth", "FilmWidth",
"FilmWidthSet", "FilmWidthSet",
...@@ -85,7 +105,19 @@ namespace FLY.IntegratedControl.UI.Client.UIModule ...@@ -85,7 +105,19 @@ namespace FLY.IntegratedControl.UI.Client.UIModule
private void button_ExCool_plus_Click(object sender, RoutedEventArgs e) private void button_ExCool_plus_Click(object sender, RoutedEventArgs e)
{ {
if (iCSystemClient.Item.ExCoolFreqSet < 49.9)
iCSystemClient.Item.ExCoolFreqSet += 0.1f;
}
private void button_ExCool_minus_Click(object sender, RoutedEventArgs e)
{
if (iCSystemClient.Item.ExCoolFreqSet > 0.1)
iCSystemClient.Item.ExCoolFreqSet -= 0.1f;
}
private void button_rotaryForw_Click(object sender, RoutedEventArgs e)
{
//iCSystemClient.Item.
} }
} }
public class ToggleButtonText public class ToggleButtonText
......
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