Forráskód Böngészése

현장 작업 : Robot Lazer ui , Battery Connect State, Update

ys-hwang 6 éve
szülő
commit
ade9123757

+ 1 - 0
Dev/OHV/OHV.Common/Model/VehicleInfo.cs

@@ -30,5 +30,6 @@ namespace OHV.Common.Model
         public double Capacity { get; set; }
         public double Energy { get; set; }
         public double Temperature {get;set;}
+        public bool BatteryIsConnect { get; set; }
     }
 }

+ 5 - 4
Dev/OHV/OHV.Module.Interactivity/PopUp/BatteryConfigView.xaml

@@ -68,6 +68,7 @@
                     </Grid.RowDefinitions>
 
                     <!--Voltage-->
+                    <TextBlock Grid.Row="0" Text="Battery View" FontSize="20" Foreground="White"/>
                     <Button Grid.Column="0" Grid.Row="0"
                             Content="Voltage" Margin="3" VerticalAlignment="Bottom"/>
 
@@ -202,10 +203,10 @@
                     <Border BorderBrush="Gray" BorderThickness="1"/>
                     <StackPanel VerticalAlignment="Center"
                                 HorizontalAlignment="Center">
-                        <Button Margin="5" HorizontalAlignment="Center" Height="Auto" BorderBrush="Gray" BorderThickness="1" Command="{Binding CloseDialogCommand}" CommandParameter="true">
+                        <Button Margin="5" HorizontalAlignment="Center" Height="Auto" BorderBrush="Gray" BorderThickness="1">
                             <StackPanel Orientation="Horizontal">
                                 <Ellipse Margin="5" Fill="{Binding ConnectStatus, FallbackValue=Gray}" Width="30" Height="30"/>
-                                <TextBlock Margin="15" Text="{Binding Connecting, FallbackValue=NONE}" VerticalAlignment="Center" HorizontalAlignment="Center" />
+                                <TextBlock Margin="15" Text="{Binding BatteryConnect, FallbackValue=DisConnecting}" VerticalAlignment="Center" HorizontalAlignment="Center" />
                             </StackPanel>
                         </Button>
                     </StackPanel>
@@ -216,8 +217,8 @@
 
         <Grid Grid.Column="1" Background="#263238">
             <Border Margin="1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
-            <StackPanel>
-                <Button Margin="7,20" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding CloseDialogCommand}" CommandParameter="true">
+            <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" />

+ 38 - 0
Dev/OHV/OHV.Module.Interactivity/PopUp/BatteryConfigViewModel.cs

@@ -12,6 +12,7 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Input;
+using System.Windows.Media;
 
 namespace OHV.Module.Interactivity.PopUp
 {
@@ -101,6 +102,19 @@ namespace OHV.Module.Interactivity.PopUp
             set { this.SetProperty( ref this.temperature , value ); }
         }
 
+        string batteryConnect = "DisConnect";
+        public string BatteryConnect
+        {
+            get { return this.batteryConnect; }
+            set { this.SetProperty( ref this.batteryConnect , value ); }
+        }
+        Brush connectStatus = Brushes.Gray;
+        public Brush ConnectStatus 
+        {
+            get { return this.connectStatus; }
+            set { this.SetProperty( ref this.connectStatus , value ); }
+        }
+
         public event Action<IDialogResult> RequestClose;
 
         public ICommand BatteryOpenCommand { get; set; }
@@ -161,6 +175,7 @@ namespace OHV.Module.Interactivity.PopUp
         private void ResponseVehicleState( DriveControlEventArgs obj )
         {
             var d = CastTo<VehicleInfo>.From<object>( obj.Args );
+            
             this.Voltage = d.Voltage;
             this.Current = d.Current;
             this.BatteryState = d.BatteryState;
@@ -171,6 +186,16 @@ namespace OHV.Module.Interactivity.PopUp
             this.Capacity = d.Capacity;
             this.Energy = d.Energy;
             this.Temperature = d.Temperature;
+            if ( d.BatteryIsConnect )
+            {
+                this.ConnectStatus = Brushes.LimeGreen;
+                this.BatteryConnect = "Connecting";
+            }
+            else
+            {
+                this.ConnectStatus = Brushes.Gray;
+                this.BatteryConnect = "DisConnecting";
+            }
         }
 
         private void UICallbackCommunication( GUIMessageEventArgs obj )
@@ -211,6 +236,19 @@ namespace OHV.Module.Interactivity.PopUp
                         case "BatteryTemperature":
                             this.Temperature = CastTo<double>.From<object>( obj.Args );
                             break;
+                        case "BatteryIsConnect":
+                            var connected = CastTo<bool>.From<object>( obj.Args );
+                            if ( connected )
+                            {
+                                this.ConnectStatus = Brushes.LimeGreen;
+                                this.BatteryConnect = "Connecting";
+                            }
+                            else
+                            {
+                                this.ConnectStatus = Brushes.Gray;
+                                this.BatteryConnect = "DisConnecting";
+                            }
+                            break;
                     }
                 }
             }

+ 5 - 4
Dev/OHV/OHV.Module.Interactivity/PopUp/ConveyorControlView.xaml

