Просмотр исходного кода

Merge branch 'master' of http://unque781.synology.me:3000/GSI/OHV

SK.Kang 6 лет назад
Родитель
Сommit
c17197f884

+ 26 - 0
Dev/OHV/OHV.Common/Events/MessageEventArgs.cs

@@ -114,4 +114,30 @@ namespace OHV.Common.Events
             this.State = state;
         }
     }
+
+    public class SteeringControlEventArgs : EventArgs
+    {
+        public enum eEventDir
+        {
+            ToBack,
+            ToFront,
+        }
+
+        public enum eControlKind
+        {
+            MOVE = 0,
+            STOP,
+        }
+
+        public enum eMoveDir
+        {
+            LEFT = 0,
+            RIGHT,
+        }
+
+        public eEventDir EventDir { get; set; }
+        public eControlKind ControlKind { get; set; }
+        public eMoveDir MoveDir { get; set; }
+        public object Args { get; set; }
+    }
 }

+ 2 - 0
Dev/OHV/OHV.Common/Events/PubSubEvent.cs

@@ -17,4 +17,6 @@ namespace OHV.Common.Events
     public class HostConnectedPubSubEvent : PubSubEvent<HostConnectedEventArgs> { }
 
     public class AxisControlPubSubEvent : PubSubEvent<AxisControlEventArgs> { }
+
+    public class SteeringControlPubSubEvent : PubSubEvent<SteeringControlEventArgs> { }
 }

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

@@ -35,6 +35,7 @@ namespace OHV.Module.Interactivity
             containerRegistry.RegisterDialog<LockServoView , LockServoViewModel>();
             containerRegistry.RegisterDialog<BatteryConfigView , BatteryConfigViewModel>();
             containerRegistry.RegisterDialog<OpticalReadingConfigView , OpticalReadingConfigViewModel>();
+            containerRegistry.RegisterDialog<InOutControlView , InOutControlViewModel>();
         }
 
         public void ShowNotificationView( string Message , bool isOK = true )
@@ -84,5 +85,10 @@ namespace OHV.Module.Interactivity
         {
             this.dialogService.ShowDialog( "OpticalReadingConfigView" , new DialogParameters() , null );
         }
+
+        public void ShowInOutControlPopupView()
+        {
+            this.dialogService.ShowDialog( "InOutControlView" , new DialogParameters() , null );
+        }
     }
 }

+ 10 - 0
Dev/OHV/OHV.Module.Interactivity/OHV.Module.Interactivity.csproj

@@ -102,6 +102,12 @@
     <Compile Include="PopUp\DriveServoViewModel.cs">
       <DependentUpon>DriveServoView.xaml</DependentUpon>
     </Compile>
+    <Compile Include="PopUp\InOutControlView.xaml.cs">
+      <DependentUpon>InOutControlView.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="PopUp\InOutControlViewModel.cs">
+      <DependentUpon>InOutControlView.xaml</DependentUpon>
+    </Compile>
     <Compile Include="PopUp\InOutView.xaml.cs">
       <DependentUpon>InOutView.xaml</DependentUpon>
     </Compile>
@@ -158,6 +164,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="PopUp\InOutControlView.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="PopUp\InOutView.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>

+ 115 - 341
Dev/OHV/OHV.Module.Interactivity/PopUp/DriveServoView.xaml

@@ -62,7 +62,7 @@
 
         <Grid Grid.Column="0" Margin="15"
               Background="#37474f">
-            
+
             <Grid.RowDefinitions>
                 <RowDefinition Height="*"/>
                 <RowDefinition Height="*"/>
@@ -96,7 +96,7 @@
                             <Setter Property="TextBlock.TextAlignment" Value="Center"/>
                             <Setter Property="TextBlock.FontStretch" Value="UltraExpanded"/>
                             <Setter Property="TextBlock.VerticalAlignment" Value="Center"/>
-                            <Setter Property="BorderBrush" Value="#FF00FFD3"/>
+                            <Setter Property="BorderBrush" Value="Black"/>
                             <Setter Property="Foreground" Value="White"/>
                             <Setter Property="FontSize" Value="15"/>
                             <Setter Property="Width" Value="161"/>
@@ -122,6 +122,11 @@
                     <ColumnDefinition Width="*"/>
                 </Grid.ColumnDefinitions>
 
+                <Border Margin="0,5,163,5" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.RowSpan="4" Grid.Column="2"/>
+                <Border Margin="161,5,2,3" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.RowSpan="2" Grid.Column="2" Grid.Row="2"/>
+                <Border Margin="161,0,10,78" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.Column="2" Grid.ColumnSpan="3" Grid.Row="2"/>
+                <Border Margin="33,-2,34,82" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.Column="2" Grid.ColumnSpan="3" Grid.RowSpan="2"/>
+
                 <Button Grid.Column="0" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Height="auto"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
@@ -184,396 +189,165 @@
                             ToolTip="MaterialDesignRaisedButton with Round Corners">
                     <TextBlock><Run Text="{Binding DifferenceDrive, StringFormat=0.000, FallbackValue=0.000}"/></TextBlock>
                 </Button>
-            </Grid>
-        </Grid>
 
-        <Grid Grid.Column="1" Background="#263238">
-            <StackPanel>
-                <Button Margin="7, 20" HorizontalAlignment="Stretch" Height="60" BorderBrush="Gray" BorderThickness="2" 
-                        Command="{Binding PositionAddCommand}">
+                <!--Steering Dir Front-->
+                <Button Grid.Column="3" Margin="10"
+                        Grid.Row="2"
+                        HorizontalAlignment="Stretch" 
+                        Height="Auto" 
+                        BorderBrush="Gray" 
+                        BorderThickness="2" 
+                        Command="{Binding SelectedDirection}"
+                        CommandParameter="Front">
                     <StackPanel>
-                        <!--<materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
-                        <TextBlock Text="Add" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                        <!--<materialDesign:PackIcon Kind="SubdirectoryArrowLeft" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
+                        <TextBlock Text="Steering" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                        <TextBlock Text="Front" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
                     </StackPanel>
                 </Button>
 
