فهرست منبع

main ui 변경
battery, ocs

ys-hwang 6 سال پیش
والد
کامیت
eb23251020

+ 17 - 0
Dev/OHV/OHV.Common/Shareds/SharedEnumType.cs

@@ -96,6 +96,23 @@
 		WaitStop,
 	}
 
+	public enum eBatteryConnect
+	{
+		DisConnect,
+		Connect
+	}
+	public enum eBatteryCharge
+	{
+		DisCharge,
+		Charge
+	}
+
+	public enum eOcsState
+	{
+		DisConnect,
+		Connect
+	}
+
     #endregion
 
     #region Command

+ 113 - 110
Dev/OHV/OHV.Module.Interactivity/PopUp/BatteryConfigView.xaml

@@ -10,7 +10,7 @@
              mc:Ignorable="d" 
              Width="800"
              Height="600"
-             Background="#455a64">
+             Background="#263238">
 
     <prism:Dialog.WindowStyle>
         <Style TargetType="Window">
@@ -39,191 +39,194 @@
         </ResourceDictionary>
     </UserControl.Resources>
 
-    <Grid>
-        <Grid.ColumnDefinitions>
-            <ColumnDefinition Width="*"/>
-            <ColumnDefinition Width="130"/>
-        </Grid.ColumnDefinitions>
-        <Grid.RowDefinitions>
-            <RowDefinition Height="50"/>
-            <RowDefinition Height="*"/>
-        </Grid.RowDefinitions>
-
-        <Grid Grid.Row="0">
-            <TextBlock Grid.Row="0" Margin="5" Text="Battery View" FontSize="25" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Center"/>
-            <StackPanel VerticalAlignment="Center"
+    <Border BorderBrush="Gray" BorderThickness="2">
+        <Grid>
+            <Grid.ColumnDefinitions>
+                <ColumnDefinition Width="*"/>
+                <ColumnDefinition Width="130"/>
+            </Grid.ColumnDefinitions>
+            <Grid.RowDefinitions>
+                <RowDefinition Height="50"/>
+                <RowDefinition Height="*"/>
+            </Grid.RowDefinitions>
+
+            <Grid Grid.Row="0">
+                <TextBlock Grid.Row="0" Margin="5" Text="Battery View" FontSize="25" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Center"/>
+                <StackPanel VerticalAlignment="Center"
                         HorizontalAlignment="Right"
                         Margin="1">
-                <Button Margin="1" HorizontalAlignment="Center" Height="45" BorderBrush="Gray" BorderThickness="0" Background="{x:Null}"
+                    <Button Margin="1" HorizontalAlignment="Center" Height="45" BorderBrush="Gray" BorderThickness="0" Background="{x:Null}"
                         HorizontalContentAlignment="Right">
-                    <StackPanel Orientation="Horizontal">
-                        <Ellipse Margin="3" Fill="{Binding BatteryConnectBrush, FallbackValue=Gray}" Width="30" Height="30"/>
-                        <TextBlock Margin="2" Text="{Binding BatteryConnect, FallbackValue=STATUS}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
-                    </StackPanel>
-                </Button>
-            </StackPanel>
-        </Grid>
+                        <StackPanel Orientation="Horizontal">
+                            <Ellipse Margin="3" Fill="{Binding BatteryConnectBrush, FallbackValue=Gray}" Width="30" Height="30"/>
+                            <TextBlock Margin="2" Text="{Binding BatteryConnect, FallbackValue=STATUS}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
+                        </StackPanel>
+                    </Button>
+                </StackPanel>
+            </Grid>
 
             <Grid Grid.Column="0" Grid.Row="1">
-            <Grid Margin="15" Background="#37474f">
-                <Grid Grid.Row="0">
-                    <Grid.ColumnDefinitions>
-                        <ColumnDefinition Width="*"/>
-                        <ColumnDefinition Width="*"/>
-                        <ColumnDefinition Width="*"/>
-                        <ColumnDefinition Width="*"/>
-                        <ColumnDefinition Width="*"/>
-                    </Grid.ColumnDefinitions>
-                    <Grid.RowDefinitions>
-                        <RowDefinition Height="*"/>
-                        <RowDefinition Height="*"/>
-                        <RowDefinition Height="*"/>
-                        <RowDefinition Height="*"/>
-                        <RowDefinition Height="*"/>
-                    </Grid.RowDefinitions>
-
-                    <Button Grid.Column="0" Grid.Row="0"
+                <Grid Margin="15" Background="#37474f">
+                    <Grid Grid.Row="0">
+                        <Grid.ColumnDefinitions>
+                            <ColumnDefinition Width="*"/>
+                            <ColumnDefinition Width="*"/>
+                            <ColumnDefinition Width="*"/>
+                            <ColumnDefinition Width="*"/>
+                            <ColumnDefinition Width="*"/>
+                        </Grid.ColumnDefinitions>
+                        <Grid.RowDefinitions>
+                            <RowDefinition Height="*"/>
+                            <RowDefinition Height="*"/>
+                            <RowDefinition Height="*"/>
+                            <RowDefinition Height="*"/>
+                            <RowDefinition Height="*"/>
+                        </Grid.RowDefinitions>
+
+                        <Button Grid.Column="0" Grid.Row="0"
                             Content="Voltage" Margin="3" VerticalAlignment="Bottom"/>
 
-                    <Border Grid.Row="1" Grid.Column="0" BorderBrush="Gray" BorderThickness="1" Margin="5">
-                        <TextBlock Grid.Column="0" Grid.Row="1"
+                        <Border Grid.Row="1" Grid.Column="0" BorderBrush="Gray" BorderThickness="1" Margin="5">
+                            <TextBlock Grid.Column="0" Grid.Row="1"
                             VerticalAlignment="Center"
                             HorizontalAlignment="Center"
                             Foreground="Orange" FontSize="20">
                             <Run Text="{Binding Voltage, StringFormat={}{0:0.00V}, FallbackValue=0.00V}"/>
-                        </TextBlock>
-                    </Border>
+                            </TextBlock>
+                        </Border>
 
-                    <!--Current-->
-                    <Button Grid.Column="1" Grid.Row="0"
+                        <!--Current-->
+                        <Button Grid.Column="1" Grid.Row="0"
                         Content="Current" Margin="3" Width="Auto" VerticalAlignment="Bottom"/>
-                    <Border Grid.Column="1" Grid.Row="1" Margin="5"
+                        <Border Grid.Column="1" Grid.Row="1" Margin="5"
                             BorderBrush="Gray" BorderThickness="1">
-                        <TextBlock Grid.Column="0" Grid.Row="1"
+                            <TextBlock Grid.Column="0" Grid.Row="1"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center"
                                Foreground="Orange" FontSize="20">
                                 <Run Text="{Binding Current,StringFormat={}{0:0.0A}, FallbackValue=0.0A}"/>
-                        </TextBlock>
-                    </Border>
+                            </TextBlock>
+                        </Border>
 
-                    <!--SOC-->
-                    <Button Grid.Column="2" Grid.Row="0"
+                        <!--SOC-->
+                        <Button Grid.Column="2" Grid.Row="0"
                         Content="SOC" Margin="3" Width="Auto" VerticalAlignment="Bottom"/>
-                    <Border Grid.Column="2" Grid.Row="1" Margin="5"
+                        <Border Grid.Column="2" Grid.Row="1" Margin="5"
                             BorderBrush="Gray" BorderThickness="1">
-                        <TextBlock Grid.Column="0" Grid.Row="1"
+                            <TextBlock Grid.Column="0" Grid.Row="1"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center"
                                Foreground="Orange" FontSize="20">
                                 <Run Text="{Binding SOC, StringFormat={}{0}%, FallbackValue=0%}"/>
-                        </TextBlock>
-                    </Border>
+                            </TextBlock>
+                        </Border>
 
-                    <!--Battery State-->
-                    <Button Grid.Column="3" Grid.Row="0"
+                        <!--Battery State-->
+                        <Button Grid.Column="3" Grid.Row="0"
                         Content="Battery State" Margin="3" Width="Auto" VerticalAlignment="Bottom"/>
-                    <Border Grid.Column="3" Grid.Row="1" Margin="5"
+                        <Border Grid.Column="3" Grid.Row="1" Margin="5"
                             BorderBrush="Gray" BorderThickness="1">
-                        <TextBlock Grid.Column="0" Grid.Row="1"
+                            <TextBlock Grid.Column="0" Grid.Row="1"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center"
                                Foreground="Orange" FontSize="20">
                                 <Run Text="{Binding BatteryState, StringFormat={}{0:0}, FallbackValue=0x0}"/>
-                        </TextBlock>
-                    </Border>
+                            </TextBlock>
+                        </Border>
 
-                    <!--Temperature-->
-                    <Button Grid.Column="4" Grid.Row="0"
+                        <!--Temperature-->
+                        <Button Grid.Column="4" Grid.Row="0"
                         Content="Temperature" Margin="3" Width="Auto" VerticalAlignment="Bottom"/>
-                    <Border Grid.Column="4" Grid.Row="1" Margin="5"
+                        <Border Grid.Column="4" Grid.Row="1" Margin="5"
                             BorderBrush="Gray" BorderThickness="1">
-                        <TextBlock Grid.Column="0" Grid.Row="1"
+                            <TextBlock Grid.Column="0" Grid.Row="1"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center"
                                Foreground="Orange" FontSize="20">
                                 <Run Text="{Binding Temperature, StringFormat={}{0:0.0C}, FallbackValue=C}"/>
-                        </TextBlock>
-                    </Border>
+                            </TextBlock>
+                        </Border>
 
-                    <!--ChargeTime-->
-                    <Button Grid.Column="0" Grid.Row="2"
+                        <!--ChargeTime-->
+                        <Button Grid.Column="0" Grid.Row="2"
                         Content="ChargeTime" Margin="3" Width="Auto" VerticalAlignment="Bottom"/>
-                    <Border Grid.Column="0" Grid.Row="3" Margin="5"
+                        <Border Grid.Column="0" Grid.Row="3" Margin="5"
                             BorderBrush="Gray" BorderThickness="1">
-                        <TextBlock Grid.Column="0" Grid.Row="1"
+                            <TextBlock Grid.Column="0" Grid.Row="1"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center"
                                Foreground="Orange" FontSize="20">
                                 <Run Text="{Binding AverageTimeToFull,StringFormat={}{0:0.0}H, FallbackValue=H}"/>
-                        </TextBlock>
-                    </Border>
+                            </TextBlock>
+                        </Border>
 
-                    <!--DisChargeTime-->
-                    <Button Grid.Column="1" Grid.Row="2"
+                        <!--DisChargeTime-->
+                        <Button Grid.Column="1" Grid.Row="2"
                         Content="DisChargeTime" Margin="3" Width="Auto" VerticalAlignment="Bottom"/>
-                    <Border Grid.Column="1" Grid.Row="3" Margin="5"
+                        <Border Grid.Column="1" Grid.Row="3" Margin="5"
                             BorderBrush="Gray" BorderThickness="1">
-                        <TextBlock Grid.Column="0" Grid.Row="1"
+                            <TextBlock Grid.Column="0" Grid.Row="1"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center"
                                Foreground="Orange" FontSize="20">
                                 <Run Text="{Binding AverageTimeToEmpty, StringFormat={}{0:0.0}H,FallbackValue=H}"/>
-                        </TextBlock>
-                    </Border>
+                            </TextBlock>
+                        </Border>
 
-                    <!--SOH-->
-                    <Button Grid.Column="2" Grid.Row="2"
+                        <!--SOH-->
+                        <Button Grid.Column="2" Grid.Row="2"
                         Content="SOH" Margin="3" Width="Auto" VerticalAlignment="Bottom"/>
-                    <Border Grid.Column="2" Grid.Row="3" Margin="5"
+                        <Border Grid.Column="2" Grid.Row="3" Margin="5"
                             BorderBrush="Gray" BorderThickness="1">
-                        <TextBlock Grid.Column="0" Grid.Row="1"
+                            <TextBlock Grid.Column="0" Grid.Row="1"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center"
                                Foreground="Orange" FontSize="20">
                                 <Run Text="{Binding SOH, StringFormat={}{0}%,FallbackValue=0%}"/>
-                        </TextBlock>
-                    </Border>
+                            </TextBlock>
+                        </Border>
 
-                    <!--Capacity-->
-                    <Button Grid.Column="3" Grid.Row="2"
+                        <!--Capacity-->
+                        <Button Grid.Column="3" Grid.Row="2"
                         Content="Capacity" Margin="3" Width="Auto" VerticalAlignment="Bottom"/>
-                    <Border Grid.Column="3" Grid.Row="3" Margin="5"
+                        <Border Grid.Column="3" Grid.Row="3" Margin="5"
                             BorderBrush="Gray" BorderThickness="1">
-                        <TextBlock Grid.Column="0" Grid.Row="1"
+                            <TextBlock Grid.Column="0" Grid.Row="1"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center"
                                Foreground="Orange" FontSize="20">
                                 <Run Text="{Binding Capacity, StringFormat={}{0:0Ah}, FallbackValue=Ah}"/>
-                        </TextBlock>
-                    </Border>
+                            </TextBlock>
+                        </Border>
 
-                    <!--Energy-->
-                    <Button Grid.Column="4" Grid.Row="2"
+                        <!--Energy-->
+                        <Button Grid.Column="4" Grid.Row="2"
                         Content="Energy" Margin="3" Width="Auto" VerticalAlignment="Bottom"/>
-                    <Border Grid.Column="4" Grid.Row="3" Margin="5"
+                        <Border Grid.Column="4" Grid.Row="3" Margin="5"
                             BorderBrush="Gray" BorderThickness="1">
-                        <TextBlock Grid.Column="0" Grid.Row="1"
+                            <TextBlock Grid.Column="0" Grid.Row="1"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center"
                                Foreground="Orange" FontSize="20">
                                 <Run Text="{Binding Energy, StringFormat={}{0:0.0.0Wh},FallbackValue=Wh}"/>
-                        </TextBlock>
-                    </Border>
+                            </TextBlock>
+                        </Border>
+                    </Grid>
                 </Grid>
             </Grid>
-        </Grid>
 
-        <Grid Grid.Column="1" Background="#263238" Grid.RowSpan="2">
-            <Border Margin="1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
-            <StackPanel VerticalAlignment="Bottom">
-                <Button Margin="10,0,10,10" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding CloseDialogCommand}" CommandParameter="true">
-                    <StackPanel>
-                        <materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                        <TextBlock Text="Close" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
-                    </StackPanel>
-                </Button>
-            </StackPanel>
+            <Grid Grid.Column="1" Background="#263238" Grid.RowSpan="2">
+                <Border Margin="1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
+                <StackPanel VerticalAlignment="Bottom">
+                    <Button Margin="10,0,10,10" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding CloseDialogCommand}" CommandParameter="true">
+                        <StackPanel>
+                            <materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                            <TextBlock Text="Close" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                        </StackPanel>
+                    </Button>
+                </StackPanel>
+            </Grid>
         </Grid>
-    </Grid>
+    </Border>
+      
 </UserControl>

+ 213 - 210
Dev/OHV/OHV.Module.Interactivity/PopUp/ConveyorControlView.xaml

@@ -8,7 +8,7 @@
              xmlns:prism="http://prismlibrary.com/"
              prism:ViewModelLocator.AutoWireViewModel="True"
              xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
-             Background="#455a64"
+             Background="#263238"
              Height="750"
              Width="900">
 
@@ -31,50 +31,51 @@
         </Style>
     </prism:Dialog.WindowStyle>
 
-    <Grid>
-        <Grid.ColumnDefinitions>
-            <ColumnDefinition Width="*"/>
-            <ColumnDefinition Width="130"/>
-        </Grid.ColumnDefinitions>
-        <Grid.RowDefinitions>
-            <RowDefinition Height="40"/>
-            <RowDefinition Height="*"/>
-        </Grid.RowDefinitions>
-
-        <Grid Grid.Row="0">
-            <TextBlock Margin="15,0,0,0" Text="Conveyor View" FontSize="25" Foreground="White"/>
-        </Grid>
+    <Border BorderBrush="Gray" BorderThickness="2">
+        <Grid>
+            <Grid.ColumnDefinitions>
+                <ColumnDefinition Width="*"/>
+                <ColumnDefinition Width="130"/>
+            </Grid.ColumnDefinitions>
+            <Grid.RowDefinitions>
+                <RowDefinition Height="40"/>
+                <RowDefinition Height="*"/>
+            </Grid.RowDefinitions>
+
+            <Grid Grid.Row="0">
+                <TextBlock Margin="15,0,0,0" Text="Conveyor View" FontSize="25" Foreground="White"/>
+            </Grid>
 
-        <Grid Grid.Row="1">
-            <Grid Margin="15" Background="#37474f">
-                <Grid.RowDefinitions>
-                    <RowDefinition Height="*"/>
-                    <RowDefinition Height="*"/>
-                </Grid.RowDefinitions>
+            <Grid Grid.Row="1">
+                <Grid Margin="15" Background="#37474f">
+                    <Grid.RowDefinitions>
+                        <RowDefinition Height="*"/>
+                        <RowDefinition Height="*"/>
+                    </Grid.RowDefinitions>
 