@@ -52,8 +52,9 @@
                         <ColumnDefinition Width="*"/>
                         <ColumnDefinition Width="*"/>
                     </Grid.ColumnDefinitions>
-                    
-                    
+
+                    <TextBlock Text="Conveyor View" FontSize="20" Foreground="White"/>
+
                     <StackPanel Grid.Column="0"
                                 Orientation="Vertical"
                                 HorizontalAlignment="Center"
@@ -294,8 +295,8 @@
 
         <Grid Grid.Column="1" Background="#263238">
             <Border Margin="1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
-            <StackPanel VerticalAlignment="Top">
-                <Button Margin="5,10,5,0" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding CloseDialogCommand}" CommandParameter="true">
+            <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" />

+ 29 - 29
Dev/OHV/OHV.Module.Interactivity/PopUp/DriveServoView.xaml

@@ -144,8 +144,8 @@
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10">
                     <StackPanel>
-                        <TextBlock HorizontalAlignment="Center"><Run Text="Target"/></TextBlock>
-                        <TextBlock HorizontalAlignment="Center"><Run Text="Pos"/></TextBlock>
+                        <TextBlock HorizontalAlignment="Center"><Run Text="Target" FontSize="20"/></TextBlock>
+                        <TextBlock HorizontalAlignment="Center"><Run Text="Pos" FontSize="20"/></TextBlock>
                     </StackPanel>
                 </Button>
 
@@ -154,8 +154,8 @@
                             materialDesign:ButtonAssist.CornerRadius="10"
                             ToolTip="MaterialDesignRaisedButton with Round Corners">
                     <StackPanel>
-                        <TextBlock HorizontalAlignment="Center"><Run Text="Current"/></TextBlock>
-                        <TextBlock HorizontalAlignment="Center"><Run Text="Pos"/></TextBlock>
+                        <TextBlock HorizontalAlignment="Center"><Run Text="Current" FontSize="20"/></TextBlock>
+                        <TextBlock HorizontalAlignment="Center"><Run Text="Pos" FontSize="20"/></TextBlock>
                     </StackPanel>
                 </Button>
 
@@ -163,8 +163,8 @@
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10">
                     <StackPanel>
-                        <TextBlock HorizontalAlignment="Center"><Run Text="Difference"/></TextBlock>
-                        <TextBlock HorizontalAlignment="Center"><Run Text="Pos"/></TextBlock>
+                        <TextBlock HorizontalAlignment="Center"><Run Text="Difference" FontSize="20"/></TextBlock>
+                        <TextBlock HorizontalAlignment="Center"><Run Text="Pos" FontSize="20"/></TextBlock>
                     </StackPanel>
                 </Button>
 
@@ -173,7 +173,7 @@
                             materialDesign:ButtonAssist.CornerRadius="10"
                             Command="{Binding SelectAxisCommand}"
                             CommandParameter="Left">
-                    <TextBlock><Run Text="Drive1"/></TextBlock>
+                    <TextBlock><Run Text="Drive1" FontSize="20"/></TextBlock>
                 </Button>
 
                 <Button Background="{x:Null}" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Height="auto"
@@ -182,19 +182,19 @@
                     <Button.InputBindings>
                         <MouseBinding Gesture="LeftClick" Command="{Binding KeyInTargetPosCommand}" CommandParameter="Left"/>
                     </Button.InputBindings>
-                    <TextBlock><Run Text="{Binding DriveTargetPos, StringFormat=0.000, FallbackValue=0.000}"/></TextBlock>
+                    <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"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10">
-                    <TextBlock><Run Text="{Binding CurrentDrive, StringFormat=0.000, FallbackValue=0.000}"/></TextBlock>
+                    <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"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10">
-                    <TextBlock><Run Text="{Binding DifferenceDrive, StringFormat=0.000, FallbackValue=0.000}"/></TextBlock>
+                    <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"  >
@@ -207,7 +207,7 @@
                         CommandParameter="CW" >
                         <StackPanel>
                             <materialDesign:PackIcon Kind="ArrowLeft" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                            <TextBlock Text="Steering Left" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                            <TextBlock Text="Steering Left" VerticalAlignment="Stretch" HorizontalAlignment="Center" FontSize="20"/>
                         </StackPanel>
                     </Button>
 
@@ -220,7 +220,7 @@
                         CommandParameter="CCW">
                         <StackPanel>
                             <materialDesign:PackIcon Kind="ArrowRight" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                            <TextBlock Text="Steering Right" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                            <TextBlock Text="Steering Right" VerticalAlignment="Stretch" HorizontalAlignment="Center" FontSize="18"/>
                         </StackPanel>
                     </Button>
                 </StackPanel>
@@ -238,7 +238,7 @@
                             >
                     <StackPanel>
                         <materialDesign:PackIcon Kind="MinusBoxOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="30" Width="auto"/>
-                        <TextBlock><Run Text="Jog(-)"/></TextBlock>
+                        <TextBlock><Run Text="Jog(-)" FontSize="20"/></TextBlock>
                     </StackPanel>
                 </Button>
 
@@ -251,7 +251,7 @@
                             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}" Foreground="Orange"/></TextBlock>