-                <Button Margin="7, 20" HorizontalAlignment="Stretch" Height="60" BorderBrush="Gray" BorderThickness="2" 
-                        Command="{Binding PositionDeleteCommand}">
+                <!--Steering Dir Back-->
+                <Button Grid.Column="4" Margin="10"
+                        Grid.Row="2"
+                        HorizontalAlignment="Stretch" 
+                        Height="Auto" 
+                        BorderBrush="Gray" 
+                        BorderThickness="2" 
+                        Command="{Binding SelectedDirection}"
+                        CommandParameter="Back">
                     <StackPanel>
-                        <!--<materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
-                        <TextBlock Text="Delete" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                        <!--<materialDesign:PackIcon Kind="SubdirectoryArrowLeft" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
+                        <TextBlock Text="Steering" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                        <TextBlock Text="Back" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
                     </StackPanel>
                 </Button>
 
-                <Button Margin="7, 20" HorizontalAlignment="Stretch" Height="60" BorderBrush="Gray" BorderThickness="2" 
-                        Command="{Binding PositionSaveCommand}">
+                <Button Grid.Column="3" Margin="3"
+                        Grid.Row="3"
+                        HorizontalAlignment="Stretch" 
+                        Height="Auto" 
+                        BorderBrush="Gray" 
+                        BorderThickness="2" 
+                        Command="{Binding SteeringCWCommand}"
+                        CommandParameter="CW">
                     <StackPanel>
-                        <!--<materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
-                        <TextBlock Text="Save" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                        <materialDesign:PackIcon Kind="SubdirectoryArrowLeft" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                        <TextBlock Text="Steering CW" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
                     </StackPanel>
                 </Button>
 
-                <!--Move TO / Current To Target-->
-                <Button Margin="7, 50" HorizontalAlignment="Stretch" Height="60" BorderBrush="Gray" BorderThickness="2" 
-                        Command="{Binding MoveToCommand}">
+                <Button Grid.Column="4" Margin="3"
+                        Grid.Row="3"
+                        HorizontalAlignment="Stretch" 
+                        Height="Auto" 
+                        BorderBrush="Gray" 
+                        BorderThickness="2" 
+                        Command="{Binding SteeringCCWCommand}"
+                        CommandParameter="CCW">
                     <StackPanel>
-                        <!--<materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
-                        <TextBlock Text="Move To" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                        <materialDesign:PackIcon Kind="SubdirectoryArrowRight" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                        <TextBlock Text="Steering CCW" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
                     </StackPanel>
                 </Button>
 
-                <Button Margin="7,0" HorizontalAlignment="Stretch" Height="60" BorderBrush="Gray" BorderThickness="2" 
-                        Command="{Binding CurrentToTargetCommand}">
+                <!--Jog Button-->
+                <RepeatButton
+                            Margin="5"
+                            Grid.Row="0" 
+                            Grid.Column="2"
+                            HorizontalAlignment="Right"
+                            Width="120"
+                            Height="auto"
+                            Command="{Binding JogCommand}" CommandParameter="-">
                     <StackPanel>
-                        <!--<materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
-                        <TextBlock Text="Current To" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                        <TextBlock Text="Target" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                        <materialDesign:PackIcon Kind="ArrowLeftBoldCircleOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="30" Width="auto"/>
+                        <TextBlock><Run Text="Jog(-)"/></TextBlock>
                     </StackPanel>
-                </Button>
-            </StackPanel>
-        </Grid>
+                </RepeatButton>
 
-        <Grid Grid.Column="2" 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="5"
+                            Grid.Row="0" 
+                            Grid.Column="3"
+                            HorizontalAlignment="Center"
+                            Height="auto"
+                            Command="{Binding JogVelPopupCommand}" CommandParameter="-">
                     <StackPanel>
-                        <materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                        <TextBlock Text="Servo On" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                        <TextBlock HorizontalAlignment="Center"><Run Text="Jog Velocity"/></TextBlock>
+                        <TextBlock HorizontalAlignment="Center"><Run Text="{Binding JogVelocity, StringFormat={}{0:0.000}, FallbackValue=0.000}"/></TextBlock>
                     </StackPanel>
                 </Button>
 
-                <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding ServoOffCommand}">
+                <RepeatButton
+                            Margin="5"
+                            Grid.Row="0" 
+                            Grid.Column="4"
+                            HorizontalAlignment="Left"
+                            Width="120"
+                            Height="auto"
+                            Command="{Binding JogCommand}" CommandParameter="+">
                     <StackPanel>
-                        <materialDesign:PackIcon Kind="PowerPlugOff" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                        <TextBlock Text="Servo Off" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                        <materialDesign:PackIcon Kind="ArrowRightBoldCircleOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="30" Width="auto"/>
+                        <TextBlock><Run Text="Jog(+)"/></TextBlock>
                     </StackPanel>
-                </Button>
+                </RepeatButton>
+            </Grid>
 
-                <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding FaultResetCommand}">
+            <!--Steering Control-->
+            <Grid Grid.Row="2">
+
+            </Grid>
+        </Grid>
+
+        <!--Sub Drive Menu-->
+        <Grid Grid.Column="1" Background="#263238">
+            <StackPanel>
+                <Button Margin="7, 20" HorizontalAlignment="Stretch" Height="60" BorderBrush="Gray" BorderThickness="2" 
+                        Command="{Binding PositionAddCommand}">
                     <StackPanel>
-                        <materialDesign:PackIcon Kind="CircleArrows" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                        <TextBlock Text="Fault Reset" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                        <!--<materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
+                        <TextBlock Text="Add" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
                     </StackPanel>
                 </Button>
 
-                <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding OriginCommand}">
+                <Button Margin="7, 20" HorizontalAlignment="Stretch" Height="60" BorderBrush="Gray" BorderThickness="2" 
+                        Command="{Binding PositionDeleteCommand}">
                     <StackPanel>