-                <Rectangle Grid.Row="1" Stroke="Gray" Margin="0,84,0,0" RadiusY="23.833" RadiusX="23.833"/>
+                    <Rectangle Grid.Row="1" Stroke="Gray" Margin="0,84,0,0" RadiusY="23.833" RadiusX="23.833"/>
 
-                <StackPanel VerticalAlignment="Top" HorizontalAlignment="Center" Margin="250,0,0,0">
-                    <Button Content="Batch Command" Foreground="Orange" Background="{x:Null}" FontSize="20"
+                    <StackPanel VerticalAlignment="Top" HorizontalAlignment="Center" Margin="250,0,0,0">
+                        <Button Content="Batch Command" Foreground="Orange" Background="{x:Null}" FontSize="20"
                             VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5"
                             Width="250" Height="50"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"/>
-                </StackPanel>
+                    </StackPanel>
 
-                <Grid Grid.Row="0">
-                    <Grid.ColumnDefinitions>
-                        <ColumnDefinition Width="*"/>
-                        <ColumnDefinition Width="*"/>
-                        <ColumnDefinition Width="*"/>
-                    </Grid.ColumnDefinitions>
+                    <Grid Grid.Row="0">
+                        <Grid.ColumnDefinitions>
+                            <ColumnDefinition Width="*"/>
+                            <ColumnDefinition Width="*"/>
+                            <ColumnDefinition Width="*"/>
+                        </Grid.ColumnDefinitions>
 
-                    <StackPanel Grid.Column="0"
+                        <StackPanel Grid.Column="0"
                                 Orientation="Vertical"
                                 HorizontalAlignment="Center"
                                 VerticalAlignment="Center">
 
-                        <!--<Button Background="{x:Null}" HorizontalContentAlignment="Left">
+                            <!--<Button Background="{x:Null}" HorizontalContentAlignment="Left">
                             <StackPanel Orientation="Horizontal">
                                 <Ellipse Margin="0,0,16,0" Width="20" Height="20" Fill="{Binding CvRun, FallbackValue=Gray}"/>
                                 <TextBlock Text="CV Running" />
@@ -115,274 +116,276 @@
                                 <TextBlock Text="CV Stop"/>
                             </StackPanel>
                         </Button>-->
-                    </StackPanel>
+                        </StackPanel>
+
+                        <Grid Grid.Column="0">
+                            <Rectangle Stroke="Gray" Margin="0,60,0,0" RadiusY="23.833" RadiusX="23.833"/>
 
-                    <Grid Grid.Column="0">
-                        <Rectangle Stroke="Gray" Margin="0,60,0,0" RadiusY="23.833" RadiusX="23.833"/>
-                        
-                        <StackPanel VerticalAlignment="Top" HorizontalAlignment="Center">
-                            <Button Content="Unit Command" Foreground="Orange" Background="{x:Null}" FontSize="20"
+                            <StackPanel VerticalAlignment="Top" HorizontalAlignment="Center">
+                                <Button Content="Unit Command" Foreground="Orange" Background="{x:Null}" FontSize="20"
                             VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5"
                             Width="Auto" Height="50"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"/>
-                        </StackPanel>
+                            </StackPanel>
 
-                        <StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center"
+                            <StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center"
                                     Margin="0,60,0,0">
-                            <Button HorizontalAlignment="Stretch"
+                                <Button HorizontalAlignment="Stretch"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             Command="{Binding ConveyorRunCommand}"
                             CommandParameter="CW"
                             Height="Auto" Width="154"
                             Margin="10">
-                                <StackPanel>
-                                    <materialDesign:PackIcon Kind="RotateRight" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                                    <TextBlock Text="CW" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
-                                </StackPanel>
-                            </Button>
+                                    <StackPanel>
+                                        <materialDesign:PackIcon Kind="RotateRight" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                                        <TextBlock Text="CW" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                                    </StackPanel>
+                                </Button>
 
-                            <Button 
+                                <Button 
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             Height="Auto" Width="154"
                             Margin="10"
                             Command="{Binding ConveyorRunCommand}"
                             CommandParameter="CCW">
-                                <StackPanel>
-                                    <materialDesign:PackIcon Kind="RotateLeft" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                                    <TextBlock Text="CCW" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
-                                </StackPanel>
-                            </Button>
+                                    <StackPanel>
+                                        <materialDesign:PackIcon Kind="RotateLeft" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                                        <TextBlock Text="CCW" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                                    </StackPanel>
+                                </Button>
 
-                            <Button HorizontalAlignment="Stretch"
+                                <Button HorizontalAlignment="Stretch"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             Command="{Binding ConveyorRunCommand}"
                             CommandParameter="STOP"
                             Height="Auto" Width="154"
                             Margin="5">
-                                <StackPanel>
-                                    <materialDesign:PackIcon Kind="StopCircleOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                                    <TextBlock Text="Stop" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
-                                </StackPanel>
-                            </Button>
-                        </StackPanel>
-                    </Grid>
+                                    <StackPanel>
+                                        <materialDesign:PackIcon Kind="StopCircleOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                                        <TextBlock Text="Stop" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                                    </StackPanel>
+                                </Button>
+                            </StackPanel>
+                        </Grid>
 
-                    <Grid Grid.Column="1">
-                        <Rectangle Stroke="Gray" Margin="0,60,0,0" RadiusY="23.833" RadiusX="23.833"/>
+                        <Grid Grid.Column="1">
+                            <Rectangle Stroke="Gray" Margin="0,60,0,0" RadiusY="23.833" RadiusX="23.833"/>
 
-                        <StackPanel Grid.Row="2" Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,60,0,0">
+                            <StackPanel Grid.Row="2" Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,60,0,0">
 
-                            <Button HorizontalAlignment="Stretch"
+                                <Button HorizontalAlignment="Stretch"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             Command="{Binding LoadUnloadCommand}"
                             CommandParameter="Load"
                             Height="Auto" Width="154"
                             Margin="10">
-                                <StackPanel>
-                                    <materialDesign:PackIcon Kind="ArrowCollapseDown" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                                    <TextBlock Text="Tray Load" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
-                                </StackPanel>
-                            </Button>
+                                    <StackPanel>
+                                        <materialDesign:PackIcon Kind="ArrowCollapseDown" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                                        <TextBlock Text="Tray Load" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                                    </StackPanel>
+                                </Button>
 
-                            <Button 
+                                <Button 
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             Height="Auto" Width="154"
                             Margin="10"
                             Command="{Binding LoadUnloadCommand}"
                             CommandParameter="Unload">
-                                <StackPanel RenderTransformOrigin="0.5,0.5" >
-                                    <materialDesign:PackIcon Kind="ArrowExpandUp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                                    <TextBlock Text="Tray UnLoad" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
-                                </StackPanel>
-                            </Button>
-                        </StackPanel>
-                    </Grid>
+                                    <StackPanel RenderTransformOrigin="0.5,0.5" >
+                                        <materialDesign:PackIcon Kind="ArrowExpandUp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                                        <TextBlock Text="Tray UnLoad" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                                    </StackPanel>
+                                </Button>
+                            </StackPanel>
+                        </Grid>
 
-                    <Grid Grid.Column="2">
-                        <Rectangle Stroke="Gray" Margin="0,60,0,0" RadiusY="23.833" RadiusX="23.833"/>
-                        
-                        <StackPanel Grid.Row="2" Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,60,0,0">
+                        <Grid Grid.Column="2">
+                            <Rectangle Stroke="Gray" Margin="0,60,0,0" RadiusY="23.833" RadiusX="23.833"/>
 
-                            <Button HorizontalAlignment="Stretch"
+                            <StackPanel Grid.Row="2" Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,60,0,0">
+
+                                <Button HorizontalAlignment="Stretch"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             Command="{Binding LoadUnloadCommand}"
                             CommandParameter="PL"
                             Height="Auto" Width="Auto"
                             Margin="10">
-                                <StackPanel>
-                                    <materialDesign:PackIcon Kind="ContactlessPayment" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto" RenderTransformOrigin="0.5,0.5">
-                                        <materialDesign:PackIcon.RenderTransform>
-                                            <TransformGroup>
-                                                <ScaleTransform/>
-                                                <SkewTransform/>
-                                                <RotateTransform Angle="90"/>
-                                                <TranslateTransform/>
-                                            </TransformGroup>
-                                        </materialDesign:PackIcon.RenderTransform>
-                                    </materialDesign:PackIcon>
-                                    <TextBlock Text="PIO Tray Load" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
-                                </StackPanel>
-                            </Button>
-
-                            <Button 
+                                    <StackPanel>
+                                        <materialDesign:PackIcon Kind="ContactlessPayment" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto" RenderTransformOrigin="0.5,0.5">
+                                            <materialDesign:PackIcon.RenderTransform>
+                                                <TransformGroup>
+                                                    <ScaleTransform/>
+                                                    <SkewTransform/>
+                                                    <RotateTransform Angle="90"/>
+                                                    <TranslateTransform/>
+                                                </TransformGroup>
+                                            </materialDesign:PackIcon.RenderTransform>
+                                        </materialDesign:PackIcon>
+                                        <TextBlock Text="PIO Tray Load" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                                    </StackPanel>
+                                </Button>
+
+                                <Button 
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             Height="Auto" Width="Auto"
                             Margin="10"
                             Command="{Binding LoadUnloadCommand}"
                             CommandParameter="PU">
-                                <StackPanel RenderTransformOrigin="0.5,0.5" >
-                                    <materialDesign:PackIcon Kind="ContactlessPayment" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto" RenderTransformOrigin="0.5,0.5">
-                                        <materialDesign:PackIcon.RenderTransform>
-                                            <TransformGroup>
-                                                <ScaleTransform ScaleY="1" ScaleX="-1"/>
-                                                <SkewTransform AngleY="0" AngleX="0"/>
-                                                <RotateTransform Angle="90"/>
-                                                <TranslateTransform/>
-                                            </TransformGroup>
-                                        </materialDesign:PackIcon.RenderTransform>
-                                    </materialDesign:PackIcon>
-                                    <TextBlock Text="PIO Tray UnLoad" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
-                                </StackPanel>
-                            </Button>
-
-                            <Button 
+                                    <StackPanel RenderTransformOrigin="0.5,0.5" >
+                                        <materialDesign:PackIcon Kind="ContactlessPayment" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto" RenderTransformOrigin="0.5,0.5">
+                                            <materialDesign:PackIcon.RenderTransform>
+                                                <TransformGroup>
+                                                    <ScaleTransform ScaleY="1" ScaleX="-1"/>
+                                                    <SkewTransform AngleY="0" AngleX="0"/>
+                                                    <RotateTransform Angle="90"/>
+                                                    <TranslateTransform/>
+                                                </TransformGroup>
+                                            </materialDesign:PackIcon.RenderTransform>
+                                        </materialDesign:PackIcon>
+                                        <TextBlock Text="PIO Tray UnLoad" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                                    </StackPanel>
+                                </Button>
+
+                                <Button 
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             Height="Auto" Width="Auto"
                             Margin="10"
                             Command="{Binding PIOCharge}"
                             CommandParameter="PB">
-                                <StackPanel RenderTransformOrigin="0.5,0.5" >
-                                    <materialDesign:PackIcon Kind="BatteryChargingWirelessEmpty" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                                    <TextBlock Text="PIO Battery Charge" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
-                                </StackPanel>
-                            </Button>
-                        </StackPanel>
+                                    <StackPanel RenderTransformOrigin="0.5,0.5" >
+                                        <materialDesign:PackIcon Kind="BatteryChargingWirelessEmpty" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                                        <TextBlock Text="PIO Battery Charge" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                                    </StackPanel>
+                                </Button>
+                            </StackPanel>
+                        </Grid>
                     </Grid>
-                </Grid>
 
-                <StackPanel Grid.Row="1" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="20">
-                    <Button Content="Clamp Control" Foreground="Orange" Background="{x:Null}" FontSize="20" Width="Auto" Height="50"
+                    <StackPanel Grid.Row="1" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="20">
+                        <Button Content="Clamp Control" Foreground="Orange" Background="{x:Null}" FontSize="20" Width="Auto" Height="50"
                              Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"/>
-                </StackPanel>
-                
-                <Grid Grid.Row="1">
-                    <Grid.ColumnDefinitions>
-                        <ColumnDefinition Width="*"/>
-                        <ColumnDefinition Width="*"/>
-                    </Grid.ColumnDefinitions>
-                    
-                    
-
-                    <Grid Grid.Column="0">
-                        <StackPanel VerticalAlignment="Bottom"
+                    </StackPanel>
+
+                    <Grid Grid.Row="1">
+                        <Grid.ColumnDefinitions>
+                            <ColumnDefinition Width="*"/>
+                            <ColumnDefinition Width="*"/>
+                        </Grid.ColumnDefinitions>
+
+
+
+                        <Grid Grid.Column="0">
+                            <StackPanel VerticalAlignment="Bottom"
                                     HorizontalAlignment="Center"
                                     Margin="20">
 
-                            <Button Background="{x:Null}">
-                                <StackPanel Orientation="Horizontal">
-                                    <Ellipse Margin="0,0,8,0" Width="20" Height="20" Fill="{Binding AxisLeftIsServoOn, FallbackValue=Gray}"/>
-                                    <TextBlock Text="Axis-L ServoON"/>
-                                </StackPanel>
-                            </Button>
-
-                            <Button Background="{x:Null}">
-                                <StackPanel Orientation="Horizontal">
-                                    <Ellipse Margin="0,0,18,0" Width="20" Height="20" Fill="{Binding AxisLeftIsOrg, FallbackValue=Gray}"/>
-                                    <TextBlock Text="Axis-L Is ORG"/>
-                                </StackPanel>
-                            </Button>
-
-                            <Button Background="{x:Null}">
-                                <StackPanel Orientation="Horizontal">
-                                    <Ellipse Margin="0,0,33,0" Width="20" Height="20" Fill="{Binding AxisLeftAmpFault, FallbackValue=Gray}"/>
-                                    <TextBlock Text="Axis-L Fault"/>
-                                </StackPanel>
-                            </Button>
-
-                            <Button Background="{x:Null}" Margin="0,10,0,0">
-                                <StackPanel Orientation="Horizontal">
-                                    <Ellipse Margin="0,0,8,0" Width="20" Height="20" Fill="{Binding AxisRightIsServoOn, FallbackValue=Gray}"/>
-                                    <TextBlock Text="Axis-R ServoON"/>
-                                </StackPanel>
-                            </Button>
-
-                            <Button Background="{x:Null}">
-                                <StackPanel Orientation="Horizontal">
-                                    <Ellipse Margin="0,0,16,0" Width="20" Height="20" Fill="{Binding AxisRightIsOrg, FallbackValue=Gray}"/>
-                                    <TextBlock Text="Axis-R Is ORG"/>
-                                </StackPanel>
-                            </Button>
-
-                            <Button Background="{x:Null}">
-                                <StackPanel Orientation="Horizontal">
-                                    <Ellipse Margin="0,0,30,0" Width="20" Height="20" Fill="{Binding AxisRightAmpFault, FallbackValue=Gray}"/>
-                                    <TextBlock Text="Axis-R Fault"/>
-                                </StackPanel>
-                            </Button>
-                        </StackPanel>
-                    </Grid>
+                                <Button Background="{x:Null}">
+                                    <StackPanel Orientation="Horizontal">
+                                        <Ellipse Margin="0,0,8,0" Width="20" Height="20" Fill="{Binding AxisLeftIsServoOn, FallbackValue=Gray}"/>
+                                        <TextBlock Text="Axis-L ServoON"/>
+                                    </StackPanel>
+                                </Button>
+
+                                <Button Background="{x:Null}">
+                                    <StackPanel Orientation="Horizontal">
+                                        <Ellipse Margin="0,0,18,0" Width="20" Height="20" Fill="{Binding AxisLeftIsOrg, FallbackValue=Gray}"/>
+                                        <TextBlock Text="Axis-L Is ORG"/>
+                                    </StackPanel>
+                                </Button>
+
+                                <Button Background="{x:Null}">
+                                    <StackPanel Orientation="Horizontal">
+                                        <Ellipse Margin="0,0,33,0" Width="20" Height="20" Fill="{Binding AxisLeftAmpFault, FallbackValue=Gray}"/>
+                                        <TextBlock Text="Axis-L Fault"/>
+                                    </StackPanel>
+                                </Button>
+
+                                <Button Background="{x:Null}" Margin="0,10,0,0">
+                                    <StackPanel Orientation="Horizontal">
+                                        <Ellipse Margin="0,0,8,0" Width="20" Height="20" Fill="{Binding AxisRightIsServoOn, FallbackValue=Gray}"/>
+                                        <TextBlock Text="Axis-R ServoON"/>
+                                    </StackPanel>
+                                </Button>
+
+                                <Button Background="{x:Null}">
+                                    <StackPanel Orientation="Horizontal">
+                                        <Ellipse Margin="0,0,16,0" Width="20" Height="20" Fill="{Binding AxisRightIsOrg, FallbackValue=Gray}"/>
+                                        <TextBlock Text="Axis-R Is ORG"/>
+                                    </StackPanel>
+                                </Button>
+
+                                <Button Background="{x:Null}">
+                                    <StackPanel Orientation="Horizontal">
+                                        <Ellipse Margin="0,0,30,0" Width="20" Height="20" Fill="{Binding AxisRightAmpFault, FallbackValue=Gray}"/>
+                                        <TextBlock Text="Axis-R Fault"/>
+                                    </StackPanel>
+                                </Button>
+                            </StackPanel>
+                        </Grid>
 