+                        <TextBlock HorizontalAlignment="Center"><Run Text="{Binding JogVelocity, StringFormat={}{0:0.000}, FallbackValue=0.00}" FontSize="20" Foreground="Orange"/></TextBlock>
                     </StackPanel>
                 </Button>
 
@@ -265,7 +265,7 @@
                             Command="{Binding JogCommand}" CommandParameter="+">
                     <StackPanel>
                         <materialDesign:PackIcon Kind="PlusBoxOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="30" Width="auto"/>
-                        <TextBlock><Run Text="Jog(+)"/></TextBlock>
+                        <TextBlock><Run Text="Jog(+)" FontSize="20"/></TextBlock>
                     </StackPanel>
                 </RepeatButton>
             </Grid>
@@ -308,11 +308,11 @@
                     </StackPanel>
                 </Button>-->
 
-                <Button Margin="7" HorizontalAlignment="Stretch" Height="60" BorderBrush="Gray" BorderThickness="2" 
+                <Button Margin="10,0,10,10" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" 
                         Command="{Binding MoveToCommand}">
                     <StackPanel>
                         <!--<materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
-                        <TextBlock Text="Move To" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                        <TextBlock Text="Move To" VerticalAlignment="Stretch" HorizontalAlignment="Center" FontSize="20"/>
                     </StackPanel>
                 </Button>
             </StackPanel>
@@ -322,48 +322,48 @@
         <Grid Grid.Column="2" Background="#263238">
             <Border Margin="1,1,0,1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Left" Width="128"/>
             <StackPanel VerticalAlignment="Top">
-                <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding ServoOnCommand}">
+                <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"/>
+                        <TextBlock Text="Servo On" VerticalAlignment="Stretch" HorizontalAlignment="Center" FontSize="19"/>
                     </StackPanel>
                 </Button>
 
-                <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding ServoOffCommand}">
+                <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"/>
+                        <TextBlock Text="Servo Off" VerticalAlignment="Stretch" HorizontalAlignment="Center" FontSize="18"/>
                     </StackPanel>
                 </Button>
 
-                <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding FaultResetCommand}">
+                <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" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                        <TextBlock Text="Fault Reset" FontSize="16" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
                     </StackPanel>
                 </Button>
 
-                <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" 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" />
+                        <TextBlock Text="Origin" VerticalAlignment="Stretch" HorizontalAlignment="Center" FontSize="20"/>
                     </StackPanel>
                 </Button>
             </StackPanel>
 
             <StackPanel VerticalAlignment="Bottom">
-                <Button Margin="7, 10" HorizontalAlignment="Stretch" Height="70" BorderBrush="Gray" BorderThickness="2" 
+                <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"/>
+                        <TextBlock Text="Save" VerticalAlignment="Stretch" HorizontalAlignment="Center" FontSize="20"/>
                     </StackPanel>
                 </Button>
 
-                <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding CloseDialogCommand}" CommandParameter="true">
+                <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" />
+                        <TextBlock Text="Close" VerticalAlignment="Stretch" HorizontalAlignment="Center" FontSize="20"/>
                     </StackPanel>
                 </Button>
             </StackPanel>

+ 2 - 2
Dev/OHV/OHV.Module.Interactivity/PopUp/InOutView.xaml

@@ -43,8 +43,8 @@
 
         <Grid Grid.Column="1" HorizontalAlignment="Stretch" Background="#263238">
             <Border Margin="1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
-            <StackPanel>
-                <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding CloseDialogCommand}" CommandParameter="true">
+            <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" />

+ 38 - 38
Dev/OHV/OHV.Module.Interactivity/PopUp/LockServoView.xaml

@@ -13,7 +13,7 @@
              xmlns:c ="clr-namespace:GSG.NET.WPF.CalcBinding;assembly=GSG.NET.WPF"
              xmlns:media ="clr-namespace:System.Windows.Media;assembly=PresentationCore"
              Width="800"
-             Height="600"
+             Height="650"
              Background="#455a64">
 
     <prism:Dialog.WindowStyle>
@@ -82,8 +82,8 @@
                             materialDesign:ButtonAssist.CornerRadius="10"
                             ToolTip="MaterialDesignRaisedButton with Round Corners">
                         <StackPanel>
-                            <TextBlock HorizontalAlignment="Center"><Run Text="Target"/></TextBlock>
-                            <TextBlock HorizontalAlignment="Center"><Run Text="Pos"/></TextBlock>
+                            <TextBlock HorizontalAlignment="Center"><Run Text="Target" FontSize="20"/></TextBlock>
+                            <TextBlock HorizontalAlignment="Center"><Run Text="Pos" FontSize="20"/></TextBlock>
                         </StackPanel>
 
                     </Button>
@@ -93,8 +93,8 @@
                             materialDesign:ButtonAssist.CornerRadius="10"
                             ToolTip="MaterialDesignRaisedButton with Round Corners">
                         <StackPanel>
-                            <TextBlock HorizontalAlignment="Center"><Run Text="Current"/></TextBlock>
-                            <TextBlock HorizontalAlignment="Center"><Run Text="Pos"/></TextBlock>
+                            <TextBlock HorizontalAlignment="Center"><Run Text="Current" FontSize="18"/></TextBlock>
+                            <TextBlock HorizontalAlignment="Center"><Run Text="Pos" FontSize="20"/></TextBlock>
                         </StackPanel>
                     </Button>
 