-                        <materialDesign:PackIcon Kind="Origin" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                        <TextBlock Text="Origin" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                        <!--<materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
+                        <TextBlock Text="Delete" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
                     </StackPanel>
                 </Button>
 
-                <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding CloseDialogCommand}" CommandParameter="true">
+                <Button Margin="7, 20" HorizontalAlignment="Stretch" Height="60" BorderBrush="Gray" BorderThickness="2" 
+                        Command="{Binding PositionSaveCommand}">
                     <StackPanel>
-                        <materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                        <TextBlock Text="Close" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                        <!--<materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
+                        <TextBlock Text="Save" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
                     </StackPanel>
                 </Button>
-            </StackPanel>
-        </Grid>
-    </Grid>
-
-    <!--<Grid>
-        <Grid.ColumnDefinitions>
-            <ColumnDefinition/>
-            <ColumnDefinition Width="130"/>
-            <ColumnDefinition Width="130"/>
-        </Grid.ColumnDefinitions>
-
-        <Grid Grid.Column="0">
-            <Grid Margin="15,15" Background="#37474f">
-                <Grid.RowDefinitions>
-                    <RowDefinition/>
-                    <RowDefinition/>
-                </Grid.RowDefinitions>
-                <Grid.ColumnDefinitions>
-                    <ColumnDefinition/>
-                    <ColumnDefinition Width="110"/>
-                </Grid.ColumnDefinitions>
-
-                <Grid Grid.Row="0">
-                    <Grid.RowDefinitions>
-                        <RowDefinition Height="*"/>
-                        <RowDefinition Height="*"/>
-                        <RowDefinition Height="*"/>
-                        <RowDefinition Height="*"/>
-                    </Grid.RowDefinitions>
-                    <Grid.ColumnDefinitions>
-                        <ColumnDefinition Width="*"/>
-                        <ColumnDefinition Width="*"/>
-                        <ColumnDefinition Width="*"/>
-                        <ColumnDefinition Width="*"/>
-                    </Grid.ColumnDefinitions>
-
-                    <Border BorderBrush="#FF00FFD3" BorderThickness="2" Grid.RowSpan="4" Grid.Column="3" Margin="95,3,0,0"/>
-
-                    
-                    <Button Background="{x:Null}" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Stretch" Margin="5" Height="auto"
-                            Style="{StaticResource MaterialDesignRaisedButton}"
-                            materialDesign:ButtonAssist.CornerRadius="10"
-                            ToolTip="MaterialDesignRaisedButton with Round Corners">
-                        <StackPanel>
-                            <TextBlock HorizontalAlignment="Center"><Run Text="Axis"/></TextBlock>
-                            <TextBlock HorizontalAlignment="Center"><Run Text="Select"/></TextBlock>
-                        </StackPanel>
-
-                    </Button>
-
-                    <Button Grid.Column="0" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Height="auto"
-                            Style="{StaticResource MaterialDesignRaisedButton}"
-                            materialDesign:ButtonAssist.CornerRadius="10"
-                            ToolTip="MaterialDesignRaisedButton with Round Corners">
-                        <StackPanel>
-                            <TextBlock HorizontalAlignment="Center"><Run Text="Target"/></TextBlock>
-                            <TextBlock HorizontalAlignment="Center"><Run Text="Pos"/></TextBlock>
-                        </StackPanel>
-
-                    </Button>
-
-                    <Button Grid.Column="0" Grid.Row="2" HorizontalAlignment="Stretch" Margin="5" Height="auto"
-                            Style="{StaticResource MaterialDesignRaisedButton}"
-                            materialDesign:ButtonAssist.CornerRadius="10"
-                            ToolTip="MaterialDesignRaisedButton with Round Corners">
-                        <StackPanel>
-                            <TextBlock HorizontalAlignment="Center"><Run Text="Current"/></TextBlock>
-                            <TextBlock HorizontalAlignment="Center"><Run Text="Pos"/></TextBlock>
-                        </StackPanel>
-                    </Button>
-
-                    <Button Grid.Column="0" Grid.Row="3" HorizontalAlignment="Stretch" Margin="5" Height="auto"
-                            Style="{StaticResource MaterialDesignRaisedButton}"
-                            materialDesign:ButtonAssist.CornerRadius="10"
-                            ToolTip="MaterialDesignRaisedButton with Round Corners">
-                        <StackPanel>
-                            <TextBlock HorizontalAlignment="Center"><Run Text="Difference"/></TextBlock>
-                            <TextBlock HorizontalAlignment="Center"><Run Text="Pos"/></TextBlock>
-                        </StackPanel>
-
-                    </Button>
-
-                    
-                    <Button Grid.Column="1" Grid.Row="0" HorizontalAlignment="Stretch" Margin="5" Height="auto"
-                            Style="{StaticResource MaterialDesignRaisedButton}"
-                            materialDesign:ButtonAssist.CornerRadius="10"
-                            ToolTip="MaterialDesignRaisedButton with Round Corners"
-                            Command="{Binding SelectAxisCommand}"
-                            CommandParameter="Left">
-                        <TextBlock><Run Text="#Drive1"/></TextBlock>
-                    </Button>
-
-                    <Button Background="{x:Null}" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Height="auto"
-                            Style="{StaticResource MaterialDesignRaisedButton}"
-                            materialDesign:ButtonAssist.CornerRadius="10"
-                            ToolTip="MaterialDesignRaisedButton with Round Corners">
-                        <Button.InputBindings>
-                            <MouseBinding Gesture="LeftClick" Command="{Binding KeyInTargetPosCommand}" CommandParameter="Left"/>
-                        </Button.InputBindings>
-                        <TextBlock><Run Text="{Binding TargetPosDriveLeft, StringFormat=0.000, FallbackValue=0.000}"/></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 CurrentDriveLeft, StringFormat=0.000, FallbackValue=0.000}"/></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 DifferenceDriveLeft, StringFormat=0.000, FallbackValue=0.000}"/></TextBlock>
-                    </Button>
-
-                    
-                    <Button Grid.Column="2" Grid.Row="0" HorizontalAlignment="Stretch" Margin="5" Height="auto"
-                            Style="{StaticResource MaterialDesignRaisedButton}"
-                            materialDesign:ButtonAssist.CornerRadius="10"
-                            ToolTip="MaterialDesignRaisedButton with Round Corners"
-                            Command="{Binding SelectAxisCommand}"
-                            CommandParameter="Right">
-                        <TextBlock><Run Text="#Drive2"/></TextBlock>
-                    </Button>
 