-                    <Grid Grid.Column="1">
+                        <Grid Grid.Column="1">
 
-                        <StackPanel Orientation="Horizontal"
+                            <StackPanel Orientation="Horizontal"
                                 HorizontalAlignment="Center" VerticalAlignment="Bottom"
                                     Margin="0,0,0,70">
 
-                            <Button Margin="15" 
+                                <Button Margin="15" 
                                 Width="154" Height="Auto"
                                 Style="{StaticResource MaterialDesignRaisedButton}"
                                 materialDesign:ButtonAssist.CornerRadius="10"
                                 Command="{Binding PosMoveCommand}"
                                 CommandParameter="Lock">
-                                <StackPanel>
-                                    <materialDesign:PackIcon Kind="ElectricSwitchClosed" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                                    <TextBlock Text="Clamp" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
-                                    <TextBlock Text="Lock" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
-                                </StackPanel>
-                            </Button>
-
-                            <Button Margin="15"
+                                    <StackPanel>
+                                        <materialDesign:PackIcon Kind="ElectricSwitchClosed" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                                        <TextBlock Text="Clamp" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                                        <TextBlock Text="Lock" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                                    </StackPanel>
+                                </Button>
+
+                                <Button Margin="15"
                                 Width="154" Height="Auto"
                                 Style="{StaticResource MaterialDesignRaisedButton}"
                                 materialDesign:ButtonAssist.CornerRadius="10"
                                 Command="{Binding PosMoveCommand}"
                                 CommandParameter="UnLock">
-                                <!--<Button.InputBindings>
+                                    <!--<Button.InputBindings>
                                 <MouseBinding Gesture="LeftClick" Command="{Binding KeyInTargetPosCommand}" CommandParameter="Left"/>
                                 </Button.InputBindings>-->
-                                <StackPanel>
-                                    <materialDesign:PackIcon Kind="ElectricSwitch" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                                    <TextBlock Text="Clamp" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
-                                    <TextBlock Text="UnLock" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
-                                </StackPanel>
-                            </Button>
-                        </StackPanel>
-                    </Grid>
+                                    <StackPanel>
+                                        <materialDesign:PackIcon Kind="ElectricSwitch" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                                        <TextBlock Text="Clamp" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                                        <TextBlock Text="UnLock" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                                    </StackPanel>
+                                </Button>
+                            </StackPanel>
+                        </Grid>
 
+                    </Grid>
                 </Grid>
             </Grid>
-        </Grid>
 
-        <Grid Grid.Column="1" Grid.RowSpan="2" Background="#263238">
-            <Border Margin="1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
-            <StackPanel VerticalAlignment="Bottom">
-                <Button Margin="10,0,10,10" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding CloseDialogCommand}" CommandParameter="true">
-                    <StackPanel>
-                        <materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                        <TextBlock Text="Close" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
-                    </StackPanel>
-                </Button>
-            </StackPanel>
+            <Grid Grid.Column="1" Grid.RowSpan="2" Background="#263238">
+                <Border Margin="1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
+                <StackPanel VerticalAlignment="Bottom">
+                    <Button Margin="10,0,10,10" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding CloseDialogCommand}" CommandParameter="true">
+                        <StackPanel>
+                            <materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                            <TextBlock Text="Close" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                        </StackPanel>
+                    </Button>
+                </StackPanel>
+            </Grid>
         </Grid>
-    </Grid>
+    </Border>
+   
 </UserControl>

+ 164 - 162
Dev/OHV/OHV.Module.Interactivity/PopUp/DriveServoView.xaml

@@ -10,7 +10,7 @@
              mc:Ignorable="d" 
              Width="1130"
              Height="750"
-             Background="#455a64"
+             Background="#263238"
              xmlns:System="clr-namespace:System;assembly=mscorlib"
              xmlns:SharedEnum="clr-namespace:OHV.Common.Model;assembly=OHV.Common"
              >
@@ -53,40 +53,40 @@
                 <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.DataGrid.xaml" />
             </ResourceDictionary.MergedDictionaries>
         </ResourceDictionary>
-
     </UserControl.Resources>
 
-    <Grid>
-        <Grid.ColumnDefinitions>
-            <ColumnDefinition/>
-            <!--<ColumnDefinition Width="130"/>-->
-            <ColumnDefinition Width="130"/>
-        </Grid.ColumnDefinitions>
-        <Grid.RowDefinitions>
-            <RowDefinition Height="30"/>
-            <RowDefinition Height="*"/>
-        </Grid.RowDefinitions>
-
-        <Grid Grid.Row="0">
-            <TextBlock Margin="15,0,0,0" FontSize="25" Foreground="White">
+    <Border BorderBrush="Gray" BorderThickness="2">
+        <Grid>
+            <Grid.ColumnDefinitions>
+                <ColumnDefinition/>
+                <!--<ColumnDefinition Width="130"/>-->
+                <ColumnDefinition Width="130"/>
+            </Grid.ColumnDefinitions>
+            <Grid.RowDefinitions>
+                <RowDefinition Height="30"/>
+                <RowDefinition Height="*"/>
+            </Grid.RowDefinitions>
+
+            <Grid Grid.Row="0">
+                <TextBlock Margin="15,0,0,0" FontSize="25" Foreground="White">
                 <Run>
                     Drive View
                 </Run>
-            </TextBlock>
-        </Grid>
+                </TextBlock>
+            </Grid>
 
-        <Grid Grid.Column="0" Margin="15" Grid.Row="1"
+            <Grid Grid.Column="0" Margin="15" Grid.Row="1"
               Background="#37474f">
 
-            <Grid.RowDefinitions>
-                <RowDefinition Height="*"/>
-                <RowDefinition Height="*"/>
-            </Grid.RowDefinitions>
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="*"/>
+                    <RowDefinition Height="*"/>
+                </Grid.RowDefinitions>
 
-            <!--Position Data Grid View-->
-            <Grid Grid.Row="0" Background="#FF606E83">
-                <!--<TextBlock VerticalAlignment="Top" HorizontalAlignment="Left" Foreground="White">Drive Point List</TextBlock>-->
-                <DockPanel>
+                <!--Position Data Grid View-->
+                <Grid Grid.Row="0" Background="#FF606E83">
+                    <!--<TextBlock VerticalAlignment="Top" HorizontalAlignment="Left" Foreground="White">Drive Point List</TextBlock>-->
+                    <DockPanel>
                         <DataGrid ItemsSource="{Binding RouteList}" CanUserSortColumns="True" CanUserAddRows="False" AutoGenerateColumns="False" materialDesign:DataGridAssist.CellPadding="13 8 8 8" 
                                   materialDesign:DataGridAssist.ColumnHeaderPadding="8" Background="{x:Null}" Foreground="White" IsSynchronizedWithCurrentItem="True" SelectedItem="{Binding SelectedRoute, Mode=TwoWay}"
                                   >
@@ -127,118 +127,118 @@
                                 <DataGridCheckBoxColumn Header="UsePIO" Binding="{Binding UsePIO}" EditingElementStyle="{StaticResource MaterialDesignDataGridCheckBoxColumnEditingStyle}"></DataGridCheckBoxColumn>
                             </DataGrid.Columns>
                         </DataGrid>
-                    <!--</ScrollViewer>-->
-                </DockPanel>
-
-            </Grid>
-
-            <!--Axis  Grid View-->
-            <Grid Grid.Row="1">
-                <Grid.RowDefinitions>
-                    <RowDefinition Height="*"/>
-                    <RowDefinition Height="*"/>
-                    <RowDefinition Height="*"/>
-                    <RowDefinition Height="*"/>
-                </Grid.RowDefinitions>
-                <Grid.ColumnDefinitions>
-                    <ColumnDefinition Width="*"/>
-                    <ColumnDefinition Width="*"/>
-                    <ColumnDefinition Width="*"/>
-                    <ColumnDefinition Width="*"/>
-                    <ColumnDefinition Width="*"/>
-                </Grid.ColumnDefinitions>
-
-                <Border Margin="0,5,189,5" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.RowSpan="4" Grid.Column="2"/>
-                <Border Margin="33,-2,34,82" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.Column="2" Grid.ColumnSpan="3" Grid.RowSpan="2"/>
-
-                <Button Grid.Column="0" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Height="auto"
+                        <!--</ScrollViewer>-->
+                    </DockPanel>
+
+                </Grid>
+
+                <!--Axis  Grid View-->
+                <Grid Grid.Row="1">
+                    <Grid.RowDefinitions>
+                        <RowDefinition Height="*"/>
+                        <RowDefinition Height="*"/>
+                        <RowDefinition Height="*"/>
+                        <RowDefinition Height="*"/>
+                    </Grid.RowDefinitions>
+                    <Grid.ColumnDefinitions>
+                        <ColumnDefinition Width="*"/>
+                        <ColumnDefinition Width="*"/>
+                        <ColumnDefinition Width="*"/>
+                        <ColumnDefinition Width="*"/>
+                        <ColumnDefinition Width="*"/>
+                    </Grid.ColumnDefinitions>
+
+                    <Border Margin="0,5,189,5" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.RowSpan="4" Grid.Column="2"/>
+                    <Border Margin="33,-2,34,82" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.Column="2" Grid.ColumnSpan="3" Grid.RowSpan="2"/>
+
+                    <Button Grid.Column="0" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Height="auto"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10">
-                    <StackPanel>
-                        <TextBlock HorizontalAlignment="Center"><Run Text="Target" FontSize="20"/></TextBlock>
-                        <TextBlock HorizontalAlignment="Center"><Run Text="Pos" FontSize="20"/></TextBlock>
-                    </StackPanel>
-                </Button>
+                        <StackPanel>
+                            <TextBlock HorizontalAlignment="Center"><Run Text="Target" FontSize="20"/></TextBlock>
+                            <TextBlock HorizontalAlignment="Center"><Run Text="Pos" FontSize="20"/></TextBlock>
+                        </StackPanel>
+                    </Button>
 
-                <Button Grid.Column="0" Grid.Row="2" HorizontalAlignment="Stretch" Margin="5" Height="auto"
+                    <Button Grid.Column="0" Grid.Row="2" HorizontalAlignment="Stretch" Margin="5" Height="auto"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             ToolTip="MaterialDesignRaisedButton with Round Corners">
-                    <StackPanel>
-                        <TextBlock HorizontalAlignment="Center"><Run Text="Current" FontSize="20"/></TextBlock>
-                        <TextBlock HorizontalAlignment="Center"><Run Text="Pos" FontSize="20"/></TextBlock>
-                    </StackPanel>
-                </Button>
+                        <StackPanel>
+                            <TextBlock HorizontalAlignment="Center"><Run Text="Current" FontSize="20"/></TextBlock>
+                            <TextBlock HorizontalAlignment="Center"><Run Text="Pos" FontSize="20"/></TextBlock>
+                        </StackPanel>
+                    </Button>
 
-                <Button Grid.Column="0" Grid.Row="3" HorizontalAlignment="Stretch" Margin="5" Height="auto"
+                    <Button Grid.Column="0" Grid.Row="3" HorizontalAlignment="Stretch" Margin="5" Height="auto"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10">
-                    <StackPanel>
-                        <TextBlock HorizontalAlignment="Center"><Run Text="Difference" FontSize="20"/></TextBlock>
-                        <TextBlock HorizontalAlignment="Center"><Run Text="Pos" FontSize="20"/></TextBlock>
-                    </StackPanel>
-                </Button>
+                        <StackPanel>
+                            <TextBlock HorizontalAlignment="Center"><Run Text="Difference" FontSize="20"/></TextBlock>
+                            <TextBlock HorizontalAlignment="Center"><Run Text="Pos" FontSize="20"/></TextBlock>
+                        </StackPanel>
+                    </Button>
 
-                <Button Grid.Column="1" Grid.Row="0" HorizontalAlignment="Stretch" Margin="5" Height="auto"
+                    <Button Grid.Column="1" Grid.Row="0" HorizontalAlignment="Stretch" Margin="5" Height="auto"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             Command="{Binding SelectAxisCommand}"
                             CommandParameter="Left">
-                    <TextBlock><Run Text="Drive" FontSize="20"/></TextBlock>
-                </Button>
+                        <TextBlock><Run Text="Drive" FontSize="20"/></TextBlock>
+                    </Button>
 
-                <Button Background="{x:Null}" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Height="auto"
+                    <Button Background="{x:Null}" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Height="auto"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10">
-                    <Button.InputBindings>
-                        <MouseBinding Gesture="LeftClick" Command="{Binding KeyInTargetPosCommand}" CommandParameter="Left"/>
-                    </Button.InputBindings>
-                    <TextBlock><Run Text="{Binding DriveTargetPos, StringFormat=0.000, FallbackValue=0.000}" FontSize="20"/></TextBlock>
-                </Button>
+                        <Button.InputBindings>
+                            <MouseBinding Gesture="LeftClick" Command="{Binding KeyInTargetPosCommand}" CommandParameter="Left"/>
+                        </Button.InputBindings>
+                        <TextBlock><Run Text="{Binding DriveTargetPos, StringFormat=0.000, FallbackValue=0.000}" FontSize="20"/></TextBlock>
+                    </Button>
 
-                <Button Background="{x:Null}" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Stretch" Margin="5" Height="auto"
+                    <Button Background="{x:Null}" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Stretch" Margin="5" Height="auto"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10">
-                    <TextBlock><Run Text="{Binding CurrentDrive, StringFormat=0.000, FallbackValue=0.000}" FontSize="20"/></TextBlock>
-                </Button>
+                        <TextBlock><Run Text="{Binding CurrentDrive, StringFormat=0.000, FallbackValue=0.000}" FontSize="20"/></TextBlock>
+                    </Button>
 
-                <Button Background="{x:Null}" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Stretch" Margin="5" Height="auto"
+                    <Button Background="{x:Null}" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Stretch" Margin="5" Height="auto"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10">
-                    <TextBlock><Run Text="{Binding DifferenceDrive, StringFormat=0.000, FallbackValue=0.000}" FontSize="20"/></TextBlock>
-                </Button>
-                    
-                <StackPanel Grid.Column="2" Grid.Row="1" Grid.ColumnSpan="3" Grid.RowSpan="3"  Orientation="Horizontal" HorizontalAlignment="Center" Margin="82,52,43,31" Width="379"  >
-                    <Button Margin="20,30" Width="150"
+                        <TextBlock><Run Text="{Binding DifferenceDrive, StringFormat=0.000, FallbackValue=0.000}" FontSize="20"/></TextBlock>
+                    </Button>
+
+                    <StackPanel Grid.Column="2" Grid.Row="1" Grid.ColumnSpan="3" Grid.RowSpan="3"  Orientation="Horizontal" HorizontalAlignment="Center" Margin="82,52,43,31" Width="379"  >
+                        <Button Margin="20,30" Width="150"
                         HorizontalAlignment="Stretch" 
                         Height="Auto" 
                         BorderBrush="{Binding SteeringLeftBrushProperty}" 
                         BorderThickness="5" 
                         Command="{Binding SteeringCWCommand}"
                         CommandParameter="CW" >
-                        <StackPanel>
-                            <materialDesign:PackIcon Kind="ArrowLeft" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                            <TextBlock Text="Steering Left" VerticalAlignment="Stretch" HorizontalAlignment="Center" FontSize="20"/>
-                        </StackPanel>
-                    </Button>
+                            <StackPanel>
+                                <materialDesign:PackIcon Kind="ArrowLeft" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                                <TextBlock Text="Steering Left" VerticalAlignment="Stretch" HorizontalAlignment="Center" FontSize="20"/>
+                            </StackPanel>
+                        </Button>
 
-                    <Button Margin="0,30" Width="150"
+                        <Button Margin="0,30" Width="150"
                         HorizontalAlignment="Stretch" 
                         Height="Auto" 
                         BorderBrush="{Binding SteeringRightBrushProperty}" 
                         BorderThickness="5" 
                         Command="{Binding SteeringCCWCommand}"
                         CommandParameter="CCW">
-                        <StackPanel>
-                            <materialDesign:PackIcon Kind="ArrowRight" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                            <TextBlock Text="Steering Right" VerticalAlignment="Stretch" HorizontalAlignment="Center" FontSize="18"/>
-                        </StackPanel>
-                    </Button>
-                </StackPanel>
+                            <StackPanel>
+                                <materialDesign:PackIcon Kind="ArrowRight" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                                <TextBlock Text="Steering Right" VerticalAlignment="Stretch" HorizontalAlignment="Center" FontSize="18"/>
+                            </StackPanel>
+                        </Button>
+                    </StackPanel>
 
 
-                <!--Jog Button-->
-                <Button
+                    <!--Jog Button-->
+                    <Button
                             Margin="5"
                             Grid.Row="0" 
                             Grid.Column="2"