@@ -103,8 +103,8 @@
                             materialDesign:ButtonAssist.CornerRadius="10"
                             ToolTip="MaterialDesignRaisedButton with Round Corners">
                         <StackPanel>
-                            <TextBlock HorizontalAlignment="Center"><Run Text="Difference"/></TextBlock>
-                            <TextBlock HorizontalAlignment="Center"><Run Text="Pos"/></TextBlock>
+                            <TextBlock HorizontalAlignment="Center"><Run Text="Difference" FontSize="14"/></TextBlock>
+                            <TextBlock HorizontalAlignment="Center"><Run Text="Pos" FontSize="20"/></TextBlock>
                         </StackPanel>
 
                     </Button>
@@ -123,7 +123,7 @@
                                        HorizontalAlignment="Center">
                                 <Run Text="Clamp"/>
                             </TextBlock>
-                            <TextBlock><Run Text="Axis Left"/></TextBlock>
+                            <TextBlock><Run Text="Axis Left" /></TextBlock>
                         </StackPanel>
                     </Button>
 
@@ -134,21 +134,21 @@
                         <Button.InputBindings>
                             <MouseBinding Gesture="LeftClick" Command="{Binding KeyInTargetPosCommand}" CommandParameter="Left"/>
                         </Button.InputBindings>
-                        <TextBlock><Run Text="{Binding TargetPosLockLeft, StringFormat=0.000, FallbackValue=0.000}"/></TextBlock>
+                        <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"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             ToolTip="MaterialDesignRaisedButton with Round Corners">
-                        <TextBlock><Run Text="{Binding CurrentLockLeft, StringFormat=0.000, FallbackValue=0.000}"/></TextBlock>
+                        <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"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             ToolTip="MaterialDesignRaisedButton with Round Corners">
-                        <TextBlock><Run Text="{Binding DifferenceLockLeft, StringFormat=0.000, FallbackValue=0.000}"/></TextBlock>
+                        <TextBlock><Run Text="{Binding DifferenceLockLeft, StringFormat=0.000, FallbackValue=0.000}" FontSize="20"/></TextBlock>
                     </Button>
 
                     <!--Column3-->
@@ -176,21 +176,21 @@
                         <Button.InputBindings>
                             <MouseBinding Gesture="LeftClick" Command="{Binding KeyInTargetPosCommand}" CommandParameter="Right"/>
                         </Button.InputBindings>
-                        <TextBlock><Run Text="{Binding TargetPosLockRight, StringFormat=0.000, FallbackValue=0.000}"/></TextBlock>
+                        <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"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             ToolTip="MaterialDesignRaisedButton with Round Corners">
-                        <TextBlock><Run Text="{Binding CurrentLockRight, StringFormat=0.000, FallbackValue=0.000}"/></TextBlock>
+                        <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"
                            Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             ToolTip="MaterialDesignRaisedButton with Round Corners">
-                        <TextBlock><Run Text="{Binding DifferenceLockRight, StringFormat=0.000, FallbackValue=0.000}"/></TextBlock>
+                        <TextBlock><Run Text="{Binding DifferenceLockRight, StringFormat=0.000, FallbackValue=0.000}" FontSize="20"/></TextBlock>
                     </Button>
 
                     <!--Axis State-->
@@ -235,7 +235,7 @@
                     </Button>
 
                     <!--Right-->
-                    <Border BorderBrush="#FF00FFD3" BorderThickness="2" Margin="12,78,15,-13" Grid.ColumnSpan="5" RenderTransformOrigin="0.5,0.5" Grid.Row="3">
+                    <Border BorderBrush="#FF00FFD3" BorderThickness="2" Margin="7,79,20,-9" Grid.ColumnSpan="5" RenderTransformOrigin="0.5,0.5" Grid.Row="3">
                         <Border.RenderTransform>
                             <TransformGroup>
                                 <ScaleTransform ScaleX="-1"/>
@@ -347,7 +347,7 @@
                                 </Button.InputBindings>-->
                                 <StackPanel>
                                     <materialDesign:PackIcon Kind="MinusBoxOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="30" Width="auto"/>
-                                    <TextBlock><Run Text="Jog(-)"/></TextBlock>
+                                    <TextBlock><Run Text="Jog(-)" FontSize="20"/></TextBlock>
                                 </StackPanel>
                             </Button>
 
@@ -390,7 +390,7 @@
 
                                 <StackPanel>
                                     <materialDesign:PackIcon Kind="PlusBoxOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="30" Width="auto"/>
-                                    <TextBlock><Run Text="Jog(+)"/></TextBlock>
+                                    <TextBlock><Run Text="Jog(+)" FontSize="20"/></TextBlock>
                                 </StackPanel>
                             </Button>
                         </StackPanel>
@@ -409,16 +409,16 @@
                             Command="{Binding SelectPosCommand}"
                             CommandParameter="Teach_Postion_Lock">
                                 <StackPanel>
-                                    <TextBlock Text="Clamp" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                                    <TextBlock Text="Lock" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                                    <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" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                                    <TextBlock Text="UnLock" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                                    <TextBlock Text="Clamp" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                                    <TextBlock Text="UnLock" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
                                 </StackPanel>
                             </Button>
                         </Grid>