-                    <Button Background="{x:Null}" Grid.Column="2" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Height="auto"
-                            Style="{StaticResource MaterialDesignRaisedButton}"
-                            materialDesign:ButtonAssist.CornerRadius="10"
-                            ToolTip="MaterialDesignRaisedButton with Round Corners">
-                        <Button.InputBindings>
-                            <MouseBinding Gesture="LeftClick" Command="{Binding KeyInTargetPosCommand}" CommandParameter="Right"/>
-                        </Button.InputBindings>
-                        <TextBlock><Run Text="{Binding TargetPosDriveRight, StringFormat=0.000, FallbackValue=0.000}"/></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 CurrentDriveRight, StringFormat=0.000, FallbackValue=0.000}"/></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 DifferenceDriveRight, StringFormat=0.000, FallbackValue=0.000}"/></TextBlock>
-                    </Button>
-                    <Border BorderBrush="#FF00FFD3" BorderThickness="2" Margin="7,98,101,-33" Grid.ColumnSpan="4" RenderTransformOrigin="0.5,0.5" Grid.Row="3">
-                        <Border.RenderTransform>
-                            <TransformGroup>
-                                <ScaleTransform ScaleX="-1"/>
-                                <SkewTransform/>
-                                <RotateTransform/>
-                                <TranslateTransform/>
-                            </TransformGroup>
-                        </Border.RenderTransform>
-                    </Border>
-
-                </Grid>
-
-                <Grid Grid.Row="1">
-                    <StackPanel Margin="50,0,0,90" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left">
-                        <Button
-                            Style="{StaticResource MaterialDesignRaisedButton}"
-                            materialDesign:ButtonAssist.CornerRadius="10"
-                            ToolTip="MaterialDesignRaisedButton with Round Corners"
-                            Margin="15"
-                            Height="auto"
-                            HorizontalAlignment="Center"
-                            VerticalAlignment="Center"
-                            >
-                            <StackPanel>
-                                <TextBlock><Run Text="Limit(-)"/></TextBlock>
-                            </StackPanel>
-                        </Button>
-
-                        <Button
-                            Style="{StaticResource MaterialDesignRaisedButton}"
-                            materialDesign:ButtonAssist.CornerRadius="10"
-                            ToolTip="MaterialDesignRaisedButton with Round Corners"
-                            Margin="15"
-                            Height="auto"
-                            HorizontalAlignment="Center"
-                            VerticalAlignment="Center">
-                            <StackPanel>
-                                <TextBlock><Run Text="Limit(+)"/></TextBlock>
-                            </StackPanel>
-                        </Button>
-                    </StackPanel>
-
-                    <StackPanel Margin="30,0,0,50" Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Left">
-                        <Button
-                            Margin="5"
-                            Grid.Row="2" 
-                            Grid.Column="1"
-                            HorizontalAlignment="Stretch"
-                            Height="auto">
-                            <StackPanel>
-                                <materialDesign:PackIcon Kind="ArrowLeftBoldCircleOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="30" Width="auto"/>
-                                <TextBlock><Run Text="Jog(-)"/></TextBlock>
-                            </StackPanel>
-                        </Button>
-
-                        <materialDesign:Badged
-                            Grid.Row="2"
-                            Grid.Column="2"
-                            Badge="Jog Velocity"
-                            BadgeColorZoneMode="Dark"
-                            BadgePlacementMode="Top"
-                            BadgeForeground="Aqua"
-                            VerticalAlignment="Center"
-                            HorizontalAlignment="Center">
-                            <Button Margin="15" VerticalAlignment="Center" HorizontalAlignment="Center" Height="60" Width="Auto" >
-                                <StackPanel>
-                                    <TextBlock Text="0.000"/>
-                                </StackPanel>
-                            </Button>
-                        </materialDesign:Badged>
-
-                        <Button
-                            Margin="5"
-                            Grid.Row="2" 
-                            Grid.Column="3"
-                            HorizontalAlignment="Stretch"
-                            Height="auto">
-                            <StackPanel>
-                                <materialDesign:PackIcon Kind="ArrowRightBoldCircleOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="30" Width="auto"/>
-                                <TextBlock><Run Text="Jog(+)"/></TextBlock>
-                            </StackPanel>
-                        </Button>
-                    </StackPanel>
-                </Grid>
-
-                <Grid Grid.Column="1">
-                    <StackPanel>
-                        <Button Margin="5" HorizontalAlignment="Stretch" Grid.Column="4" Grid.Row="1" Width="Auto" Height="Auto" BorderBrush="Gray" BorderThickness="2"
-                                Command="{Binding SelectPosCommand}" CommandParameter="P1">
-                            <StackPanel>
-                                <TextBlock Text="Pos" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                                <TextBlock Text="P1" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                            </StackPanel>
-                        </Button>
-                        <Button Margin="5" HorizontalAlignment="Stretch" Grid.Column="4" Grid.Row="2" Width="Auto" Height="Auto" BorderBrush="Gray" BorderThickness="2"
-                                Command="{Binding SelectPosCommand}" CommandParameter="P2">
-                            <StackPanel>
-                                <TextBlock Text="Pos" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                                <TextBlock Text="P2" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                            </StackPanel>
-                        </Button>
-                        <Button Margin="5" HorizontalAlignment="Stretch" Grid.Column="4" Grid.Row="3" Width="Auto" Height="Auto" BorderBrush="Gray" BorderThickness="2"
-                                Command="{Binding SelectPosCommand}" CommandParameter="P3">
-                            <StackPanel>
-                                <TextBlock Text="Pos" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                                <TextBlock Text="P3" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                            </StackPanel>
-                        </Button>
-                        <Button Margin="5" HorizontalAlignment="Stretch" Grid.Column="4" Grid.Row="3" Width="Auto" Height="Auto" BorderBrush="Gray" BorderThickness="2"
-                                Command="{Binding SelectPosCommand}" CommandParameter="P4">
-                            <StackPanel>
-                                <TextBlock Text="Pos" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                                <TextBlock Text="P4" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                            </StackPanel>
-                        </Button>
-                        <Button Margin="5" HorizontalAlignment="Stretch" Grid.Column="4" Grid.Row="3" Width="Auto" Height="Auto" BorderBrush="Gray" BorderThickness="2"
-                                Command="{Binding SelectPosCommand}" CommandParameter="P5">
-                            <StackPanel>
-                                <TextBlock Text="Pos" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                                <TextBlock Text="P5" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                            </StackPanel>
-                        </Button>
-                    </StackPanel>
-                </Grid>
-            </Grid>
-        </Grid>
-        
-        <Grid Grid.Column="1" Background="#37474f">
-            <StackPanel>
-                <Button Margin="7,20" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2"
-                        Style="{DynamicResource MaterialDesignRaisedButton}"
-                        materialDesign:ShadowAssist.ShadowDepth="Depth5"
+                <!--Move TO / Current To Target-->
+                <Button Margin="7, 50" HorizontalAlignment="Stretch" Height="60" BorderBrush="Gray" BorderThickness="2" 
                         Command="{Binding MoveToCommand}">
                     <StackPanel>