@@ -247,26 +247,26 @@
                             Height="auto"
                             Command="{Binding JogCommand}" CommandParameter="-"
                             >
-                    <StackPanel>
-                        <materialDesign:PackIcon Kind="MinusBoxOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="30" Width="auto"/>
-                        <TextBlock><Run Text="Jog(-)" FontSize="20"/></TextBlock>
-                    </StackPanel>
-                </Button>
+                        <StackPanel>
+                            <materialDesign:PackIcon Kind="MinusBoxOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="30" Width="auto"/>
+                            <TextBlock><Run Text="Jog(-)" FontSize="20"/></TextBlock>
+                        </StackPanel>
+                    </Button>
 
-                <Button
+                    <Button
                             Margin="5"
                             Grid.Row="0" 
                             Grid.Column="3"
                             HorizontalAlignment="Center"
                             Height="auto"
                             Command="{Binding JogVelPopupCommand}" CommandParameter="-">
-                    <StackPanel>
-                        <TextBlock HorizontalAlignment="Center"><Run Text="Jog Velocity"/></TextBlock>
-                        <TextBlock HorizontalAlignment="Center"><Run Text="{Binding JogVelocity, StringFormat={}{0:0.000}, FallbackValue=0.00}" FontSize="20" Foreground="Orange"/></TextBlock>
-                    </StackPanel>
-                </Button>
+                        <StackPanel>
+                            <TextBlock HorizontalAlignment="Center"><Run Text="Jog Velocity"/></TextBlock>
+                            <TextBlock HorizontalAlignment="Center"><Run Text="{Binding JogVelocity, StringFormat={}{0:0.000}, FallbackValue=0.00}" FontSize="20" Foreground="Orange"/></TextBlock>
+                        </StackPanel>
+                    </Button>
 
-                <RepeatButton
+                    <RepeatButton
                             Margin="5"
                             Grid.Row="0" 
                             Grid.Column="4"
@@ -274,21 +274,21 @@
                             Width="120"
                             Height="auto"
                             Command="{Binding JogCommand}" CommandParameter="+">
-                    <StackPanel>
-                        <materialDesign:PackIcon Kind="PlusBoxOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="30" Width="auto"/>
-                        <TextBlock><Run Text="Jog(+)" FontSize="20"/></TextBlock>
-                    </StackPanel>
-                </RepeatButton>
-            </Grid>
+                        <StackPanel>
+                            <materialDesign:PackIcon Kind="PlusBoxOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="30" Width="auto"/>
+                            <TextBlock><Run Text="Jog(+)" FontSize="20"/></TextBlock>
+                        </StackPanel>
+                    </RepeatButton>
+                </Grid>
 
-            <!--Steering Control-->
-            <Grid Grid.Row="2">
+                <!--Steering Control-->
+                <Grid Grid.Row="2">
 
+                </Grid>
             </Grid>
-        </Grid>
 
-        <!--Sub Drive Menu-->
-        <!--<Grid Grid.Column="1" Background="#37474f" Grid.RowSpan="2">
+            <!--Sub Drive Menu-->
+            <!--<Grid Grid.Column="1" Background="#37474f" Grid.RowSpan="2">
             <StackPanel Orientation="Vertical" VerticalAlignment="Top">
                 <Button Margin="7, 10" HorizontalAlignment="Stretch" Height="60" BorderBrush="Gray" BorderThickness="2" 
                         Command="{Binding PositionAddCommand}">
@@ -329,55 +329,57 @@
             </StackPanel>
         </Grid>-->
 
-        <!--Right Drive Menu-->
-        <Grid Grid.Column="2" Background="#263238" Grid.RowSpan="2">
-            <Border Margin="1,1,0,1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Left" Width="128"/>
-            <StackPanel VerticalAlignment="Top">
-                <Button Margin="10,10,10,5" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding ServoOnCommand}">
-                    <StackPanel>
-                        <materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                        <TextBlock Text="Servo On" VerticalAlignment="Stretch" HorizontalAlignment="Center" FontSize="19"/>
-                    </StackPanel>
-                </Button>
+            <!--Right Drive Menu-->
+            <Grid Grid.Column="2" Background="#263238" Grid.RowSpan="2">
+                <Border Margin="1,1,0,1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Left" Width="128"/>
+                <StackPanel VerticalAlignment="Top">
+                    <Button Margin="10,10,10,5" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding ServoOnCommand}">
+                        <StackPanel>
+                            <materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                            <TextBlock Text="Servo On" VerticalAlignment="Stretch" HorizontalAlignment="Center" FontSize="19"/>
+                        </StackPanel>
+                    </Button>
 
-                <Button Margin="10,10,10,5" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding ServoOffCommand}">
-                    <StackPanel>
-                        <materialDesign:PackIcon Kind="PowerPlugOff" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                        <TextBlock Text="Servo Off" VerticalAlignment="Stretch" HorizontalAlignment="Center" FontSize="18"/>
-                    </StackPanel>
-                </Button>
+                    <Button Margin="10,10,10,5" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding ServoOffCommand}">
+                        <StackPanel>
+                            <materialDesign:PackIcon Kind="PowerPlugOff" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                            <TextBlock Text="Servo Off" VerticalAlignment="Stretch" HorizontalAlignment="Center" FontSize="18"/>
+                        </StackPanel>
+                    </Button>
 
-                <Button Margin="10,10,10,5" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding FaultResetCommand}">
-                    <StackPanel>
-                        <materialDesign:PackIcon Kind="CircleArrows" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                        <TextBlock Text="Fault Reset" FontSize="16" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                    </StackPanel>
-                </Button>
+                    <Button Margin="10,10,10,5" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding FaultResetCommand}">
+                        <StackPanel>
+                            <materialDesign:PackIcon Kind="CircleArrows" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                            <TextBlock Text="Fault Reset" FontSize="16" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                        </StackPanel>
+                    </Button>
 
-                <!--<Button Margin="10,10,10,5" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding OriginCommand}">
+                    <!--<Button Margin="10,10,10,5" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding OriginCommand}">
                     <StackPanel>
                         <materialDesign:PackIcon Kind="Origin" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
                         <TextBlock Text="Origin" VerticalAlignment="Stretch" HorizontalAlignment="Center" FontSize="20"/>
                     </StackPanel>
                 </Button>-->
-            </StackPanel>
+                </StackPanel>
 
-            <StackPanel VerticalAlignment="Bottom">
-                <Button Margin="10,0,10,10" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" 
+                <StackPanel VerticalAlignment="Bottom">
+                    <Button Margin="10,0,10,10" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" 
                         Command="{Binding PositionSaveCommand}">
-                    <StackPanel>
-                        <materialDesign:PackIcon Kind="ContentSave" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                        <TextBlock Text="Save" VerticalAlignment="Stretch" HorizontalAlignment="Center" FontSize="20"/>
-                    </StackPanel>
-                </Button>
+                        <StackPanel>
+                            <materialDesign:PackIcon Kind="ContentSave" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                            <TextBlock Text="Save" VerticalAlignment="Stretch" HorizontalAlignment="Center" FontSize="20"/>
+                        </StackPanel>
+                    </Button>
 
-                <Button Margin="10,0,10,10" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding CloseDialogCommand}" CommandParameter="true">
-                    <StackPanel>
-                        <materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                        <TextBlock Text="Close" VerticalAlignment="Stretch" HorizontalAlignment="Center" FontSize="20"/>
-                    </StackPanel>
-                </Button>
-            </StackPanel>
+                    <Button Margin="10,0,10,10" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding CloseDialogCommand}" CommandParameter="true">
+                        <StackPanel>
+                            <materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                            <TextBlock Text="Close" VerticalAlignment="Stretch" HorizontalAlignment="Center" FontSize="20"/>
+                        </StackPanel>
+                    </Button>
+                </StackPanel>
+            </Grid>
         </Grid>
-    </Grid>
+    </Border>
+    
 </UserControl>

+ 1 - 1
Dev/OHV/OHV.Module.Interactivity/PopUp/InOutControlView.xaml

@@ -10,7 +10,7 @@
              mc:Ignorable="d" 
              Width="800"
              Height="600"
-             Background="#455a64">
+             Background="#263238">
 
     <prism:Dialog.WindowStyle>
         <Style TargetType="Window">

+ 313 - 310
Dev/OHV/OHV.Module.Interactivity/PopUp/LockServoView.xaml

@@ -14,7 +14,7 @@
              xmlns:media ="clr-namespace:System.Windows.Media;assembly=PresentationCore"
              Width="900"
              Height="700"
-             Background="#455a64">
+             Background="#263238">
 
     <prism:Dialog.WindowStyle>
         <Style TargetType="Window">
@@ -57,88 +57,89 @@
         </Style>
     </UserControl.Resources>
 
-    <Grid>
-        <Grid.ColumnDefinitions>
-            <ColumnDefinition/>
-            <ColumnDefinition Width="130"/>
-            <ColumnDefinition Width="130"/>
-        </Grid.ColumnDefinitions>
-        <Grid.RowDefinitions>
-            <RowDefinition Height="30"/>
-            <RowDefinition Height="*"/>
-        </Grid.RowDefinitions>
-
-        <Grid Grid.Row="0">
-            <TextBlock Margin="15,0,0,0" Text="Lock View" FontSize="25" Foreground="White"/>
-        </Grid>
-
-        <Grid Grid.Column="0" Grid.Row="1">
-            <Grid Margin="15,15" Background="#37474f">
-                <Grid.RowDefinitions>
-                    <RowDefinition/>
-                    <RowDefinition/>
-                </Grid.RowDefinitions>
+    <Border BorderBrush="Gray" BorderThickness="2">
+        <Grid>
+            <Grid.ColumnDefinitions>
+                <ColumnDefinition/>
+                <ColumnDefinition Width="130"/>
+                <ColumnDefinition Width="130"/>
+            </Grid.ColumnDefinitions>
+            <Grid.RowDefinitions>
+                <RowDefinition Height="30"/>
+                <RowDefinition Height="*"/>
+            </Grid.RowDefinitions>
+
+            <Grid Grid.Row="0">
+                <TextBlock Margin="15,0,0,0" Text="Clam View" FontSize="25" Foreground="White"/>
+            </Grid>
 
-                <Grid Grid.Row="0">
+            <Grid Grid.Column="0" Grid.Row="1">
+                <Grid Margin="15,15" Background="#37474f">
                     <Grid.RowDefinitions>
-                        <RowDefinition Height="*"/>
-                        <RowDefinition Height="*"/>
-                        <RowDefinition Height="*"/>
-                        <RowDefinition Height="*"/>
+                        <RowDefinition/>
+                        <RowDefinition/>
                     </Grid.RowDefinitions>
-                    <Grid.ColumnDefinitions>
-                        <ColumnDefinition Width="*"/>
-                        <ColumnDefinition Width="*"/>
-                        <ColumnDefinition Width="*"/>
-                        <ColumnDefinition Width="*"/>
-                        <ColumnDefinition Width="*"/>
-                    </Grid.ColumnDefinitions>
-
-                    <Button Background="{x:Null}" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Stretch" Margin="5" Height="auto"
+
+                    <Grid Grid.Row="0">
+                        <Grid.RowDefinitions>
+                            <RowDefinition Height="*"/>
+                            <RowDefinition Height="*"/>
+                            <RowDefinition Height="*"/>
+                            <RowDefinition Height="*"/>
+                        </Grid.RowDefinitions>
+                        <Grid.ColumnDefinitions>
+                            <ColumnDefinition Width="*"/>
+                            <ColumnDefinition Width="*"/>
+                            <ColumnDefinition Width="*"/>
+                            <ColumnDefinition Width="*"/>
+                            <ColumnDefinition Width="*"/>
+                        </Grid.ColumnDefinitions>
+
+                        <Button Background="{x:Null}" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Stretch" Margin="5" Height="auto"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             ToolTip="MaterialDesignRaisedButton with Round Corners">
-                        <StackPanel>
-                            <TextBlock HorizontalAlignment="Center"><Run Text="Axis" FontSize="20"/></TextBlock>
-                            <TextBlock HorizontalAlignment="Center"><Run Text="Select" FontSize="20"/></TextBlock>
-                        </StackPanel>
+                            <StackPanel>
+                                <TextBlock HorizontalAlignment="Center"><Run Text="Axis" FontSize="20"/></TextBlock>
+                                <TextBlock HorizontalAlignment="Center"><Run Text="Select" FontSize="20"/></TextBlock>
+                            </StackPanel>
 
-                    </Button>
+                        </Button>
 
-                    <Button Grid.Column="0" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Height="auto"
+                        <Button Grid.Column="0" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Height="auto"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             ToolTip="MaterialDesignRaisedButton with Round Corners">
-                        <StackPanel>
-                            <TextBlock HorizontalAlignment="Center"><Run Text="Target" FontSize="20"/></TextBlock>
-                            <TextBlock HorizontalAlignment="Center"><Run Text="Pos" FontSize="20"/></TextBlock>
-                        </StackPanel>
+                            <StackPanel>
+                                <TextBlock HorizontalAlignment="Center"><Run Text="Target" FontSize="20"/></TextBlock>
+                                <TextBlock HorizontalAlignment="Center"><Run Text="Pos" FontSize="20"/></TextBlock>
+                            </StackPanel>
 
-                    </Button>
+                        </Button>
 
-                    <Button Grid.Column="0" Grid.Row="2" HorizontalAlignment="Stretch" Margin="5" Height="auto"
+                        <Button Grid.Column="0" Grid.Row="2" HorizontalAlignment="Stretch" Margin="5" Height="auto"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             ToolTip="MaterialDesignRaisedButton with Round Corners">
-                        <StackPanel>
-                            <TextBlock HorizontalAlignment="Center"><Run Text="Current" FontSize="18"/></TextBlock>
-                            <TextBlock HorizontalAlignment="Center"><Run Text="Pos" FontSize="20"/></TextBlock>
-                        </StackPanel>
-                    </Button>
+                            <StackPanel>
+                                <TextBlock HorizontalAlignment="Center"><Run Text="Current" FontSize="18"/></TextBlock>
+                                <TextBlock HorizontalAlignment="Center"><Run Text="Pos" FontSize="20"/></TextBlock>
+                            </StackPanel>
+                        </Button>
 
-                    <Button Grid.Column="0" Grid.Row="3" HorizontalAlignment="Stretch" Margin="5" Height="auto"
+                        <Button Grid.Column="0" Grid.Row="3" HorizontalAlignment="Stretch" Margin="5" Height="auto"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             ToolTip="MaterialDesignRaisedButton with Round Corners">
-                        <StackPanel>
-                            <TextBlock HorizontalAlignment="Center"><Run Text="Difference" FontSize="14"/></TextBlock>
-                            <TextBlock HorizontalAlignment="Center"><Run Text="Pos" FontSize="20"/></TextBlock>
-                        </StackPanel>
+                            <StackPanel>
+                                <TextBlock HorizontalAlignment="Center"><Run Text="Difference" FontSize="14"/></TextBlock>
+                                <TextBlock HorizontalAlignment="Center"><Run Text="Pos" FontSize="20"/></TextBlock>
+                            </StackPanel>
 
-                    </Button>
+                        </Button>
 
-                    <!--Column2-->
-                    <Button Grid.Column="1" Grid.Row="0" HorizontalAlignment="Stretch" Margin="5" Height="auto"
+                        <!--Column2-->
+                        <Button Grid.Column="1" Grid.Row="0" HorizontalAlignment="Stretch" Margin="5" Height="auto"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             ToolTip="MaterialDesignRaisedButton with Round Corners"
@@ -146,41 +147,41 @@
                             CommandParameter="Axis_CarrierLock_Left"
                             BorderBrush="{Binding LeftAxisBrush}"
                             BorderThickness="2">
-                        <StackPanel>
-                            <TextBlock VerticalAlignment="Center"
+                            <StackPanel>
+                                <TextBlock VerticalAlignment="Center"
                                        HorizontalAlignment="Center">
                                 <Run Text="Clamp" FontSize="20"/>
-                            </TextBlock>
-                            <TextBlock><Run Text="Axis Left" FontSize="20"/></TextBlock>
-                        </StackPanel>
-                    </Button>
+                                </TextBlock>
+                                <TextBlock><Run Text="Axis Left" FontSize="20"/></TextBlock>
+                            </StackPanel>
+                        </Button>
 
-                    <Button Background="{x:Null}" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Height="auto"
+                        <Button Background="{x:Null}" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Height="auto"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             ToolTip="MaterialDesignRaisedButton with Round Corners">
-                        <Button.InputBindings>
-                            <MouseBinding Gesture="LeftClick" Command="{Binding KeyInTargetPosCommand}" CommandParameter="Left"/>
-                        </Button.InputBindings>
-                        <TextBlock><Run Text="{Binding TargetPosLockLeft, StringFormat=0.000, FallbackValue=0.000}" FontSize="20"/></TextBlock>
-                    </Button>
+                            <Button.InputBindings>
+                                <MouseBinding Gesture="LeftClick" Command="{Binding KeyInTargetPosCommand}" CommandParameter="Left"/>
+                            </Button.InputBindings>
+                            <TextBlock><Run Text="{Binding TargetPosLockLeft, StringFormat=0.000, FallbackValue=0.000}" FontSize="20"/></TextBlock>
+                        </Button>
 
