| | |
| | | xmlns:pw="https://opensource.panuon.com/wpf" |
| | | xmlns:pu="https://opensource.panuon.com/wpf-ui" |
| | | xmlns:dp="clr-namespace:HMI.UI.DpUtil;assembly=HMI.UI" |
| | | FontSize="10" |
| | | d:DesignHeight="450" d:DesignWidth="800"> |
| | | <UserControl.Resources> |
| | | <Style TargetType="pu:Switch"> |
| | | <Setter Property="ContentPlacement" Value="Left" /> |
| | | <Setter Property="BoxHeight" Value="16" /> |
| | | <Setter Property="CheckedBackground" Value="{StaticResource GreenVerBar}" /> |
| | | <Setter Property="Background" Value="{StaticResource DangerColor}" /> |
| | | <Setter Property="BoxHeight" Value="14" /> |
| | | <Setter Property="CheckedBackground" Value="{DynamicResource GreenVerBar}" /> |
| | | <Setter Property="Background" Value="{DynamicResource DangerColor}" /> |
| | | <Setter Property="ToggleSize" Value="10" /> |
| | | <Setter Property="ToggleShadowColor" Value="{x:Null}" /> |
| | | <Setter Property="Margin" Value="0"/> |
| | | <Setter Property="Padding" Value="0"/> |
| | | </Style> |
| | | <Style TargetType="Label"> |
| | | <Setter Property="VerticalContentAlignment" Value="Center"/> |
| | | </Style> |
| | | </UserControl.Resources> |
| | | |
| | | <GroupBox Header="{Binding Header}"> |
| | | <Grid> |
| | | <!--<Grid> |
| | | <Grid.RowDefinitions> |
| | | <RowDefinition /> |
| | | <RowDefinition /> |
| | |
| | | <ColumnDefinition/> |
| | | </Grid.ColumnDefinitions> |
| | | |
| | | <pu:Switch Grid.Row="0" Grid.Column="0" CheckedContent="电源开" x:Name="powerSw" |
| | | IsChecked="{Binding PowerStatus,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" |
| | | Content="电源关"/> |
| | | <pu:Switch Grid.Row="0" Grid.Column="0" CheckedContent="电源开" x:Name="powerSw" |
| | | IsChecked="{Binding PowerStatus,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" |
| | | Content="电源关"/> |
| | | |
| | | <pu:Switch Grid.Row="0" Grid.Column="1" CheckedContent="激活" x:Name="activationSw" |
| | | IsChecked="{Binding ActivationStatus,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" |
| | |
| | | <pu:Switch Grid.Row="1" Grid.Column="0" CheckedContent="OK亮" x:Name="okLightSw" |
| | | IsChecked="{Binding OkLightOn,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" |
| | | Content="OK灭"/> |
| | | |
| | | |
| | | |
| | | <pu:Switch Grid.Row="1" Grid.Column="1" CheckedContent="NG亮" x:Name="ngLightSw" |
| | | IsChecked="{Binding NgLightOn,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" |
| | | Content="NG灭"/> |
| | | </Grid>--> |
| | | <Grid> |
| | | <Grid.RowDefinitions> |
| | | <RowDefinition Height="Auto"/> |
| | | <RowDefinition Height="Auto"/> |
| | | <RowDefinition Height="Auto"/> |
| | | </Grid.RowDefinitions> |
| | | <Grid.ColumnDefinitions> |
| | | <ColumnDefinition Width="Auto"/> |
| | | <ColumnDefinition /> |
| | | <ColumnDefinition Width="Auto"/> |
| | | <ColumnDefinition /> |
| | | </Grid.ColumnDefinitions> |
| | | <Label>电源</Label> |
| | | <pu:Switch Grid.Row="0" Grid.Column="1" x:Name="powerSw" |
| | | IsChecked="{Binding PowerStatus,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
| | | |
| | | <!--<ui:LightBall Grid.Row="1" Grid.Column="0" Value="{Binding CellStatus}" Content="OK/NG状态"/>--> |
| | | <Label Grid.Row="0" Grid.Column="2">激活</Label> |
| | | <pu:Switch Grid.Row="0" Grid.Column="3" x:Name="activationSw" |
| | | IsChecked="{Binding ActivationStatus,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
| | | |
| | | <!--<TextBlock Grid.Row="0" Grid.Column="0" Text="{Binding PowerStatus}"/> |
| | | |
| | | <TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding ActivationStatus}"/>--> |
| | | |
| | | |
| | | <Label Grid.Row="1" Grid.Column="0">OK灯</Label> |
| | | <pu:Switch Grid.Row="1" Grid.Column="1" x:Name="okLightSw" |
| | | IsChecked="{Binding OkLightOn,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
| | | |
| | | <Label Grid.Row="1" Grid.Column="2">NG灯</Label> |
| | | <pu:Switch Grid.Row="1" Grid.Column="3" x:Name="ngLightSw" |
| | | IsChecked="{Binding NgLightOn,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
| | | |
| | | <Label Grid.Row="2" Grid.Column="0">电流</Label> |
| | | <TextBox Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="3" IsReadOnly="True" |
| | | Style="{StaticResource EditorTextBoxStyle}" Height="18" Text="{Binding Current}"/> |
| | | </Grid> |
| | | <!--<UniformGrid Rows="2" Columns="2"> |
| | | <pu:Switch Grid.Row="0" Grid.Column="0" CheckedContent="电源开" x:Name="powerSw" |
| | | IsChecked="{Binding PowerStatus,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" |
| | | Content="电源关"/> |
| | | |
| | | <pu:Switch Grid.Row="0" Grid.Column="1" CheckedContent="激活" x:Name="activationSw" |
| | | IsChecked="{Binding ActivationStatus,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" |
| | | Content="未激活"/> |
| | | |
| | | <pu:Switch Grid.Row="1" Grid.Column="0" CheckedContent="OK亮" x:Name="okLightSw" |
| | | IsChecked="{Binding OkLightOn,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" |
| | | Content="OK灭"/> |
| | | |
| | | |
| | | <pu:Switch Grid.Row="1" Grid.Column="1" CheckedContent="NG亮" x:Name="ngLightSw" |
| | | IsChecked="{Binding NgLightOn,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" |
| | | Content="NG灭"/> |
| | | </UniformGrid>--> |
| | | </GroupBox> |
| | | </UserControl> |