Ver código fonte

SteeringConfigView Delete / OpticalReadingConfigView Add

ys-hwang 6 anos atrás
pai
commit
cb09fca3b9

+ 6 - 0
Dev/OHV/OHV.Module.Interactivity/MessageController.cs

@@ -34,6 +34,7 @@ namespace OHV.Module.Interactivity
             containerRegistry.RegisterDialog<DriveServoView , DriveServoViewModel>();
             containerRegistry.RegisterDialog<LockServoView , LockServoViewModel>();
             containerRegistry.RegisterDialog<BatteryConfigView , BatteryConfigViewModel>();
+            containerRegistry.RegisterDialog<OpticalReadingConfigView , OpticalReadingConfigViewModel>();
         }
 
         public void ShowNotificationView( string Message , bool isOK = true )
@@ -78,5 +79,10 @@ namespace OHV.Module.Interactivity
         {
             this.dialogService.ShowDialog( "BatteryConfigView" , new DialogParameters() , null );
         }
+
+        public void ShowOpticalReadPopupView()
+        {
+            this.dialogService.ShowDialog( "OpticalReadingConfigView" , new DialogParameters() , null );
+        }
     }
 }

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

@@ -203,7 +203,7 @@
                         <RowDefinition Height="*"/>
                     </Grid.RowDefinitions>-->
 
-                    <StackPanel Margin="0,0,0,90" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left">
+                    <StackPanel Margin="50,0,0,90" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left">
                         <Button
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
@@ -218,7 +218,7 @@
                             </StackPanel>
                         </Button>
 
-                        <materialDesign:Badged
+                        <!--<materialDesign:Badged
                             Badge="Current Pos"
                             BadgeColorZoneMode="Dark"
                             BadgePlacementMode="Top"
@@ -231,7 +231,7 @@
                                     <TextBlock Text="0.000"/>
                                 </StackPanel>
                             </Button>
-                        </materialDesign:Badged>
+                        </materialDesign:Badged>-->
 
                         <Button
                             Style="{StaticResource MaterialDesignRaisedButton}"

+ 5 - 1
Dev/OHV/OHV.Module.Interactivity/PopUp/DriveServoViewModel.cs

@@ -1,4 +1,5 @@
 using Prism.Commands;
+using Prism.Events;
 using Prism.Mvvm;
 using Prism.Services.Dialogs;
 using System;
@@ -101,9 +102,12 @@ namespace OHV.Module.Interactivity.PopUp
         public ICommand FaultResetCommand { get; set; }
         public ICommand OriginCommand { get; set; }
 
+        public IEventAggregator eventAggregator;
 