-                        <materialDesign:PackIcon Kind="GearBox" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                        <!--<materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
                         <TextBlock Text="Move To" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
                     </StackPanel>
                 </Button>
 
-
-                <Button Margin="7,20" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2"
-                        Style="{DynamicResource MaterialDesignRaisedButton}"
-                        materialDesign:ShadowAssist.ShadowDepth="Depth5"
+                <Button Margin="7,0" HorizontalAlignment="Stretch" Height="60" BorderBrush="Gray" BorderThickness="2" 
                         Command="{Binding CurrentToTargetCommand}">
                     <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"/>
+                        <!--<materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
+                        <TextBlock Text="Current To" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                        <TextBlock Text="Target" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
                     </StackPanel>
                 </Button>
             </StackPanel>
         </Grid>
 
-        <Grid Grid.Column="2" HorizontalAlignment="Stretch" Background="#263238">
+        <!--Right Drive Menu-->
+        <Grid Grid.Column="2" 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}">
@@ -612,5 +386,5 @@
                 </Button>
             </StackPanel>
         </Grid>
-    </Grid>-->
+    </Grid>
 </UserControl>

+ 130 - 58
Dev/OHV/OHV.Module.Interactivity/PopUp/DriveServoViewModel.cs

@@ -1,4 +1,5 @@
-using OHV.Common.Model;
+using OHV.Common.Events;
+using OHV.Common.Model;
 using OHV.SqliteDAL;
 using Prism.Commands;
 using Prism.Events;
@@ -40,56 +41,40 @@ namespace OHV.Module.Interactivity.PopUp
             }
         }
 
-        private string _selectAxis = string.Empty;
-        public string SelectAxis
+        private string _selectDirection = string.Empty;
+        public string SelectDirection
         {
-            get => this._selectAxis;
-            set { this.SetProperty( ref this._selectAxis , value ); }
+            get => this._selectDirection;
+            set { this.SetProperty( ref this._selectDirection , value ); }
         }
 
         #region Motor Left Binding Value
-        private double _targetPosDriveLeft;
-        public double TargetPosDriveLeft
+        private double _targetPosDrive;
+        public double TargetPosDrive
         {
-            get { return this._targetPosDriveLeft; }
-            set { this.SetProperty( ref this._targetPosDriveLeft , value ); }
+            get { return this._targetPosDrive; }
+            set { this.SetProperty( ref this._targetPosDrive , value ); }
         }
 
-        private double _currentDriveLeft;
-        public double CurrentDriveLeft
+        private double _currentDrive;
+        public double CurrentDrive
         {
-            get { return this._currentDriveLeft; }
-            set { this.SetProperty( ref this._currentDriveLeft , value ); }
+            get { return this._currentDrive; }
+            set { this.SetProperty( ref this._currentDrive , value ); }
         }
 
-        private double _differenceDriveLeft;
-        public double DifferenceDriveLeft
+        private double _differenceDrive;
+        public double DifferenceDrive
         {
-            get { return this._differenceDriveLeft; }
-            set { this.SetProperty( ref this._differenceDriveLeft , value ); }
+            get { return this._differenceDrive; }
+            set { this.SetProperty( ref this._differenceDrive , value ); }
         }
-        #endregion
 
-        #region Motor Right Binding Value
-        private double _targetPosDriveRight;
-        public double TargetPosDriveRight
+        private double _jogVelocity;
+        public double JogVelocity
         {
-            get { return this._targetPosDriveRight; }
-            set { this.SetProperty( ref this._targetPosDriveRight , value ); }
-        }
-
-        private double _currentDriveRight;
-        public double CurrentDriveRight
-        {
-            get { return this._currentDriveRight; }
-            set { this.SetProperty( ref this._currentDriveRight , value ); }
-        }
-
-        private double _differenceDriveRight;
-        public double DifferenceDriveRight
-        {
-            get { return this._differenceDriveRight; }
-            set { this.SetProperty( ref this._differenceDriveRight , value ); }
+            get { return this._jogVelocity; }
+            set { this.SetProperty( ref this._jogVelocity , value ); }
         }
         #endregion
 
@@ -109,6 +94,11 @@ namespace OHV.Module.Interactivity.PopUp
         public ICommand PositionAddCommand { get; set; }
         public ICommand PositionDeleteCommand { get; set; }
         public ICommand PositionSaveCommand { get; set; }