-                    <Button Background="{x:Null}" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Stretch" Margin="5" Height="auto"
+                        <Button Background="{x:Null}" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Stretch" Margin="5" Height="auto"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             ToolTip="MaterialDesignRaisedButton with Round Corners">
-                        <TextBlock><Run Text="{Binding CurrentLockLeft, StringFormat=0.000, FallbackValue=0.000}" FontSize="20"/></TextBlock>
-                    </Button>
+                            <TextBlock><Run Text="{Binding CurrentLockLeft, StringFormat=0.000, FallbackValue=0.000}" FontSize="20"/></TextBlock>
+                        </Button>
 
-                    <Button Background="{x:Null}" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Stretch" Margin="5" Height="auto"
+                        <Button Background="{x:Null}" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Stretch" Margin="5" Height="auto"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             ToolTip="MaterialDesignRaisedButton with Round Corners">
-                        <TextBlock><Run Text="{Binding DifferenceLockLeft, StringFormat=0.000, FallbackValue=0.000}" FontSize="20"/></TextBlock>
-                    </Button>
+                            <TextBlock><Run Text="{Binding DifferenceLockLeft, StringFormat=0.000, FallbackValue=0.000}" FontSize="20"/></TextBlock>
+                        </Button>
 
-                    <!--Column3-->
-                    <Button Grid.Column="2" Grid.Row="0" HorizontalAlignment="Stretch" Margin="5" Height="auto"
+                        <!--Column3-->
+                        <Button Grid.Column="2" Grid.Row="0" HorizontalAlignment="Stretch" Margin="5" Height="auto"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             ToolTip="MaterialDesignRaisedButton with Round Corners"
@@ -188,128 +189,128 @@
                             CommandParameter="Axis_CarrierLock_Right"
                             BorderBrush="{Binding RightAxisBrush}"
                             BorderThickness="2">
-                        <StackPanel>
-                            <TextBlock VerticalAlignment="Center"
+                            <StackPanel>
+                                <TextBlock VerticalAlignment="Center"
                                        HorizontalAlignment="Center">
                                 <Run Text="Clamp" FontSize="20"/>
-                            </TextBlock>
-                            <TextBlock><Run Text="Axis Rigt" FontSize="20"/></TextBlock>
-                        </StackPanel>
-                    </Button>
+                                </TextBlock>
+                                <TextBlock><Run Text="Axis Rigt" FontSize="20"/></TextBlock>
+                            </StackPanel>
+                        </Button>
 
-                    <Button Background="{x:Null}" Grid.Column="2" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Height="auto"
+                        <Button Background="{x:Null}" Grid.Column="2" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Height="auto"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             ToolTip="MaterialDesignRaisedButton with Round Corners">
-                        <Button.InputBindings>
-                            <MouseBinding Gesture="LeftClick" Command="{Binding KeyInTargetPosCommand}" CommandParameter="Right"/>
-                        </Button.InputBindings>
-                        <TextBlock><Run Text="{Binding TargetPosLockRight, StringFormat=0.000, FallbackValue=0.000}" FontSize="20"/></TextBlock>
-                    </Button>
+                            <Button.InputBindings>
+                                <MouseBinding Gesture="LeftClick" Command="{Binding KeyInTargetPosCommand}" CommandParameter="Right"/>
+                            </Button.InputBindings>
+                            <TextBlock><Run Text="{Binding TargetPosLockRight, StringFormat=0.000, FallbackValue=0.000}" FontSize="20"/></TextBlock>
+                        </Button>
 
-                    <Button Background="{x:Null}" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Stretch" Margin="5" Height="auto"
+                        <Button Background="{x:Null}" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Stretch" Margin="5" Height="auto"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             ToolTip="MaterialDesignRaisedButton with Round Corners">
-                        <TextBlock><Run Text="{Binding CurrentLockRight, StringFormat=0.000, FallbackValue=0.000}" FontSize="20"/></TextBlock>
-                    </Button>
+                            <TextBlock><Run Text="{Binding CurrentLockRight, StringFormat=0.000, FallbackValue=0.000}" FontSize="20"/></TextBlock>
+                        </Button>
 
-                    <Button Background="{x:Null}" Grid.Column="2" Grid.Row="3" HorizontalAlignment="Stretch" Margin="5" Height="auto"
+                        <Button Background="{x:Null}" Grid.Column="2" Grid.Row="3" HorizontalAlignment="Stretch" Margin="5" Height="auto"
                            Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             ToolTip="MaterialDesignRaisedButton with Round Corners">
-                        <TextBlock><Run Text="{Binding DifferenceLockRight, StringFormat=0.000, FallbackValue=0.000}" FontSize="20"/></TextBlock>
-                    </Button>
+                            <TextBlock><Run Text="{Binding DifferenceLockRight, StringFormat=0.000, FallbackValue=0.000}" FontSize="20"/></TextBlock>
+                        </Button>
 
-                    <!--Axis State-->
-                    <Border BorderThickness="3" BorderBrush="Aqua" Grid.Column="3" Grid.ColumnSpan="4" Grid.RowSpan="4" />
+                        <!--Axis State-->
+                        <Border BorderThickness="3" BorderBrush="Aqua" Grid.Column="3" Grid.ColumnSpan="4" Grid.RowSpan="4" />
 
-                    <Button Background="{x:Null}" Grid.Column="3" Grid.Row="0" HorizontalAlignment="Stretch" Margin="5" Height="auto"
+                        <Button Background="{x:Null}" Grid.Column="3" Grid.Row="0" HorizontalAlignment="Stretch" Margin="5" Height="auto"
                            Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             ToolTip="MaterialDesignRaisedButton with Round Corners">
-                        <TextBlock><Run Text="Left Axis" FontSize="20"/></TextBlock>
-                    </Button>
-                    <Button Background="{x:Null}" Grid.Column="4" Grid.Row="0" HorizontalAlignment="Stretch" Margin="5" Height="auto"
+                            <TextBlock><Run Text="Left Axis" FontSize="20"/></TextBlock>
+                        </Button>
+                        <Button Background="{x:Null}" Grid.Column="4" Grid.Row="0" HorizontalAlignment="Stretch" Margin="5" Height="auto"
                            Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             ToolTip="MaterialDesignRaisedButton with Round Corners">
-                        <TextBlock><Run Text="Right Axis" FontSize="18"/></TextBlock>
-                    </Button>
+                            <TextBlock><Run Text="Right Axis" FontSize="18"/></TextBlock>
+                        </Button>
 
-                    <Button Grid.Column="3" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Height="auto"
+                        <Button Grid.Column="3" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Height="auto"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             Background="{c:Binding 'IsLeftServoOn ? media:Brushes.DodgerBlue : media:Brushes.Transparent'}">
-                        <StackPanel>
-                            <TextBlock HorizontalAlignment="Center"><Run Text="Servo On"/></TextBlock>
-                        </StackPanel>
-                    </Button>
-                    <Button Grid.Column="3" Grid.Row="2" HorizontalAlignment="Stretch" Margin="5" Height="auto"
+                            <StackPanel>
+                                <TextBlock HorizontalAlignment="Center"><Run Text="Servo On"/></TextBlock>
+                            </StackPanel>
+                        </Button>
+                        <Button Grid.Column="3" Grid.Row="2" HorizontalAlignment="Stretch" Margin="5" Height="auto"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10" Background="{c:Binding 'IsLeftServoOriginReturn ? media:Brushes.DodgerBlue : media:Brushes.Transparent'}"
                             ToolTip="MaterialDesignRaisedButton with Round Corners">
-                        <StackPanel>
-                            <TextBlock HorizontalAlignment="Center" TextWrapping="Wrap"><Run Text="Origin Return"/></TextBlock>
-                        </StackPanel>
-                    </Button>
-                    <Button Grid.Column="3" Grid.Row="3" HorizontalAlignment="Stretch" Margin="5" Height="auto"
+                            <StackPanel>
+                                <TextBlock HorizontalAlignment="Center" TextWrapping="Wrap"><Run Text="Origin Return"/></TextBlock>
+                            </StackPanel>
+                        </Button>
+                        <Button Grid.Column="3" Grid.Row="3" HorizontalAlignment="Stretch" Margin="5" Height="auto"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10" Background="{c:Binding 'IsLeftServoFault ? media:Brushes.DodgerBlue : media:Brushes.Transparent'}"
                             ToolTip="MaterialDesignRaisedButton with Round Corners">
-                        <StackPanel>
-                            <TextBlock HorizontalAlignment="Center" TextWrapping="Wrap"><Run Text="Servo Fault"/></TextBlock>
-                        </StackPanel>
-                    </Button>
-
-                    <!--Right-->
-                    <Border BorderBrush="#FF00FFD3" BorderThickness="2" Margin="7,79,20,-5" Grid.ColumnSpan="5" RenderTransformOrigin="0.5,0.5" Grid.Row="3">
-                        <Border.RenderTransform>
-                            <TransformGroup>
-                                <ScaleTransform ScaleX="-1"/>
-                                <SkewTransform/>
-                                <RotateTransform/>
-                                <TranslateTransform/>
-                            </TransformGroup>
-                        </Border.RenderTransform>
-                    </Border>
-                    <Button Grid.Column="4" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Height="auto"
+                            <StackPanel>
+                                <TextBlock HorizontalAlignment="Center" TextWrapping="Wrap"><Run Text="Servo Fault"/></TextBlock>
+                            </StackPanel>
+                        </Button>
+
+                        <!--Right-->
+                        <Border BorderBrush="#FF00FFD3" BorderThickness="2" Margin="7,79,20,-5" Grid.ColumnSpan="5" RenderTransformOrigin="0.5,0.5" Grid.Row="3">
+                            <Border.RenderTransform>
+                                <TransformGroup>
+                                    <ScaleTransform ScaleX="-1"/>
+                                    <SkewTransform/>
+                                    <RotateTransform/>
+                                    <TranslateTransform/>
+                                </TransformGroup>
+                            </Border.RenderTransform>
+                        </Border>
+                        <Button Grid.Column="4" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Height="auto"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10" Background="{c:Binding 'IsRightServoOn ? media:Brushes.DodgerBlue : media:Brushes.Transparent'}"
                             ToolTip="MaterialDesignRaisedButton with Round Corners">
-                        <StackPanel>
-                            <TextBlock HorizontalAlignment="Center"><Run Text="Servo On"/></TextBlock>
-                        </StackPanel>
-                    </Button>
-                    <Button Grid.Column="4" Grid.Row="2" HorizontalAlignment="Stretch" Margin="5" Height="auto"
+                            <StackPanel>
+                                <TextBlock HorizontalAlignment="Center"><Run Text="Servo On"/></TextBlock>
+                            </StackPanel>
+                        </Button>
+                        <Button Grid.Column="4" Grid.Row="2" HorizontalAlignment="Stretch" Margin="5" Height="auto"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10" Background="{c:Binding 'IsRightServoOriginReturn ? media:Brushes.DodgerBlue : media:Brushes.Transparent'}"
                             ToolTip="MaterialDesignRaisedButton with Round Corners">
-                        <StackPanel>
-                            <TextBlock HorizontalAlignment="Center" TextWrapping="Wrap"><Run Text="Origin Return"/></TextBlock>
-                        </StackPanel>
-                    </Button>
-                    <Button Grid.Column="4" Grid.Row="3" HorizontalAlignment="Stretch" Margin="5" Height="auto"
+                            <StackPanel>
+                                <TextBlock HorizontalAlignment="Center" TextWrapping="Wrap"><Run Text="Origin Return"/></TextBlock>
+                            </StackPanel>
+                        </Button>
+                        <Button Grid.Column="4" Grid.Row="3" HorizontalAlignment="Stretch" Margin="5" Height="auto"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10" Background="{c:Binding 'IsRightServoFault ? media:Brushes.DodgerBlue : media:Brushes.Transparent'}"
                             ToolTip="MaterialDesignRaisedButton with Round Corners">
-                        <StackPanel>
-                            <TextBlock HorizontalAlignment="Center" TextWrapping="Wrap"><Run Text="Servo Fault"/></TextBlock>
-                        </StackPanel>
-                    </Button>
+                            <StackPanel>
+                                <TextBlock HorizontalAlignment="Center" TextWrapping="Wrap"><Run Text="Servo Fault"/></TextBlock>
+                            </StackPanel>
+                        </Button>
 
-                    <Border BorderBrush="#FF00FFD3" BorderThickness="2" Grid.Column="1" Margin="78,102,39,-269" Grid.Row="3"/>
+                        <Border BorderBrush="#FF00FFD3" BorderThickness="2" Grid.Column="1" Margin="78,102,39,-269" Grid.Row="3"/>
 
-                </Grid>
+                    </Grid>
 
-                <Grid Grid.Row="1">
-                    <Grid.ColumnDefinitions>
-                        <ColumnDefinition Width="*"/>
-                        <ColumnDefinition Width="2*"/>
-                    </Grid.ColumnDefinitions>
-                    <StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
-                        <StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Center" >
-                            <!--<Button
+                    <Grid Grid.Row="1">
+                        <Grid.ColumnDefinitions>
+                            <ColumnDefinition Width="*"/>
+                            <ColumnDefinition Width="2*"/>
+                        </Grid.ColumnDefinitions>
+                        <StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
+                            <StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Center" >
+                                <!--<Button
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             ToolTip="MaterialDesignRaisedButton with Round Corners"
@@ -323,7 +324,7 @@
                                 </StackPanel>
                             </Button>-->
 
-                            <!--<Button
+                                <!--<Button
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             ToolTip="MaterialDesignRaisedButton with Round Corners"
@@ -337,7 +338,7 @@
                                 </StackPanel>
                             </Button>-->
 
-                            <!--<Button
+                                <!--<Button
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             ToolTip="MaterialDesignRaisedButton with Round Corners"
@@ -349,33 +350,33 @@
                                     <TextBlock><Run Text="Limit(+)"/></TextBlock>
                                 </StackPanel>
                             </Button>-->
-                        </StackPanel>
+                            </StackPanel>
 
-                        <StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Center"
+                            <StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Center"
                                 Width="Auto" Height="120">
-                            <Button Style="{StaticResource TouchButton}"
-                            x:Name="M"
-                            Margin="5"
-                            Grid.Row="2" 
-                            Grid.Column="1"
-                            HorizontalAlignment="Stretch"
-                            Height="auto"
-                             Width="90" PreviewMouseDown="Button_PreviewMouseDown" PreviewMouseUp="Button_PreviewMouseUp">
-                                <i:Interaction.Triggers>
-                                    <i:EventTrigger EventName="TouchDown">
-                                        <i:InvokeCommandAction Command="{Binding JogCommand}" CommandParameter="-"/>
-                                    </i:EventTrigger>
-                                    <i:EventTrigger EventName="TouchUp">
-                                        <i:InvokeCommandAction Command="{Binding JogStopCommand}"/>
-                                    </i:EventTrigger>
-                                </i:Interaction.Triggers>
-                                <StackPanel>
-                                    <materialDesign:PackIcon Kind="MinusBoxOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="30" Width="auto"/>
-                                    <TextBlock><Run Text="Jog(-)" FontSize="20"/></TextBlock>
-                                </StackPanel>
-                            </Button>
+                                <Button
+                                    x:Name="M"
+                                    Margin="5"
+                                    Grid.Row="2" 
+                                    Grid.Column="1"
+                                    HorizontalAlignment="Stretch"
+                                    Height="auto"
+                                    Width="90" PreviewMouseDown="Button_PreviewMouseDown" PreviewMouseUp="Button_PreviewMouseUp">
+                                    <i:Interaction.Triggers>
+                                        <i:EventTrigger EventName="TouchDown">
+                                            <i:InvokeCommandAction Command="{Binding JogCommand}" CommandParameter="-"/>
+                                        </i:EventTrigger>
+                                        <i:EventTrigger EventName="TouchUp">
+                                            <i:InvokeCommandAction Command="{Binding JogStopCommand}"/>
+                                        </i:EventTrigger>
+                                    </i:Interaction.Triggers>
+                                    <StackPanel>
+                                        <materialDesign:PackIcon Kind="MinusBoxOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="30" Width="auto"/>
+                                        <TextBlock><Run Text="Jog(-)" FontSize="20"/></TextBlock>
+                                    </StackPanel>
+                                </Button>
 
-                            <materialDesign:Badged
+                                <materialDesign:Badged
                             Grid.Row="2"
                             Grid.Column="2"
                             Badge="Jog Velocity"
@@ -384,167 +385,169 @@
                             BadgeForeground="Aqua"
                             VerticalAlignment="Center"
                             HorizontalAlignment="Center">