@@ -429,23 +429,23 @@
 
         <Grid Grid.Column="1" Background="#37474f">
             <StackPanel>
-                <Button Margin="7,5" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding MoveToCommand}"
+                <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" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                        <TextBlock Text="Move To" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
                     </StackPanel>
                 </Button>
 
 
-                <Button Margin="7,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" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                        <TextBlock Text="To Target" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                        <TextBlock Text="Current" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                        <TextBlock Text="To Target" FontSize="18" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
                     </StackPanel>
                 </Button>
 
@@ -456,51 +456,51 @@
         <Grid Grid.Column="2" HorizontalAlignment="Stretch" Background="#263238">
             <Border Margin="1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
             <StackPanel>
-                <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding ServoOnCommand}">
+                <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"/>
+                        <TextBlock Text="Servo On" FontSize="18" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
                     </StackPanel>
                 </Button>
 
-                <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding ServoOffCommand}">
+                <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"/>
+                        <TextBlock Text="Servo Off" FontSize="18" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
                     </StackPanel>
                 </Button>
 
-                <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding FaultResetCommand}">
+                <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" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                        <TextBlock Text="Fault Reset" FontSize="16" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
                     </StackPanel>
                 </Button>
 
-                <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" 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" />
+                        <TextBlock Text="Origin" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
                     </StackPanel>
                 </Button>
 
             </StackPanel>
 
             <StackPanel Orientation="Vertical" VerticalAlignment="Bottom">
-                <Button Margin="7,5" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2"
+                <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" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                        <TextBlock Text="SAVE" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
                     </StackPanel>
                 </Button>
 
-                <Button Margin="7,0,7,7" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding CloseDialogCommand}" CommandParameter="true">
+                <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" />
+                        <TextBlock Text="Close" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
                     </StackPanel>
                 </Button>
             </StackPanel>

+ 75 - 102
Dev/OHV/OHV.Module.Interactivity/PopUp/OpticalReadingConfigView.xaml

@@ -8,7 +8,7 @@
              xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
              prism:ViewModelLocator.AutoWireViewModel="True"
              mc:Ignorable="d" 
-             Width="1000"
+             Width="600"
              Height="600"
              Background="#455a64">
 
@@ -38,138 +38,108 @@
         </Grid.ColumnDefinitions>
 
         <Grid Grid.Column="0" Margin="15" Background="#37474f">
-            <Grid.ColumnDefinitions>
+            <Grid.RowDefinitions>
+                <RowDefinition Height="*"/>
+                <RowDefinition Height="*"/>
+            </Grid.RowDefinitions>
+            <!--<Grid.ColumnDefinitions>
                 <ColumnDefinition/>
-                <ColumnDefinition Width="2*"/>
-            </Grid.ColumnDefinitions>
-
-            <Border Grid.Column="0" Margin="39,10" BorderBrush="#FF00FFD3" BorderThickness="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
+                <ColumnDefinition Width="*"/>
+                <ColumnDefinition Width="*"/>
+            </Grid.ColumnDefinitions>-->
             <StackPanel VerticalAlignment="Center"
                         HorizontalAlignment="Center"
                         Grid.Column="0" Margin="85,15">
-                <materialDesign:Badged Margin="5"
-                                       Badge="Detect Area#1"
-                                       BadgeColorZoneMode="Dark">
-                    <Button Width="100"
-                            Height="240"
-                            Background="{Binding OpReaderOutFirst}">
-                        <StackPanel>
-                            <TextBlock HorizontalAlignment="Center"><Run Text="Slow" FontSize="25"/></TextBlock>
-                            <TextBlock HorizontalAlignment="Center"><Run Text="Stop" FontSize="25"/></TextBlock>
-                        </StackPanel>
-                    </Button>
-                </materialDesign:Badged>
-
-                <materialDesign:Badged Margin="5"
-                                       Badge="Detect Area#2"
-                                       BadgeColorZoneMode="Dark">
-                    <Button Width="100"
-                            Height="170"
-                            Background="{Binding OpReaderOutSecond}">
+                
+            </StackPanel>
+            <TextBlock Text="Safe Detect View" FontSize="20" Foreground="White"/>
+
+            <Grid Grid.Row="0">
+                <Border BorderBrush="Gray" BorderThickness="1"/>
+                <StackPanel VerticalAlignment="Center" 
+                                HorizontalAlignment="Center">
+                    <Button Height="60">
                         <StackPanel>
-                            <TextBlock HorizontalAlignment="Center"><Run Text="Safety" FontSize="25"/></TextBlock>
-                            <TextBlock HorizontalAlignment="Center"><Run Text="Stop" FontSize="25"/></TextBlock>
+                            <TextBlock><Run Text=" Lazer State " FontSize="20"/></TextBlock>
                         </StackPanel>
                     </Button>
-                </materialDesign:Badged>
-
-                <materialDesign:Badged Margin="5"
-                                       Badge="Detect Area#3"
-                                       BadgeColorZoneMode="Dark">
-                    <Button Width="100"
-                            Height="100"
-                            Background="{Binding OpReaderOutThird}">
+
+                    <Button Background="{x:Null}" Height="60">
                         <StackPanel>