+        public ICommand SteeringCWCommand { get; set; }
+        public ICommand SteeringCCWCommand { get; set; }
+        public ICommand SelectedDirection { get; set; }
+        public ICommand JogVelPopupCommand { get; set; }
+        public ICommand JogCommand { get; set; }
 
         private ObservableCollection<AxisPositionData> _pos;
         public ObservableCollection<AxisPositionData> POS
@@ -132,10 +122,17 @@ namespace OHV.Module.Interactivity.PopUp
         public DriveServoViewModel( IEventAggregator _ea, SqliteManager _sql, MessageController _messageController )
         {
             this.eventAggregator = _ea;
+            this.eventAggregator.GetEvent<SteeringControlPubSubEvent>().Unsubscribe( UICallbackCommunication );
+            this.eventAggregator.GetEvent<SteeringControlPubSubEvent>().Subscribe( UICallbackCommunication , ThreadOption.UIThread );
+
+            this.eventAggregator.GetEvent<AxisControlPubSubEvent>().Unsubscribe( UICallbackCommunication );
+            this.eventAggregator.GetEvent<AxisControlPubSubEvent>().Subscribe( UICallbackCommunication , ThreadOption.UIThread );
+
             this.sql = _sql;
+            this.POS = new ObservableCollection<AxisPositionData>( sql.AxisPositionDataDAL.All );
+
             this.messageController = _messageController;
 
-            this.SelectAxisCommand = new DelegateCommand<object>( ExecuteSelectAxisCommand );
             this.SelectPosCommand = new DelegateCommand<object>( ExecuteSelectPosCommand );
             this.MoveToCommand = new DelegateCommand( ExecuteMoveToCommand );
             this.CurrentToTargetCommand = new DelegateCommand( ExecuteCurrentToTargetCommand );
@@ -150,7 +147,97 @@ namespace OHV.Module.Interactivity.PopUp
             this.PositionDeleteCommand = new DelegateCommand( ExecutePositionDeleteCommand );
             this.PositionSaveCommand = new DelegateCommand( ExecutePositionSaveCommand );
 
-            this.POS = new ObservableCollection<AxisPositionData>( sql.AxisPositionDataDAL.All );
+            this.SelectedDirection = new DelegateCommand<object>( ExecuteSelectedDirection );
+            this.SteeringCWCommand = new DelegateCommand<object>( ExecuteSteeringCWCommand );
+            this.SteeringCCWCommand = new DelegateCommand<object>( ExecuteSteeringCCWCommand );
+
+            this.JogVelPopupCommand = new DelegateCommand( ExecuteJogVelPopupCommand );
+            this.JogCommand = new DelegateCommand<object>( ExecuteJogCommand );
+        }
+
+        private void ExecuteJogCommand( object obj )
+        {
+            if(obj.ToString().Equals("+"))
+            { 
+            }
+            else
+            {
+            }
+        }
+
+        private void ExecuteJogVelPopupCommand( )
+        {
+            var numPad = new CalcuratorView();
+            var result = numPad.ShowDialog( this.JogVelocity );
+            this.JogVelocity = result;
+        }
+
+        private void UICallbackCommunication( AxisControlEventArgs args )
+        {
+            //TODO: Drive, Steering 구분
+        }
+
+        void PublishEvent( AxisControlEventArgs args )
+        {
+            this.eventAggregator.GetEvent<AxisControlPubSubEvent>().Publish( args );
+        }
+
+        private void ExecuteSelectedDirection( object obj )
+        {
+            this.SelectDirection = obj.ToString();
+        }
+
+        private void UICallbackCommunication( SteeringControlEventArgs args )
+        {
+            //TODO: Drive, Steering 구분
+
+            if ( args.EventDir == SteeringControlEventArgs.eEventDir.ToFront )
+            {
+                switch ( args.MoveDir )
+                {
+                    case SteeringControlEventArgs.eMoveDir.LEFT:
+                        break;
+                    case SteeringControlEventArgs.eMoveDir.RIGHT:
+                        break;
+                }
+            }
+        }
+
+        void PublishEvent( SteeringControlEventArgs args )
+        {
+            this.eventAggregator.GetEvent<SteeringControlPubSubEvent>().Publish( args );
+        }
+
+        private void ExecuteSteeringCCWCommand( object obj )
+        {
+            var msg = new SteeringControlEventArgs
+            {
+                EventDir = SteeringControlEventArgs.eEventDir.ToBack ,
+                ControlKind = SteeringControlEventArgs.eControlKind.MOVE ,
+            };
+
+            if ( obj.ToString().Equals( "CCW" ) )
+                msg.MoveDir = SteeringControlEventArgs.eMoveDir.RIGHT;
+            else
+                msg.MoveDir = SteeringControlEventArgs.eMoveDir.LEFT;
+
+            this.PublishEvent( msg );
+        }
+
+        private void ExecuteSteeringCWCommand( object obj )
+        {
+            var msg = new SteeringControlEventArgs
+            {
+                EventDir = SteeringControlEventArgs.eEventDir.ToBack ,
+                ControlKind = SteeringControlEventArgs.eControlKind.MOVE ,
+            };
+
+            if ( obj.ToString().Equals( "CW" ) )
+                msg.MoveDir = SteeringControlEventArgs.eMoveDir.LEFT;
+            else
+                msg.MoveDir = SteeringControlEventArgs.eMoveDir.RIGHT;
+
+            this.PublishEvent( msg );
         }
 
         private void ExecutePositionSaveCommand( )
