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

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

parent fd85ec70
......@@ -202,6 +202,9 @@
<PackageReference Include="LiveCharts.Wpf">
<Version>0.9.7</Version>
</PackageReference>
<PackageReference Include="MahApps.Metro.IconPacks">
<Version>3.0.0-alpha0188</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>12.0.2</Version>
</PackageReference>
......
......@@ -44,7 +44,7 @@
</TransformGroup>
</Path.RenderTransform>
</Path>
<TextBlock Text="IBC" />
<TextBlock Text="综合" />
</StackPanel>
</Button>
</Grid>
......
......@@ -155,7 +155,7 @@
<Style TargetType="Path">
<Setter Property="Fill" Value="{StaticResource Color_theme_static}"/>
<Style.Triggers>
<DataTrigger Binding="{Binding IsRotaryForw}" Value="True">
<DataTrigger Binding="{Binding IsAirCushionOn}" Value="True">
<Setter Property="Fill" Value="{StaticResource Color_theme_activity}"/>
</DataTrigger>
</Style.Triggers>
......@@ -164,7 +164,7 @@
</Path>
<TextBlock Text="运行中" Style="{StaticResource TextBlockStyle_FieldHeader}" VerticalAlignment="Center"/>
</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>
</Grid>
......@@ -207,10 +207,14 @@
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel>
<TextBlock Text="设定" FontSize="{StaticResource FontSize_title}" Margin="3,0" Foreground="{StaticResource Color_theme_activity}"/>
<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>
<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}">
......@@ -455,8 +459,8 @@
</Grid.ColumnDefinitions>
<StackPanel Grid.Row="0" Grid.ColumnSpan="2" Orientation="Vertical">
<TextBlock Grid.Row="0" Grid.Column="0" Text="显示" FontSize="{StaticResource FontSize_title}" Margin="3,0" Foreground="{StaticResource Color_theme_static}"/>
<StackPanel Grid.ColumnSpan="2" >
<TextBlock Text="显示" FontSize="{StaticResource FontSize_title}" Margin="3,0" Foreground="{StaticResource Color_theme_static}"/>
<StackPanel Orientation="Horizontal">
<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}" />
......@@ -477,10 +481,14 @@
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel>
<TextBlock Text="设定" FontSize="{StaticResource FontSize_title}" Margin="3,0" Foreground="{StaticResource Color_theme_activity}"/>
<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>
<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}">
......@@ -533,10 +541,14 @@
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel>
<TextBlock Text="设定" FontSize="{StaticResource FontSize_title}" Margin="3,0" Foreground="{StaticResource Color_theme_activity}"/>
<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>
<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}">
......@@ -588,10 +600,14 @@
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel>
<TextBlock Text="设定" FontSize="{StaticResource FontSize_title}" Margin="3,0" Foreground="{StaticResource Color_theme_activity}"/>
<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>
<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}">
......@@ -611,6 +627,7 @@
</StackPanel>
</Viewbox>
</Border>
<local:IBCCtrlGraph x:Name="ibcCtrlGraph" Grid.Row="3" />
</Grid>
</Page>
......@@ -30,12 +30,32 @@ namespace FLY.IntegratedControl.UI.Client.UIModule
public void Init(int id)
{
iCSystemClient = TDGage.Current.mICSystemService;
grid_ibc.DataContext = iCSystemClient.Item;
this.DataContext = iCSystemClient.Item;
setPlan = new FLY.OBJComponents.Client.SetPLCUpdatePlan(
iCSystemClient.PLCos,
iCSystemClient.Item,
new string[] {
"TractionVelocity",
"TractionVelocitySet",
"IsTractionOn",
"TractionOn",
"IsAirCushionOn",
"AirCushionOn",
"RotaryFreqSet",
"RotaryFreq",
"IsRotaryOn",
"IsRotaryForw",
"IsRotaryBackw",
"IsRotaryForwTurn",
"IsRotaryOrgSign",
"IsRotaryBackwTurn",
"IsRotaryForwLimit",
"IsRotaryBackwLimit",
"IsIBCAuto",
"FilmWidth",
"FilmWidthSet",
......@@ -85,7 +105,19 @@ namespace FLY.IntegratedControl.UI.Client.UIModule
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
......
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