-        public DriveServoViewModel( )
+        public DriveServoViewModel( IEventAggregator _ea )
         {
+            this.eventAggregator = _ea;
+
             this.SelectAxisCommand = new DelegateCommand<object>( ExecuteSelectAxisCommand );
             this.SelectPosCommand = new DelegateCommand<object>( ExecuteSelectPosCommand );
             this.MoveToCommand = new DelegateCommand( ExecuteMoveToCommand );

+ 52 - 25
Dev/OHV/OHV.Module.Interactivity/PopUp/LockServoView.xaml

@@ -112,8 +112,15 @@
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             ToolTip="MaterialDesignRaisedButton with Round Corners"
-                            Command="{Binding SelectAxisCommand}">
-                        <TextBlock><Run Text="#Motor1"/></TextBlock>
+                            Command="{Binding SelectAxisCommand}"
+                            CommandParameter="Axis_CarrierLock_Left">
+                        <StackPanel>
+                            <TextBlock VerticalAlignment="Center"
+                                       HorizontalAlignment="Center">
+                                <Run Text="Carrier"/>
+                            </TextBlock>
+                            <TextBlock><Run Text="Axis Left"/></TextBlock>
+                        </StackPanel>
                     </Button>
 
                     <Button Background="{x:Null}" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Height="auto"
@@ -145,8 +152,15 @@
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
                             ToolTip="MaterialDesignRaisedButton with Round Corners"
-                            Command="{Binding SelectAxisCommand}">
-                        <TextBlock><Run Text="#Motor2"/></TextBlock>
+                            Command="{Binding SelectAxisCommand}"
+                            CommandParameter="Axis_CarrierLock_Right">
+                        <StackPanel>
+                            <TextBlock VerticalAlignment="Center"
+                                       HorizontalAlignment="Center">
+                                <Run Text="Carrier"/>
+                            </TextBlock>
+                            <TextBlock><Run Text="Axis Right"/></TextBlock>
+                        </StackPanel>
                     </Button>
 
                     <Button Background="{x:Null}" Grid.Column="2" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Height="auto"
@@ -154,7 +168,7 @@
                             materialDesign:ButtonAssist.CornerRadius="10"
                             ToolTip="MaterialDesignRaisedButton with Round Corners">
                         <Button.InputBindings>
-                            <MouseBinding Gesture="RightClick" Command="{Binding KeyInTargetPosCommand}" CommandParameter="Left"/>
+                            <MouseBinding Gesture="LeftClick" Command="{Binding KeyInTargetPosCommand}" CommandParameter="Right"/>
                         </Button.InputBindings>
                         <TextBlock><Run Text="{Binding TargetPosLockRight, StringFormat=0.000, FallbackValue=0.000}"/></TextBlock>
                     </Button>
@@ -203,7 +217,7 @@
                 </Grid>
 
                 <Grid Grid.Row="1">
-                    <StackPanel Margin="0,0,0,90" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left">
+                    <StackPanel Margin="50,0,0,90" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left">
                         <Button
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
@@ -218,7 +232,7 @@
                             </StackPanel>
                         </Button>
 
-                        <materialDesign:Badged
+                        <!--<materialDesign:Badged
                             Badge="Current Pos"
                             BadgeColorZoneMode="Dark"
                             BadgePlacementMode="Top"
@@ -231,7 +245,7 @@
                                     <TextBlock Text="0.000"/>
                                 </StackPanel>
                             </Button>
-                        </materialDesign:Badged>
+                        </materialDesign:Badged>-->
 
                         <Button
                             Style="{StaticResource MaterialDesignRaisedButton}"
@@ -247,23 +261,25 @@
                         </Button>
                     </StackPanel>
 
-                    <StackPanel Margin="30,0,0,50" Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Left">
-                        <Button
+                    <StackPanel Margin="30,0,0,50" Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Left"
+                                Width="Auto" Height="120">
+                        <RepeatButton
                             Margin="5"
                             Grid.Row="2" 
                             Grid.Column="1"
                             HorizontalAlignment="Stretch"
-                            Height="auto">
+                            Height="auto"
+                            Command="{Binding JogCommand}" CommandParameter="-">
                             <StackPanel>
                                 <materialDesign:PackIcon Kind="ArrowLeftBoldCircleOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="30" Width="auto"/>
                                 <TextBlock><Run Text="Jog(-)"/></TextBlock>
                             </StackPanel>
-                            <i:Interaction.Triggers>
+                            <!--<i:Interaction.Triggers>
                                 <i:EventTrigger EventName="PreviewMouseDown">
                                     <i:InvokeCommandAction Command="{Binding JogCommand}" CommandParameter="-"/>
                                 </i:EventTrigger>
-                            </i:Interaction.Triggers>
-                        </Button>
+                            </i:Interaction.Triggers>-->
+                        </RepeatButton>
 
                         <materialDesign:Badged
                             Grid.Row="2"
@@ -281,23 +297,23 @@
                             </Button>
                         </materialDesign:Badged>
 
-                        <Button
-                    Margin="5"
-                    Grid.Row="2" 
-                    Grid.Column="3"
-                    HorizontalAlignment="Stretch"
-                    Height="auto">
+                        <RepeatButton
+                            Margin="5"
+                            Grid.Row="2" 
+                            Grid.Column="3"
+                            HorizontalAlignment="Stretch"
+                            Height="auto"
+                            Command="{Binding JogCommand}" CommandParameter="+">  
                             <StackPanel>
                                 <materialDesign:PackIcon Kind="ArrowRightBoldCircleOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="30" Width="auto"/>
                                 <TextBlock><Run Text="Jog(+)"/></TextBlock>
                             </StackPanel>
-                            <i:Interaction.Triggers>
-                                <i:EventTrigger EventName="PreviewMouseDown">
+                            <!--<i:Interaction.Triggers>
+                                <i:EventTrigger EventName="PreviewTouchDown">
                                     <i:InvokeCommandAction Command="{Binding JogCommand}" CommandParameter="+"/>
                                 </i:EventTrigger>
-                            </i:Interaction.Triggers>
-
-                        </Button>
+                            </i:Interaction.Triggers>--> 
+                        </RepeatButton>
                     </StackPanel>
                 </Grid>
             </Grid>
@@ -324,6 +340,17 @@
                         <TextBlock Text="To Target" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
                     </StackPanel>
                 </Button>
+
+
+                <Button Margin="7,20" HorizontalAlignment="Stretch" Height="90" BorderBrush="Orange" BorderThickness="2"
+                        Style="{DynamicResource MaterialDesignRaisedButton}"
+                        materialDesign:ShadowAssist.ShadowDepth="Depth5"
+                        Command="{Binding SelectedPosDataSave}">
+                    <StackPanel>
+                        <materialDesign:PackIcon Kind="CalendarExport" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                        <TextBlock Text="SAVE" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                    </StackPanel>
+                </Button>
             </StackPanel>
         </Grid>
 

+ 35 - 3
Dev/OHV/OHV.Module.Interactivity/PopUp/LockServoViewModel.cs

@@ -103,29 +103,61 @@ namespace OHV.Module.Interactivity.PopUp
         public ICommand FaultResetCommand { get; set; }
         public ICommand OriginCommand { get; set; }
         public ICommand JogCommand { get; set; }
+        public ICommand SelectedPosDataSave { get; set; }
 
         public event Action<IDialogResult> RequestClose;
 
         IEventAggregator eventAggregator;
+        MessageController messageController;
 
-        public LockServoViewModel(IEventAggregator ea)
+        public LockServoViewModel(IEventAggregator ea, MessageController _messageController )
         {
             this.SelectAxisCommand = new DelegateCommand<object>(ExecuteSelectAxisCommand);
             this.SelectPosCommand = new DelegateCommand<object>(ExecuteSelectPosCommand);
             this.MoveToCommand = new DelegateCommand(ExecuteMoveToCommand);
             this.CurrentToTargetCommand = new DelegateCommand(ExecuteCurrentToTargetCommand);
-            this.KeyInTargetPosCommand = new DelegateCommand<object>(ExecuteKeyInCommadn);
+            this.KeyInTargetPosCommand = new DelegateCommand<object>(ExecuteKeyInCommand);
 
             this.ServoOnCommand = new DelegateCommand(ExecuteServoOnCommand);
             this.ServoOffCommand = new DelegateCommand(ExecuteServoOffCommand);
             this.FaultResetCommand = new DelegateCommand(ExecuteFaultResetCommand);
             this.OriginCommand = new DelegateCommand(ExecuteOriginCommand);
+            this.SelectedPosDataSave = new DelegateCommand<object>( ExecuteSelectedPosDataSave );
 
             this.JogCommand = new DelegateCommand<object>(ExecuteJogCommand);
 
             this.eventAggregator = ea;
             this.eventAggregator.GetEvent<AxisControlPubSubEvent>().Unsubscribe(UICallbackCommunication);
             this.eventAggregator.GetEvent<AxisControlPubSubEvent>().Subscribe(UICallbackCommunication, ThreadOption.UIThread);
+
+            this.messageController = _messageController;
+        }
+
+        private void ExecuteSelectedPosDataSave( object obj )
+        {
+            // save data Send 
+            // currentPos, posName ,AxisName
+            string axis = string.Empty;
+            double currentPos;
+
+            this.messageController.ShowConfirmationPopupView( "Position Data Save ?" , r =>
+            {
+                if ( r.Result == ButtonResult.OK )
+                {
+                    switch(this.SelectAxis )
+                    {
+                        case ConstString.AXIS_CARRIER_LOCK_LEFT:
+                            axis = ConstString.AXIS_CARRIER_LOCK_LEFT;
+                            currentPos = this.CurrentLockLeft;
+                            break;
+                        case ConstString.AXIS_CARRIER_LOCK_RIGHT:
+                            axis = ConstString.AXIS_CARRIER_LOCK_RIGHT;
+                            currentPos = this.CurrentLockRight;
+                            break;
+                    }
+                    //Publish( currentPos , this.SelectedPosition , axis );
+                }
+            } );
         }
 
         private void ExecuteJogCommand(object obj)
@@ -196,7 +228,7 @@ namespace OHV.Module.Interactivity.PopUp
         {
         }
 
-        private void ExecuteKeyInCommadn(object obj)
+        private void ExecuteKeyInCommand( object obj)
         {
             if (obj.ToString().Equals("Left"))
             {

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

@@ -0,0 +1,282 @@
+<UserControl x:Class="OHV.Module.Interactivity.PopUp.OpticalReadingConfigView"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:local="clr-namespace:OHV.Module.Interactivity.PopUp"
+             xmlns:prism="http://prismlibrary.com/"
+             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+             prism:ViewModelLocator.AutoWireViewModel="True"
+             mc:Ignorable="d" 
+             Width="800"
+             Height="600"
+             Background="#455a64">
+
+    <prism:Dialog.WindowStyle>
+        <Style TargetType="Window">
+            <Setter Property="prism:Dialog.WindowStartupLocation" Value="CenterScreen" />
+            <Setter Property="Background" Value="Transparent"/>
+            <Setter Property="AllowsTransparency" Value="True"/>
+            <Setter Property="ResizeMode" Value="NoResize"/>
+            <Setter Property="WindowStyle" Value="None"/>
+            <Setter Property="BorderThickness" Value="1"/>
+            <Setter Property="BorderBrush" Value="{DynamicResource BorderSolidNormal}"/>
+            <Setter Property="Template" Value="{DynamicResource WindowTemplateKey}"/>
+
+            <!--<Style.Triggers>
+                <Trigger Property="ResizeMode" Value="CanResizeWithGrip">
+                    <Setter Property="Template" Value="{StaticResource WindowTemplateKey}"/>
+                </Trigger>
+            </Style.Triggers>-->
+        </Style>
+    </prism:Dialog.WindowStyle>
+
+    <Grid>
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="*"/>
+            <ColumnDefinition Width="130"/>
+            <ColumnDefinition Width="130"/>
+        </Grid.ColumnDefinitions>
+
+        <Grid Grid.Column="0" Margin="15" Background="#37474f">
+            <Grid.ColumnDefinitions>
+                <ColumnDefinition Width="*"/>
+                <ColumnDefinition Width="*"/>
+                <ColumnDefinition Width="*"/>
+            </Grid.ColumnDefinitions>
+
+            <!--<StackPanel Grid.Column="0" VerticalAlignment="Center"
+                        HorizontalAlignment="Center">
+                <Border Background="White"
+                        Width="60" Height="60">
+                    <TextBlock Text="Output#1" VerticalAlignment="Center"
+                               HorizontalAlignment="Center"/>
+                </Border>
+                <Border Background="Gray"
+                        Width="60" Height="50">
+                    <TextBlock Text="Output#2" VerticalAlignment="Center"
+                               HorizontalAlignment="Center"/>
+                </Border>
+                <Border Background="Black"
+                        Width="60" Height="40">
+                    <TextBlock Text="Output#3" VerticalAlignment="Center" Foreground="White"
+                               HorizontalAlignment="Center"/>
+                </Border>
+            </StackPanel>-->
+
+            <Border Grid.Column="0" Margin="37,69,37,47" BorderBrush="#FF00FFD3" BorderThickness="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
+            
+            <!--InPut-->
+            <StackPanel Orientation="Vertical"
+                        VerticalAlignment="Center"
+                        HorizontalAlignment="Center"
+                        Grid.Column="0">
+
+                <materialDesign:Badged 
+                                       Badge="Converter IO"
+                                       BadgeColorZoneMode="Dark"
+                                       BadgePlacementMode="Top">
+                    <Button IsEnabled="False" Background="{x:Null}">
+                        <StackPanel>
+                            <TextBlock><Run Text="InputList"/></TextBlock>
+                        </StackPanel>
+                    </Button>
+                </materialDesign:Badged>
+
+                <ToggleButton Margin="15"
+                         Style="{StaticResource MaterialDesignActionToggleButton}"
+                         ToolTip="MaterialDesignActionLightToggleButton"
+                         Width="40">
+                    <ToggleButton.Content>
+                        <materialDesign:PackIcon Height="Auto"
+                         Kind="LedOn" />
+                    </ToggleButton.Content>
+                    <materialDesign:ToggleButtonAssist.OnContent>
+                        <materialDesign:PackIcon
+                        Kind="CloseBoxOutline" />
+                    </materialDesign:ToggleButtonAssist.OnContent>
+                </ToggleButton>
+                <TextBlock Text="Input1" 
+                           VerticalAlignment="Center"
+                           HorizontalAlignment="Center"
+                           Foreground="Orange"/>
+
+                <ToggleButton Margin="15"
+                         Style="{StaticResource MaterialDesignActionToggleButton}"
+                         ToolTip="MaterialDesignActionLightToggleButton"
+                         Width="40">
+                    <ToggleButton.Content>
+                        <materialDesign:PackIcon
+                         Kind="LedOn" />
+                    </ToggleButton.Content>
+                    <materialDesign:ToggleButtonAssist.OnContent>
+                        <materialDesign:PackIcon
+                        Kind="CloseBoxOutline" />
+                    </materialDesign:ToggleButtonAssist.OnContent>
+                </ToggleButton>
+                <TextBlock Text="Input2" 
+                           VerticalAlignment="Center"
+                           HorizontalAlignment="Center"
+                           Foreground="Orange"/>
+
+                <ToggleButton Margin="15"
+                         Style="{StaticResource MaterialDesignActionToggleButton}"
+                         ToolTip="MaterialDesignActionLightToggleButton"
+                         Width="40">
+                    <ToggleButton.Content>
+                        <materialDesign:PackIcon
+                         Kind="LedOn" />
+                    </ToggleButton.Content>
+                    <materialDesign:ToggleButtonAssist.OnContent>
+                        <materialDesign:PackIcon
+                        Kind="CloseBoxOutline" />
+                    </materialDesign:ToggleButtonAssist.OnContent>
+                </ToggleButton>
+                <TextBlock Text="Input3" 
+                           VerticalAlignment="Center"
+                           HorizontalAlignment="Center"
+                           Foreground="Orange"/>
+
+                <ToggleButton Margin="15"
+                         Style="{StaticResource MaterialDesignActionToggleButton}"
+                         ToolTip="MaterialDesignActionLightToggleButton"
+                         Width="40">
+                    <ToggleButton.Content>
+                        <materialDesign:PackIcon
+                         Kind="LedOn" />
+                    </ToggleButton.Content>
+                    <materialDesign:ToggleButtonAssist.OnContent>
+                        <materialDesign:PackIcon
+                        Kind="CloseBoxOutline" />
+                    </materialDesign:ToggleButtonAssist.OnContent>
+                </ToggleButton>
+                <TextBlock Text="Input4" 
+                           VerticalAlignment="Center"
+                           HorizontalAlignment="Center"
+                           Foreground="Orange"/>
+
+                <ToggleButton Margin="15"
+                         Style="{StaticResource MaterialDesignActionToggleButton}"
+                         ToolTip="MaterialDesignActionLightToggleButton"
+                         Width="40">
+                    <ToggleButton.Content>
+                        <materialDesign:PackIcon
+                         Kind="LedOn" />
+                    </ToggleButton.Content>
+                    <materialDesign:ToggleButtonAssist.OnContent>
+                        <materialDesign:PackIcon
+                        Kind="CloseBoxOutline" />
+                    </materialDesign:ToggleButtonAssist.OnContent>
+                </ToggleButton>
+                <TextBlock Text="Input5" 
+                           VerticalAlignment="Center"
+                           HorizontalAlignment="Center"
+                           Foreground="Orange"/>
+            </StackPanel>
+
+            <!--OutPut-->
+            <Border Grid.Column="1" Margin="30,180" BorderBrush="#FF00FFD3" BorderThickness="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
+            <StackPanel VerticalAlignment="Center"
+                        HorizontalAlignment="Center"
+                        Grid.Column="1">
+                <materialDesign:Badged Margin="5"
+                                       Badge="Detect Area#1"
+                                       BadgeColorZoneMode="Dark">
+                        <Button Width="80"
+                                Height="60"
+                                Background="{Binding OpReaderOutFirst}">
+                           <StackPanel>
+                             <TextBlock><Run Text="Zone#1"/></TextBlock>
+                         </StackPanel>
+                      </Button>
+                </materialDesign:Badged>
+
+                <materialDesign:Badged Margin="5"
+                                       Badge="Detect Area#2"
+                                       BadgeColorZoneMode="Dark">
+                    <Button Width="80"
+                            Height="50"
+                            Background="{Binding OpReaderOutSecond}">
+                          <StackPanel>
+                             <TextBlock><Run Text="Zone#2"/></TextBlock>
+                          </StackPanel>
+                       </Button>
+                </materialDesign:Badged>
+
+                <materialDesign:Badged Margin="5"
+                                       Badge="Detect Area#3"
+                                       BadgeColorZoneMode="Dark">
+                    <Button Width="80"
+                            Height="40"
+                            Background="{Binding OpReaderOutThird}">
+                        <StackPanel>
+                            <TextBlock><Run Text="Zone#3"/></TextBlock>
+                        </StackPanel>
+                    </Button>
+                </materialDesign:Badged>
+            </StackPanel>
+
+            <StackPanel Grid.Column="2"
+                        VerticalAlignment="Center"
+                        HorizontalAlignment="Center">
+                <Button >
+                    <StackPanel>
+                        <TextBlock><Run Text="Input Bit Result"/></TextBlock>
+                    </StackPanel>
+                </Button>
+                
+                <Button Background="{x:Null}">
+                    <StackPanel>
+                        <TextBlock><Run Text="{Binding InputBitResult, FallbackValue=0}"/></TextBlock>
+                    </StackPanel>
+                </Button>
+            </StackPanel>
+        </Grid>
+
+        <!--Right Sub Menu Grid-->
+        <Grid Grid.Column="1" Background="#37474f">
+            <StackPanel>
+                <Button Margin="5,50,5,0" HorizontalAlignment="Stretch" Height="69" 
+                        BorderBrush="Gray" BorderThickness="2" 
+                        Command="{Binding SteeringSaveCommand}" CommandParameter="true">
+                    <StackPanel>
+                        <materialDesign:PackIcon Kind="CalendarExport" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                        <TextBlock Text="Save" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                    </StackPanel>
+                </Button>
+            </StackPanel>
+        </Grid>
+
+        <!--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" HorizontalAlignment="Stretch" Height="69" 
+                        BorderBrush="Gray" BorderThickness="2"
+                        Command="{Binding SteeringConnectCommand}" CommandParameter="true">
+                    <StackPanel>
+                        <!--<materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
+                        <TextBlock Text="Connect" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                    </StackPanel>
+                </Button>
+
+                <Button Margin="5" HorizontalAlignment="Stretch" Height="69" 
+                        BorderBrush="Gray" BorderThickness="2" 
+                        Command="{Binding SteeringDisConnectCommand}" CommandParameter="true">
+                    <StackPanel>
+                        <!--<materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
+                        <TextBlock Text="Disonnect" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                    </StackPanel>
+                </Button>
+
+                <Button Margin="5,50" HorizontalAlignment="Stretch" Height="Auto" 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>
+</UserControl>

+ 2 - 2
Dev/OHV/OHV.Module.Interactivity/PopUp/SteeringConfigView.xaml.cs

@@ -18,9 +18,9 @@ namespace OHV.Module.Interactivity.PopUp
     /// <summary>
     /// SteeringConfigView.xaml에 대한 상호 작용 논리
     /// </summary>
-    public partial class SteeringConfigView : UserControl
+    public partial class OpticalReadingConfigView : UserControl
     {
-        public SteeringConfigView( )
+        public OpticalReadingConfigView( )
         {
             InitializeComponent();
         }

+ 88 - 0
Dev/OHV/OHV.Module.Interactivity/PopUp/OpticalReadingConfigViewModel.cs

@@ -0,0 +1,88 @@
+using Prism.Commands;
+using Prism.Mvvm;
+using Prism.Services.Dialogs;
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OHV.Module.Interactivity.PopUp
+{
+    public class OpticalReadingConfigViewModel : BindableBase, IDialogAware
+    {
+        private DelegateCommand<string> _closeDialogCommand;
+        public DelegateCommand<string> CloseDialogCommand =>
+            _closeDialogCommand ?? ( _closeDialogCommand = new DelegateCommand<string>( CloseDialog ) );
+
+        Brush _opReaderOutFirst = Brushes.Gray;
+        Brush _opReaderOutSecond = Brushes.Gray;
+        Brush _opReaderOutThird = Brushes.Gray;
+
+        public Brush OpReaderOutFirst
+        {
+            get { return this._opReaderOutFirst; }
+            set { this.SetProperty( ref this._opReaderOutFirst , value ); }
+        }
+        public Brush OpReaderOutSecond
+        {
+            get { return this._opReaderOutSecond; }
+            set { this.SetProperty( ref this._opReaderOutSecond , value ); }
+        }
+        public Brush OpreaderOutThird
+        {
+            get { return this._opReaderOutThird; }
+            set { this.SetProperty( ref this._opReaderOutThird , value ); }
+        }
+
+        private string _title = "SteeringConfigView";
+        public string Title
+        {
+            get { return this._title; }
+            set
+            {
+                this.SetProperty( ref this._title , value );
+            }
+        }
+
+        public event Action<IDialogResult> RequestClose;
+
+        public OpticalReadingConfigViewModel( )
+        {
+
+        }
+
+        #region Dialog Function
+        public bool CanCloseDialog( )
+        {
+            return true;
+        }
+
+        public void OnDialogClosed( )
+        {
+        }
+
+        public void OnDialogOpened( IDialogParameters parameters )
+        {
+        }
+
+        private void CloseDialog( string parameter )
+        {
+            ButtonResult result = ButtonResult.None;
+
+            if ( parameter?.ToLower() == "true" )
+                result = ButtonResult.OK;
+            else if ( parameter?.ToLower() == "false" )
+                result = ButtonResult.Cancel;
+
+            RaiseRequestClose( new DialogResult( result ) );
+        }
+
+        public virtual void RaiseRequestClose( IDialogResult dialogResult )
+        {
+            RequestClose?.Invoke( dialogResult );
+        }
+        #endregion
+    }
+}

+ 0 - 83
Dev/OHV/OHV.Module.Interactivity/PopUp/SteeringConfigView.xaml

@@ -1,83 +0,0 @@
- <UserControl x:Class="OHV.Module.Interactivity.PopUp.SteeringConfigView"
-             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
-             xmlns:local="clr-namespace:OHV.Module.Interactivity.PopUp"
-             xmlns:prism="http://prismlibrary.com/"
-             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
-             prism:ViewModelLocator.AutoWireViewModel="True"
-             mc:Ignorable="d" 
-             Width="800"
-             Height="600"
-             Background="#455a64">
-
-    <prism:Dialog.WindowStyle>
-        <Style TargetType="Window">
-            <Setter Property="prism:Dialog.WindowStartupLocation" Value="CenterScreen" />
-            <Setter Property="Background" Value="Transparent"/>
-            <Setter Property="AllowsTransparency" Value="True"/>
-            <Setter Property="ResizeMode" Value="NoResize"/>
-            <Setter Property="WindowStyle" Value="None"/>
-            <Setter Property="BorderThickness" Value="1"/>
-            <Setter Property="BorderBrush" Value="{DynamicResource BorderSolidNormal}"/>
-            <Setter Property="Template" Value="{DynamicResource WindowTemplateKey}"/>
-
-            <!--<Style.Triggers>
-                <Trigger Property="ResizeMode" Value="CanResizeWithGrip">
-                    <Setter Property="Template" Value="{StaticResource WindowTemplateKey}"/>
-                </Trigger>
-            </Style.Triggers>-->
-        </Style>
-    </prism:Dialog.WindowStyle>
-
-    <Grid>
-        <Grid.ColumnDefinitions>
-            <ColumnDefinition Width="*"/>
-            <ColumnDefinition Width="130"/>
-        </Grid.ColumnDefinitions>
-
-        <Grid Grid.Column="0" Margin="15" Background="#37474f">
-            <StackPanel>
-                <Border Margin="15" HorizontalAlignment="Left" VerticalAlignment="Bottom"
-                        Height="250"
-                        Width="250">
-                    <!--<Border.Background>
-                        --><!--<ImageBrush ImageSource="HokuyoReader.png"/>--><!--
-                    </Border.Background>-->
-                </Border>
-            </StackPanel>
-        </Grid>
-
-        <Grid Grid.Column="1" Background="#263238">
-            <Border Margin="1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
-            <StackPanel>
-                <Button Margin="5" HorizontalAlignment="Stretch" Height="69" 
-                        BorderBrush="Gray" BorderThickness="2" 
-                        Command="{Binding SteeringConnectCommand}" CommandParameter="true">
-                    <StackPanel>
-                        <!--<materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
-                        <TextBlock Text="Connect" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
-                    </StackPanel>
-                </Button>
-
-                <Button Margin="5" HorizontalAlignment="Stretch" Height="69" 
-                        BorderBrush="Gray" BorderThickness="2" 
-                        Command="{Binding SteeringDisConnectCommand}" CommandParameter="true">
-                    <StackPanel>
-                        <!--<materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
-                        <TextBlock Text="Disonnect" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
-                    </StackPanel>
-                </Button>
-
-                <Button Margin="5,50" HorizontalAlignment="Stretch" Height="Auto" 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>
-</UserControl>

+ 0 - 12
Dev/OHV/OHV.Module.Interactivity/PopUp/SteeringConfigViewModel.cs

@@ -1,12 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace OHV.Module.Interactivity.PopUp
-{
-    class SteeringConfigViewModel
-    {
-    }
-}

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

@@ -8,7 +8,7 @@
              xmlns:prism="http://prismlibrary.com/"
              prism:ViewModelLocator.AutoWireViewModel="True"
              mc:Ignorable="d"             
-             Width="1554"
+             Width="Auto"
              Height="942"
              >
 

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

@@ -8,7 +8,7 @@
              xmlns:prism="http://prismlibrary.com/"
              prism:ViewModelLocator.AutoWireViewModel="True"
              mc:Ignorable="d" 
-             Width="1554"
+             Width="Auto"
              Height="942"
              Background="#37474f">
     

+ 2 - 2
Dev/OHV/OHV.Module.MainViews/Views/UnitView.xaml

@@ -9,7 +9,7 @@
              prism:ViewModelLocator.AutoWireViewModel="True"
              mc:Ignorable="d" 
              Height="942"
-             Width="1554"
+             Width="Auto"
              Background="#37474f">
 
     <Grid>
@@ -87,7 +87,7 @@
                     materialDesign:ButtonProgressAssist.Value="-1"
                     materialDesign:ButtonProgressAssist.IsIndicatorVisible="True"
                     materialDesign:ButtonProgressAssist.IsIndeterminate="True"
-                    Command="{Binding OcsPopup}"
+                    Command="{Binding OpticalReaderPopup}"
                     Height="auto" Width="auto">
                     <StackPanel>
                         <materialDesign:PackIcon Kind="WifiStrength2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="auto" Height="50"/>

+ 7 - 0
Dev/OHV/OHV.Module.MainViews/Views/UnitViewModel.cs

@@ -21,6 +21,7 @@ namespace OHV.Module.MainViews.Views
         public ICommand ServoConfigCommand { get; set; }
         public ICommand InoutPupup { get; set; }
         public ICommand BatteryPopup { get; set; }
+        public ICommand OpticalReaderPopup { get; set; }
 
         public UnitViewModel( IEventAggregator _ea , VCSystem _vcSystem , MessageController _msgController )
         {
@@ -31,6 +32,12 @@ namespace OHV.Module.MainViews.Views
             this.ServoConfigCommand = new DelegateCommand( ExecuteServoConfigCommand );
             this.InoutPupup = new DelegateCommand( ExecuteInOutCommand );
             this.BatteryPopup = new DelegateCommand( ExecuteBatteryCommand );
+            this.OpticalReaderPopup = new DelegateCommand( ExecuteOpticalReadCommand );
+        }
+
+        private void ExecuteOpticalReadCommand( )
+        {
+            this.msgController.ShowOpticalReadPopupView();
         }
 
         private void ExecuteBatteryCommand( )

+ 2 - 0
Dev/OHV/OHV.Vehicle/Helpler/DeskTopInfo.cs

@@ -80,6 +80,8 @@ namespace OHV.Vehicle
             var drive = new DriveInfo("C");
 
             return 100 * drive.TotalFreeSpace / drive.TotalSize;
+            return ( ( ( drive.TotalSize / 1024 ) / 1024 ) / 1024);
+            //return 100 * drive.TotalFreeSpace / drive.TotalSize;
         }
     }
 }