-                                <Button Margin="15" VerticalAlignment="Center" HorizontalAlignment="Center" Height="80" Width="70"
+                                    <Button Margin="15" VerticalAlignment="Center" HorizontalAlignment="Center" Height="80" Width="70"
                                         Command="{Binding JogVelPopupCommand}">
-                                    <StackPanel>
-                                        <TextBlock Text="{Binding JogVelocity, StringFormat={}{0:0.000}, FallbackValue=0.00}" Foreground="Orange" FontSize="20"/>
-                                    </StackPanel>
-                                </Button>
-                            </materialDesign:Badged>
+                                        <StackPanel>
+                                            <TextBlock Text="{Binding JogVelocity, StringFormat={}{0:0.000}, FallbackValue=0.00}" Foreground="Orange" FontSize="20"/>
+                                        </StackPanel>
+                                    </Button>
+                                </materialDesign:Badged>
 
-                            <Button
+                                <Button
                             Margin="5"
                             Grid.Row="2" 
                             Grid.Column="3"
                             HorizontalAlignment="Stretch"
                             Height="auto"
                             Width="90" PreviewMouseDown="Button_PreviewMouseDown" PreviewMouseUp="Button_PreviewMouseUp">
-                                <i:Interaction.Triggers>
-                                    <i:EventTrigger EventName="TouchDown">
-                                        <i:InvokeCommandAction Command="{Binding JogCommand}" CommandParameter="+"/>
-                                    </i:EventTrigger>
-                                    <i:EventTrigger EventName="TouchUp">
-                                        <i:InvokeCommandAction Command="{Binding JogStopCommand}"/>
-                                    </i:EventTrigger>
-                                </i:Interaction.Triggers>
-                                <StackPanel>
-                                    <materialDesign:PackIcon Kind="PlusBoxOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="30" Width="auto"/>
-                                    <TextBlock><Run Text="Jog(+)" FontSize="20"/></TextBlock>
-                                </StackPanel>
-                            </Button>
+                                    <i:Interaction.Triggers>
+                                        <i:EventTrigger EventName="TouchDown">
+                                            <i:InvokeCommandAction Command="{Binding JogCommand}" CommandParameter="+"/>
+                                        </i:EventTrigger>
+                                        <i:EventTrigger EventName="TouchUp">
+                                            <i:InvokeCommandAction Command="{Binding JogStopCommand}"/>
+                                        </i:EventTrigger>
+                                    </i:Interaction.Triggers>
+                                    <StackPanel>
+                                        <materialDesign:PackIcon Kind="PlusBoxOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="30" Width="auto"/>
+                                        <TextBlock><Run Text="Jog(+)" FontSize="20"/></TextBlock>
+                                    </StackPanel>
+                                </Button>
+                            </StackPanel>
+
                         </StackPanel>
 
-                    </StackPanel>
-
-                    <Grid Grid.Column="0" Margin="5,20,0,0">
-                        <Grid>
-                            <Grid.RowDefinitions>
-                                <RowDefinition Height="*"/>
-                                <RowDefinition Height="*"/>
-                                <RowDefinition Height="*"/>
-                                <RowDefinition Height="*"/>
-                            </Grid.RowDefinitions>
-                            <Button Margin="3" HorizontalAlignment="Stretch" Grid.Column="4" Grid.Row="0" Width="Auto" Height="Auto" BorderBrush="{Binding PosLockBrush}" BorderThickness="2"
+                        <Grid Grid.Column="0" Margin="5,20,0,0">
+                            <Grid>
+                                <Grid.RowDefinitions>
+                                    <RowDefinition Height="*"/>
+                                    <RowDefinition Height="*"/>
+                                    <RowDefinition Height="*"/>
+                                    <RowDefinition Height="*"/>
+                                </Grid.RowDefinitions>
+                                <Button Margin="3" HorizontalAlignment="Stretch" Grid.Column="4" Grid.Row="0" Width="Auto" Height="Auto" BorderBrush="{Binding PosLockBrush}" BorderThickness="2"
                             Command="{Binding SelectPosCommand}"
                             CommandParameter="Teach_Postion_Lock">
-                                <StackPanel>
-                                    <TextBlock Text="Clamp" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                                    <TextBlock Text="Lock" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                                </StackPanel>
-                            </Button>
-                            <Button Margin="3" HorizontalAlignment="Stretch" Grid.Column="4" Grid.Row="1" Width="Auto" Height="Auto" BorderBrush="{Binding PosUnlockBrush}" BorderThickness="2"
+                                    <StackPanel>
+                                        <TextBlock Text="Clamp" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                                        <TextBlock Text="Lock" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                                    </StackPanel>
+                                </Button>
+                                <Button Margin="3" HorizontalAlignment="Stretch" Grid.Column="4" Grid.Row="1" Width="Auto" Height="Auto" BorderBrush="{Binding PosUnlockBrush}" BorderThickness="2"
                             Command="{Binding SelectPosCommand}"
                             CommandParameter="Teach_Postion_Unlock">
-                                <StackPanel>
-                                    <TextBlock Text="Clamp" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                                    <TextBlock Text="UnLock" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                                </StackPanel>
-                            </Button>
+                                    <StackPanel>
+                                        <TextBlock Text="Clamp" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                                        <TextBlock Text="UnLock" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                                    </StackPanel>
+                                </Button>
+                            </Grid>
                         </Grid>
                     </Grid>
                 </Grid>
             </Grid>
-        </Grid>
 
-        <Grid Grid.Column="1" Background="#37474f" Grid.RowSpan="2">
-            <StackPanel>
-                <Button Margin="10,10,10,5" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding MoveToCommand}"
+            <Grid Grid.Column="1" Background="#37474f" Grid.RowSpan="2">
+                <StackPanel>
+                    <Button Margin="10,10,10,5" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding MoveToCommand}"
                         Style="{DynamicResource MaterialDesignRaisedButton}"
                         materialDesign:ShadowAssist.ShadowDepth="Depth5">
-                    <StackPanel>
-                        <!--<materialDesign:PackIcon Kind="GearBox" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
-                        <TextBlock Text="Move To" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                    </StackPanel>
-                </Button>
+                        <StackPanel>
+                            <!--<materialDesign:PackIcon Kind="GearBox" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
+                            <TextBlock Text="Move To" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                        </StackPanel>
+                    </Button>
 
-                <Button Margin="10,10,10,5" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding CurrentToTargetCommand}"
+                    <Button Margin="10,10,10,5" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding CurrentToTargetCommand}"
                         Style="{DynamicResource MaterialDesignRaisedButton}"
                         materialDesign:ShadowAssist.ShadowDepth="Depth5">
-                    <StackPanel>
-                        <!--<materialDesign:PackIcon Kind="GearBox" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
-                        <TextBlock Text="Current" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                        <TextBlock Text="To Target" FontSize="18" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                    </StackPanel>
-                </Button>
-            </StackPanel>
-
-            <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,40,0,0">
-                <Button Margin="10,10,10,10" HorizontalAlignment="Stretch" Height="90" Width="110" BorderBrush="Gray" BorderThickness="2" Command="{Binding AllOriginCommand}"
+                        <StackPanel>
+                            <!--<materialDesign:PackIcon Kind="GearBox" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
+                            <TextBlock Text="Current" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                            <TextBlock Text="To Target" FontSize="18" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                        </StackPanel>
+                    </Button>
+                </StackPanel>
+
+                <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,40,0,0">
+                    <Button Margin="10,10,10,10" HorizontalAlignment="Stretch" Height="90" Width="110" BorderBrush="Gray" BorderThickness="2" Command="{Binding AllOriginCommand}"
                         Style="{DynamicResource MaterialDesignRaisedButton}"
                         materialDesign:ShadowAssist.ShadowDepth="Depth5">
-                    <StackPanel>
-                        <!--<materialDesign:PackIcon Kind="GearBox" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
-                        <TextBlock Text="ALL" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                        <TextBlock Text="Origin" FontSize="18" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                    </StackPanel>
-                </Button>
-            </StackPanel>
-        </Grid>
+                        <StackPanel>
+                            <!--<materialDesign:PackIcon Kind="GearBox" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
+                            <TextBlock Text="ALL" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                            <TextBlock Text="Origin" FontSize="18" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                        </StackPanel>
+                    </Button>
+                </StackPanel>
+            </Grid>
+
+            <Grid Grid.Column="2" HorizontalAlignment="Stretch" Background="#263238" Grid.RowSpan="2">
+                <Border Margin="1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
+                <StackPanel>
+                    <Button Margin="10,10,10,5" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding ServoOnCommand}">
+                        <StackPanel>
+                            <materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                            <TextBlock Text="Servo On" FontSize="18" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                        </StackPanel>
+                    </Button>
+
+                    <Button Margin="10,10,10,5" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding ServoOffCommand}">
+                        <StackPanel>
+                            <materialDesign:PackIcon Kind="PowerPlugOff" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                            <TextBlock Text="Servo Off" FontSize="18" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                        </StackPanel>
+                    </Button>
+
+                    <Button Margin="10,10,10,5" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding FaultResetCommand}">
+                        <StackPanel>
+                            <materialDesign:PackIcon Kind="CircleArrows" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                            <TextBlock Text="Fault Reset" FontSize="16" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                        </StackPanel>
+                    </Button>
 
-        <Grid Grid.Column="2" HorizontalAlignment="Stretch" Background="#263238" Grid.RowSpan="2">
-            <Border Margin="1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
-            <StackPanel>
-                <Button Margin="10,10,10,5" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding ServoOnCommand}">
-                    <StackPanel>
-                        <materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                        <TextBlock Text="Servo On" FontSize="18" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                    </StackPanel>
-                </Button>
-
-                <Button Margin="10,10,10,5" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding ServoOffCommand}">
-                    <StackPanel>
-                        <materialDesign:PackIcon Kind="PowerPlugOff" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                        <TextBlock Text="Servo Off" FontSize="18" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                    </StackPanel>
-                </Button>
-
-                <Button Margin="10,10,10,5" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding FaultResetCommand}">
-                    <StackPanel>
-                        <materialDesign:PackIcon Kind="CircleArrows" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                        <TextBlock Text="Fault Reset" FontSize="16" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                    </StackPanel>
-                </Button>
-
-                <Button Margin="10,10,10,5" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding OriginCommand}">
-                    <StackPanel>
-                        <materialDesign:PackIcon Kind="Origin" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                        <TextBlock Text="Origin" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
-                    </StackPanel>
-                </Button>
-
-            </StackPanel>
-
-            <StackPanel Orientation="Vertical" VerticalAlignment="Bottom">
-                <Button Margin="10,0,10,10" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2"
+                    <Button Margin="10,10,10,5" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding OriginCommand}">
+                        <StackPanel>
+                            <materialDesign:PackIcon Kind="Origin" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                            <TextBlock Text="Origin" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                        </StackPanel>
+                    </Button>
+
+                </StackPanel>
+
+                <StackPanel Orientation="Vertical" VerticalAlignment="Bottom">
+                    <Button Margin="10,0,10,10" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2"
                         Style="{DynamicResource MaterialDesignRaisedButton}"
                         materialDesign:ShadowAssist.ShadowDepth="Depth5"
                         Command="{Binding SelectedPosDataSave}">
-                    <StackPanel>
-                        <materialDesign:PackIcon Kind="ContentSave" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                        <TextBlock Text="SAVE" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                    </StackPanel>
-                </Button>
-
-                <Button Margin="10,0,10,10" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding CloseDialogCommand}" CommandParameter="true">
-                    <StackPanel>
-                        <materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                        <TextBlock Text="Close" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
-                    </StackPanel>
-                </Button>
-            </StackPanel>
+                        <StackPanel>
+                            <materialDesign:PackIcon Kind="ContentSave" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                            <TextBlock Text="SAVE" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                        </StackPanel>
+                    </Button>
 
-        </Grid>
+                    <Button Margin="10,0,10,10" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding CloseDialogCommand}" CommandParameter="true">
+                        <StackPanel>
+                            <materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                            <TextBlock Text="Close" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                        </StackPanel>
+                    </Button>
+                </StackPanel>
 
-        <!--<StackPanel Orientation="Horizontal" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,5,0,0">
+            </Grid>
+
+            <!--<StackPanel Orientation="Horizontal" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,5,0,0">
             <Button x:Name="btnSend" HorizontalAlignment="Left" VerticalAlignment="Top" Width="100" Margin="0,0,20,0" Height="25" Command="{Binding CloseDialogCommand}" CommandParameter="true" Content="확인" Background="#FF1368BD" Style="{StaticResource MaterialDesignRaisedButton}"/>
             -->
-        <!--Style="{DynamicResource btn_Send}"-->
-        <!--
+            <!--Style="{DynamicResource btn_Send}"-->
+            <!--
 
             <Button x:Name="btnCancel" HorizontalAlignment="Left" VerticalAlignment="Top" Width="100" Height="25"  Content="취소" Command="{Binding CloseDialogCommand}" CommandParameter="false" Background="#FF1368BD" Style="{StaticResource MaterialDesignRaisedButton}"/>
             -->
-        <!--Style="{DynamicResource btn_Close}"-->
-        <!--
+            <!--Style="{DynamicResource btn_Close}"-->
+            <!--
         </StackPanel>-->
-    </Grid>
+        </Grid>
+    </Border>
+    
 </UserControl>

+ 14 - 7
Dev/OHV/OHV.Module.Interactivity/PopUp/LockServoViewModel.cs

@@ -396,13 +396,7 @@ namespace OHV.Module.Interactivity.PopUp
                         break;
                     case eAxisControlKind.AllOriginReturn:
                         {
-                            var msg = string.Empty;
-                            if ( args.Result.IsSuccess )
-                                msg = $"All Origin Success";
-                            else
-                                msg = $"{args.Result.Reasons[0].Message}";
-
-                            this.messageController.ShowNotificationView( msg );
+                            this.RspOriginState();
                         }
                         break;
                     case eAxisControlKind.SyncMove:
@@ -415,6 +409,19 @@ namespace OHV.Module.Interactivity.PopUp
             }
         }
 