@@ -187,23 +274,9 @@ namespace OHV.Module.Interactivity.PopUp
 
         private void ExecuteKeyInCommadn( object obj )
         {
-            if ( obj.ToString().Equals( "Left" ) )
-            {
-                var numPad = new CalcuratorView();
-                var result = numPad.ShowDialog( this.TargetPosDriveLeft );
-                this.TargetPosDriveLeft = result;
-            }
-            else
-            {
-                var numPad = new CalcuratorView();
-                var result = numPad.ShowDialog( this.TargetPosDriveRight );
-                this.TargetPosDriveRight = result;
-            }
-        }
-
-        private void ExecuteSelectAxisCommand( object obj )
-        {
-            this.SelectAxis = obj.ToString();
+            var numPad = new CalcuratorView();
+            var result = numPad.ShowDialog( this.TargetPosDrive );
+            this.TargetPosDrive = result;
         }
 
         private void ExecuteOriginCommand( )
@@ -228,8 +301,7 @@ namespace OHV.Module.Interactivity.PopUp
 
         private void ExecuteCurrentToTargetCommand( )
         {
-            this.TargetPosDriveLeft = this.CurrentDriveLeft;
-            this.TargetPosDriveRight = this.CurrentDriveRight;
+            this.TargetPosDrive = this.CurrentDrive;
         }
 
         private async void ExecuteMoveToCommand( )

+ 110 - 0
Dev/OHV/OHV.Module.Interactivity/PopUp/InOutControlView.xaml

@@ -0,0 +1,110 @@
+<UserControl x:Class="OHV.Module.Interactivity.PopUp.InOutControlView"
+             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/>
+            <ColumnDefinition Width="130"/>
+        </Grid.ColumnDefinitions>
+
+        <Grid Grid.Column="0">
+            <Grid Margin="15,15" Background="#37474f">
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition/>
+                    <ColumnDefinition/>
+                    <ColumnDefinition/>
+                    <ColumnDefinition/>
+                </Grid.ColumnDefinitions>
+
+                <!--Safety-->
+                <Grid Grid.Column="0">
+                    <StackPanel Orientation="Vertical">
+                        <Button Margin="5" Content="Safety" Background="{x:Null}"
+                                Foreground="Orange"/>
+                        <Button Margin="5" Content="Drive Brake Off" Command="{Binding OutPutCommand}"/>
+                        <Button Margin="5" Content="Safety Reset" Command="{Binding OutPutCommand}"/>
+                        <Button Margin="5" Content="Teach Mode" Command="{Binding OutPutCommand}"/>
+                    </StackPanel>
+                </Grid>
+
+                <!--PIO-->
+                <Grid Grid.Column="1">
+                    <StackPanel Orientation="Vertical">
+                        <Button Margin="5" Content="PIO" Background="{x:Null}"
+                                Foreground="Orange"/>
+                        <Button Margin="5" Content="Start Req" Command="{Binding OutPutCommand}"/>
+                        <Button Margin="5" Content="Load Req" Command="{Binding OutPutCommand}"/>
+                        <Button Margin="5" Content="UnLoad Req" Command="{Binding OutPutCommand}"/>
+                        <Button Margin="5" Content="Complite Req" Command="{Binding OutPutCommand}"/>
+                    </StackPanel>
+                </Grid>
+                
+                <!--Steering-->
+                <Grid Grid.Column="2">
+                    <StackPanel Orientation="Vertical">
+                        <Button Margin="5" Content="Steering" Background="{x:Null}"
+                                Foreground="Orange"/>
+                        <Button Margin="5" Content="DA-1 Set" Command="{Binding OutPutCommand}"/>
+                        <Button Margin="5" Content="DA-2 Set" Command="{Binding OutPutCommand}"/>
+                        <Button Margin="5" Content="DA-3 Set" Command="{Binding OutPutCommand}"/>
+                        <Button Margin="5" Content="C W" Command="{Binding OutPutCommand}"/>
+                        <Button Margin="5" Content="C C W" Command="{Binding OutPutCommand}"/>
+                    </StackPanel>
+                </Grid>
+
+                <!--Conveyor-->
+                <Grid Grid.Column="3">
+                    <StackPanel Orientation="Vertical">
+                        <Button Margin="5" Content="Conveyor" Background="{x:Null}"
+                                Foreground="Orange"/>
+                        <Button Margin="5" Content="C W" Command="{Binding OutPutCommand}"/>
+                        <Button Margin="5" Content="C C W" Command="{Binding OutPutCommand}"/>
+                    </StackPanel>
+                </Grid>
+            </Grid>
+        </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="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>

+ 28 - 0
Dev/OHV/OHV.Module.Interactivity/PopUp/InOutControlView.xaml.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace OHV.Module.Interactivity.PopUp
+{
+    /// <summary>
+    /// InOutControlView.xaml에 대한 상호 작용 논리
+    /// </summary>
+    public partial class InOutControlView : UserControl
+    {
+        public InOutControlView( )
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 84 - 0
Dev/OHV/OHV.Module.Interactivity/PopUp/InOutControlViewModel.cs

@@ -0,0 +1,84 @@
+using Prism.Commands;
+using Prism.Events;
+using Prism.Mvvm;
+using Prism.Services.Dialogs;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Input;
+
+namespace OHV.Module.Interactivity.PopUp
+{
+    class InOutControlViewModel : BindableBase, IDialogAware
+    {
+        private DelegateCommand<string> _closeDialogCommand;
+        public DelegateCommand<string> CloseDialogCommand =>
+            _closeDialogCommand ?? ( _closeDialogCommand = new DelegateCommand<string>( CloseDialog ) );
+
+        private string _title = "InOutControlView";
+        public string Title
+        {
+            get { return this._title; }
+            set
+            {
+                this.SetProperty( ref this._title , value );
+            }
+        }
+
+        public event Action<IDialogResult> RequestClose;
+
+        IEventAggregator eventAggregator;
+
+        public ICommand OutPutCommand { get; set; }
+
+        public InOutControlViewModel( IEventAggregator _ea )
+        {
+            this.eventAggregator = _ea;
+
+            this.OutPutCommand = new DelegateCommand<object>( ExecuteOutPutCommand );
+        }
+
+        private void ExecuteOutPutCommand( object obj )
+        {
+            
+        }
+
+        #region Dialog 
+        public bool CanCloseDialog( )
+        {
+            //throw new NotImplementedException();
+            return true;
+        }
+
+        public void OnDialogClosed( )
+        {
+            //this.eventAggregator.GetEvent<AxisControlPubSubEvent>().Publish( new AxisControlEventArgs { Dir = AxisControlEventArgs.eEventDir.ToBack , Kind = AxisControlEventArgs.eAxisControlKind.ReqStopCurrentPosition } );
+            //this.eventAggregator.GetEvent<AxisControlPubSubEvent>().Unsubscribe( UICallbackCommunication );
+        }
+
+        public void OnDialogOpened( IDialogParameters parameters )
+        {
+            //this.eventAggregator.GetEvent<AxisControlPubSubEvent>().Publish( new AxisControlEventArgs { Dir = AxisControlEventArgs.eEventDir.ToBack , Kind = AxisControlEventArgs.eAxisControlKind.ReqCurrentPosition } );
+        }
+
+        public virtual void RaiseRequestClose( IDialogResult dialogResult )
+        {
+            RequestClose?.Invoke( dialogResult );
+        }
+
+        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 ) );
+        }
+        #endregion
+    }
+}

