| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 | <UserControl x:Class="FurnaceUI.Views.Maintenances.BufferRobotView"             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"              xmlns:d="http://schemas.microsoft.com/expression/blend/2008"              xmlns:local="clr-namespace:FurnaceUI.Views.Maintenances"              xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"              xmlns:cal="http://www.caliburn.org"             xmlns:deviceControl="clr-namespace:Aitex.Core.UI.DeviceControl;assembly=MECF.Framework.UI.Core" xmlns:parts="clr-namespace:FurnaceUI.Controls.Parts"             mc:Ignorable="d"              d:DesignHeight="900" d:DesignWidth="1280">    <Grid>        <Canvas IsEnabled="{Binding IsPermission}">            <Grid Margin="10,10,0,0">                <Grid.RowDefinitions>                    <RowDefinition Height="24"/>                    <RowDefinition Height="35"/>                    <RowDefinition Height="35"/>                    <RowDefinition Height="35"/>                    <RowDefinition Height="35"/>                    <RowDefinition Height="115"/>                </Grid.RowDefinitions>                <Grid.ColumnDefinitions>                    <ColumnDefinition Width="110"/>                    <ColumnDefinition  Width="80"/>                    <ColumnDefinition  Width="110"/>                    <ColumnDefinition  Width="180"/>                </Grid.ColumnDefinitions>                <Label Style="{DynamicResource Table_TitleStyle}"  Grid.Row="0" Grid.ColumnSpan="4" HorizontalContentAlignment="Center" VerticalContentAlignment="Center">                    <Label.Content>                        <TextBlock Text="Buffer Information" Foreground="White"></TextBlock>                    </Label.Content>                </Label>                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Title}" Grid.Row="1" Grid.Column="0" Padding="5,1,0,1">                    <TextBlock Text="Status" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14"  VerticalAlignment="Center" />                </Border>                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Grid.Row="1" Grid.Column ="1" Padding="5,1">                    <TextBlock Text="{Binding BufferStatus}" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="14"/>                </Border>                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Title}" Grid.Row="1" Grid.Column="2" Padding="5,1,0,1">                    <TextBlock Text="Servo On/Off" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14"  VerticalAlignment="Center" />                </Border>                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Grid.Row="1" Grid.Column ="3" Padding="5,1">                    <deviceControl:AITSensor CustomColorOn="#FF07FF07" IsCustomRender="True" CustomColorOff="Gray" LightOnValue="{Binding BufferIsServoOn}" EnableToolTip="False"/>                </Border>                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Title}" Grid.Row="2" Grid.Column="0" Padding="5,1,0,1">                    <TextBlock Text="Current Speed(mm/min)" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14"  VerticalAlignment="Center" />                </Border>                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Grid.Row="2" Grid.Column ="1" Padding="5,1">                    <TextBlock Text="{Binding BufferCurrentSpeed,StringFormat={}{0:f2}}" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="14"/>                </Border>                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Title}" Grid.Row="2" Grid.Column="2" Padding="5,1,0,1">                    <!--<TextBlock Text="Motor Alarm" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14"  VerticalAlignment="Center" />-->                </Border>                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Grid.Row="2" Grid.Column ="3" Padding="5,1">                    <!--<deviceControl:AITSensor CustomColorOn="Red" IsCustomRender="True" CustomColorOff="#FF07FF07" LightOnValue="{Binding BufferIsAlarm}" EnableToolTip="False"/>-->                </Border>                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Title}" Grid.Row="3" Grid.Column="0" Padding="5,1,0,1">                    <TextBlock Text="Current Position(mm)" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14"  VerticalAlignment="Center" />                </Border>                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Grid.Row="3" Grid.Column ="1" Padding="5,1">                    <TextBlock Text="{Binding BufferCurrentPosition,StringFormat={}{0:f2}}" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="14"/>                </Border>                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Title}" Grid.Row="3" Grid.Column="2" Padding="5,1,0,1">                    <TextBlock Text="Motor Running" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14"  VerticalAlignment="Center" />                </Border>                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Grid.Row="3" Grid.Column ="3" Padding="5,1">                    <deviceControl:AITSensor CustomColorOn="#FF07FF07" IsCustomRender="True" CustomColorOff="Gray" LightOnValue="{Binding BufferIsMotorRun}" EnableToolTip="False"/>                </Border>                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Title}" Grid.Row="4" Grid.Column="0" Padding="5,1,0,1">                    <TextBlock Text="Target Position" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14"  VerticalAlignment="Center" />                </Border>                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Grid.Row="4" Grid.Column ="1" Grid.ColumnSpan="4" Padding="5,1">                    <StackPanel   Orientation="Horizontal"  >                        <ComboBox ItemsSource="{Binding TargetPosition}" SelectedItem="{Binding SelectedTargetPosition}" Width="90" Height="30"/>                        <Button Content="Set" Width="80" Height="30" Margin="10,0,10,0" IsEnabled="{Binding IsSystemStaus}">                            <i:Interaction.Triggers>                                <i:EventTrigger EventName="Click">                                    <cal:ActionMessage MethodName="SetValue">                                    </cal:ActionMessage>                                </i:EventTrigger>                            </i:Interaction.Triggers>                        </Button>                        <Button Content="Move To" Width="80" Height="30" Margin="0,0,10,0"  IsEnabled="{Binding IsSystemStaus}">                            <i:Interaction.Triggers>                                <i:EventTrigger EventName="Click">                                    <cal:ActionMessage MethodName="MoveTo">                                    </cal:ActionMessage>                                </i:EventTrigger>                            </i:Interaction.Triggers>                        </Button>                    </StackPanel>                </Border>                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Content}" Grid.Row="5" Grid.ColumnSpan="4" Padding="45,0,0,0">                    <StackPanel   Orientation="Horizontal" Margin="35,0,0,0" >                        <Button Content="Servo On" Width="92" Height="30" Margin="22,-70,10,0"  IsEnabled="{Binding IsSystemStaus}">                            <i:Interaction.Triggers>                                <i:EventTrigger EventName="Click">                                    <cal:ActionMessage MethodName="SetServoOn">                                        <cal:Parameter Value="PM1.BufferServo.ServoOnOff" />                                        <cal:Parameter Value="True" />                                    </cal:ActionMessage>                                </i:EventTrigger>                            </i:Interaction.Triggers>                        </Button>                        <Button Content="Servo Off" Width="92" Height="30" Margin="5,-70,10,0"  IsEnabled="{Binding IsSystemStaus}">                             <i:Interaction.Triggers>                                <i:EventTrigger EventName="Click">                                    <cal:ActionMessage MethodName="SetServoOn">                                        <cal:Parameter Value="PM1.BufferServo.ServoOnOff" />                                        <cal:Parameter Value="False" />                                    </cal:ActionMessage>                                </i:EventTrigger>                            </i:Interaction.Triggers>                        </Button>                        <Button Content="Stop" Width="92" Height="30" Margin="-325,0,0,0"  IsEnabled="{Binding IsSystemStaus}">                            <i:Interaction.Triggers>                                <i:EventTrigger EventName="Click">                                    <cal:ActionMessage MethodName="Stop">                                        <cal:Parameter Value="PM1.BufferServo" />                                    </cal:ActionMessage>                                </i:EventTrigger>                            </i:Interaction.Triggers>                        </Button>                        <Button Content="Reset" Width="92" Height="30" Margin="-110,0,0,0"  IsEnabled="{Binding IsSystemStaus}">                            <i:Interaction.Triggers>                                <i:EventTrigger EventName="Click">                                    <cal:ActionMessage MethodName="Reset">                                        <cal:Parameter Value="PM1.BufferServo" />                                    </cal:ActionMessage>                                </i:EventTrigger>                            </i:Interaction.Triggers>                        </Button>                    </StackPanel>                </Border>            </Grid>        </Canvas>    </Grid></UserControl>
 |