-                            <TextBlock><Run Text="Stop" FontSize="25"/></TextBlock>
+                            <TextBlock><Run Text="{Binding ObstacleState, FallbackValue=NONE}" FontSize="25" Foreground="Orange"/></TextBlock>
                         </StackPanel>
                     </Button>
-                </materialDesign:Badged>
-            </StackPanel>
-
-            <Grid Grid.Column="0">
-                
+                </StackPanel>
             </Grid>
 
-            <Grid Grid.Column="1">
-                <Grid.RowDefinitions>
-                    <RowDefinition Height="*"/>
-                    <RowDefinition Height="*"/>
-                </Grid.RowDefinitions>
-
-                <Grid Grid.Row="0">
-                    <Border BorderBrush="Gray" BorderThickness="1"/>
-                    <StackPanel VerticalAlignment="Center"
+            <Grid Grid.Row="1">
+                <Border BorderBrush="Gray" BorderThickness="1"/>
+                <StackPanel Orientation="Horizontal"
+                                VerticalAlignment="Center"
                                 HorizontalAlignment="Center">
+                    <StackPanel Margin="5"
+                                    VerticalAlignment="Center"
+                                    HorizontalAlignment="Center">
+
                         <Button Height="60">
                             <StackPanel>
-                                <TextBlock><Run Text="Obsatcle State" FontSize="20"/></TextBlock>
+                                <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 ObstacleState, FallbackValue=NONE}" FontSize="25" Foreground="Orange"/></TextBlock>
+                                <TextBlock><Run Text="{Binding CurrentPattern, FallbackValue=NONE}" FontSize="25" Foreground="Orange"/></TextBlock>
                             </StackPanel>
                         </Button>
-                    </StackPanel>
-                </Grid>
-                
-                
-                <Grid Grid.Row="1">
-                    <Border BorderBrush="Gray" BorderThickness="1"/>
-                    <StackPanel Orientation="Horizontal"
-                                VerticalAlignment="Center"
-                                HorizontalAlignment="Center">
-                        <StackPanel Margin="5"
-                                    VerticalAlignment="Center"
-                                    HorizontalAlignment="Center">
 
-                            <Button Height="60">
-                                <StackPanel>
-                                    <TextBlock><Run Text="Drive 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 ObstacleDrive, FallbackValue=0}" FontSize="25" Foreground="Orange"/></TextBlock>
-                                </StackPanel>
-                            </Button>
-                        </StackPanel>
+                            <StackPanel>
+                                <TextBlock><Run Text="{Binding ObstacleDrive, FallbackValue=0}" FontSize="25" Foreground="Orange"/></TextBlock>
+                            </StackPanel>
+                        </Button>-->
+                    </StackPanel>
+                </StackPanel>
+            </Grid>
 
-                        <StackPanel Margin="5"
+            <!--<Grid Grid.Row="2">
+                <Border BorderBrush="Gray" BorderThickness="1"/>
+                
+                <StackPanel Margin="5"
                         VerticalAlignment="Center"
                         HorizontalAlignment="Center">
 
-                            <Button Height="60">
-                                <StackPanel>
-                                    <TextBlock><Run Text="Curve Pattern" FontSize="20"/></TextBlock>
-                                </StackPanel>
-                            </Button>
+                    <Button Height="60">
+                        <StackPanel>
+                            <TextBlock><Run Text="Curve Pattern" FontSize="20"/></TextBlock>
+                        </StackPanel>
+                    </Button>
 
-                            <Button Background="{x:Null}" Height="60"
+                    <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>
-                                </StackPanel>
-                            </Button>
+                        <StackPanel>
+                            <TextBlock><Run Text="{Binding ObstacleCurve, FallbackValue=0}" FontSize="25" Foreground="Orange"/></TextBlock>
                         </StackPanel>
-                    </StackPanel>
-                    
-                </Grid>
-
-            </Grid>
+                    </Button>
+                </StackPanel>
+            </Grid>-->
 
-           
 
-           
         </Grid>
 
         <!--Right Sub Menu Grid-->
@@ -182,21 +152,24 @@
         <!--Right Main Menu Grid-->
         <Grid Grid.Column="2" Background="#263238">
             <Border Margin="1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
-            <StackPanel>
-                <Button Margin="5,10,5,0" HorizontalAlignment="Stretch" Height="69" 
+
+            <StackPanel VerticalAlignment="Top">
+                <!--<Button Margin="7,7,7,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" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                        <TextBlock Text="Save" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
                     </StackPanel>
-                </Button>
+                </Button>-->
+            </StackPanel>
 
-                <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" 
+            <StackPanel VerticalAlignment="Bottom">
+                <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" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                        <TextBlock Text="Close" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
                     </StackPanel>
                 </Button>
             </StackPanel>

+ 1 - 0
Dev/OHV/OHV.Module.Interactivity/PopUp/OpticalReadingConfigView.xaml.cs