+ 1 - 26
Dev/OHV/OHV.Module.Interactivity/PopUp/LockServoView.xaml

@@ -236,21 +236,6 @@
                             </StackPanel>
                         </Button>
 
-                        <!--<materialDesign:Badged
-                            Badge="Current Pos"
-                            BadgeColorZoneMode="Dark"
-                            BadgePlacementMode="Top"
-                            BadgeForeground="Aqua"
-                            VerticalAlignment="Center"
-                            HorizontalAlignment="Center"
-                            Height="auto">
-                            <Button Margin="15" VerticalAlignment="Center" HorizontalAlignment="Center" Height="50" >
-                                <StackPanel>
-                                    <TextBlock Text="0.000"/>
-                                </StackPanel>
-                            </Button>
-                        </materialDesign:Badged>-->
-
                         <Button
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             materialDesign:ButtonAssist.CornerRadius="10"
@@ -278,11 +263,6 @@
                                 <materialDesign:PackIcon Kind="ArrowLeftBoldCircleOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="30" Width="auto"/>
                                 <TextBlock><Run Text="Jog(-)"/></TextBlock>
                             </StackPanel>
-                            <!--<i:Interaction.Triggers>
-                                <i:EventTrigger EventName="PreviewMouseDown">
-                                    <i:InvokeCommandAction Command="{Binding JogCommand}" CommandParameter="-"/>
-                                </i:EventTrigger>
-                            </i:Interaction.Triggers>-->
                         </RepeatButton>
 
                         <materialDesign:Badged
@@ -307,16 +287,11 @@
                             Grid.Column="3"
                             HorizontalAlignment="Stretch"
                             Height="auto"
-                            Command="{Binding JogCommand}" CommandParameter="+">  
+                            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="PreviewTouchDown">
-                                    <i:InvokeCommandAction Command="{Binding JogCommand}" CommandParameter="+"/>
-                                </i:EventTrigger>
-                            </i:Interaction.Triggers>--> 
                         </RepeatButton>
                     </StackPanel>
                 </Grid>

+ 6 - 5
Dev/OHV/OHV.Module.MainViews/Views/TeachView.xaml

@@ -53,19 +53,20 @@
                     </StackPanel>
                 </Button>
 
-                <!--<Button HorizontalAlignment="Stretch"
+                <Button HorizontalAlignment="Stretch"
                     Style="{StaticResource MaterialDesignRaisedButton}"
                     Margin="20"
                     materialDesign:ButtonProgressAssist.Value="-1"
                     materialDesign:ButtonProgressAssist.IsIndicatorVisible="True"
                     materialDesign:ButtonProgressAssist.IsIndeterminate="True"
-                    Command="{Binding JogPopup}"
+                    Command="{Binding InOutControlPopup}"
                     Height="Auto" Width="Auto">
                     <StackPanel>
-                        <materialDesign:PackIcon Kind="GestureSpread" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="50"/>
-                        <TextBlock Text="# Jogging" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                        <materialDesign:PackIcon Kind="CursorDefaultClickOutline" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="50"/>
+                        <TextBlock Text="#I/O Control" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
                     </StackPanel>
-                </Button>-->
+                </Button>
+
             </StackPanel>
         </Grid>
     </Grid>

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

@@ -24,6 +24,7 @@ namespace OHV.Module.MainViews.Views
         public ICommand JogPopup { get; set; }
         public ICommand LockPopup { get; set; }
         public ICommand DriveTeachPopup { get; set; }
+        public ICommand InOutControlPopup { get; set; }
 
         public TeachViewModel( IEventAggregator _ea , VCSystem _vcSystem , MessageController _msgController, SqliteManager _sql )
         {
@@ -35,6 +36,12 @@ namespace OHV.Module.MainViews.Views
             this.JogPopup = new DelegateCommand( ExecuteServoConfigCommand );
             this.LockPopup = new DelegateCommand( ExecuteLockPopupCommand );
             this.DriveTeachPopup = new DelegateCommand( ExecuteDriveTeachPopupCommand );
+            this.InOutControlPopup = new DelegateCommand( ExecuteInOutControlPopup );
+        }
+
+        private void ExecuteInOutControlPopup( )
+        {
+            this.msgController.ShowInOutControlPopupView();
         }
 
         private void ExecuteDriveTeachPopupCommand( )

+ 0 - 1
Dev/OHV/OHV.Vehicle/Concept/D_MainWindow.xaml

@@ -205,7 +205,6 @@
                                     <TextBlock Text="{Binding RAM, StringFormat={}{0:0.0} GB}" HorizontalAlignment="Center"/>
                                 </StackPanel>
                             </Button>
-                            <Button Content="1TB" Margin="0,5,0,0" Background="{x:Null}"/>
                             <Button Margin="0,5,0,0" Background="{x:Null}">
                                 <StackPanel>
                                     <TextBlock Text="{Binding CDrive, StringFormat={}{0:0} GB}" HorizontalAlignment="Center"/>