+        void RspOriginState()
+        {
+            var msg = string.Empty;
+
+            if ( IsLeftServoOriginReturn && IsRightServoOriginReturn )
+                msg = "All Origin Success";
+            else
+                msg = "Origin Fail";
+
+                this.messageController.ShowNotificationView( msg );
+
+        }
+
         private void AxisState( AxisControlEventArgs args )
         {
             var left = args.Args[ "Left" ] as AxisState;

+ 99 - 94
Dev/OHV/OHV.Module.Interactivity/PopUp/OpticalReadingConfigView.xaml

@@ -10,7 +10,7 @@
              mc:Ignorable="d" 
              Width="600"
              Height="600"
-             Background="#455a64">
+             Background="#263238">
 
     <prism:Dialog.WindowStyle>
         <Style TargetType="Window">
@@ -31,106 +31,107 @@
         </Style>
     </prism:Dialog.WindowStyle>
 
-    <Grid>
-        <Grid.ColumnDefinitions>
-            <ColumnDefinition Width="*"/>
-            <ColumnDefinition Width="130"/>
-        </Grid.ColumnDefinitions>
-        <Grid.RowDefinitions>
-            <RowDefinition Height="30"/>
-            <RowDefinition Height="*"/>
-        </Grid.RowDefinitions>
-
-        <Grid Grid.Row="0">
-            <TextBlock Margin="15,0,0,0" Text="Detect View" FontSize="25" Foreground="White"/>
-        </Grid>
-
-        <Grid Grid.Column="0" Grid.Row="1" Margin="15" Background="#37474f">
+    <Border BorderBrush="Gray" BorderThickness="2">
+        <Grid>
+            <Grid.ColumnDefinitions>
+                <ColumnDefinition Width="*"/>
+                <ColumnDefinition Width="130"/>
+            </Grid.ColumnDefinitions>
             <Grid.RowDefinitions>
-                <RowDefinition Height="*"/>
+                <RowDefinition Height="30"/>
                 <RowDefinition Height="*"/>
             </Grid.RowDefinitions>
-            <!--<Grid.ColumnDefinitions>
+
+            <Grid Grid.Row="0">
+                <TextBlock Margin="15,0,0,0" Text="Detect View" FontSize="25" Foreground="White"/>
+            </Grid>
+
+            <Grid Grid.Column="0" Grid.Row="1" Margin="15" Background="#37474f">
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="*"/>
+                    <RowDefinition Height="*"/>
+                </Grid.RowDefinitions>
+                <!--<Grid.ColumnDefinitions>
                 <ColumnDefinition/>
                 <ColumnDefinition Width="*"/>
                 <ColumnDefinition Width="*"/>
             </Grid.ColumnDefinitions>-->
-            <StackPanel VerticalAlignment="Center"
+                <StackPanel VerticalAlignment="Center"
                         HorizontalAlignment="Center"
                         Grid.Column="0" Margin="85,15">
 
-            </StackPanel>
+                </StackPanel>
 
-            <Grid Grid.Row="0">
-                <Border BorderBrush="Gray" BorderThickness="1"/>
-                <StackPanel VerticalAlignment="Center" 
+                <Grid Grid.Row="0">
+                    <Border BorderBrush="Gray" BorderThickness="1"/>
+                    <StackPanel VerticalAlignment="Center" 
                                 HorizontalAlignment="Left"
                             Margin="30">
-                    <Button Height="60">
-                        <StackPanel>
-                            <TextBlock><Run Text="Detect State" FontSize="20"/></TextBlock>
-                        </StackPanel>
-                    </Button>
+                        <Button Height="60">
+                            <StackPanel>
+                                <TextBlock><Run Text="Detect State" FontSize="20"/></TextBlock>
+                            </StackPanel>
+                        </Button>
 
-                    <Button Background="{x:Null}" Height="60">
-                        <StackPanel>
-                            <TextBlock><Run Text="{Binding ObstacleState, FallbackValue=NONE}" FontSize="25" Foreground="Orange"/></TextBlock>
-                        </StackPanel>
-                    </Button>
-                </StackPanel>
+                        <Button Background="{x:Null}" Height="60">
+                            <StackPanel>
+                                <TextBlock><Run Text="{Binding ObstacleState, FallbackValue=NONE}" FontSize="25" Foreground="Orange"/></TextBlock>
+                            </StackPanel>
+                        </Button>
+                    </StackPanel>
 
-                <StackPanel Orientation="Horizontal"
+                    <StackPanel Orientation="Horizontal"
                                 VerticalAlignment="Center"
                                 HorizontalAlignment="Right">
-                    <StackPanel Margin="30"
+                        <StackPanel Margin="30"
                                     VerticalAlignment="Center"
                                     HorizontalAlignment="Center">
 
-                        <Button Height="60">
-                            <StackPanel>
-                                <TextBlock><Run Text="Current Pattern" FontSize="20"/></TextBlock>
-                            </StackPanel>
-                        </Button>
+                            <Button Height="60">
+                                <StackPanel>
+                                    <TextBlock><Run Text="Current Pattern" FontSize="20"/></TextBlock>
+                                </StackPanel>
+                            </Button>
 
-                        <Button Background="{x:Null}" Height="60"
+                            <Button Background="{x:Null}" Height="60"
                                     Command="{Binding PatternResultKyein}"
                                     CommandParameter="D">
-                            <StackPanel>
-                                <TextBlock><Run Text="{Binding CurrentPattern, FallbackValue=NONE}" FontSize="25" Foreground="Orange"/></TextBlock>
-                            </StackPanel>
-                        </Button>
+                                <StackPanel>
+                                    <TextBlock><Run Text="{Binding CurrentPattern, FallbackValue=NONE}" FontSize="25" Foreground="Orange"/></TextBlock>
+                                </StackPanel>
+                            </Button>
+                        </StackPanel>
                     </StackPanel>
-                </StackPanel>
-            </Grid>
+                </Grid>
 
-            <Grid Grid.Row="1">
-                <Border BorderBrush="Gray" BorderThickness="1"/>
-                <StackPanel Orientation="Horizontal"
+                <Grid Grid.Row="1">
+                    <Border BorderBrush="Gray" BorderThickness="1"/>
+                    <StackPanel Orientation="Horizontal"
                             VerticalAlignment="Center"
                             HorizontalAlignment="Center">
-                    <StackPanel Orientation="Vertical"
+                        <StackPanel Orientation="Vertical"
                                 HorizontalAlignment="Center"
                                 VerticalAlignment="Center"
                                 Margin="5">
 
-                        <Button Height="60">
-                            <StackPanel>
-                                <TextBlock><Run Text="Pattern Seting" FontSize="20"/></TextBlock>
-                            </StackPanel>
-                        </Button>
+                            <Button Height="60">
+                                <StackPanel>
+                                    <TextBlock><Run Text="Pattern Seting" FontSize="20"/></TextBlock>
+                                </StackPanel>
+                            </Button>
 
-                        <Button Background="{x:Null}" Height="60"
+                            <Button Background="{x:Null}" Height="60"
                                     Command="{Binding PatternResultKyein}"
                                     CommandParameter="D">
-                            <StackPanel>
-                                <TextBlock><Run Text="{Binding SetPattern, FallbackValue=0}" FontSize="25" Foreground="Orange"/></TextBlock>
-                            </StackPanel>
-                        </Button>
+                                <StackPanel>
+                                    <TextBlock><Run Text="{Binding SetPattern, FallbackValue=0}" FontSize="25" Foreground="Orange"/></TextBlock>
+                                </StackPanel>
+                            </Button>
+                        </StackPanel>
                     </StackPanel>
-                </StackPanel>
-            </Grid>
+                </Grid>
 
-            <!--<Grid Grid.Row="2">
+                <!--<Grid Grid.Row="2">
                 <Border BorderBrush="Gray" BorderThickness="1"/>
                 
                 <StackPanel Margin="5"
@@ -146,9 +147,11 @@
                     <Button Background="{x:Null}" Height="60"
                         Command="{Binding PatternResultKyein}"
                         CommandParameter="C">
-                        --><!--<Button.InputBindings>
+                        -->
+                <!--<Button.InputBindings>
                         <MouseBinding Gesture="LeftClick" Command="{Binding KeyInTargetPosCommand}" CommandParameter="Left"/>
-                    </Button.InputBindings>--><!--
+                    </Button.InputBindings>-->
+                <!--
 
                         <StackPanel>
                             <TextBlock><Run Text="{Binding ObstacleCurve, FallbackValue=0}" FontSize="25" Foreground="Orange"/></TextBlock>
@@ -158,21 +161,21 @@
             </Grid>-->
 
 
-        </Grid>
+            </Grid>
 
-        <!--Right Sub Menu Grid-->
-        <Grid Grid.Column="1" Background="#37474f">
-            <StackPanel>
+            <!--Right Sub Menu Grid-->
+            <Grid Grid.Column="1" Background="#37474f">
+                <StackPanel>
 
-            </StackPanel>
-        </Grid>
+                </StackPanel>
+            </Grid>
 
-        <!--Right Main Menu Grid-->
-        <Grid Grid.Column="2" Background="#263238" Grid.RowSpan="2">
-            <Border Margin="1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
+            <!--Right Main Menu Grid-->
+            <Grid Grid.Column="2" Background="#263238" Grid.RowSpan="2">
+                <Border Margin="1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
 
-            <StackPanel VerticalAlignment="Top">
-                <!--<Button Margin="7,7,7,7" HorizontalAlignment="Stretch" Height="90" 
+                <StackPanel VerticalAlignment="Top">
+                    <!--<Button Margin="7,7,7,7" HorizontalAlignment="Stretch" Height="90" 
                         BorderBrush="Gray" BorderThickness="2" 
                         Command="{Binding DetectPatternSave}" CommandParameter="true">
                     <StackPanel>
@@ -180,27 +183,29 @@
                         <TextBlock Text="Save" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
                     </StackPanel>
                 </Button>-->
-            </StackPanel>
+                </StackPanel>
 
-            <StackPanel VerticalAlignment="Bottom">
+                <StackPanel VerticalAlignment="Bottom">
 
-                <Button Margin="10,0,10,7" HorizontalAlignment="Stretch" Height="90" 
+                    <Button Margin="10,0,10,7" HorizontalAlignment="Stretch" Height="90" 
                         BorderBrush="Gray" BorderThickness="2" 
                         Command="{Binding DetectPatternSave}" CommandParameter="true">
-                    <StackPanel>
-                        <materialDesign:PackIcon Kind="CalendarExport" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                        <TextBlock Text="Save" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
-                    </StackPanel>
-                </Button>
+                        <StackPanel>
+                            <materialDesign:PackIcon Kind="CalendarExport" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                            <TextBlock Text="Save" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                        </StackPanel>
+                    </Button>
 
-                <Button Margin="10,0,10,7" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" 
+                    <Button Margin="10,0,10,7" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" 
                         Command="{Binding CloseDialogCommand}" CommandParameter="true">
-                    <StackPanel>
-                        <materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                        <TextBlock Text="Close" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
-                    </StackPanel>
-                </Button>
-            </StackPanel>
+                        <StackPanel>
+                            <materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                            <TextBlock Text="Close" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                        </StackPanel>
+                    </Button>
+                </StackPanel>
+            </Grid>
         </Grid>
-    </Grid>
+    </Border>
+    
 </UserControl>

+ 88 - 85
Dev/OHV/OHV.Module.Interactivity/PopUp/ServoConfigView.xaml

@@ -10,7 +10,7 @@
              mc:Ignorable="d" 
              Width="1000"
              Height="600"
-             Background="#455a64">
+             Background="#263238">
 
     <prism:Dialog.WindowStyle>
         <Style TargetType="Window">
@@ -31,89 +31,90 @@
         </Style>
     </prism:Dialog.WindowStyle>
 
-    <Grid>
-        <Grid.ColumnDefinitions>
-            <ColumnDefinition/>
-            <ColumnDefinition Width="130"/>
-        </Grid.ColumnDefinitions>
-        <Grid.RowDefinitions>
-            <RowDefinition Height="30"/>
-            <RowDefinition Height="*"/>
-        </Grid.RowDefinitions>
-
-        <Grid Grid.Row="0">
-            <TextBlock Margin="15,0,0,0" Text="Drive View" FontSize="25" Foreground="White"/>
-        </Grid>
+    <Border BorderBrush="Gray" BorderThickness="2">
+        <Grid>
+            <Grid.ColumnDefinitions>
+                <ColumnDefinition/>
+                <ColumnDefinition Width="130"/>
+            </Grid.ColumnDefinitions>
+            <Grid.RowDefinitions>
+                <RowDefinition Height="30"/>
+                <RowDefinition Height="*"/>
+            </Grid.RowDefinitions>
+
+            <Grid Grid.Row="0">
+                <TextBlock Margin="15,0,0,0" Text="Drive View" FontSize="25" Foreground="White"/>
+            </Grid>
 
-        <Grid Grid.Column="0" Grid.Row="1">
-            <Grid Margin="15,15" Background="#37474f">
-                <Grid.RowDefinitions>
-                    <RowDefinition Height="*"/>
-                    <RowDefinition Height="*"/>
-                </Grid.RowDefinitions>
-
-                <Grid Grid.Row="0">
-                    <Border Margin="5" BorderBrush="Gray" BorderThickness="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
-                    <Button Background="{x:Null}" Foreground="Orange" Margin="10,10,657,226" Height="Auto">
-                        <TextBlock Text="Drive" FontSize="20"/>
-                    </Button>
-                    <StackPanel Orientation="Horizontal"
+            <Grid Grid.Column="0" Grid.Row="1">
+                <Grid Margin="15,15" Background="#37474f">
+                    <Grid.RowDefinitions>
+                        <RowDefinition Height="*"/>
+                        <RowDefinition Height="*"/>
+                    </Grid.RowDefinitions>
+
+                    <Grid Grid.Row="0">
+                        <Border Margin="5" BorderBrush="Gray" BorderThickness="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
+                        <Button Background="{x:Null}" Foreground="Orange" Margin="10,10,657,226" Height="Auto">
+                            <TextBlock Text="Drive" FontSize="20"/>
+                        </Button>
+                        <StackPanel Orientation="Horizontal"
                                 HorizontalAlignment="Center"
                                 VerticalAlignment="Center">
 
-                        <StackPanel Orientation="Vertical"
+                            <StackPanel Orientation="Vertical"
                                     VerticalAlignment="Center">
-                            <Button Content="Name" Background="{x:Null}" FontSize="20"/>
-                            <Button Content="ID" Background="{x:Null}" FontSize="20"/>
-                            <Button Content="IP" Background="{x:Null}" FontSize="20"/>
-                            <Button Content="Scale" Background="{x:Null}" FontSize="20"/>
-                        </StackPanel>
+                                <Button Content="Name" Background="{x:Null}" FontSize="20"/>
+                                <Button Content="ID" Background="{x:Null}" FontSize="20"/>
+                                <Button Content="IP" Background="{x:Null}" FontSize="20"/>
+                                <Button Content="Scale" Background="{x:Null}" FontSize="20"/>
+                            </StackPanel>
 
-                        <StackPanel Orientation="Vertical" 
+                            <StackPanel Orientation="Vertical" 
                                     VerticalAlignment="Center">
-                            <Button Content="{Binding DriveName, FallbackValue=OHV_DRIVE}" FontSize="20" Background="{x:Null}"/>
-                            <Button Content="{Binding DriveID, FallbackValue=Drive}" FontSize="20" Background="{x:Null}"/>
-                            <Button Content="{Binding DriveIP, FallbackValue=192.168.0.1}" FontSize="20" Background="{x:Null}"/>
-                            <Button Content="{Binding DriveScale, FallbackValue=0.001}" FontSize="20" Background="{x:Null}"/>
+                                <Button Content="{Binding DriveName, FallbackValue=OHV_DRIVE}" FontSize="20" Background="{x:Null}"/>
+                                <Button Content="{Binding DriveID, FallbackValue=Drive}" FontSize="20" Background="{x:Null}"/>
+                                <Button Content="{Binding DriveIP, FallbackValue=192.168.0.1}" FontSize="20" Background="{x:Null}"/>
+                                <Button Content="{Binding DriveScale, FallbackValue=0.001}" FontSize="20" Background="{x:Null}"/>
+                            </StackPanel>
                         </StackPanel>
-                    </StackPanel>
-                </Grid>
-
-                <Grid Grid.Row="1">
-                    <Border Margin="5" BorderBrush="Gray" BorderThickness="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
-                    <Button Background="{x:Null}" Foreground="Orange" Margin="10,10,657,226" Height="Auto">
-                        <TextBlock Text="Lock Servo" FontSize="20"/>
-                    </Button>
-                    <StackPanel Orientation="Horizontal"
+                    </Grid>
+
+                    <Grid Grid.Row="1">
+                        <Border Margin="5" BorderBrush="Gray" BorderThickness="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
+                        <Button Background="{x:Null}" Foreground="Orange" Margin="10,10,657,226" Height="Auto">
+                            <TextBlock Text="Lock Servo" FontSize="20"/>
+                        </Button>
+                        <StackPanel Orientation="Horizontal"
                                 HorizontalAlignment="Center"
                                 VerticalAlignment="Center">
 
-                        <StackPanel Orientation="Vertical"
+                            <StackPanel Orientation="Vertical"
                                     VerticalAlignment="Center">
-                            <Button Content="Name" Background="{x:Null}" FontSize="20" Height="Auto"/>
-                            <Button Content="ID" Background="{x:Null}" FontSize="20" Height="Auto"/>
-                            <Button Content="IP" Background="{x:Null}" FontSize="20" Height="Auto"/>
-                            <Button Content="Scale" Background="{x:Null}" FontSize="20" Height="Auto"/>
-                        </StackPanel>
+                                <Button Content="Name" Background="{x:Null}" FontSize="20" Height="Auto"/>
+                                <Button Content="ID" Background="{x:Null}" FontSize="20" Height="Auto"/>
+                                <Button Content="IP" Background="{x:Null}" FontSize="20" Height="Auto"/>
+                                <Button Content="Scale" Background="{x:Null}" FontSize="20" Height="Auto"/>
+                            </StackPanel>
 
-                        <StackPanel Orientation="Vertical" 
+                            <StackPanel Orientation="Vertical" 
                                     VerticalAlignment="Center">
-                            <Button Content="{Binding LockLeftName, FallbackValue=Axis_CarrierLock_Left}" Background="{x:Null}" FontSize="20" Height="Auto"/>
-                            <Button Content="{Binding LockLeftID, FallbackValue=1}" Background="{x:Null}" FontSize="20" Height="Auto"/>
-                            <Button Content="{Binding LockLeftIP, FallbackValue=100.100.100.20}" Background="{x:Null}" FontSize="20" Height="Auto" />
-                            <Button Content="{Binding LockLeftScale, FallbackValue=0.001}" Background="{x:Null}" FontSize="20" Height="Auto"/>
-                        </StackPanel>
-                        <StackPanel Orientation="Vertical"
+                                <Button Content="{Binding LockLeftName, FallbackValue=Axis_CarrierLock_Left}" Background="{x:Null}" FontSize="20" Height="Auto"/>
+                                <Button Content="{Binding LockLeftID, FallbackValue=1}" Background="{x:Null}" FontSize="20" Height="Auto"/>
+                                <Button Content="{Binding LockLeftIP, FallbackValue=100.100.100.20}" Background="{x:Null}" FontSize="20" Height="Auto" />
+                                <Button Content="{Binding LockLeftScale, FallbackValue=0.001}" Background="{x:Null}" FontSize="20" Height="Auto"/>
+                            </StackPanel>
+                            <StackPanel Orientation="Vertical"
                                     VerticalAlignment="Center">
-                            <Button Content="{Binding LockRightName, FallbackValue=Axis_CarrierLock_Right}" FontSize="20" Background="{x:Null}" Height="Auto"/>
-                            <Button Content="{Binding LockRightID, FallbackValue=2}" FontSize="20" Background="{x:Null}" Height="Auto"/>
-                            <Button Content="{Binding LockRightIP, FallbackValue=100.100.100.21}" FontSize="20" Background="{x:Null}" Height="Auto"/>
-                            <Button Content="{Binding LockRightScale, FallbackValue=0.001}" FontSize="20" Background="{x:Null}" Height="Auto"/>
+                                <Button Content="{Binding LockRightName, FallbackValue=Axis_CarrierLock_Right}" FontSize="20" Background="{x:Null}" Height="Auto"/>
+                                <Button Content="{Binding LockRightID, FallbackValue=2}" FontSize="20" Background="{x:Null}" Height="Auto"/>
+                                <Button Content="{Binding LockRightIP, FallbackValue=100.100.100.21}" FontSize="20" Background="{x:Null}" Height="Auto"/>
+                                <Button Content="{Binding LockRightScale, FallbackValue=0.001}" FontSize="20" Background="{x:Null}" Height="Auto"/>
+                            </StackPanel>
                         </StackPanel>
-                    </StackPanel>
-                </Grid>
+                    </Grid>
 
-                <!--<Border Margin="2,101,0,10" BorderBrush="#FF00FFD3" 
+                    <!--<Border Margin="2,101,0,10" BorderBrush="#FF00FFD3" 
                         BorderThickness="1" VerticalAlignment="Stretch"
                         HorizontalAlignment="Stretch" Grid.Column="1" 
                         Grid.ColumnSpan="3" Grid.RowSpan="2"/>
@@ -202,32 +203,34 @@
                     </StackPanel>
                 </Button>-->
 
+                </Grid>
             </Grid>
-        </Grid>
 
-        <Grid Grid.Column="2" HorizontalAlignment="Stretch" Background="#263238" Grid.RowSpan="2">
-            <Border Margin="1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
-            <StackPanel VerticalAlignment="Bottom">
-                <Button Margin="10,0,10,10" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding CloseDialogCommand}" CommandParameter="true">
-                    <StackPanel>
-                        <materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                        <TextBlock Text="Close" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
-                    </StackPanel>
-                </Button>
-            </StackPanel>
+            <Grid Grid.Column="2" HorizontalAlignment="Stretch" Background="#263238" Grid.RowSpan="2">
+                <Border Margin="1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
+                <StackPanel VerticalAlignment="Bottom">
+                    <Button Margin="10,0,10,10" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding CloseDialogCommand}" CommandParameter="true">
+                        <StackPanel>
+                            <materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                            <TextBlock Text="Close" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                        </StackPanel>
+                    </Button>
+                </StackPanel>
 