@@ -17,6 +17,7 @@ namespace OHV.Module.Interactivity.PopUp
 {
     /// <summary>
     /// SteeringConfigView.xaml에 대한 상호 작용 논리
+    /// opticalreading -> RobotLazer 이름 변경해야함
     /// </summary>
     public partial class OpticalReadingConfigView : UserControl
     {

+ 20 - 3
Dev/OHV/OHV.Module.Interactivity/PopUp/OpticalReadingConfigViewModel.cs

@@ -54,6 +54,16 @@ namespace OHV.Module.Interactivity.PopUp
             set { this.SetProperty( ref this._obstacleState , value ); }
         }
 
+        string currentPattern;
+        public string CurrentPattern
+        {
+            get { return this.currentPattern; }
+            set
+            {
+                this.SetProperty( ref this.currentPattern , value );
+            }
+        }
+
         public ICommand DetectPatternSave { get; set; }
         public ICommand ResultPattern { get; set; }
         public ICommand PatternResultKyein { get; set; }
@@ -141,10 +151,12 @@ namespace OHV.Module.Interactivity.PopUp
                         case "ObstacleDrive":
                             var drive = CastTo<int>.From<object>( obj.Args );
                             this.ObstacleDrive = drive;
+                            this.CurrentPattern = " Drive ";
                             break;
                         case "ObstacleCurve":
                             var curve = CastTo<int>.From<object>( obj.Args );
                             this.ObstacleCurve = curve;
+                            this.CurrentPattern = " Curve ";
                             break;
                         default:
                             break;
@@ -152,9 +164,14 @@ namespace OHV.Module.Interactivity.PopUp
                 }
             }
 
-            if ( obj.Kind == GUIMessageEventArgs.eGUIMessageKind.RspObstaclePatternNo )
+            if ( obj.Kind == GUIMessageEventArgs.eGUIMessageKind.RspObstaclePatternNo ) 
             {
-                this.ObstacleDrive = Convert.ToInt32( obj.MessageText );
+                if ( Convert.ToInt32( obj.MessageText ) <= 0 )
+                    this.CurrentPattern = "Drive";
+                else
+                    this.CurrentPattern = "Curve";
+
+                //this.ObstacleDrive = Convert.ToInt32( obj.MessageText );
             }
         }
 
@@ -265,6 +282,6 @@ namespace OHV.Module.Interactivity.PopUp
         {
             RequestClose?.Invoke( dialogResult );
         }
-        #endregion
+        #endregion      
     }
 }

+ 4 - 4
Dev/OHV/OHV.Module.Interactivity/PopUp/ServoConfigView.xaml

@@ -45,7 +45,7 @@
                 </Grid.RowDefinitions>
 
                 <Grid Grid.Row="0">
-                    <Border Margin="5" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
+                    <Border Margin="5" BorderBrush="Gray" BorderThickness="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
                     <Button Background="{x:Null}" Foreground="Orange" Margin="10,10,568,226" Height="Auto">
                         <TextBlock Text="Drive" FontSize="30"/>
                     </Button>
@@ -72,7 +72,7 @@
                 </Grid>
 
                 <Grid Grid.Row="1">
-                    <Border Margin="5" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
+                    <Border Margin="5" BorderBrush="Gray" BorderThickness="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
                     <Button Background="{x:Null}" Foreground="Orange" Margin="10,10,568,226" Height="Auto">
                         <TextBlock Text="Lock Servo" FontSize="30"/>
                     </Button>
@@ -199,8 +199,8 @@
 
         <Grid Grid.Column="2" HorizontalAlignment="Stretch" Background="#263238">
             <Border Margin="1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
-            <StackPanel>
-                <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding CloseDialogCommand}" CommandParameter="true">
+            <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" />

+ 5 - 0
Dev/OHV/OHV.Module.ListViews/Views/CommandListViewModel.cs

@@ -122,6 +122,11 @@ namespace OHV.Module.ListViews.Views
 
         void RefreshCommandLIst()
         {
+            //TODO: null Exception
+            //TODO: Application Exit 중 Null Exception 발생됨
+            //if ( this.CommandList.Count <= 0 )
+            //    return;
+
             Application.Current.Dispatcher.Invoke(() =>
             {
                 this.CommandList.Clear();

+ 2 - 0
Dev/OHV/OHV.Module.ListViews/Views/SubCommandListViewModel.cs

@@ -70,6 +70,8 @@ namespace OHV.Module.ListViews.Views
 
         void RefreshLIst()
         {
+            //TODO: Null Exception Check 
+            //TODO: Application 종료 시 TaskCancledException 발생됨
             Application.Current.Dispatcher.Invoke(() =>
             {
                 this.SubCmdList.Clear();

+ 4 - 0
Dev/OHV/OHV.Module.MainViews/Views/HistoryViewModel.cs

@@ -40,6 +40,10 @@ namespace OHV.Module.MainViews.Views
 
         private void HisAlarmDAL_ChangedProperty()
         {
+            //TODO: AlarmList Null Exception 발생함.
+            if ( this.AlarmList.Count <= 0 )
+                return;
+
             this.AlarmList.Clear();
             this.AlarmList = null;
 

+ 9 - 2
Dev/OHV/VehicleControlSystem/ControlLayer/Serial/BatteryTabos/Advantech/Advantech.cs

@@ -180,8 +180,13 @@ namespace VehicleControlSystem.ControlLayer.Serial.BatteryTabos
             }
 
             //this.IsConnected = true;
-            this.Write( eSendMode.AUTO );
-            manager._OnConnected();
+            if ( this.Write( eSendMode.MANUAL ) <= 0 )
+            {
+                throw new Exception( "AdvCan Write Error" );
+                return;
+            }
+            else
+                manager._OnConnected();
         }
 
         public void _ThreadPoolingReceiveData( )
@@ -315,11 +320,13 @@ namespace VehicleControlSystem.ControlLayer.Serial.BatteryTabos
             {
                 CanError();
                 logger.E( "Battery Write TimeOut Error" );
+                return -1;
             }
             else if (ret == AdvCANIO.OPERATION_ERROR)
             {
                 CanError();
                 logger.E( "Battery Operation Error" );
+                return -1;
             }
 
             return 1;

+ 6 - 6
Dev/OHV/VehicleControlSystem/ControlLayer/Serial/BatteryTabos/BMUManager.cs

@@ -40,8 +40,8 @@ namespace VehicleControlSystem.ControlLayer.Serial.BatteryTabos
         }
 
         #region Event
-        public event Action<string> OnConnect;
-        public event Action<string> OnDisconnect;
+        public event Action<string,bool> OnConnect;
+        public event Action<string, bool> OnDisconnect;
         public event Action<ReceivedData> OnChangedReceivedData;
         public event Action<List<ReceivedData>> OnFirstColtd;
         #endregion
@@ -112,9 +112,9 @@ namespace VehicleControlSystem.ControlLayer.Serial.BatteryTabos
                     var qo = this.qq.Dequeue();
 
                     if ( qo is QoConnect )
-                        DelegateUtils.Invoke( OnConnect , qo.Arg0 );
+                        DelegateUtils.Invoke( OnConnect , qo.Arg0, qo.Arg1 );
                     else if ( qo is QoDisconnected )
-                        DelegateUtils.Invoke( OnDisconnect , qo.Arg0 );
+                        DelegateUtils.Invoke( OnDisconnect , qo.Arg0, qo.Arg1 );
                     else if ( qo is QoReceivedDataChanged )
                         DelegateUtils.Invoke( OnChangedReceivedData , qo.Arg0 );
                     //else if ( qo is QoSendMessageSuccess )
@@ -138,14 +138,14 @@ namespace VehicleControlSystem.ControlLayer.Serial.BatteryTabos
         internal void _OnConnected()
         {
             if ( 0 != collectNo )
-                this.qq.Enqueue( new QoConnect { Arg0 = this.BMUConfig.ID } );
+                this.qq.Enqueue( new QoConnect { Arg0 = this.BMUConfig.ID, Arg1 = true } );
 
             _OnTimePoll();
         }
 
         internal void _OnDisconnected()
         {
-            this.qq.Enqueue( new QoDisconnected { Arg0 = this.BMUConfig.ID } );
+            this.qq.Enqueue( new QoDisconnected { Arg0 = this.BMUConfig.ID, Arg1 = false } );
         }
 
         internal void _InvokeChgdWordsAndBits()

+ 16 - 2
Dev/OHV/VehicleControlSystem/ControlLayer/Vehicle.cs

@@ -216,6 +216,17 @@ namespace VehicleControlSystem.ControlLayer
 
         double batteryTemperature;
         public double BatteryTemperature { get { return this.batteryTemperature; } set { this.SetField( ref this.batteryTemperature , value ); } }
+
+        bool batteryIsConnect;
+        public bool BatteryIsConnect 
+        { 
+            get 
+            {
+                this.BatteryIsConnect = this.bMUManager.IsConnected;
+                return this.bMUManager.IsConnected; 
+            }
+            set { this.SetField( ref this.batteryIsConnect , value ); }
+        }
         public bool IsError { get; set; }
 
         public SubCmd CurrentSubCommand { get; private set; }
@@ -489,6 +500,7 @@ namespace VehicleControlSystem.ControlLayer
             state.Capacity = this.BatteryCapacity;
             state.Energy = this.BatteryEnergy;
             state.Temperature = this.BatteryTemperature;
+            state.BatteryIsConnect = this.BatteryIsConnect;
 
             var msg = new DriveControlEventArgs();
             msg.ControlKind = args.ControlKind;
@@ -1453,13 +1465,15 @@ namespace VehicleControlSystem.ControlLayer
             this.bMUManager.Connect(BMUManager.eCANSelect.Advantech);
         }
 
-        private void BMUManager_OnDisconnect( string obj )
+        private void BMUManager_OnDisconnect( string obj, bool state )
         {
+            this.BatteryIsConnect = state;
             this.OccurVehicleAlarm( 32 );
         }
 
-        private void BMUManager_OnConnect( string obj )
+        private void BMUManager_OnConnect( string obj, bool state )
         {
+            this.BatteryIsConnect = state;
         }
 
         private void BMUManager_OnFirstColtd( List<ReceivedData> obj )

+ 0 - 1
Dev/OHV/VehicleControlSystem/VCSystem.cs

@@ -73,7 +73,6 @@ namespace VehicleControlSystem
             this.vehicle.Init();
             this.scheduler.Init();
             this.autoManager.Init(this.vehicle);
-
         }
 
         private void Vehicle_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)