-        </Grid>
+            </Grid>
 
-        <!--<StackPanel Orientation="Horizontal" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,5,0,0">
+            <!--<StackPanel Orientation="Horizontal" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,5,0,0">
             <Button x:Name="btnSend" HorizontalAlignment="Left" VerticalAlignment="Top" Width="100" Margin="0,0,20,0" Height="25" Command="{Binding CloseDialogCommand}" CommandParameter="true" Content="확인" Background="#FF1368BD" Style="{StaticResource MaterialDesignRaisedButton}"/>
             -->
-        <!--Style="{DynamicResource btn_Send}"-->
-        <!--
+            <!--Style="{DynamicResource btn_Send}"-->
+            <!--
 
             <Button x:Name="btnCancel" HorizontalAlignment="Left" VerticalAlignment="Top" Width="100" Height="25"  Content="취소" Command="{Binding CloseDialogCommand}" CommandParameter="false" Background="#FF1368BD" Style="{StaticResource MaterialDesignRaisedButton}"/>
             -->
-        <!--Style="{DynamicResource btn_Close}"-->
-        <!--
+            <!--Style="{DynamicResource btn_Close}"-->
+            <!--
         </StackPanel>-->
-    </Grid>
+        </Grid>
+    </Border>
+   
 </UserControl>

+ 1 - 1
Dev/OHV/OHV.Module.MainViews/Views/ControlView.xaml

@@ -8,7 +8,7 @@
              xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
              prism:ViewModelLocator.AutoWireViewModel="True"
              mc:Ignorable="d" 
-             Height="942"
+             Height="Auto"
              Width="Auto"
              MinWidth="1386"
              Background="#37474f">

+ 1 - 1
Dev/OHV/OHV.Module.MainViews/Views/EditView.xaml

@@ -8,7 +8,7 @@
              xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
              prism:ViewModelLocator.AutoWireViewModel="True"
              mc:Ignorable="d" 
-             Height="942"
+             Height="Auto"
              Width="Auto"
              MinWidth="1386"
              Background="#37474f">

+ 1 - 1
Dev/OHV/OHV.Module.MainViews/Views/TeachView.xaml

@@ -9,7 +9,7 @@
              prism:ViewModelLocator.AutoWireViewModel="True"
              mc:Ignorable="d" 
              Width="Auto"
-             Height="942"
+             Height="Auto"
              MinWidth="1386"
              Background="#37474f">
     

+ 51 - 10
Dev/OHV/OHV.Vehicle/Concept/D_MainWindow.xaml

@@ -19,8 +19,8 @@
 
     <Grid x:Name="GridMain" Background="{x:Null}">
         <Grid.RowDefinitions>
-            <RowDefinition Height="10*"/>
-            <RowDefinition Height="5*"/>
+            <RowDefinition Height="15*"/>
+            <RowDefinition Height="8*"/>
             <RowDefinition Height="109*"/>
         </Grid.RowDefinitions>
 
@@ -38,15 +38,56 @@
                 </TextBlock>
             </StackPanel>
 
-            <StackPanel Margin="0,0,300,0" Orientation="Horizontal" VerticalAlignment="Stretch" HorizontalAlignment="Right">
-                <Button Margin="10,0,10,0"
+            <StackPanel Margin="0,0,50,0" Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Right">
+                <!--<Button Margin="1"
                    Style="{DynamicResource MaterialDesignFloatingActionMiniButton}"     
                    materialDesign:ShadowAssist.ShadowDepth="Depth5" Background="{Binding OcsBrush, FallbackValue={x:Null}}">
                     OCS
+                </Button>-->
+
+                <!--<Button Margin="0" Width="47" Height="60"
+                   Style="{DynamicResource MaterialDesignFloatingActionButton}"     
+                   materialDesign:ShadowAssist.ShadowDepth="Depth5" Background="{Binding BatteryBrush, FallbackValue={x:Null}}">
+                    <StackPanel>
+                        <materialDesign:PackIcon Kind="BatteryCharging" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,0,0,0" Height="20" Width="auto"/>
+                        <TextBlock Text="{Binding SOC, StringFormat={}{0}%, FallbackValue=0%}"/>
+                    </StackPanel>
+                </Button>-->
+                
+                <Button Margin="1" HorizontalAlignment="Left" Height="40" BorderBrush="Gray" BorderThickness="0" Background="{x:Null}"
+                        >
+                    <StackPanel Orientation="Horizontal">
+                        <materialDesign:PackIcon HorizontalContentAlignment="Left" Kind="AccessPointNetworkOff" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0,0,0,0" Height="35" Width="auto"
+                                                 Visibility="{c:Binding 'OcsState == OHVCommonShareds:eOcsState.DisConnect'}"/>
+                        <TextBlock Margin="2" Text="OCS ::" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20"/>
+                        <TextBlock Margin="2" Text="{Binding OcsState, FallbackValue=X}" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20"/>
+
+                        <materialDesign:PackIcon HorizontalContentAlignment="Left" Kind="AccessPointNetwork" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0,0,0,0" Height="35" Width="auto"
+                                                 Visibility="{c:Binding 'OcsState == OHVCommonShareds:eOcsState.Connect'}"/>
+                    </StackPanel>
+                </Button> 
+
+                <Button Margin="1" HorizontalAlignment="Center" Height="40" BorderBrush="Gray" BorderThickness="0" Background="{x:Null}"
+                        HorizontalContentAlignment="Left">
+                    <StackPanel Orientation="Horizontal">
+                        <materialDesign:PackIcon HorizontalContentAlignment="Left" Kind="BatteryOff" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0,0,0,0" Height="40" Width="AUto"
+                                                 Visibility="{c:Binding 'BatteryConnectState == OHVCommonShareds:eBatteryConnect.DisConnect'}"/>
+                        <TextBlock Margin="2" Text="{Binding BatteryConnect, FallbackValue=Battery ::}" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20"
+                                   Visibility="{c:Binding 'BatteryConnectState == OHVCommonShareds:eBatteryConnect.DisConnect'}"/>
+                        <TextBlock Margin="2" Text="{Binding SOC, StringFormat={}{0}%, FallbackValue=0%}" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20"
+                                   Visibility="{c:Binding 'BatteryConnectState == OHVCommonShareds:eBatteryConnect.DisConnect'}"/>
+
+                        <materialDesign:PackIcon HorizontalContentAlignment="Left" Kind="BatteryCharging" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0,0,0,0" Height="40" Width="auto"
+                                                 Visibility="{c:Binding 'BatteryConnectState == OHVCommonShareds:eBatteryConnect.Connect'}"/>
+                        <TextBlock Margin="2" Text="{Binding BatteryConnect, FallbackValue=Battery ::}" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20"
+                                   Visibility="{c:Binding 'BatteryConnectState == OHVCommonShareds:eBatteryConnect.Connect'}"/>
+                        <TextBlock Margin="2" Text="{Binding SOC, StringFormat={}{0}%, FallbackValue=0%}" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20"
+                                   Visibility="{c:Binding 'BatteryConnectState == OHVCommonShareds:eBatteryConnect.Connect'}"/>
+                    </StackPanel>
                 </Button>
             </StackPanel>
 
-            <StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0">
+            <StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20,0,0,0">
                 <TextBlock Text="{Binding VehicleID, FallbackValue=VehicleControlSystem 1.0.0.1}" VerticalAlignment="Center" Foreground="LightGray" FontSize="20" Margin="0,0,0,10"/>
                 <TextBlock Text="{Binding DateTime, FallbackValue=2020-02-24 13:09:33, StringFormat=' \{0:yyyy-MM-dd HH:mm:ss\}'}" VerticalAlignment="Center" FontSize="20" Foreground="LightGray"/>
             </StackPanel>
@@ -121,7 +162,7 @@
                     <Border Margin="5" BorderBrush="#FF00FFD3" BorderThickness="2"/>
                     <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
                         <StackPanel Orientation="Vertical">
-                            
+
                             <Button Margin="15" Width="200" Height="50"
                                     Command="{Binding BuzzerStopCommand}"
                                     CommandParameter="Buzzer">
@@ -149,9 +190,9 @@
                     </Border>
                     <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
                         <StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center">
-                            <Button Content="Vehicle ID" Margin="3" Background="{x:Null}"/>
+                            <!--<Button Content="Vehicle ID" Margin="3" Background="{x:Null}"/>
                             <Button Content="Vehicle IP" Margin="3" Background="{x:Null}"/>
-                            <Button Content="OCS IP" Margin="3" Background="{x:Null}"/>
+                            <Button Content="OCS IP" Margin="3" Background="{x:Null}"/>-->
                             <Button Content="Version" Margin="3" Background="{x:Null}"/>
                             <Button Content="CPU" Margin="3" Background="{x:Null}"/>
                             <!--<Button Margin="3" Height="50" Background="{x:Null}">
@@ -163,9 +204,9 @@
                         </StackPanel>
 
                         <StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center">
-                            <Button Content="{Binding VehicleID, FallbackValue=VM00001}" Margin="3" Background="{x:Null}"/>
+                            <!--<Button Content="{Binding VehicleID, FallbackValue=VM00001}" Margin="3" Background="{x:Null}"/>
                             <Button Content="{Binding VehicleIP, FallbackValue=127.0.0.1}" Margin="3" Background="{x:Null}"/>
-                            <Button Content="{Binding OcsIP, FallbackValue=192.168.0.10}" Margin="3" Background="{x:Null}"/>
+                            <Button Content="{Binding OcsIP, FallbackValue=192.168.0.10}" Margin="3" Background="{x:Null}"/>-->
                             <Button Content="{Binding SwVersion, FallbackValue=OHV.1.0.0.1}" Margin="3" Background="{x:Null}"/>
                             <Button Margin="0,4,0,0" Height="30" Width="auto" Background="{x:Null}">
                                 <TextBlock HorizontalAlignment="Center"><Run Text="{Binding CPU, StringFormat={}{0:0.0} %, FallbackValue=0%}"/></TextBlock>

+ 78 - 6
Dev/OHV/OHV.Vehicle/Concept/D_MainWindowViewModel.cs

@@ -149,10 +149,32 @@ namespace OHV.Vehicle.Concept
             set { SetProperty(ref this.machineMode, value); }
         }
 
+        //HostConnectedEventArgs.eConnectedState ocsState = HostConnectedEventArgs.eConnectedState.Disconnected;
+        //public HostConnectedEventArgs.eConnectedState OcsState
+        //{
+        //    get { return this.ocsState; }
+        //    set { this.SetProperty( ref this.ocsState , value ); }
+        //}
+
+        eOcsState ocsState = eOcsState.DisConnect;
+        public eOcsState OcsState
+        {
+            get { return this.ocsState; }
+            set { this.SetProperty( ref this.ocsState , value ); }
+        }
+            
+
+        eBatteryConnect batteryConnectState = eBatteryConnect.DisConnect;
+        public eBatteryConnect BatteryConnectState
+        {
+            get { return this.batteryConnectState; }
+            set { this.SetProperty( ref this.batteryConnectState , value ); }
+        }
+
         #endregion
 
         #region Brushes
-        private Brush _ocsBrush;// = Brushes.Gray;
+        private Brush _ocsBrush;
 
         public Brush OcsBrush
         {
@@ -163,6 +185,24 @@ namespace OHV.Vehicle.Concept
             }
         }
 
+        private Brush batteryBrush;
+
+        public Brush BatteryBrush
+        {
+            get { return batteryBrush; }
+            set
+            {
+                SetProperty( ref batteryBrush , value );
+            }
+        }
+
+        double soc;
+        public double SOC
+        {
+            get { return this.soc; }
+            set { this.SetProperty( ref this.soc , value ); }
+        }
+
         #endregion
 
         #region Commands
@@ -185,7 +225,8 @@ namespace OHV.Vehicle.Concept
         VCSMessagePubSubEvent vcsMessagePublisher;
 
         IRegionManager regionManager;
-        public Common.Events.HostConnectedEventArgs.eConnectedState State { get; set; }
+        
+        
 
         DeskTopInfo dti = new DeskTopInfo();
         SqliteManager sql;
@@ -339,15 +380,15 @@ namespace OHV.Vehicle.Concept
 
         private void OcsConnectCallBack(HostConnectedEventArgs obj)
         {
-            this.State = obj.State;
+            var state = obj.State;
 
-            switch (this.State)
+            switch ( state )
             {
                 case HostConnectedEventArgs.eConnectedState.Disconnected:
-                    this.OcsBrush = Brushes.Transparent;
+                    this.OcsState = eOcsState.DisConnect;
                     break;
                 case HostConnectedEventArgs.eConnectedState.Connected:
-                    this.OcsBrush = Brushes.LimeGreen;
+                    this.OcsState = eOcsState.Connect;
                     break;
             }
         }
@@ -387,6 +428,22 @@ namespace OHV.Vehicle.Concept
 
         private void UICallbackCommunication(GUIMessageEventArgs obj)
         {
+            if ( obj.Kind == GUIMessageEventArgs.eGUIMessageKind.ModelPropertyChange )
+            {
+                if ( obj.MessageKey.Equals( MessageKey.Vehicle ) )
+                {
+                    switch ( obj.ModelPropertyName )
+                    {
+                        case "BatteryIsConnect":
+                            this.RspBatteryConnected( obj );
+                            break;
+                        case "BatteryStateOfCharge":
+                            this.SOC = CastTo<double>.From<object>( obj.Args );
+                            break;
+                    }
+                }
+            }
+
             switch ( obj.Kind )
             {
                 case GUIMessageEventArgs.eGUIMessageKind.ModelPropertyChange:
@@ -419,6 +476,21 @@ namespace OHV.Vehicle.Concept
             }
         }
 
+        void RspBatteryConnected( GUIMessageEventArgs obj )
+        {
+            var connected = CastTo<bool>.From<object>( obj.Args );
+            if ( connected )
+            {
+                this.BatteryBrush = Brushes.LimeGreen;
+                BatteryConnectState = eBatteryConnect.Connect;
+            }
+            else
+            {
+                this.BatteryBrush = Brushes.Gray;
+                BatteryConnectState = eBatteryConnect.DisConnect;
+            }
+        }
+
         private void RspMachineModeChg( GUIMessageEventArgs obj )
         {
             string reason = string.Empty;

+ 3 - 0
Dev/OHV/VehicleControlSystem/ControlLayer/Serial/BatteryTabos/Advantech/Advantech.cs

@@ -334,6 +334,9 @@ namespace VehicleControlSystem.ControlLayer.Serial.BatteryTabos
             {
                 ll.ForEach( r =>
                 {
+                    if ( r == null )
+                        return; //buffer empty
+
                     if ( r[ 1 ] == 1 )
                     { CanRecvSave( r , 1 ); }
                     else if ( r[ 1 ] == 2 )