Browse Source

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

# Conflicts:
#	Dev/OHV/OHV.Module.Interactivity/PopUp/ConveyorControlViewModel.cs
#	Dev/OHV/OHV.Vehicle/Concept/D_MainWindowViewModel.cs
#	Dev/OHV/VehicleControlSystem/ControlLayer/Vehicle.cs
DESKTOP-Kang 6 years ago
parent
commit
6a1c4949f8
33 changed files with 1996 additions and 1517 deletions
  1. 53 20
      Dev/OHV/OHV.Common/Events/MessageEventArgs.cs
  2. 2 0
      Dev/OHV/OHV.Common/Events/PubSubEvent.cs
  3. 106 0
      Dev/OHV/OHV.Common/OHV.Common.csproj.orig
  4. 9 0
      Dev/OHV/OHV.Common/Shareds/SharedEnumType.cs
  5. 14 14
      Dev/OHV/OHV.Module.Interactivity/PopUp/ConveyorControlView.xaml
  6. 222 89
      Dev/OHV/OHV.Module.Interactivity/PopUp/ConveyorControlViewModel.cs
  7. 459 0
      Dev/OHV/OHV.Module.Interactivity/PopUp/ConveyorControlViewModel.cs.orig
  8. 7 7
      Dev/OHV/OHV.Module.Interactivity/PopUp/DriveServoView.xaml
  9. 48 25
      Dev/OHV/OHV.Module.Interactivity/PopUp/DriveServoViewModel.cs
  10. 3 3
      Dev/OHV/OHV.Module.Interactivity/PopUp/InOutViewModel.cs
  11. 7 6
      Dev/OHV/OHV.Module.Interactivity/PopUp/LockServoView.xaml
  12. 23 1
      Dev/OHV/OHV.Module.Interactivity/PopUp/LockServoViewModel.cs
  13. 79 168
      Dev/OHV/OHV.Module.Interactivity/PopUp/OpticalReadingConfigView.xaml
  14. 120 100
      Dev/OHV/OHV.Module.Interactivity/PopUp/OpticalReadingConfigViewModel.cs
  15. 4 0
      Dev/OHV/OHV.Module.Status/OHV.Module.Status.csproj
  16. 9 10
      Dev/OHV/OHV.Module.Status/VehicleStatusView.xaml
  17. 152 4
      Dev/OHV/OHV.Module.Status/VehicleStatusViewModel.cs
  18. 82 76
      Dev/OHV/OHV.Vehicle/Concept/D_MainWindowViewModel.cs
  19. 112 7
      Dev/OHV/VehicleControlSystem/ControlLayer/Clamp.cs
  20. 471 465
      Dev/OHV/VehicleControlSystem/ControlLayer/Vehicle.cs
  21. 1 1
      Dev/OHV/VehicleControlSystem/Managers/AutoManager.cs
  22. 13 3
      Dev/OHV/VehicleControlSystem/VCSystem.cs
  23. 0 54
      Dev/OHV/ViewTest/CustomControl1.cs
  24. 0 55
      Dev/OHV/ViewTest/Properties/AssemblyInfo.cs
  25. 0 62
      Dev/OHV/ViewTest/Properties/Resources.Designer.cs
  26. 0 117
      Dev/OHV/ViewTest/Properties/Resources.resx
  27. 0 30
      Dev/OHV/ViewTest/Properties/Settings.Designer.cs
  28. 0 7
      Dev/OHV/ViewTest/Properties/Settings.settings
  29. 0 18
      Dev/OHV/ViewTest/Themes/Generic.xaml
  30. 0 16
      Dev/OHV/ViewTest/UserControl1.xaml
  31. 0 28
      Dev/OHV/ViewTest/UserControl1.xaml.cs
  32. 0 122
      Dev/OHV/ViewTest/ViewTest.csproj
  33. 0 9
      Dev/OHV/ViewTest/packages.config

+ 53 - 20
Dev/OHV/OHV.Common/Events/MessageEventArgs.cs

@@ -34,7 +34,7 @@ namespace OHV.Common.Events
         public string MessageKey { get; set; }
         public string MessageText { get; set; }
         public Command Command { get; set; }
-        public Dictionary<string, object> Dic { get; set; }
+        public Dictionary<string , object> Dic { get; set; }
         public object Args { get; set; }
         public FluentResults.Result Result { get; set; }
 
@@ -62,13 +62,14 @@ namespace OHV.Common.Events
             ReqAlarmReset,
             ReqVehicleModeChange,
             ReqEStop,
+            ReqBuzzerStop,
         }
 
         public eVCSMessageKind Kind { get; set; }
         public string MessageKey { get; set; }
         public string MessageText { get; set; }
         public Command Command { get; set; }
-        public Dictionary<string, object> Args { get; set; }
+        public Dictionary<string , object> Args { get; set; }
     }
 
     public class AxisControlEventArgs : EventArgs
@@ -93,6 +94,8 @@ namespace OHV.Common.Events
             ReqStopCurrentPosition,
             FaultReset,
             AxisState,
+            SyncMove,
+            SyncState,
         }
 
         public enum eJogMoveDir
@@ -101,13 +104,6 @@ namespace OHV.Common.Events
             Negative,
         }
 
-        public enum eAxises
-        {
-            LEFT = 0,
-            RIGHT,
-            LR_SYNC
-        }
-
         /// <summary>
         /// ConveyorPopupView -> Move 하기 위해 구분용으로 생성함
         /// </summary>
@@ -118,14 +114,13 @@ namespace OHV.Common.Events
         }
 
         public ePosDir PosDir { get; set; }
-        public eAxises Axis { get; set; }
         public eEventDir Dir { get; set; }
         public eAxisControlKind Kind { get; set; }
         public eJogMoveDir JogDir { get; set; }
         public string AxisName { get; set; }
         public double CurrentPosition { get; set; }
 
-        public Dictionary<string, object> Args { get; set; }
+        public Dictionary<string , object> Args { get; set; }
 
         public Result Result { get; set; }
 
@@ -138,13 +133,13 @@ namespace OHV.Common.Events
         }
     }
 
-    public class IOChangedMessageEventArgs: EventArgs
-    {
-        public object Args { get; set; }
-    }
+    public class IOChangedMessageEventArgs : EventArgs
+        {
+            public object Args { get; set; }
+        }
 
-    public class HostConnectedEventArgs : EventArgs 
-    { 
+    public class HostConnectedEventArgs : EventArgs
+    {
         public enum eConnectedState
         {
             Disconnected,
@@ -152,7 +147,7 @@ namespace OHV.Common.Events
         }
         public eConnectedState State { get; set; }
 
-        public HostConnectedEventArgs(eConnectedState state)
+        public HostConnectedEventArgs( eConnectedState state )
         {
             this.State = state;
         }
@@ -168,6 +163,7 @@ namespace OHV.Common.Events
 
         public enum eControlKind
         {
+            NONE = -1,
             MOVE = 0,
             STOP,
             Steering,
@@ -179,7 +175,7 @@ namespace OHV.Common.Events
             DriveOFF,
             JOG,
             VehicleState,
-
+            Conveyor
         }
 
         public enum eJogMoveDir
@@ -194,10 +190,20 @@ namespace OHV.Common.Events
             RIGHT,
         }
 
-        
+        public enum eCvDir
+        {
+            NONE = -1,
+            CW = 0,
+            CCW,
+            STOP
+        }
+
+
         public double CurrentPosition { get; set; }
         public int TargetRouteID { get; set; }
 
+        public eCvDir CvDir { get; set; }
+
         public eJogMoveDir JogDir { get; set; }
         public eEventDir EventDir { get; set; }
         public eControlKind ControlKind { get; set; }
@@ -228,4 +234,31 @@ namespace OHV.Common.Events
         public object Args { get; set; }
     }
 
+    public class ObstacleControlEventArgs
+    {
+        public enum eEventDir
+        {
+            ToBack,
+            ToFront,
+        }
+
+        public enum eControlKind
+        {
+            NONE = -1,
+            DRIVE = 0,
+            CURVE,
+            STATE,
+            INFO,
+            SAVE
+        }
+
+        public int Drive { get; set; }
+        public int Curve { get; set; }
+        public string ObstacleState { get; set; }
+
+        public FluentResults.Result Result { get; set; }
+        public eControlKind ControlKind { get; set; }
+        public eEventDir EventDir { get; set; }
+        public object Args { get; set; }
+    }
 }

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

@@ -24,4 +24,6 @@ namespace OHV.Common.Events
     public class VehicleCommandListChanged : PubSubEvent<string> { }
     public class VehicleSubCmdListChanged : PubSubEvent<string> { }
 
+    public class ObstacleControlPubSubEvent : PubSubEvent<ObstacleControlEventArgs> { }
+
 }

+ 106 - 0
Dev/OHV/OHV.Common/OHV.Common.csproj.orig

@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="..\packages\EntityFramework.6.4.0\build\EntityFramework.props" Condition="Exists('..\packages\EntityFramework.6.4.0\build\EntityFramework.props')" />
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{0D1F7FBC-BFB0-4EE4-852D-E2A8D62C5708}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>OHV.Common</RootNamespace>
+    <AssemblyName>OHV.Common</AssemblyName>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <Deterministic>true</Deterministic>
+    <NuGetPackageImportStamp>
+    </NuGetPackageImportStamp>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
+      <HintPath>..\packages\EntityFramework.6.4.0\lib\net45\EntityFramework.dll</HintPath>
+    </Reference>
+    <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
+      <HintPath>..\packages\EntityFramework.6.4.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
+    </Reference>
+    <Reference Include="FluentResults">
+      <HintPath>..\Assambly\FluentResults.dll</HintPath>
+    </Reference>
+    <Reference Include="Prism, Version=7.2.0.1422, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
+      <HintPath>..\packages\Prism.Core.7.2.0.1422\lib\net45\Prism.dll</HintPath>
+    </Reference>
+    <Reference Include="SQLite.CodeFirst, Version=1.5.3.29, Culture=neutral, PublicKeyToken=eb96ba0a78d831a7, processorArchitecture=MSIL">
+      <HintPath>..\packages\SQLite.CodeFirst.1.5.3.29\lib\net45\SQLite.CodeFirst.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.ComponentModel.DataAnnotations" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.ValueTuple.4.5.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Events\MessageEventArgs.cs" />
+    <Compile Include="Events\PubSubEvent.cs" />
+    <Compile Include="Interfaces\IModelBase.cs" />
+    <Compile Include="Interfaces\ISqlManager.cs" />
+    <Compile Include="Interfaces\IVehicle.cs" />
+    <Compile Include="Model\Alarm.cs" />
+    <Compile Include="Model\AxisConfig.cs" />
+    <Compile Include="Model\AxisPositionData.cs" />
+    <Compile Include="Model\AxisVelocityData.cs" />
+    <Compile Include="Model\Command.cs" />
+    <Compile Include="Model\Config.cs" />
+    <Compile Include="Model\HisAlarm.cs" />
+    <Compile Include="Model\Route.cs" />
+    <Compile Include="Model\SelectionItem.cs" />
+    <Compile Include="Model\SelectionList.cs" />
+    <Compile Include="Model\SubCmd.cs" />
+<<<<<<< HEAD
+    <Compile Include="Model\VehicleState.cs" />
+=======
+    <Compile Include="Model\VehicleInfo.cs" />
+>>>>>>> 06cd50a7615cca64bd11a5a71d408533b013704d
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Shareds\ConstString.cs" />
+    <Compile Include="Shareds\SharedEnumType.cs" />
+    <Compile Include="Shareds\RegionNames.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+    <None Include="packages.config" />
+  </ItemGroup>
+  <ItemGroup />
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+    <PropertyGroup>
+      <ErrorText>이 프로젝트는 이 컴퓨터에 없는 NuGet 패키지를 참조합니다. 해당 패키지를 다운로드하려면 NuGet 패키지 복원을 사용하십시오. 자세한 내용은 http://go.microsoft.com/fwlink/?LinkID=322105를 참조하십시오. 누락된 파일은 {0}입니다.</ErrorText>
+    </PropertyGroup>
+    <Error Condition="!Exists('..\packages\EntityFramework.6.4.0\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.0\build\EntityFramework.props'))" />
+    <Error Condition="!Exists('..\packages\EntityFramework.6.4.0\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.0\build\EntityFramework.targets'))" />
+  </Target>
+  <Import Project="..\packages\EntityFramework.6.4.0\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.0\build\EntityFramework.targets')" />
+</Project>

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

@@ -53,6 +53,8 @@
         Abnormal,
         Blocked,
         Decelerate,
+		DRIVE,
+		CURVE
     }
 
 	public enum eSteeringState
@@ -61,6 +63,13 @@
 		Left,
 		Right,
 	}
+
+	public enum eClampState
+	{
+		NONE = 0,
+		LOCK,
+		UNLOCK
+	}
     #endregion
 
     #region Opertation

+ 14 - 14
Dev/OHV/OHV.Module.Interactivity/PopUp/ConveyorControlView.xaml

@@ -61,43 +61,43 @@
                         
                         <Button Background="{x:Null}">
                             <StackPanel Orientation="Horizontal">
-                                <Ellipse Margin="0,0,16,0" Width="20" Height="20" Fill="{Binding CvRun, FallbackValue=Red}"/>
-                                <TextBlock Text="CV RUN"/>
+                                <Ellipse Margin="0,0,16,0" Width="20" Height="20" Fill="{Binding CvError, FallbackValue=Gray}"/>
+                                <TextBlock Text="CV ERROR"/>
                             </StackPanel>
                         </Button>
 
                         <Button Background="{x:Null}">
                             <StackPanel Orientation="Horizontal">
-                                <Ellipse Margin="0,0,16,0" Width="20" Height="20" Fill="{Binding CvCWCCW, FallbackValue=Red}"/>
+                                <Ellipse Margin="0,0,38,0" Width="20" Height="20" Fill="{Binding CvCW, FallbackValue=Gray}"/>
                                 <TextBlock Text="CV CW"/>
                             </StackPanel>
                         </Button>
 
                         <Button Background="{x:Null}">
                             <StackPanel Orientation="Horizontal">
-                                <Ellipse Margin="0,0,16,0" Width="20" Height="20" Fill="{Binding CvCWCCW, FallbackValue=Red}"/>
+                                <Ellipse Margin="0,0,30,0" Width="20" Height="20" Fill="{Binding CvCCW, FallbackValue=Gray}"/>
                                 <TextBlock Text="CV CCW"/>
                             </StackPanel>
                         </Button>
 
                         <Button Background="{x:Null}">
                             <StackPanel Orientation="Horizontal">
-                                <Ellipse Margin="0,0,16,0" Width="20" Height="20" Fill="{Binding CvEntryIn, FallbackValue=Red}"/>
+                                <Ellipse Margin="0,0,16,0" Width="20" Height="20" Fill="{Binding CvEntryIn, FallbackValue=Gray}"/>
                                 <TextBlock Text="CV EntryIn"/>
                             </StackPanel>
                         </Button>
 
                         <Button Background="{x:Null}">
                             <StackPanel Orientation="Horizontal">
-                                <Ellipse Margin="0,0,16,0" Width="20" Height="20" Fill="{Binding CvSlowStop, FallbackValue=Red}"/>
+                                <Ellipse Margin="0,0,16,0" Width="20" Height="20" Fill="{Binding CvSlowStop, FallbackValue=Gray}"/>
                                 <TextBlock Text="CV Slow-S"/>
                             </StackPanel>
                         </Button>
 
                         <Button Background="{x:Null}">
                             <StackPanel Orientation="Horizontal">
-                                <Ellipse Margin="0,0,16,0" Width="20" Height="20" Fill="{Binding CvStop, FallbackValue=Red}"/>
-                                <TextBlock Text="CV Stop-S"/>
+                                <Ellipse Margin="0,0,30,0" Width="20" Height="20" Fill="{Binding CvStop, FallbackValue=Gray}"/>
+                                <TextBlock Text="CV Stop"/>
                             </StackPanel>
                         </Button>
 
@@ -169,28 +169,28 @@
                                     HorizontalAlignment="Center">
                             <Button Background="{x:Null}">
                                 <StackPanel Orientation="Horizontal">
-                                    <Ellipse Margin="0,0,18,0" Width="20" Height="20" Fill="{Binding AxisLeftIsMove, FallbackValue=Red}"/>
-                                    <TextBlock Text="Axis-L IsMove"/>
+                                    <Ellipse Margin="0,0,18,0" Width="20" Height="20" Fill="{Binding AxisLeftIsOrg, FallbackValue=Gray}"/>
+                                    <TextBlock Text="Axis-L Is ORG"/>
                                 </StackPanel>
                             </Button>
 
                             <Button Background="{x:Null}">
                                 <StackPanel Orientation="Horizontal">
-                                    <Ellipse Margin="0,0,33,0" Width="20" Height="20" Fill="{Binding AxisLeftFault, FallbackValue=Red}"/>
+                                    <Ellipse Margin="0,0,33,0" Width="20" Height="20" Fill="{Binding AxisLeftAmpFault, FallbackValue=Gray}"/>
                                     <TextBlock Text="Axis-L Fault"/>
                                 </StackPanel>
                             </Button>
 
                             <Button Background="{x:Null}">
                                 <StackPanel Orientation="Horizontal">
-                                    <Ellipse Margin="0,0,16,0" Width="20" Height="20" Fill="{Binding AxisRightIsMove, FallbackValue=Red}"/>
-                                    <TextBlock Text="Axis-R IsMove"/>
+                                    <Ellipse Margin="0,0,16,0" Width="20" Height="20" Fill="{Binding AxisRightIsOrg, FallbackValue=Gray}"/>
+                                    <TextBlock Text="Axis-R Is ORG"/>
                                 </StackPanel>
                             </Button>
 
                             <Button Background="{x:Null}">
                                 <StackPanel Orientation="Horizontal">
-                                    <Ellipse Margin="0,0,30,0" Width="20" Height="20" Fill="{Binding AxisRightFault, FallbackValue=Red}"/>
+                                    <Ellipse Margin="0,0,30,0" Width="20" Height="20" Fill="{Binding AxisRightAmpFault, FallbackValue=Gray}"/>
                                     <TextBlock Text="Axis-R Fault"/>
                                 </StackPanel>
                             </Button>

+ 222 - 89
Dev/OHV/OHV.Module.Interactivity/PopUp/ConveyorControlViewModel.cs

@@ -1,5 +1,6 @@
 using GSG.NET.Extensions;
 using OHV.Common.Events;
+using OHV.Common.Model;
 using OHV.Common.Shareds;
 using Prism.Commands;
 using Prism.Events;
@@ -11,6 +12,10 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Input;
+<<<<<<< HEAD
+=======
+using System.Windows.Media;
+>>>>>>> eef332823de9e5e1c309ffa9e4d055ac4e281980
 using VehicleControlSystem;
 using VehicleControlSystem.ControlLayer.IO;
 using static OHV.Common.Events.AxisControlEventArgs;
@@ -36,6 +41,68 @@ namespace OHV.Module.Interactivity.PopUp
             }
         }
 
+        #region Brushes
+        private Brush _cvError = Brushes.Gray;
+        public Brush CvError { get { return _cvError; } set { SetProperty( ref _cvError , value ); } }
+
+        private Brush _cvStop = Brushes.Gray;
+        public Brush CvStop { get { return _cvStop; } set { SetProperty( ref _cvStop , value ); } }
+
+        private Brush _cvSlowStop = Brushes.Gray;
+        public Brush CvSlowStop { get { return _cvSlowStop; } set { SetProperty( ref _cvSlowStop , value ); } }
+
+        private Brush _cvEntryIn = Brushes.Gray;
+        public Brush CvEntryIn { get { return _cvEntryIn; } set { SetProperty( ref _cvEntryIn , value ); } }
+        private Brush _cvRun = Brushes.Gray;
+        public Brush CvRun { get { return _cvRun; } set { SetProperty( ref _cvRun , value ); } }
+
+        private Brush _cvCW = Brushes.Gray;
+        public Brush CvCW { get { return _cvCW; } set { SetProperty( ref _cvCW , value ); } }
+
+        private Brush _cvCCW = Brushes.Gray;
+        public Brush CvCCW { get { return _cvCCW; } set { SetProperty( ref _cvCCW , value ); } }
+
+        private Brush _axisLeftIsOrg = Brushes.Red;
+        private Brush _axisLeftAmpFault = Brushes.Gray;
+
+        private Brush _axisRightIsOrg = Brushes.Red;
+        private Brush _axisRightAmpFault = Brushes.Gray;
+
+        public Brush AxisLeftIsOrg
+        {
+            get { return _axisLeftIsOrg; }
+            set
+            {
+                SetProperty( ref _axisLeftIsOrg , value );
+            }
+        }
+        public Brush AxisLeftAmpFault
+        {
+            get { return _axisLeftAmpFault; }
+            set
+            {
+                SetProperty( ref _axisLeftAmpFault , value );
+            }
+        }
+        public Brush AxisRightIsOrg
+        {
+            get { return _axisRightIsOrg; }
+            set
+            {
+                SetProperty( ref _axisRightIsOrg , value );
+            }
+        }
+        public Brush AxisRightAmpFault
+        {
+            get { return _axisRightAmpFault; }
+            set
+            {
+                SetProperty( ref _axisRightAmpFault , value );
+            }
+        }
+
+        #endregion
+
         public ICommand ConveyorRunCommand { get; set; }
         public ICommand PosMoveCommand { get; set; }
 
@@ -44,17 +111,25 @@ namespace OHV.Module.Interactivity.PopUp
 
         List<BitBlock> allIOList = new List<BitBlock>();
 
+<<<<<<< HEAD
         EzIO iO = null; 
 
         public ConveyorControlViewModel( IEventAggregator _ea , MessageController _msg, VCSystem vcSystem)
+=======
+        VCSystem VCSystem;
+        EzIO IO = null;
+
+        public ConveyorControlViewModel( IEventAggregator _ea , MessageController _msg, VCSystem _vcSystem)
+>>>>>>> eef332823de9e5e1c309ffa9e4d055ac4e281980
         {
             this.iO = vcSystem.IO as EzIO;
             this.iO.OnChangedIO += IO_OnChangedIO;
             this.eventAggregator = _ea;
 
-            /*IO Publish Event*/
-            //this.eventAggregator.GetEvent<IOControlPubSubEvent>().Unsubscribe( UICallbackCommunivation );
-            //this.eventAggregator.GetEvent<IOControlPubSubEvent>().Subscribe( UICallbackCommunivation , ThreadOption.UIThread );
+            this.VCSystem = _vcSystem;
+            this.IO = VCSystem.IO as EzIO;
+            this.IO.OnChangedIO += IO_OnChangedIO;
+            this.GetSensorState(this.IO);
 
             /*Lock&UnLock Publish Event*/
             this.eventAggregator.GetEvent<AxisControlPubSubEvent>().Unsubscribe( AxisUICallbackCommunication );
@@ -70,14 +145,83 @@ namespace OHV.Module.Interactivity.PopUp
             this.PosMoveCommand = new DelegateCommand<object>( ExecutePosMoveCommand );
         }
 
+<<<<<<< HEAD
         private void IO_OnChangedIO( BitBlock bit )
         {
             throw new NotImplementedException();
+=======
+        private void GetSensorState( EzIO _iO )
+        {
+            //IO_OnChangedIO 중복됨 어쩌지
+            if ( _iO.IsOn( "IN_CV_ERROR" ) )
+                this.CvError = Brushes.LimeGreen;
+
+            if(_iO.IsOn( "IN_CV_DETECT_00" ) )
+                this.CvEntryIn = Brushes.LimeGreen;
+
+            if ( _iO.IsOn( "IN_CV_DETECT_01" ) )
+                this.CvSlowStop = Brushes.LimeGreen;
+
+            if ( _iO.IsOn( "IN_CV_DETECT_02" ) )
+                this.CvStop = Brushes.LimeGreen;
+
+            if ( _iO.IsOn( "OUT_CV_RUN" , false ) )
+                this.CvRun = Brushes.LimeGreen;
+
+            if(_iO.IsOn( "OUT_CV_CWCCW", false ) )
+            {
+                this.CvCW = Brushes.LimeGreen;
+                this.CvCCW = Brushes.Gray;
+            }
+            else
+            {
+                this.CvCW = Brushes.Gray;
+                this.CvCCW = Brushes.LimeGreen;
+            }
+        }
+
+        private void IO_OnChangedIO( BitBlock bit )
+        {
+            if ( bit.Tag.Equals( "IN_CV_ERROR" ) )
+                this.CvError = Brushes.LimeGreen;
+            else
+                this.CvError = Brushes.Gray;
+
+            if ( bit.Tag.Equals( "IN_CV_DETECT_00" ) )
+                this.CvEntryIn = Brushes.LimeGreen;
+            else
+                this.CvEntryIn = Brushes.Gray;
+
+            if ( bit.Tag.Equals( "IN_CV_DETECT_01" ) )
+                this.CvSlowStop = Brushes.LimeGreen;
+            else
+                this.CvSlowStop = Brushes.Gray;
+
+            if ( bit.Tag.Equals( "IN_CV_DETECT_02" ) )
+                this.CvStop = Brushes.LimeGreen;
+            else
+                this.CvStop = Brushes.Gray;
+
+            if ( bit.Tag.Equals( "OUT_CV_CWCCW" ) )
+            {
+                this.CvCW = Brushes.LimeGreen;
+                this.CvCCW = Brushes.Gray;
+            }
+            else
+            {
+                this.CvCW = Brushes.Gray;
+                this.CvCCW = Brushes.LimeGreen;
+            }
+        }
+
+        private void RspIOState( VCSMessageEventArgs args )
+        {
+            //var ioAll = args.Args as EzIO;
+>>>>>>> eef332823de9e5e1c309ffa9e4d055ac4e281980
         }
 
         private void UICallbackCommunication( GUIMessageEventArgs _args )
         {
-            //TODO:[20/03/20 ys-hwang] Conveyor 에서 Vehicle 상태를 쓸 항목이 있으런지? 쓴다면 State만??
             if( _args.Kind == GUIMessageEventArgs.eGUIMessageKind.ModelPropertyChange)
             {
                 if( _args.MessageKey.Equals(MessageKey.Vehicle))
@@ -93,30 +237,6 @@ namespace OHV.Module.Interactivity.PopUp
                     }
                 }
             }
-
-            switch ( _args.Kind )
-            {
-                case GUIMessageEventArgs.eGUIMessageKind.ModelPropertyChange:
-                    break;
-                case GUIMessageEventArgs.eGUIMessageKind.RspIOObject:
-                    break;
-                case GUIMessageEventArgs.eGUIMessageKind.RspIOMapList:
-                    break;
-                case GUIMessageEventArgs.eGUIMessageKind.RspCommandList:
-                    break;
-                case GUIMessageEventArgs.eGUIMessageKind.RspAutoModeChange:
-                    break;
-                case GUIMessageEventArgs.eGUIMessageKind.RspManualModeChange:
-                    break;
-                case GUIMessageEventArgs.eGUIMessageKind.RspAlarmReset:
-                    break;
-                case GUIMessageEventArgs.eGUIMessageKind.RspVehicleModeChange:
-                    break;
-                case GUIMessageEventArgs.eGUIMessageKind.RspEStop:
-                    break;
-                case GUIMessageEventArgs.eGUIMessageKind.RspVihicleState:
-                    break;
-            }
         }
 
         private void ChangeObstacleState( eObstacleState _reply )
@@ -135,7 +255,7 @@ namespace OHV.Module.Interactivity.PopUp
                     var msg = new AxisControlEventArgs
                     {
                         Dir = AxisControlEventArgs.eEventDir.ToBack ,
-                        Kind = AxisControlEventArgs.eAxisControlKind.Move ,
+                        Kind = AxisControlEventArgs.eAxisControlKind.SyncMove ,
                     };
 
                     switch ( selectedPos )
@@ -173,8 +293,7 @@ namespace OHV.Module.Interactivity.PopUp
                     case AxisControlEventArgs.eAxisControlKind.EStop:
                         break;
                     case AxisControlEventArgs.eAxisControlKind.Move:
-                        //Sync Move Success Return
-                        
+                        ResponseMove( _args );
                         break;
                     case AxisControlEventArgs.eAxisControlKind.Jog:
                         break;
@@ -191,74 +310,93 @@ namespace OHV.Module.Interactivity.PopUp
                     case AxisControlEventArgs.eAxisControlKind.AxisState:
                         AxisState( _args );
                         break;
+                    case eAxisControlKind.SyncMove:
+                        if ( _args.Result.IsSuccess )
+                            this.messageController.ShowNotificationView( "Success" );
+                        else
+                            this.messageController.ShowNotificationView( "Fail" );
+                        break;
                 }
             }
         }
 
-        private void AxisState( AxisControlEventArgs args )
+        private void ResponseMove( AxisControlEventArgs _args )
         {
-            var left = args.Args[ "Left" ] as AxisState;
-            var right = args.Args[ "Right" ] as AxisState;
+            var msg = string.Empty;
 
-            //this.IsLeftServoOn = left.IsServoOn;
-            //this.IsLeftServoOriginReturn = left.IsOriginReturn;
-            //this.IsLeftServoFault = left.IsAmpFault;
-            //this.CurrentLockLeft = left.CurrentPosition;
+            if ( _args.Result.IsSuccess )
+                msg = ( "Move Success" );
+            else
+            {
+                var error = _args.Result.Errors.FirstOrDefault();
+                var alarm = error.Metadata[ "Alarm" ] as Alarm;
+                msg = alarm.Name + " " + alarm.Text;
+            }
 
-            //this.IsRightServoOn = right.IsServoOn;
-            //this.IsRightServoOriginReturn = right.IsOriginReturn;
-            //this.IsRightServoFault = right.IsAmpFault;
-            //this.CurrentLockRight = right.CurrentPosition;
+            this.messageController.ShowNotificationView( msg );
         }
 
-        private void UICallbackCommunivation( IOControlEventArgs _args )
+        private void AxisState( AxisControlEventArgs args )
         {
-            if ( _args.EventDir == IOControlEventArgs.eEventDir.ToBack )
-            {
-                switch ( _args.ControlKind )
-                {
-                    case IOControlEventArgs.eControlKind.USE:
-                        break;
-                    case IOControlEventArgs.eControlKind.ON:
-                        break;
-                    case IOControlEventArgs.eControlKind.OFF:
-                        break;
-                    case IOControlEventArgs.eControlKind.STATE:
-                        break;
-                }
-            }
+            var left = args.Args[ "Left" ] as AxisState;
+            var right = args.Args[ "Right" ] as AxisState;
+
+            if ( left.IsOriginReturn )
+                this.AxisLeftIsOrg = Brushes.LimeGreen;
+            else
+                this.AxisLeftIsOrg = Brushes.Red;
+
+            if ( left.IsAmpFault )
+                this.AxisLeftAmpFault = Brushes.Red;
+            else
+                this.AxisLeftAmpFault = Brushes.Gray;
+
+            if ( right.IsOriginReturn )
+                this.AxisRightIsOrg = Brushes.LimeGreen;
+            else
+                this.AxisRightIsOrg = Brushes.Red;
+
+            if ( right.IsAmpFault )
+                this.AxisRightAmpFault = Brushes.Red;
+            else
+                this.AxisRightAmpFault = Brushes.Gray;
         }
 
         private void ExecuteCvCommand( object _obj )
         {
             var type = _obj.ToString();
-            var order = string.Empty;
+            DriveControlEventArgs.eCvDir dir = DriveControlEventArgs.eCvDir.NONE;
 
-            switch(type)
+            switch ( type )
             {
                 case "CW":
-                    order = "OUT_CV_CWCCW";
+                    dir = DriveControlEventArgs.eCvDir.CW;
                     break;
                 case "CCW":
-                    order = "OUT_CV_CWCCW";
+                    dir = DriveControlEventArgs.eCvDir.CCW;
                     break;
                 case "STOP":
-                    order = "STOP";
+                    dir = DriveControlEventArgs.eCvDir.STOP;
                     break;
             }
 
-            var msg = new IOControlEventArgs
+            var msg = new DriveControlEventArgs
             {
-                EventDir = IOControlEventArgs.eEventDir.ToBack,
-                OutPutTag = order.ToString()
+                EventDir = DriveControlEventArgs.eEventDir.ToBack ,
+                ControlKind = DriveControlEventArgs.eControlKind.Conveyor ,
+                CvDir = dir
             };
-
             this.PublishEvent( msg );
         }
 
-        private void PublishEvent( IOControlEventArgs _args )
+        private void PublishEvent( DriveControlEventArgs _args )
+        {
+            this.eventAggregator.GetEvent<DriveControlPubSubEvent>().Publish( _args );
+        }
+
+        private void IOPublish( VCSMessageEventArgs _args )
         {
-            this.eventAggregator.GetEvent<IOControlPubSubEvent>().Publish( _args );
+            this.eventAggregator.GetEvent<VCSMessagePubSubEvent>().Publish( _args );
         }
 
         #region Dialog
@@ -269,42 +407,37 @@ namespace OHV.Module.Interactivity.PopUp
 
         public void OnDialogClosed( )
         {
-            this.eventAggregator.GetEvent<IOControlPubSubEvent>().Publish( new IOControlEventArgs { EventDir = IOControlEventArgs.eEventDir.ToBack } );
-            this.eventAggregator.GetEvent<IOControlPubSubEvent>().Unsubscribe( UICallbackCommunivation );
-
-            //TODO:[03-14 ys-hwang] - Closed 해제 처리해줄때 Kind == OriginReturn 값이 들어와버림 그래서 NONE 생성 
             this.eventAggregator.GetEvent<AxisControlPubSubEvent>().Publish( new AxisControlEventArgs 
             { 
                 Dir = AxisControlEventArgs.eEventDir.ToBack, 
                 Kind = AxisControlEventArgs.eAxisControlKind.NONE 
             } );
             this.eventAggregator.GetEvent<AxisControlPubSubEvent>().Unsubscribe( AxisUICallbackCommunication );
+
+            this.eventAggregator.GetEvent<DriveControlPubSubEvent>().Publish( new DriveControlEventArgs { EventDir = DriveControlEventArgs.eEventDir.ToBack , ControlKind = DriveControlEventArgs.eControlKind.ReqStopCurrentPos } );
+            //this.eventAggregator.GetEvent<DriveControlPubSubEvent>().Unsubscribe( DriveControlCallBack );
+
+            this.eventAggregator.GetEvent<GUIMessagePubSubEvent>().Unsubscribe( UICallbackCommunication );
         }
 
         public void OnDialogOpened( IDialogParameters parameters )
         {
             /*IO*/
-            var ioMsg = new IOControlEventArgs
-            {
-                EventDir = IOControlEventArgs.eEventDir.ToBack ,
-                ControlKind = IOControlEventArgs.eControlKind.STATE
-            };
-            this.PublishEvent( ioMsg );
-
-            this.eventAggregator.GetEvent<IOControlPubSubEvent>().Publish( new IOControlEventArgs { EventDir = IOControlEventArgs.eEventDir.ToBack } );
+            var msg = new VCSMessageEventArgs() { Kind = VCSMessageEventArgs.eVCSMessageKind.ReqIOObject };
+            this.eventAggregator.GetEvent<VCSMessagePubSubEvent>().Publish( msg );
 
             /*Lock Axis*/
-            var axisMsg = new AxisControlEventArgs
-            {
-                Dir = AxisControlEventArgs.eEventDir.ToBack ,
-                Kind = AxisControlEventArgs.eAxisControlKind.NONE
-            };
-
-            this.AxisPublishEvent(axisMsg);
-
-            this.eventAggregator.GetEvent<AxisControlPubSubEvent>().Publish( new AxisControlEventArgs { Dir = AxisControlEventArgs.eEventDir.ToBack , Kind = AxisControlEventArgs.eAxisControlKind.NONE } );
+            //var axisMsg = new AxisControlEventArgs
+            //{
+            //    Dir = AxisControlEventArgs.eEventDir.ToBack ,
+            //    Kind = AxisControlEventArgs.eAxisControlKind.NONE
+            //};
+            //this.AxisPublishEvent(axisMsg);
+
+            this.eventAggregator.GetEvent<AxisControlPubSubEvent>().Publish( new AxisControlEventArgs { Dir = AxisControlEventArgs.eEventDir.ToBack , Kind = AxisControlEventArgs.eAxisControlKind.ReqCurrentPosition } );
         }
 
+
         private void CloseDialog( string parameter )
         {
             ButtonResult result = ButtonResult.None;

+ 459 - 0
Dev/OHV/OHV.Module.Interactivity/PopUp/ConveyorControlViewModel.cs.orig

@@ -0,0 +1,459 @@
+using GSG.NET.Extensions;
+using OHV.Common.Events;
+using OHV.Common.Model;
+using OHV.Common.Shareds;
+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;
+<<<<<<< HEAD
+=======
+using System.Windows.Media;
+>>>>>>> eef332823de9e5e1c309ffa9e4d055ac4e281980
+using VehicleControlSystem;
+using VehicleControlSystem.ControlLayer.IO;
+using static OHV.Common.Events.AxisControlEventArgs;
+
+namespace OHV.Module.Interactivity.PopUp
+{
+    public class ConveyorControlViewModel : BindableBase, IDialogAware
+    {
+        private DelegateCommand<string> _closeDialogCommand;
+        public DelegateCommand<string> CloseDialogCommand =>
+            _closeDialogCommand ?? ( _closeDialogCommand = new DelegateCommand<string>( CloseDialog ) );
+
+        public event Action<IDialogResult> RequestClose;
+
+
+        private string _title = "ConveyorControlView";
+        public string Title
+        {
+            get { return this._title; }
+            set
+            {
+                this.SetProperty( ref this._title , value );
+            }
+        }
+
+        #region Brushes
+        private Brush _cvError = Brushes.Gray;
+        public Brush CvError { get { return _cvError; } set { SetProperty( ref _cvError , value ); } }
+
+        private Brush _cvStop = Brushes.Gray;
+        public Brush CvStop { get { return _cvStop; } set { SetProperty( ref _cvStop , value ); } }
+
+        private Brush _cvSlowStop = Brushes.Gray;
+        public Brush CvSlowStop { get { return _cvSlowStop; } set { SetProperty( ref _cvSlowStop , value ); } }
+
+        private Brush _cvEntryIn = Brushes.Gray;
+        public Brush CvEntryIn { get { return _cvEntryIn; } set { SetProperty( ref _cvEntryIn , value ); } }
+        private Brush _cvRun = Brushes.Gray;
+        public Brush CvRun { get { return _cvRun; } set { SetProperty( ref _cvRun , value ); } }
+
+        private Brush _cvCW = Brushes.Gray;
+        public Brush CvCW { get { return _cvCW; } set { SetProperty( ref _cvCW , value ); } }
+
+        private Brush _cvCCW = Brushes.Gray;
+        public Brush CvCCW { get { return _cvCCW; } set { SetProperty( ref _cvCCW , value ); } }
+
+        private Brush _axisLeftIsOrg = Brushes.Red;
+        private Brush _axisLeftAmpFault = Brushes.Gray;
+
+        private Brush _axisRightIsOrg = Brushes.Red;
+        private Brush _axisRightAmpFault = Brushes.Gray;
+
+        public Brush AxisLeftIsOrg
+        {
+            get { return _axisLeftIsOrg; }
+            set
+            {
+                SetProperty( ref _axisLeftIsOrg , value );
+            }
+        }
+        public Brush AxisLeftAmpFault
+        {
+            get { return _axisLeftAmpFault; }
+            set
+            {
+                SetProperty( ref _axisLeftAmpFault , value );
+            }
+        }
+        public Brush AxisRightIsOrg
+        {
+            get { return _axisRightIsOrg; }
+            set
+            {
+                SetProperty( ref _axisRightIsOrg , value );
+            }
+        }
+        public Brush AxisRightAmpFault
+        {
+            get { return _axisRightAmpFault; }
+            set
+            {
+                SetProperty( ref _axisRightAmpFault , value );
+            }
+        }
+
+        #endregion
+
+        public ICommand ConveyorRunCommand { get; set; }
+        public ICommand PosMoveCommand { get; set; }
+
+        IEventAggregator eventAggregator;
+        MessageController messageController;
+
+        List<BitBlock> allIOList = new List<BitBlock>();
+
+<<<<<<< HEAD
+        EzIO iO = null; 
+
+        public ConveyorControlViewModel( IEventAggregator _ea , MessageController _msg, VCSystem vcSystem)
+=======
+        VCSystem VCSystem;
+        EzIO IO = null;
+
+        public ConveyorControlViewModel( IEventAggregator _ea , MessageController _msg, VCSystem _vcSystem)
+>>>>>>> eef332823de9e5e1c309ffa9e4d055ac4e281980
+        {
+            this.iO = vcSystem.IO as EzIO;
+            this.iO.OnChangedIO += IO_OnChangedIO;
+            this.eventAggregator = _ea;
+
+            this.VCSystem = _vcSystem;
+            this.IO = VCSystem.IO as EzIO;
+            this.IO.OnChangedIO += IO_OnChangedIO;
+            this.GetSensorState(this.IO);
+
+            /*Lock&UnLock Publish Event*/
+            this.eventAggregator.GetEvent<AxisControlPubSubEvent>().Unsubscribe( AxisUICallbackCommunication );
+            this.eventAggregator.GetEvent<AxisControlPubSubEvent>().Subscribe( AxisUICallbackCommunication , ThreadOption.UIThread );
+
+            /*GUI Pubsub Event*/
+            this.eventAggregator.GetEvent<GUIMessagePubSubEvent>().Unsubscribe( UICallbackCommunication );
+            this.eventAggregator.GetEvent<GUIMessagePubSubEvent>().Subscribe( UICallbackCommunication, ThreadOption.UIThread );
+
+            this.messageController = _msg;
+
+            this.ConveyorRunCommand = new DelegateCommand<object>( ExecuteCvCommand );
+            this.PosMoveCommand = new DelegateCommand<object>( ExecutePosMoveCommand );
+        }
+
+<<<<<<< HEAD
+        private void IO_OnChangedIO( BitBlock bit )
+        {
+            throw new NotImplementedException();
+=======
+        private void GetSensorState( EzIO _iO )
+        {
+            //IO_OnChangedIO 중복됨 어쩌지
+            if ( _iO.IsOn( "IN_CV_ERROR" ) )
+                this.CvError = Brushes.LimeGreen;
+
+            if(_iO.IsOn( "IN_CV_DETECT_00" ) )
+                this.CvEntryIn = Brushes.LimeGreen;
+
+            if ( _iO.IsOn( "IN_CV_DETECT_01" ) )
+                this.CvSlowStop = Brushes.LimeGreen;
+
+            if ( _iO.IsOn( "IN_CV_DETECT_02" ) )
+                this.CvStop = Brushes.LimeGreen;
+
+            if ( _iO.IsOn( "OUT_CV_RUN" , false ) )
+                this.CvRun = Brushes.LimeGreen;
+
+            if(_iO.IsOn( "OUT_CV_CWCCW", false ) )
+            {
+                this.CvCW = Brushes.LimeGreen;
+                this.CvCCW = Brushes.Gray;
+            }
+            else
+            {
+                this.CvCW = Brushes.Gray;
+                this.CvCCW = Brushes.LimeGreen;
+            }
+        }
+
+        private void IO_OnChangedIO( BitBlock bit )
+        {
+            if ( bit.Tag.Equals( "IN_CV_ERROR" ) )
+                this.CvError = Brushes.LimeGreen;
+            else
+                this.CvError = Brushes.Gray;
+
+            if ( bit.Tag.Equals( "IN_CV_DETECT_00" ) )
+                this.CvEntryIn = Brushes.LimeGreen;
+            else
+                this.CvEntryIn = Brushes.Gray;
+
+            if ( bit.Tag.Equals( "IN_CV_DETECT_01" ) )
+                this.CvSlowStop = Brushes.LimeGreen;
+            else
+                this.CvSlowStop = Brushes.Gray;
+
+            if ( bit.Tag.Equals( "IN_CV_DETECT_02" ) )
+                this.CvStop = Brushes.LimeGreen;
+            else
+                this.CvStop = Brushes.Gray;
+
+            if ( bit.Tag.Equals( "OUT_CV_CWCCW" ) )
+            {
+                this.CvCW = Brushes.LimeGreen;
+                this.CvCCW = Brushes.Gray;
+            }
+            else
+            {
+                this.CvCW = Brushes.Gray;
+                this.CvCCW = Brushes.LimeGreen;
+            }
+        }
+
+        private void RspIOState( VCSMessageEventArgs args )
+        {
+            //var ioAll = args.Args as EzIO;
+>>>>>>> eef332823de9e5e1c309ffa9e4d055ac4e281980
+        }
+
+        private void UICallbackCommunication( GUIMessageEventArgs _args )
+        {
+            if( _args.Kind == GUIMessageEventArgs.eGUIMessageKind.ModelPropertyChange)
+            {
+                if( _args.MessageKey.Equals(MessageKey.Vehicle))
+                {
+                    switch(_args.ModelPropertyName)
+                    {
+                        case "ObstacleStateProperty":
+                            {
+                                var reply = CastTo<eObstacleState>.From<object>( _args.Args );
+                                this.ChangeObstacleState( reply );
+                            }
+                            break;
+                    }
+                }
+            }
+        }
+
+        private void ChangeObstacleState( eObstacleState _reply )
+        {
+            
+        }
+
+        private void ExecutePosMoveCommand( object obj )
+        {
+            this.messageController.ShowConfirmationPopupView( "Carrier Move To ?" , r =>
+            {
+                if ( r.Result == ButtonResult.OK )
+                {
+                    var selectedPos = obj.ToString();
+
+                    var msg = new AxisControlEventArgs
+                    {
+                        Dir = AxisControlEventArgs.eEventDir.ToBack ,
+                        Kind = AxisControlEventArgs.eAxisControlKind.SyncMove ,
+                    };
+
+                    switch ( selectedPos )
+                    {
+                        case "Lock":
+                            msg.PosDir = AxisControlEventArgs.ePosDir.Lock;
+                            break;
+                        case "UnLock":
+                            msg.PosDir = AxisControlEventArgs.ePosDir.UnLock;
+                            break;
+                    }
+
+                    this.AxisPublishEvent( msg );
+                }
+            } );
+        }
+
+        private void AxisPublishEvent( AxisControlEventArgs msg )
+        {
+            this.eventAggregator.GetEvent<AxisControlPubSubEvent>().Publish( msg );
+        }
+
+        private void AxisUICallbackCommunication( AxisControlEventArgs _args )
+        {
+            if ( _args.Dir == AxisControlEventArgs.eEventDir.ToFront )
+            {
+                switch ( _args.Kind )
+                {
+                    case AxisControlEventArgs.eAxisControlKind.NONE:
+                        break;
+                    case AxisControlEventArgs.eAxisControlKind.OriginReturn:
+                        break;
+                    case AxisControlEventArgs.eAxisControlKind.Stop:
+                        break;
+                    case AxisControlEventArgs.eAxisControlKind.EStop:
+                        break;
+                    case AxisControlEventArgs.eAxisControlKind.Move:
+                        ResponseMove( _args );
+                        break;
+                    case AxisControlEventArgs.eAxisControlKind.Jog:
+                        break;
+                    case AxisControlEventArgs.eAxisControlKind.ServoOn:
+                        break;
+                    case AxisControlEventArgs.eAxisControlKind.ServoOff:
+                        break;
+                    case AxisControlEventArgs.eAxisControlKind.ReqCurrentPosition:
+                        break;
+                    case AxisControlEventArgs.eAxisControlKind.ReqStopCurrentPosition:
+                        break;
+                    case AxisControlEventArgs.eAxisControlKind.FaultReset:
+                        break;
+                    case AxisControlEventArgs.eAxisControlKind.AxisState:
+                        AxisState( _args );
+                        break;
+                    case eAxisControlKind.SyncMove:
+                        if ( _args.Result.IsSuccess )
+                            this.messageController.ShowNotificationView( "Success" );
+                        else
+                            this.messageController.ShowNotificationView( "Fail" );
+                        break;
+                }
+            }
+        }
+
+        private void ResponseMove( AxisControlEventArgs _args )
+        {
+            var msg = string.Empty;
+
+            if ( _args.Result.IsSuccess )
+                msg = ( "Move Success" );
+            else
+            {
+                var error = _args.Result.Errors.FirstOrDefault();
+                var alarm = error.Metadata[ "Alarm" ] as Alarm;
+                msg = alarm.Name + " " + alarm.Text;
+            }
+
+            this.messageController.ShowNotificationView( msg );
+        }
+
+        private void AxisState( AxisControlEventArgs args )
+        {
+            var left = args.Args[ "Left" ] as AxisState;
+            var right = args.Args[ "Right" ] as AxisState;
+
+            if ( left.IsOriginReturn )
+                this.AxisLeftIsOrg = Brushes.LimeGreen;
+            else
+                this.AxisLeftIsOrg = Brushes.Red;
+
+            if ( left.IsAmpFault )
+                this.AxisLeftAmpFault = Brushes.Red;
+            else
+                this.AxisLeftAmpFault = Brushes.Gray;
+
+            if ( right.IsOriginReturn )
+                this.AxisRightIsOrg = Brushes.LimeGreen;
+            else
+                this.AxisRightIsOrg = Brushes.Red;
+
+            if ( right.IsAmpFault )
+                this.AxisRightAmpFault = Brushes.Red;
+            else
+                this.AxisRightAmpFault = Brushes.Gray;
+        }
+
+        private void ExecuteCvCommand( object _obj )
+        {
+            var type = _obj.ToString();
+            DriveControlEventArgs.eCvDir dir = DriveControlEventArgs.eCvDir.NONE;
+
+            switch ( type )
+            {
+                case "CW":
+                    dir = DriveControlEventArgs.eCvDir.CW;
+                    break;
+                case "CCW":
+                    dir = DriveControlEventArgs.eCvDir.CCW;
+                    break;
+                case "STOP":
+                    dir = DriveControlEventArgs.eCvDir.STOP;
+                    break;
+            }
+
+            var msg = new DriveControlEventArgs
+            {
+                EventDir = DriveControlEventArgs.eEventDir.ToBack ,
+                ControlKind = DriveControlEventArgs.eControlKind.Conveyor ,
+                CvDir = dir
+            };
+            this.PublishEvent( msg );
+        }
+
+        private void PublishEvent( DriveControlEventArgs _args )
+        {
+            this.eventAggregator.GetEvent<DriveControlPubSubEvent>().Publish( _args );
+        }
+
+        private void IOPublish( VCSMessageEventArgs _args )
+        {
+            this.eventAggregator.GetEvent<VCSMessagePubSubEvent>().Publish( _args );
+        }
+
+        #region Dialog
+        public bool CanCloseDialog( )
+        {
+            return true;
+        }
+
+        public void OnDialogClosed( )
+        {
+            this.eventAggregator.GetEvent<AxisControlPubSubEvent>().Publish( new AxisControlEventArgs 
+            { 
+                Dir = AxisControlEventArgs.eEventDir.ToBack, 
+                Kind = AxisControlEventArgs.eAxisControlKind.NONE 
+            } );
+            this.eventAggregator.GetEvent<AxisControlPubSubEvent>().Unsubscribe( AxisUICallbackCommunication );
+
+            this.eventAggregator.GetEvent<DriveControlPubSubEvent>().Publish( new DriveControlEventArgs { EventDir = DriveControlEventArgs.eEventDir.ToBack , ControlKind = DriveControlEventArgs.eControlKind.ReqStopCurrentPos } );
+            //this.eventAggregator.GetEvent<DriveControlPubSubEvent>().Unsubscribe( DriveControlCallBack );
+
+            this.eventAggregator.GetEvent<GUIMessagePubSubEvent>().Unsubscribe( UICallbackCommunication );
+        }
+
+        public void OnDialogOpened( IDialogParameters parameters )
+        {
+            /*IO*/
+            var msg = new VCSMessageEventArgs() { Kind = VCSMessageEventArgs.eVCSMessageKind.ReqIOObject };
+            this.eventAggregator.GetEvent<VCSMessagePubSubEvent>().Publish( msg );
+
+            /*Lock Axis*/
+            //var axisMsg = new AxisControlEventArgs
+            //{
+            //    Dir = AxisControlEventArgs.eEventDir.ToBack ,
+            //    Kind = AxisControlEventArgs.eAxisControlKind.NONE
+            //};
+            //this.AxisPublishEvent(axisMsg);
+
+            this.eventAggregator.GetEvent<AxisControlPubSubEvent>().Publish( new AxisControlEventArgs { Dir = AxisControlEventArgs.eEventDir.ToBack , Kind = AxisControlEventArgs.eAxisControlKind.ReqCurrentPosition } );
+        }
+
+
+        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
+    }
+}

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

@@ -278,10 +278,10 @@
         <!--Sub Drive Menu-->
         <Grid Grid.Column="1" Background="#263238">
             <StackPanel Orientation="Vertical" VerticalAlignment="Top">
-                <Button Margin="7, 10" HorizontalAlignment="Stretch" Height="60" BorderBrush="Gray" BorderThickness="2" 
+                <!--<Button Margin="7, 10" HorizontalAlignment="Stretch" Height="60" BorderBrush="Gray" BorderThickness="2" 
                         Command="{Binding PositionAddCommand}">
                     <StackPanel>
-                        <!--<materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
+                        --><!--<materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>--><!--
                         <TextBlock Text="Add" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
                     </StackPanel>
                 </Button>
@@ -289,23 +289,23 @@
                 <Button Margin="7, 10" HorizontalAlignment="Stretch" Height="60" BorderBrush="Gray" BorderThickness="2" 
                         Command="{Binding PositionDeleteCommand}">
                     <StackPanel>
-                        <!--<materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
+                        --><!--<materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>--><!--
                         <TextBlock Text="Delete" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
                     </StackPanel>
-                </Button>
+                </Button>-->
 
             </StackPanel>
 
             <StackPanel Grid.Column="1" VerticalAlignment="Center" Orientation="Vertical"
                         Margin="0,130,0,0">
-                <Button Margin="7" HorizontalAlignment="Stretch" Height="60" BorderBrush="Gray" BorderThickness="2" 
+                <!--<Button Margin="7" HorizontalAlignment="Stretch" Height="60" BorderBrush="Gray" BorderThickness="2" 
                         Command="{Binding CurrentToTargetCommand}">
                     <StackPanel>
-                        <!--<materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
+                        --><!--<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>
+                </Button>-->
 
                 <Button Margin="7" HorizontalAlignment="Stretch" Height="60" BorderBrush="Gray" BorderThickness="2" 
                         Command="{Binding MoveToCommand}">

+ 48 - 25
Dev/OHV/OHV.Module.Interactivity/PopUp/DriveServoViewModel.cs

@@ -129,7 +129,7 @@ namespace OHV.Module.Interactivity.PopUp
         SqliteManager sql;
         MessageController messageController;
 
-        public DriveServoViewModel(IEventAggregator _ea, SqliteManager _sql, MessageController _messageController)
+        public DriveServoViewModel( IEventAggregator _ea , SqliteManager _sql , MessageController _messageController )
         {
             this.eventAggregator = _ea;
             this.eventAggregator.GetEvent<DriveControlPubSubEvent>().Unsubscribe( DriveControlCallBack );
@@ -140,32 +140,32 @@ namespace OHV.Module.Interactivity.PopUp
             this.eventAggregator.GetEvent<GUIMessagePubSubEvent>().Subscribe( UICallBackCommunication , ThreadOption.UIThread );
 
             this.sql = _sql;
-            this.RouteList = new ObservableCollection<Route>(sql.RouteDal.All);
+            this.RouteList = new ObservableCollection<Route>( sql.RouteDal.All );
 
             this.messageController = _messageController;
 
-            this.SelectPosCommand = new DelegateCommand<object>(ExecuteSelectPosCommand);
-            this.MoveToCommand = new DelegateCommand(ExecuteMoveToCommand);
-            this.CurrentToTargetCommand = new DelegateCommand(ExecuteCurrentToTargetCommand);
-            this.KeyInTargetPosCommand = new DelegateCommand<object>(ExecuteKeyInCommadn);
+            this.SelectPosCommand = new DelegateCommand<object>( ExecuteSelectPosCommand );
+            this.MoveToCommand = new DelegateCommand( ExecuteMoveToCommand );
+            this.CurrentToTargetCommand = new DelegateCommand( ExecuteCurrentToTargetCommand );
+            this.KeyInTargetPosCommand = new DelegateCommand<object>( ExecuteKeyInCommadn );
 
-            this.ServoOnCommand = new DelegateCommand(ExecuteServoOnCommand);
-            this.ServoOffCommand = new DelegateCommand(ExecuteServoOffCommand);
-            this.FaultResetCommand = new DelegateCommand(ExecuteFaultResetCommand);
-            this.OriginCommand = new DelegateCommand(ExecuteOriginCommand);
+            this.ServoOnCommand = new DelegateCommand( ExecuteServoOnCommand );
+            this.ServoOffCommand = new DelegateCommand( ExecuteServoOffCommand );
+            this.FaultResetCommand = new DelegateCommand( ExecuteFaultResetCommand );
+            this.OriginCommand = new DelegateCommand( ExecuteOriginCommand );
 
-            this.PositionAddCommand = new DelegateCommand(ExecutePositionAddCommand);
-            this.PositionDeleteCommand = new DelegateCommand(ExecutePositionDeleteCommand);
-            this.PositionSaveCommand = new DelegateCommand(ExecutePositionSaveCommand);
+            this.PositionAddCommand = new DelegateCommand( ExecutePositionAddCommand );
+            this.PositionDeleteCommand = new DelegateCommand( ExecutePositionDeleteCommand );
+            this.PositionSaveCommand = new DelegateCommand( ExecutePositionSaveCommand );
 
-            this.SelectedDirection = new DelegateCommand<object>(ExecuteSelectedDirection);
-            this.SteeringCWCommand = new DelegateCommand<object>(ExecuteSteeringCWCommand);
-            this.SteeringCCWCommand = new DelegateCommand<object>(ExecuteSteeringCCWCommand);
+            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);
+            this.JogVelPopupCommand = new DelegateCommand( ExecuteJogVelPopupCommand );
+            this.JogCommand = new DelegateCommand<object>( ExecuteJogCommand );
         }
-
+        
         private void UICallBackCommunication( GUIMessageEventArgs obj )
         {
             //Property 상태가 바뀔때 마다 표현만 하면 된다?
@@ -220,8 +220,6 @@ namespace OHV.Module.Interactivity.PopUp
 
         private void ChagneVehicleState( eVehicleState v )
         {
-            //TODO:[20/03/20 ys-hwang] Vehicle Manual Move 할때? 상태를 보고 해야?, 아니면 Manual 이니까???? 
-            // 아니면 busy 상태 확인만 ?
             switch ( v )
             {
                 case eVehicleState.None:
@@ -253,6 +251,8 @@ namespace OHV.Module.Interactivity.PopUp
             {
                 switch ( args.ControlKind )
                 {
+                    case DriveControlEventArgs.eControlKind.NONE:
+                        break;
                     case DriveControlEventArgs.eControlKind.MOVE:
                         ResponseMove(args);
                         break;
@@ -296,7 +296,8 @@ namespace OHV.Module.Interactivity.PopUp
 
         private void ResponseVehicleState(DriveControlEventArgs args)
         {
-            var state = CastTo<VehicleInfo>.From<object>(args.Args);
+            var state = CastTo<VehicleInfo>.From<object>( args.Args );
+
             this.CurrentDrive = state.CurrentPosition;
         }
 
@@ -344,6 +345,12 @@ namespace OHV.Module.Interactivity.PopUp
         #region Execute Method
         private void ExecuteJogCommand(object obj)
         {
+            if ( this.JogVelocity <= 0 )
+            {
+                this.messageController.ShowNotificationView( "Check Jog Velocity" );
+                return;
+            }
+
             var msg = new DriveControlEventArgs
             {
                 EventDir = DriveControlEventArgs.eEventDir.ToBack,
@@ -410,7 +417,16 @@ namespace OHV.Module.Interactivity.PopUp
               if (r.Result == ButtonResult.OK)
               {
                     //TODO:[20/03/18 ys-hwang] DB Table Update
-              }
+                    // check selected table
+                    var result = this.RouteList.Any( x => x.IsSelected != false );
+                    if ( !result )
+                    {
+                        this.messageController.ShowNotificationView( "Pos Not Selected" );
+                        return;
+                    }
+
+                    var ll = this.RouteList.Where( x => x.IsSelected ).FirstOrDefault();                    
+                }
             });
         }
 
@@ -458,7 +474,6 @@ namespace OHV.Module.Interactivity.PopUp
             {
                 if ( r.Result == ButtonResult.OK )
                 {
-                    //TODO: How to use
                 }
             } );
         }
@@ -513,6 +528,14 @@ namespace OHV.Module.Interactivity.PopUp
             {
                 if ( r.Result == ButtonResult.OK )
                 {
+                    //TODO:[20/03/20 ys-hwang] RoutList.IsSelected Check
+                    var result = this.RouteList.Any( x => x.IsSelected != false );
+                    if ( !result )
+                    {
+                        this.messageController.ShowNotificationView( "Pos Not Selected" );
+                        return;
+                    }
+
                     var ll = this.RouteList.Where(x => x.IsSelected).FirstOrDefault();
 
                     var msg = new DriveControlEventArgs
@@ -555,7 +578,7 @@ namespace OHV.Module.Interactivity.PopUp
             };
             this.PublishEvent(msg);
 
-            //this.eventAggregator.GetEvent<DriveControlPubSubEvent>().Publish( new DriveControlEventArgs { EventDir = DriveControlEventArgs.eEventDir.ToBack , ControlKind = DriveControlEventArgs.eControlKind.VehicleState } );
+            this.eventAggregator.GetEvent<DriveControlPubSubEvent>().Publish( new DriveControlEventArgs { EventDir = DriveControlEventArgs.eEventDir.ToBack , ControlKind = DriveControlEventArgs.eControlKind.VehicleState } );
         }
 
         private void CloseDialog(string parameter)

+ 3 - 3
Dev/OHV/OHV.Module.Interactivity/PopUp/InOutViewModel.cs

@@ -52,13 +52,13 @@ namespace OHV.Module.Interactivity.PopUp
 
         public void OnDialogClosed( )
         {
-            this.eventAggregator.GetEvent<AxisControlPubSubEvent>().Publish( new AxisControlEventArgs { Dir = AxisControlEventArgs.eEventDir.ToBack , Kind = AxisControlEventArgs.eAxisControlKind.ReqStopCurrentPosition } );
-            this.eventAggregator.GetEvent<AxisControlPubSubEvent>().Unsubscribe( UICallbackCommunication );
+            //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 } );
+            //this.eventAggregator.GetEvent<AxisControlPubSubEvent>().Publish( new AxisControlEventArgs { Dir = AxisControlEventArgs.eEventDir.ToBack , Kind = AxisControlEventArgs.eAxisControlKind.ReqCurrentPosition } );
         }
 
         public virtual void RaiseRequestClose( IDialogResult dialogResult )

+ 7 - 6
Dev/OHV/OHV.Module.Interactivity/PopUp/LockServoView.xaml

@@ -331,9 +331,9 @@
                             Grid.Column="1"
                             HorizontalAlignment="Stretch"
                             Height="auto"
-                            Command="{Binding JogCommand}" CommandParameter="-">
+                            Command="{Binding JogCommand}" CommandParameter="-" Width="90">
                                 <StackPanel>
-                                    <materialDesign:PackIcon Kind="ArrowLeftBoldCircleOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="30" Width="auto"/>
+                                    <materialDesign:PackIcon Kind="MinusBoxOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="30" Width="auto"/>
                                     <TextBlock><Run Text="Jog(-)"/></TextBlock>
                                 </StackPanel>
                             </RepeatButton>
@@ -347,9 +347,10 @@
                             BadgeForeground="Aqua"
                             VerticalAlignment="Center"
                             HorizontalAlignment="Center">
-                                <Button Margin="15" VerticalAlignment="Center" HorizontalAlignment="Center" Height="60" Width="Auto" >
+                                <Button Margin="15" VerticalAlignment="Center" HorizontalAlignment="Center" Height="80" Width="70"
+                                        Command="{Binding JogVelPopupCommand}">
                                     <StackPanel>
-                                        <TextBlock Text="0.000"/>
+                                        <TextBlock Text="{Binding JogVelocity, StringFormat={}{0:0.000}, FallbackValue=0.00}" Foreground="Orange" FontSize="20"/>
                                     </StackPanel>
                                 </Button>
                             </materialDesign:Badged>
@@ -360,9 +361,9 @@
                             Grid.Column="3"
                             HorizontalAlignment="Stretch"
                             Height="auto"
-                            Command="{Binding JogCommand}" CommandParameter="+">
+                            Command="{Binding JogCommand}" CommandParameter="+" Width="90">
                                 <StackPanel>
-                                    <materialDesign:PackIcon Kind="ArrowRightBoldCircleOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="30" Width="auto"/>
+                                    <materialDesign:PackIcon Kind="PlusBoxOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="30" Width="auto"/>
                                     <TextBlock><Run Text="Jog(+)"/></TextBlock>
                                 </StackPanel>
                             </RepeatButton>

+ 23 - 1
Dev/OHV/OHV.Module.Interactivity/PopUp/LockServoViewModel.cs

@@ -49,6 +49,13 @@ namespace OHV.Module.Interactivity.PopUp
             }
         }
 
+        double _jogVelocity;
+        public double JogVelocity
+        {
+            get { return this._jogVelocity; }
+            set { this.SetProperty( ref this._jogVelocity , value ); }
+        }
+
         #region Binding Lock Left
         private double _targetPosLockLeft;
         public double TargetPosLockLeft
@@ -184,6 +191,7 @@ namespace OHV.Module.Interactivity.PopUp
         public ICommand OriginCommand { get; set; }
         public ICommand JogCommand { get; set; }
         public ICommand SelectedPosDataSave { get; set; }
+        public ICommand JogVelPopupCommand { get; set; }
 
         public event Action<IDialogResult> RequestClose;
 
@@ -206,6 +214,7 @@ namespace OHV.Module.Interactivity.PopUp
 
             this.SelectedPosDataSave = new DelegateCommand<object>( ExecuteSelectedPosDataSave );
             this.JogCommand = new DelegateCommand<object>( ExecuteJogCommand );
+            this.JogVelPopupCommand = new DelegateCommand( ExecuteJogVelPopup );
 
             this.eventAggregator = ea;
             this.eventAggregator.GetEvent<AxisControlPubSubEvent>().Unsubscribe( AxisUICallbackCommunication );
@@ -227,6 +236,14 @@ namespace OHV.Module.Interactivity.PopUp
             this.PosLockBrush = Brushes.Orange;
         }
 
+        private void ExecuteJogVelPopup( )
+        {
+            var numPad = new CalcuratorView();
+            var result = numPad.ShowDialog( this.JogVelocity );
+
+            this.JogVelocity = result;
+        }
+
         private void UICallbackCommunication( GUIMessageEventArgs obj )
         {
             if ( obj.Kind == GUIMessageEventArgs.eGUIMessageKind.ModelPropertyChange )
@@ -285,6 +302,12 @@ namespace OHV.Module.Interactivity.PopUp
 
         private void ExecuteJogCommand( object obj )
         {
+            if ( this.JogVelocity <= 0 )
+            {
+                this.messageController.ShowNotificationView( "Check Jog Velocity" );
+                return;
+            }
+
             var msg = new AxisControlEventArgs
             {
                 Dir = AxisControlEventArgs.eEventDir.ToBack ,
@@ -328,7 +351,6 @@ namespace OHV.Module.Interactivity.PopUp
                     case AxisControlEventArgs.eAxisControlKind.NONE:
                         break;
                     case AxisControlEventArgs.eAxisControlKind.OriginReturn:
-                        //TODO:[20/03/20 sy-hwang] Origin 시작 시 UI Lock 여부 ?
                         break;
                     case AxisControlEventArgs.eAxisControlKind.ReqCurrentPosition:
                         break;

+ 79 - 168
Dev/OHV/OHV.Module.Interactivity/PopUp/OpticalReadingConfigView.xaml

@@ -39,146 +39,14 @@
 
         <Grid Grid.Column="0" Margin="15" Background="#37474f">
             <Grid.ColumnDefinitions>
-                <ColumnDefinition Width="*"/>
-                <ColumnDefinition Width="*"/>
-                <ColumnDefinition Width="*"/>
+                <ColumnDefinition/>
+                <ColumnDefinition Width="2*"/>
             </Grid.ColumnDefinitions>
 
-            <!--<Border Grid.Column="0" Margin="23,22,23,17" BorderBrush="#FF00FFD3" BorderThickness="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>-->
-
-            <!--InPut-->
-            <!--<StackPanel Orientation="Vertical"
-                        VerticalAlignment="Center"
-                        HorizontalAlignment="Center"
-                        Grid.Column="0">
-
-                <materialDesign:Badged
-                    Badge="Detect Pattern"
-                    BadgeColorZoneMode="Dark"
-                    BadgePlacementMode="Top">
-                    <Button IsEnabled="False" Background="{x:Null}">
-                        <StackPanel>
-                            <TextBlock><Run Text="Pattern List"/></TextBlock>
-                        </StackPanel>
-                    </Button>
-                </materialDesign:Badged>
-
-                <ToggleButton Margin="15"
-                         Style="{StaticResource MaterialDesignActionToggleButton}"
-                         ToolTip="MaterialDesignActionLightToggleButton"
-                         Width="60"
-                         Height="60"
-                         Command="{Binding ResultPattern}"
-                         CommandParameter="1"
-                         IsChecked="{Binding ResultPatternOne}">
-                    <ToggleButton.Content>
-                        <materialDesign:PackIcon Height="30" Width="30" Kind="CloseBoxOutline"/>
-                    </ToggleButton.Content>
-                    <materialDesign:ToggleButtonAssist.OnContent>
-                        <materialDesign:PackIcon Height="30" Width="30" Kind="LedOn"/>
-                    </materialDesign:ToggleButtonAssist.OnContent>
-                </ToggleButton>
-
-                <TextBlock Text="Set Out#1" Margin="0,-15,0,0"
-                           VerticalAlignment="Center"
-                           HorizontalAlignment="Center"
-                           Foreground="Orange"/>
-
-                <ToggleButton Margin="15"
-                         Style="{StaticResource MaterialDesignActionToggleButton}"
-                         ToolTip="MaterialDesignActionLightToggleButton"
-                         Width="60"
-                         Height="60"
-                         Command="{Binding ResultPattern}"
-                         CommandParameter="2"
-                         IsChecked="{Binding ResultPatternTwo}">
-                    <ToggleButton.Content>
-                        <materialDesign:PackIcon Height="30" Width="30"
-                        Kind="CloseBoxOutline" />
-
-                    </ToggleButton.Content>
-                    <materialDesign:ToggleButtonAssist.OnContent>
-                        <materialDesign:PackIcon Height="30" Width="30"
-                        Kind="LedOn" />
-                    </materialDesign:ToggleButtonAssist.OnContent>
-                </ToggleButton>
-                <TextBlock Text="Set Out#2" Margin="0,-15,0,0"
-                           VerticalAlignment="Center"
-                           HorizontalAlignment="Center"
-                           Foreground="Orange"/>
-
-                <ToggleButton Margin="15"
-                         Style="{StaticResource MaterialDesignActionToggleButton}"
-                         ToolTip="MaterialDesignActionLightToggleButton"
-                         Width="60"
-                         Height="60"
-                         Command="{Binding ResultPattern}"
-                         CommandParameter="3"
-                         IsChecked="{Binding ResultPatternThree}">
-                    <ToggleButton.Content>
-                        <materialDesign:PackIcon Height="30" Width="30"
-                        Kind="CloseBoxOutline" />
-                    </ToggleButton.Content>
-                    <materialDesign:ToggleButtonAssist.OnContent>
-                        <materialDesign:PackIcon Height="30" Width="30"
-                        Kind="LedOn" />
-                    </materialDesign:ToggleButtonAssist.OnContent>
-                </ToggleButton>
-                <TextBlock Text="Set Out#3" Margin="0,-15,0,0"
-                           VerticalAlignment="Center"
-                           HorizontalAlignment="Center"
-                           Foreground="Orange"/>
-
-                <ToggleButton Margin="15"
-                         Style="{StaticResource MaterialDesignActionToggleButton}"
-                         ToolTip="MaterialDesignActionLightToggleButton"
-                         Width="60"
-                         Height="60"
-                         Command="{Binding ResultPattern}"
-                         CommandParameter="4"
-                         IsChecked="{Binding ResultPatternFour}">
-                    <ToggleButton.Content>
-                        <materialDesign:PackIcon Height="30" Width="30"
-                        Kind="CloseBoxOutline" />
-                    </ToggleButton.Content>
-                    <materialDesign:ToggleButtonAssist.OnContent>
-                        <materialDesign:PackIcon Height="30" Width="30"
-                        Kind="LedOn" />
-                    </materialDesign:ToggleButtonAssist.OnContent>
-                </ToggleButton>
-                <TextBlock Text="Set Out#4" Margin="0,-15,0,0"
-                           VerticalAlignment="Center"
-                           HorizontalAlignment="Center"
-                           Foreground="Orange"/>
-
-                <ToggleButton Margin="15"
-                         Style="{StaticResource MaterialDesignActionToggleButton}"
-                         ToolTip="MaterialDesignActionLightToggleButton"
-                         Width="60"
-                         Height="60"
-                         Command="{Binding ResultPattern}"
-                         CommandParameter="5"
-                         IsChecked="{Binding ResultPatternFive}">
-                    <ToggleButton.Content>
-                        <materialDesign:PackIcon Height="30" Width="30"
-                        Kind="CloseBoxOutline" />
-                    </ToggleButton.Content>
-                    <materialDesign:ToggleButtonAssist.OnContent>
-                        <materialDesign:PackIcon Height="30" Width="30"
-                        Kind="LedOn" />
-                    </materialDesign:ToggleButtonAssist.OnContent>
-                </ToggleButton>
-                <TextBlock Text="Set Out#5" Margin="0,-15,0,0"
-                           VerticalAlignment="Center"
-                           HorizontalAlignment="Center"
-                           Foreground="Orange"/>
-            </StackPanel>-->
-
-            <!--OutPut-->
             <Border Grid.Column="0" Margin="39,10" BorderBrush="#FF00FFD3" BorderThickness="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
             <StackPanel VerticalAlignment="Center"
                         HorizontalAlignment="Center"
-                        Grid.Column="0">
+                        Grid.Column="0" Margin="85,15">
                 <materialDesign:Badged Margin="5"
                                        Badge="Detect Area#1"
                                        BadgeColorZoneMode="Dark">
@@ -218,53 +86,96 @@
                 </materialDesign:Badged>
             </StackPanel>
 
-            <StackPanel Grid.Column="1"
-                        VerticalAlignment="Center"
-                        HorizontalAlignment="Right"
-                        Margin="15">
-                <Button Height="60">
-                    <StackPanel>
-                        <TextBlock><Run Text="Drive Pattern" FontSize="20"/></TextBlock>
-                    </StackPanel>
-                </Button>
-
-                <Button Background="{x:Null}" Height="60"
-                        Command="{Binding PatternResultKyein}"
-                        CommandParameter="D">
-                    <StackPanel>
-                        <TextBlock><Run Text="{Binding DrivePatternResult, FallbackValue=0}" FontSize="25" Foreground="Orange"/></TextBlock>
+            <Grid Grid.Column="0">
+                
+            </Grid>
+
+            <Grid Grid.Column="1">
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="*"/>
+                    <RowDefinition Height="*"/>
+                </Grid.RowDefinitions>
+
+                <Grid Grid.Row="0">
+                    <Border BorderBrush="Gray" BorderThickness="1"/>
+                    <StackPanel VerticalAlignment="Center"
+                                HorizontalAlignment="Center">
+                        <Button Height="60">
+                            <StackPanel>
+                                <TextBlock><Run Text="Obsatcle State" FontSize="20"/></TextBlock>
+                            </StackPanel>
+                        </Button>
+
+                        <Button Background="{x:Null}" Height="60">
+                            <StackPanel>
+                                <TextBlock><Run Text="{Binding ObstacleState, FallbackValue=NONE}" FontSize="25" Foreground="Orange"/></TextBlock>
+                            </StackPanel>
+                        </Button>
                     </StackPanel>
-                </Button>
-            </StackPanel>
+                </Grid>
+                
+                
+                <Grid Grid.Row="1">
+                    <Border BorderBrush="Gray" BorderThickness="1"/>
+                    <StackPanel Orientation="Horizontal"
+                                VerticalAlignment="Center"
+                                HorizontalAlignment="Center">
+                        <StackPanel Margin="5"
+                                    VerticalAlignment="Center"
+                                    HorizontalAlignment="Center">
+
+                            <Button Height="60">
+                                <StackPanel>
+                                    <TextBlock><Run Text="Drive Pattern" FontSize="20"/></TextBlock>
+                                </StackPanel>
+                            </Button>
+
+                            <Button Background="{x:Null}" Height="60"
+                                    Command="{Binding PatternResultKyein}"
+                                    CommandParameter="D">
+                                <StackPanel>
+                                    <TextBlock><Run Text="{Binding ObstacleDrive, FallbackValue=0}" FontSize="25" Foreground="Orange"/></TextBlock>
+                                </StackPanel>
+                            </Button>
+                        </StackPanel>
 
-            <StackPanel Grid.Column="2"
+                        <StackPanel Margin="5"
                         VerticalAlignment="Center"
-                        HorizontalAlignment="Left"
-                        Margin="15">
-                <Button Height="60">
-                    <StackPanel>
-                        <TextBlock><Run Text="Curve Pattern" FontSize="20"/></TextBlock>
-                    </StackPanel>
-                </Button>
+                        HorizontalAlignment="Center">
 
-                <Button Background="{x:Null}" Height="60"
+                            <Button Height="60">
+                                <StackPanel>
+                                    <TextBlock><Run Text="Curve Pattern" FontSize="20"/></TextBlock>
+                                </StackPanel>
+                            </Button>
+
+                            <Button Background="{x:Null}" Height="60"
                         Command="{Binding PatternResultKyein}"
                         CommandParameter="C">
-                    <!--<Button.InputBindings>
+                                <!--<Button.InputBindings>
                         <MouseBinding Gesture="LeftClick" Command="{Binding KeyInTargetPosCommand}" CommandParameter="Left"/>
                     </Button.InputBindings>-->
-                    
-                    <StackPanel>
-                        <TextBlock><Run Text="{Binding CurvePatternResult, FallbackValue=0}" FontSize="25" Foreground="Orange"/></TextBlock>
+
+                                <StackPanel>
+                                    <TextBlock><Run Text="{Binding ObstacleCurve, FallbackValue=0}" FontSize="25" Foreground="Orange"/></TextBlock>
+                                </StackPanel>
+                            </Button>
+                        </StackPanel>
                     </StackPanel>
-                </Button>
-            </StackPanel>
+                    
+                </Grid>
+
+            </Grid>
+
+           
+
+           
         </Grid>
 
         <!--Right Sub Menu Grid-->
         <Grid Grid.Column="1" Background="#37474f">
             <StackPanel>
-                
+
             </StackPanel>
         </Grid>
 

+ 120 - 100
Dev/OHV/OHV.Module.Interactivity/PopUp/OpticalReadingConfigViewModel.cs

@@ -1,4 +1,6 @@
-using OHV.Common.Events;
+using GSG.NET.Extensions;
+using OHV.Common.Events;
+using OHV.Common.Shareds;
 using Prism.Commands;
 using Prism.Events;
 using Prism.Mvvm;
@@ -11,6 +13,7 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Input;
+using VehicleControlSystem;
 
 namespace OHV.Module.Interactivity.PopUp
 {
@@ -20,89 +23,6 @@ namespace OHV.Module.Interactivity.PopUp
         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 int _curvePatternResult;
-        public int CurvePatternResult
-        {
-            get { return this._curvePatternResult; }
-            set { this.SetProperty( ref this._curvePatternResult , value ); }
-        }
-
-        private int _drivePatternResult;
-        public int DrivePatternResult
-        {
-            get { return this._drivePatternResult; }
-            set { this.SetProperty( ref this._drivePatternResult , value ); }
-        }
-
-        private bool _resultPatternOne;
-        public bool ResultPatternOne
-        {
-            get { return this._resultPatternOne; }
-            set 
-            { 
-                this.SetProperty( ref this._resultPatternOne , value );
-            }
-        }
-
-        private bool _resultPatternTwo;
-        public bool ResultPatternTwo
-        {
-            get { return this._resultPatternTwo; }
-            set
-            {
-                this.SetProperty( ref this._resultPatternTwo , value );
-            }
-        }
-
-        private bool _resultPatternThree;
-        public bool ResultPatternThree
-        {
-            get { return this._resultPatternThree; }
-            set
-            {
-                this.SetProperty( ref this._resultPatternThree , value );
-            }
-        }
-
-        private bool _resultPatternFour;
-        public bool ResultPatternFour
-        {
-            get { return this._resultPatternFour; }
-            set
-            {
-                this.SetProperty( ref this._resultPatternFour , value );
-            }
-        }
-
-        private bool _resultPatternFive;
-        public bool ResultPatternFive
-        {
-            get { return this._resultPatternFive; }
-            set
-            {
-                this.SetProperty( ref this._resultPatternFive , value );
-            }
-        }
 
         private string _title = "SteeringConfigView";
         public string Title
@@ -127,6 +47,13 @@ namespace OHV.Module.Interactivity.PopUp
             set { this.SetProperty( ref this._obstacleCurve , value ); }
         }
 
+        string _obstacleState;
+        public string ObstacleState
+        {
+            get { return this._obstacleState; }
+            set { this.SetProperty( ref this._obstacleState , value ); }
+        }
+
         public ICommand DetectPatternSave { get; set; }
         public ICommand ResultPattern { get; set; }
         public ICommand PatternResultKyein { get; set; }
@@ -143,33 +70,114 @@ namespace OHV.Module.Interactivity.PopUp
             this.eventAggregator.GetEvent<GUIMessagePubSubEvent>().Unsubscribe( UICallbackCommunication );
             this.eventAggregator.GetEvent<GUIMessagePubSubEvent>().Subscribe( UICallbackCommunication, ThreadOption.UIThread );
 
+            this.eventAggregator.GetEvent<ObstacleControlPubSubEvent>().Unsubscribe( ObstacleCallBackCommunication );
+            this.eventAggregator.GetEvent<ObstacleControlPubSubEvent>().Subscribe( ObstacleCallBackCommunication , ThreadOption.UIThread );
+
             this.messageController = _msg;
 
             this.DetectPatternSave = new DelegateCommand( ExecuteDetectPatternSave );
-            this.ResultPattern = new DelegateCommand<object>( ExecuteResultPattern );
+            //this.ResultPattern = new DelegateCommand<object>( ExecuteResultPattern );
             this.PatternResultKyein = new DelegateCommand<object>( ExecutePatternResultKyein );
         }
 
+        private void ObstacleCallBackCommunication( ObstacleControlEventArgs obj )
+        {
+            // PopUp시 Sync
+            if(obj.EventDir == ObstacleControlEventArgs.eEventDir.ToFront)
+            {
+                switch ( obj.ControlKind )
+                {
+                    case ObstacleControlEventArgs.eControlKind.NONE:
+                        break;
+                    case ObstacleControlEventArgs.eControlKind.DRIVE:
+                        break;
+                    case ObstacleControlEventArgs.eControlKind.CURVE:
+                        break;
+                    case ObstacleControlEventArgs.eControlKind.STATE:
+                        break;
+                    case ObstacleControlEventArgs.eControlKind.INFO:
+                        this.ObstacleDrive = obj.Drive;
+                        this.ObstacleCurve = obj.Curve;
+                        this.ObstacleState = obj.ObstacleState;
+                        break;
+                    case ObstacleControlEventArgs.eControlKind.SAVE:
+                        ResponsePatternSave(obj);
+                        break;
+                }
+            }
+        }
+
+        private void ResponsePatternSave( ObstacleControlEventArgs args)
+        {
+            var msg = string.Empty;
+            if ( args.Result.IsSuccess )
+            {
+                msg = "Save Successs";
+            }
+            else
+            {
+                //var error = args.Result.Errors.FirstOrDefault();
+                //var alarm = error.Metadata[ "Alarm" ] as Alarm;
+                //msg = alarm.Name + " " + alarm.Text;
+                msg = "Save Fail";
+            }
+
+            this.messageController.ShowNotificationView( msg );
+        }
+
         private void UICallbackCommunication( GUIMessageEventArgs obj )
         {
+            // 상태변화 Response
+            if(obj.Kind == GUIMessageEventArgs.eGUIMessageKind.ModelPropertyChange)
+            {
+                if(obj.MessageKey.Equals(MessageKey.Vehicle))
+                {
+                    switch(obj.ModelPropertyName)
+                    {
+                        case "ObstacleStateProperty":
+                            var lazer = CastTo<eObstacleState>.From<object>( obj.Args );
+                            this.ChangeObstacleState( lazer );
+                            break;
+                        case "ObstacleDrive":
+                            var drive = CastTo<int>.From<object>( obj.Args );
+                            this.ObstacleDrive = drive;
+                            break;
+                        case "ObstacleCurve":
+                            var curve = CastTo<int>.From<object>( obj.Args );
+                            this.ObstacleCurve = curve;
+                            break;
+                        default:
+                            break;
+                    }
+                }
+            }
+        }
 
+        private void ChangeObstacleState( eObstacleState lazer )
+        {
+            if ( lazer == eObstacleState.Abnormal )
+                this.ObstacleState = "Abnormal";
+            else if ( lazer == eObstacleState.Blocked )
+                this.ObstacleState = "Blocked";
+            else if ( lazer == eObstacleState.Decelerate )
+                this.ObstacleState = "Decelerate";
+            else
+                this.ObstacleState = "NORMAL";
         }
 
         private void ExecutePatternResultKyein( object obj)
         {
             var numpad = new CalcuratorView();
-            var result = numpad.ShowDialog(0);
-
-            var pattern = obj.ToString();
 
-            switch(pattern)
+            if (obj.ToString().Equals("D"))
+            {
+                var result = numpad.ShowDialog( this.ObstacleDrive );
+                this.ObstacleDrive = (int)result;
+            }
+            else
             {
-                case "C":
-                    this.CurvePatternResult = Convert.ToInt32( result );
-                    break;
-                case "D":
-                    this.DrivePatternResult = Convert.ToInt32( result );
-                    break;
+                var result = numpad.ShowDialog( this.ObstacleCurve );
+                this.ObstacleCurve = (int)result;
             }
         }
 
@@ -191,15 +199,23 @@ namespace OHV.Module.Interactivity.PopUp
             {
                 if ( r.Result == ButtonResult.OK )
                 {
-                    //bool[] bitResult = new bool[] { this.ResultPatternOne , this.ResultPatternTwo , this.ResultPatternThree , this.ResultPatternFour , this.ResultPatternFive };
-                    //var result = new System.Collections.BitArray( bitResult );
-                    //this.PatternResult = ConvertToByte( result );
-
-                    //this.Publish(this.PatternResult);
+                    var msg = new ObstacleControlEventArgs
+                    {
+                        Curve = this.ObstacleCurve ,
+                        Drive = this.ObstacleDrive,
+                        ControlKind = ObstacleControlEventArgs.eControlKind.SAVE
+                    };
+                    this.ObstaclePublishEvent( msg );
                 }
             } );
         }
 
+        private void ObstaclePublishEvent(ObstacleControlEventArgs _args)
+        {
+            _args.EventDir = ObstacleControlEventArgs.eEventDir.ToBack;
+            this.eventAggregator.GetEvent<ObstacleControlPubSubEvent>().Publish( _args );
+        }
+
         #region Dialog Function
         public bool CanCloseDialog( )
         {
@@ -208,10 +224,14 @@ namespace OHV.Module.Interactivity.PopUp
 
         public void OnDialogClosed( )
         {
+            this.eventAggregator.GetEvent<ObstacleControlPubSubEvent>().Publish( new ObstacleControlEventArgs { EventDir = ObstacleControlEventArgs.eEventDir.ToBack , ControlKind = ObstacleControlEventArgs.eControlKind.INFO } );
+            this.eventAggregator.GetEvent<ObstacleControlPubSubEvent>().Unsubscribe( ObstacleCallBackCommunication );
         }
 
         public void OnDialogOpened( IDialogParameters parameters )
         {
+            this.eventAggregator.GetEvent<ObstacleControlPubSubEvent>().Publish( new ObstacleControlEventArgs { EventDir = ObstacleControlEventArgs.eEventDir.ToBack , ControlKind = ObstacleControlEventArgs.eControlKind.INFO } );
+            //this.eventAggregator.GetEvent<ObstacleControlPubSubEvent>().Publish( new ObstacleControlEventArgs { EventDir = ObstacleControlEventArgs.eEventDir.ToBack , ControlKind = ObstacleControlEventArgs.eControlKind.CURVE } );
         }
 
         private void CloseDialog( string parameter )

+ 4 - 0
Dev/OHV/OHV.Module.Status/OHV.Module.Status.csproj

@@ -37,6 +37,10 @@
     <Reference Include="CommonServiceLocator, Version=2.0.4.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
       <HintPath>..\packages\CommonServiceLocator.2.0.4\lib\net45\CommonServiceLocator.dll</HintPath>
     </Reference>
+    <Reference Include="GSG.NET, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\Assambly\GSG.NET.dll</HintPath>
+    </Reference>
     <Reference Include="MaterialDesignColors, Version=1.2.2.920, Culture=neutral, processorArchitecture=MSIL">
       <HintPath>..\packages\MaterialDesignColors.1.2.2\lib\net45\MaterialDesignColors.dll</HintPath>
     </Reference>

+ 9 - 10
Dev/OHV/OHV.Module.Status/VehicleStatusView.xaml

@@ -31,9 +31,9 @@
                         HorizontalAlignment="Center"
                         Grid.Column="0"
                         Grid.Row="1">
-                <TextBlock Margin="5" Text="Clamp State" Foreground="Silver" FontSize="25"/>
+                <TextBlock Margin="5" Text="Clamp" Foreground="Silver" FontSize="25"/>
                 <TextBlock Margin="5" HorizontalAlignment="Center" 
-                           Text="{Binding VehicleClampState, FallbackValue=OFF}" Foreground="Orange" FontSize="30"/>
+                           Text="{Binding ClampState, FallbackValue=NONE}" Foreground="Orange" FontSize="30"/>
             </StackPanel>
 
             <StackPanel Orientation="Vertical"
@@ -44,7 +44,9 @@
 
                 <TextBlock Margin="5" Text="Conveyor" Foreground="Silver" FontSize="25"/>
                 <TextBlock Margin="5" HorizontalAlignment="Center" 
-                           Text="{Binding VehicleCVState, FallbackValue=OFF}" Foreground="Orange" FontSize="30"/>
+                           Text="{Binding CvState, FallbackValue=NONE}" Foreground="Orange" FontSize="20"/>
+                <TextBlock Margin="5" HorizontalAlignment="Center" 
+                           Text="{Binding CvDir, FallbackValue=NONE}" Foreground="Orange" FontSize="20"/>
             </StackPanel>
 
             <StackPanel Orientation="Vertical"
@@ -69,7 +71,7 @@
                            Text="{Binding VehicleState, FallbackValue=IDLE}" Foreground="Orange" FontSize="30"/>
             </StackPanel>
 
-            <StackPanel Orientation="Vertical"
+            <!--<StackPanel Orientation="Vertical"
                         VerticalAlignment="Center"
                         HorizontalAlignment="Left" 
                         Grid.Column="0"
@@ -95,11 +97,9 @@
                         <TextBlock Text="CV EntryIN"/>
                     </StackPanel>
                 </Button>
+            </StackPanel>-->
 
-                
-            </StackPanel>
-
-            <StackPanel Orientation="Vertical"
+            <!--<StackPanel Orientation="Vertical"
                         VerticalAlignment="Center"
                         HorizontalAlignment="Left" 
                         Grid.Column="1"
@@ -125,8 +125,7 @@
                         <TextBlock Text="CV-ERROR"/>
                     </StackPanel>
                 </Button>
-
-            </StackPanel>
+            </StackPanel>-->
         </Grid>
     </Grid>
 </UserControl>

+ 152 - 4
Dev/OHV/OHV.Module.Status/VehicleStatusViewModel.cs

@@ -1,4 +1,8 @@
-using Prism.Events;
+using GSG.NET.Extensions;
+using OHV.Common.Events;
+using OHV.Common.Model;
+using OHV.Common.Shareds;
+using Prism.Events;
 using Prism.Mvvm;
 using System;
 using System.Collections.Generic;
@@ -6,6 +10,7 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 using VehicleControlSystem;
+using VehicleControlSystem.ControlLayer.IO;
 
 namespace OHV.Module.Status
 {
@@ -20,18 +25,161 @@ namespace OHV.Module.Status
             set { this.SetProperty( ref this._vehicleState , value ); }
         }
         IEventAggregator eventAggregator;
-        
+
+
+        string _clampState = string.Empty;
+        public string ClampState
+        {
+            get { return this._clampState; }
+            set { this.SetProperty( ref this._clampState , value ); }
+        }
+
+        string _cvState = string.Empty;
+        public string CvState
+        {
+            get { return this._cvState; }
+            set { this.SetProperty( ref this._cvState , value ); }
+        }
+
+        string _cvDir = "IDLE";
+        public string CvDir
+        {
+            get { return this._cvDir; }
+            set { this.SetProperty( ref this._cvDir , value ); }
+        }
+
+        double _vehicleCurrentPos;
+        public double VehicleCurrentPos
+        {
+            get { return this._vehicleCurrentPos; }
+            set { this.SetProperty( ref this._vehicleCurrentPos , value ); }
+        }
+
+        string _vehicleCurrentTag;
+        public string VehicleCurrentTag
+        {
+            get { return this._vehicleCurrentTag; }
+            set { this.SetProperty( ref this._vehicleCurrentTag , value ); }
+        }
+
+        EzIO IO = null;
 
         public VehicleStatusViewModel(IEventAggregator _ea, VCSystem _vcSystem )
         {
             this.eventAggregator = _ea;
+            this.eventAggregator.GetEvent<GUIMessagePubSubEvent>().Unsubscribe( UICallBackCommunication );
+            this.eventAggregator.GetEvent<GUIMessagePubSubEvent>().Subscribe( UICallBackCommunication , ThreadOption.UIThread );
+
+            this.eventAggregator.GetEvent<DriveControlPubSubEvent>().Unsubscribe( DriveUICallBackCommunication );
+            this.eventAggregator.GetEvent<DriveControlPubSubEvent>().Subscribe( DriveUICallBackCommunication , ThreadOption.UIThread );
+            this.eventAggregator.GetEvent<DriveControlPubSubEvent>().Publish( new DriveControlEventArgs { EventDir = DriveControlEventArgs.eEventDir.ToBack , ControlKind = DriveControlEventArgs.eControlKind.VehicleState } );
+
+            this.eventAggregator.GetEvent<AxisControlPubSubEvent>().Publish( new AxisControlEventArgs { Dir = AxisControlEventArgs.eEventDir.ToBack , Kind = AxisControlEventArgs.eAxisControlKind.SyncState } );
 
             this.vcSystem = _vcSystem;
 
             vcSystem.autoManager.OnOperationModeChanged += ( mode ) => { this.VehicleState = mode.ToString(); };
-            //this.vcSystem.autoManager.OperationModeChanged += () => { };//AutoManager_OperationModeChanged;
+            
+            this.IO = _vcSystem.IO as EzIO;
+            this.IO.OnChangedIO += IO_OnChangedIO;
+            if ( IO.IsOn( "OUT_CV_RUN", false ) )
+                this.CvState = "RUN";
+            else
+                this.CvState = "IDLE";
+        }
+
+        private void DriveUICallBackCommunication( DriveControlEventArgs obj )
+        {
+            if(obj.EventDir == DriveControlEventArgs.eEventDir.ToFront)
+            {
+                switch ( obj.ControlKind )
+                {
+                    case DriveControlEventArgs.eControlKind.NONE:
+                        break;
+                    case DriveControlEventArgs.eControlKind.MOVE:
+                        break;
+                    case DriveControlEventArgs.eControlKind.STOP:
+                        break;
+                    case DriveControlEventArgs.eControlKind.Steering:
+                        break;
+                    case DriveControlEventArgs.eControlKind.SteeringState:
+                        break;
+                    case DriveControlEventArgs.eControlKind.ReqCurrentPos:
+                        break;
+                    case DriveControlEventArgs.eControlKind.ReqStopCurrentPos:
+                        break;
+                    case DriveControlEventArgs.eControlKind.FaultReset:
+                        break;
+                    case DriveControlEventArgs.eControlKind.DriveON:
+                        break;
+                    case DriveControlEventArgs.eControlKind.DriveOFF:
+                        break;
+                    case DriveControlEventArgs.eControlKind.JOG:
+                        break;
+                    case DriveControlEventArgs.eControlKind.VehicleState:
+                        var state = CastTo<VehicleInfo>.From<object>( obj.Args );
+                        this.VehicleCurrentPos = state.CurrentPosition;
+                        break;
+                    case DriveControlEventArgs.eControlKind.Conveyor:
+                        break;
+                }
+            }
+        }
+
+        private void IO_OnChangedIO( BitBlock bit )
+        {
+            if ( bit.Tag.Equals( "OUT_CV_RUN" ) )
+                this.CvState = "RUN";
+
+            if ( bit.Tag.Equals( "OUT_CV_CWCCW" ) && bit.Tag.Equals("OUT_CV_RUN"))
+                this.CvDir = "CW";
+            else if ( !bit.Tag.Equals( "OUT_CV_CWCCW" ) && bit.Tag.Equals( "OUT_CV_RUN" ) )
+                this.CvDir = "CCW";
+            else
+                this.CvDir = "IDLE";
+                
+            if ( bit.Tag.Equals( "IN_CV_ERROR" ) )
+                this.CvState = "ERROR";
+            else
+                this.CvState = "IDLE";
+        }
+
+        private void UICallBackCommunication( GUIMessageEventArgs obj )
+        {
+            if(obj.Kind == GUIMessageEventArgs.eGUIMessageKind.ModelPropertyChange)
+            {
+                if(obj.MessageKey.Equals(MessageKey.Vehicle))
+                {
+                    switch(obj.ModelPropertyName)
+                    {
+                        case "ClampState":
+                            var state = CastTo<eClampState>.From<object>( obj.Args );
+                            this.ChangedClampState( state );
+                            break;
+                        case "Currenttag":
+                            var tag = CastTo<string>.From<object>(obj.Args);
+                            this.VehicleCurrentTag = tag;
+                            break;
+                    }
+                }
+            }
+        }
+
+        private void ChangedClampState( eClampState state )
+        {
+            switch ( state )
+            {
+                case eClampState.NONE:
+                    this.ClampState = eClampState.NONE.ToString();
+                    break;
+                case eClampState.LOCK:
+                    this.ClampState = eClampState.LOCK.ToString();
+                    break;
+                case eClampState.UNLOCK:
+                    this.ClampState = eClampState.UNLOCK.ToString();
+                    break;
+            }
         }
-        
 
         public void Init( ) { }
     }

+ 82 - 76
Dev/OHV/OHV.Vehicle/Concept/D_MainWindowViewModel.cs

@@ -204,7 +204,6 @@ namespace OHV.Vehicle.Concept
         private DeskTopInfo dti = new DeskTopInfo();
         SqliteManager sql;
 
-
         public D_MainWindowViewModel( IEventAggregator _ea , VCSystem cSystem , IRegionManager _regionManager , MessageController _msgController, SqliteManager _sql )
         {
             this.regionManager = _regionManager;
@@ -216,6 +215,7 @@ namespace OHV.Vehicle.Concept
             vcsMessagePublisher = this.eventAggregator.GetEvent<VCSMessagePubSubEvent>();
 
             this.VCSystem = cSystem;
+            
             this.messageController = _msgController;
             this.sql = _sql;
 
@@ -231,6 +231,7 @@ namespace OHV.Vehicle.Concept
             this.StopCommand = new DelegateCommand(ExecuteStopCommand);
             this.AlarmResetCommand = new DelegateCommand( ExecuteAlarmResetCommand);
             this.EmergencyStopCommand = new DelegateCommand(ExecuteEStop);
+            this.BuzzerStopCommand = new DelegateCommand( ExecuteBuzzerStop );
 
             DispatcherTimer dateTimer = new DispatcherTimer();
             dateTimer.Tick += (object sender, EventArgs e) =>
@@ -246,6 +247,15 @@ namespace OHV.Vehicle.Concept
             GSG.NET.Quartz.QuartzUtils.Invoke("RESOURCE_CHECK", GSG.NET.Quartz.QuartzUtils.GetExpnSecond(1), QuzOnResourceUsage);
         }
 
+        private void ExecuteBuzzerStop( )
+        {
+            var msg = new VCSMessageEventArgs
+            {
+                Kind = VCSMessageEventArgs.eVCSMessageKind.ReqBuzzerStop ,
+            };
+            vcsMessagePublisher.Publish( msg );
+        }
+
         void QuzOnResourceUsage()
         {
             this.CPU = GSG.NET.OSView.Mgnt.CpuUseRate();
@@ -254,65 +264,7 @@ namespace OHV.Vehicle.Concept
             var ll = GSG.NET.OSView.Mgnt.HddList();
             this.CDrive = ll.FirstOrDefault().AvailableFreeSpace / ConstUtils.ONE_GIGA_BYTES;
         }
-        void VehicleModeChang(bool isAutoMode)
-        {
-            if (isAutoMode)
-            {
-                this.StartEnable = false;
-                this.StopEnable = true;
-                this.IsManualMode = false;
-                regionManager.RequestNavigate(RegionNames.MainView, "AutoView");
-            }
-            else
-            {
-                this.StartEnable = true;
-                this.StopEnable = false;
-                this.IsManualMode = true;
-            }
-        }
-        private void Navigate(object obj)
-        {
-            var selectItem = obj.ToString();
-            if (!string.IsNullOrEmpty(selectItem))
-                regionManager.RequestNavigate("MainView", selectItem);
-        }
-        public static void SelectCulture(string culture)
-        {
-            if (String.IsNullOrEmpty(culture))
-                return;
 
-            //Copy all MergedDictionarys into a auxiliar list.
-            var dictionaryList = Application.Current.Resources.MergedDictionaries.ToList();
-
-            //Search for the specified culture.     
-            string requestedCulture = string.Format("StringResources.{0}.xaml", culture);
-            var resourceDictionary = dictionaryList.
-                FirstOrDefault(d => d.Source.OriginalString == "/OHV.ResourceDic;component/Resources/StringResource.en-US.xaml");
-
-            if (resourceDictionary == null)
-            {
-                //If not found, select our default language.             
-                requestedCulture = "StringResources.xaml";
-                resourceDictionary = dictionaryList.
-                    FirstOrDefault(d => d.Source.OriginalString == requestedCulture);
-            }
-
-            //If we have the requested resource, remove it from the list and place at the end.     
-            //Then this language will be our string table to use.      
-            if (resourceDictionary != null)
-            {
-                Application.Current.Resources.MergedDictionaries.Remove(resourceDictionary);
-                Application.Current.Resources.MergedDictionaries.Add(resourceDictionary);
-            }
-
-            //Inform the threads of the new culture.     
-            Thread.CurrentThread.CurrentCulture = new CultureInfo(culture);
-            Thread.CurrentThread.CurrentUICulture = new CultureInfo(culture);
-
-        }
-
-
-        #region Execute Method
         private void Execte_ChangeLanguage()
         {
             //LanguageHalper.LanguagesSelcter.ChangLanguage(LanguageHalper.eLanguageType.Chinese);
@@ -322,12 +274,12 @@ namespace OHV.Vehicle.Concept
         {
             var msg = new VCSMessageEventArgs
             {
-                Kind = VCSMessageEventArgs.eVCSMessageKind.ReqEStop,
+                Kind = VCSMessageEventArgs.eVCSMessageKind.ReqEStop ,
             };
-            vcsMessagePublisher.Publish(msg);
+            vcsMessagePublisher.Publish( msg );
         }
 
-        private void ExecuteAlarmResetCommand()
+        private void ExecuteAlarmResetCommand( )
         {
             loggerRemote.I("123214wefsadfsdafsd");
             this.messageController.ShowConfirmationPopupView(" Alarm Reset ? ", r =>
@@ -400,19 +352,31 @@ namespace OHV.Vehicle.Concept
                       App.Current.Shutdown();
               });
         }
-        
-        private void ExecuteTextCommand()
+
+        private void Navigate(object obj)
         {
-            //var m = new VCSMessageEventArgs();
-            //m.MessageKey = 1234;
-            //m.MessageText = "Test Message";
-            //m.Command = new Common.Model.Command() { CommandID = "TestCommand123", Type = Common.Shareds.eCommandType.Move };
+            var selectItem = obj.ToString();
+            if (!string.IsNullOrEmpty(selectItem))
+                regionManager.RequestNavigate("MainView", selectItem);
+        }
 
-            //this.eventAggregator.GetEvent<VCSMessagePubSubEvent>().Publish(m);
+        void VehicleModeChange(bool isAutoMode)
+        {
+            if (isAutoMode)
+            {
+                this.StartEnable = false;
+                this.StopEnable = true;
+                this.IsManualMode = false;
+                regionManager.RequestNavigate(RegionNames.MainView, "AutoView");
+            }
+            else
+            {
+                this.StartEnable = true;
+                this.StopEnable = false;
+                this.IsManualMode = true;
+            }
         }
-        #endregion
 
-        #region Subscribe
         private void UICallbackCommunication(GUIMessageEventArgs obj)
         {
             switch (obj.Kind)
@@ -442,10 +406,10 @@ namespace OHV.Vehicle.Concept
 
         private void RspVehicleModeChange(GUIMessageEventArgs obj)
         {
-            if (obj.Result.IsSuccess)
+            if ( obj.Result.IsSuccess)
             {
-                if (obj.MessageKey.Equals(MessageKey.AutoMode)) { this.VehicleModeChang(true); }
-                if (obj.MessageKey.Equals(MessageKey.ManualMode)) { this.VehicleModeChang(false); }
+                if (obj.MessageKey.Equals(MessageKey.AutoMode)) { this.VehicleModeChange(true); }
+                if (obj.MessageKey.Equals(MessageKey.ManualMode)) { this.VehicleModeChange(false); }
             }
             else
             {
@@ -459,7 +423,7 @@ namespace OHV.Vehicle.Concept
             {
                 var hisAlarm = args.Args as HisAlarm;
                 this.messageController.ShowNotificationView(args.MessageText);
-                this.VehicleModeChang(false);//알람이 발생하면 자동으로 Manual Mode 로 변경됨
+                this.VehicleModeChange(false);//알람이 발생하면 자동으로 Manual Mode 로 변경됨
             }
 
             if (args.MessageKey.Equals(MessageKey.Vehicle))
@@ -475,7 +439,15 @@ namespace OHV.Vehicle.Concept
             }
         }
 
-        #endregion
+        private void ExecuteTextCommand()
+        {
+            //var m = new VCSMessageEventArgs();
+            //m.MessageKey = 1234;
+            //m.MessageText = "Test Message";
+            //m.Command = new Common.Model.Command() { CommandID = "TestCommand123", Type = Common.Shareds.eCommandType.Move };
+
+            //this.eventAggregator.GetEvent<VCSMessagePubSubEvent>().Publish(m);
+        }
 
         public void InitViewModel()
         {
@@ -495,5 +467,39 @@ namespace OHV.Vehicle.Concept
             //VCSystem.Instance.Dispose();
         }
 
+        public static void SelectCulture(string culture)
+        {
+            if (String.IsNullOrEmpty(culture))
+                return;
+
+            //Copy all MergedDictionarys into a auxiliar list.
+            var dictionaryList = Application.Current.Resources.MergedDictionaries.ToList();
+
+            //Search for the specified culture.     
+            string requestedCulture = string.Format("StringResources.{0}.xaml", culture);
+            var resourceDictionary = dictionaryList.
+                FirstOrDefault(d => d.Source.OriginalString == "/OHV.ResourceDic;component/Resources/StringResource.en-US.xaml");
+
+            if (resourceDictionary == null)
+            {
+                //If not found, select our default language.             
+                requestedCulture = "StringResources.xaml";
+                resourceDictionary = dictionaryList.
+                    FirstOrDefault(d => d.Source.OriginalString == requestedCulture);
+            }
+
+            //If we have the requested resource, remove it from the list and place at the end.     
+            //Then this language will be our string table to use.      
+            if (resourceDictionary != null)
+            {
+                Application.Current.Resources.MergedDictionaries.Remove(resourceDictionary);
+                Application.Current.Resources.MergedDictionaries.Add(resourceDictionary);
+            }
+
+            //Inform the threads of the new culture.     
+            Thread.CurrentThread.CurrentCulture = new CultureInfo(culture);
+            Thread.CurrentThread.CurrentUICulture = new CultureInfo(culture);
+
+        }
     }
 }

+ 112 - 7
Dev/OHV/VehicleControlSystem/ControlLayer/Clamp.cs

@@ -26,6 +26,14 @@ namespace VehicleControlSystem.ControlLayer
         IEventAggregator eventAggregator;
         TaskCancel taskCancel = new TaskCancel();
 
+        //TODO:[20/03/25 ys-hwang] Clamp State 필요함.
+        eClampState _clampState;
+        public eClampState ClampState
+        {
+            get { return this._clampState; }
+            set { this.SetField( ref this._clampState , value ); }
+        }
+
         public Clamp(SqliteManager sqliteManager, IEventAggregator ea)
         {
             this.sql = sqliteManager;
@@ -44,23 +52,23 @@ namespace VehicleControlSystem.ControlLayer
         {
             if (args.Dir == AxisControlEventArgs.eEventDir.ToBack)
             {
-                switch (args.Kind)
+                switch ( args.Kind )
                 {
                     case AxisControlEventArgs.eAxisControlKind.Stop:
                         break;
                     case AxisControlEventArgs.eAxisControlKind.EStop:
                         break;
                     case AxisControlEventArgs.eAxisControlKind.Move:
-                        this.ReqOrderByMove(args);
+                        //this.ReqOrderByMove( args );
                         break;
                     case AxisControlEventArgs.eAxisControlKind.Jog:
-                        this.ReqJog(args);
+                        this.ReqJog( args );
                         break;
                     case AxisControlEventArgs.eAxisControlKind.ServoOn:
-                        this.ReqServoOn(args);
+                        this.ReqServoOn( args );
                         break;
                     case AxisControlEventArgs.eAxisControlKind.ServoOff:
-                        this.ReqServoOff(args);
+                        this.ReqServoOff( args );
                         break;
                     case AxisControlEventArgs.eAxisControlKind.ReqCurrentPosition:
                         this.ReqStartAxisState();
@@ -70,10 +78,20 @@ namespace VehicleControlSystem.ControlLayer
                         this.taskCancel.WaitAll();
                         break;
                     case AxisControlEventArgs.eAxisControlKind.OriginReturn:
-                        this.ReqOriginReturn(args);
+                        this.ReqOriginReturn( args );
                         break;
                     case AxisControlEventArgs.eAxisControlKind.FaultReset:
-                        this.ReqFaultReset(args);
+                        this.ReqFaultReset( args );
+                        break;
+                    case eAxisControlKind.NONE:
+                        break;
+                    case eAxisControlKind.AxisState:
+                        break;
+                    case eAxisControlKind.SyncMove:
+                        this.ReqSyncMove( args );
+                        break;
+                    case eAxisControlKind.SyncState:
+                        this.ReqSyncState( args );
                         break;
                     default:
                         break;
@@ -81,6 +99,8 @@ namespace VehicleControlSystem.ControlLayer
             }
         }
 
+        
+
         void PublishEvent(AxisControlEventArgs args)
         {
             args.Dir = AxisControlEventArgs.eEventDir.ToFront;
@@ -88,6 +108,89 @@ namespace VehicleControlSystem.ControlLayer
         }
 
         #region Request Method
+        private void ReqSyncState( AxisControlEventArgs args )
+        {
+            var leftPositionDatas = sql.AxisPositionDataDAL.GetKFromName( ConstString.AXIS_CARRIER_LOCK_LEFT ).ToList();
+            var leftLockData = leftPositionDatas.Where( x => x.Name.Equals( ConstString.TEACH_POSITION_LOCK ) ).Single();
+            var leftUnLockData = leftPositionDatas.Where( x => x.Name.Equals( ConstString.TEACH_POSITION_UNLOCK ) ).Single();
+            
+            var left = this.axes.Where( x => x.Config.AxisName.Equals( ConstString.AXIS_CARRIER_LOCK_LEFT ) ).Single();
+
+            var rightPositionDatas = sql.AxisPositionDataDAL.GetKFromName( ConstString.AXIS_CARRIER_LOCK_RIGHT ).ToList();
+            var rightLockData = leftPositionDatas.Where( x => x.Name.Equals( ConstString.TEACH_POSITION_LOCK ) ).Single();
+            var rightUnLockData = leftPositionDatas.Where( x => x.Name.Equals( ConstString.TEACH_POSITION_UNLOCK ) ).Single();
+            
+            var right = this.axes.Where( x => x.Config.AxisName.Equals( ConstString.AXIS_CARRIER_LOCK_RIGHT ) ).Single();
+
+            if ( left.CurrentPosition == leftLockData.Value && right.CurrentPosition == rightLockData.Value )
+                this.ClampState = eClampState.LOCK;
+            else if ( left.CurrentPosition == leftUnLockData.Value && right.CurrentPosition == rightUnLockData.Value )
+                this.ClampState = eClampState.UNLOCK;
+            else
+                this.ClampState = eClampState.NONE;
+
+            this.ClampState = eClampState.NONE;
+
+            var msg = new AxisControlEventArgs
+            {
+                Kind = eAxisControlKind.SyncState
+            };
+
+            this.PublishEvent( msg );
+        }
+
+        private void ReqSyncMove( AxisControlEventArgs args )
+        {
+            var result = 0;
+            var reply = new AxisControlEventArgs
+            {
+                Kind = eAxisControlKind.SyncMove
+            };
+
+            if ( args.PosDir == ePosDir.Lock )
+            {
+                result = this.Lock_Sync();
+                if ( result == 0 )
+                {
+                    reply.Result = Results.Ok();
+                    this.ClampState = eClampState.LOCK;
+                }
+                else
+                {
+                    var alarm = this.sql.AlarmDAL.GetK( result );
+                    if ( alarm == null )
+                        alarm = new Alarm() { Name = "UnKnown Alarm" , Text = "Not Define" };
+                    
+                    var error = new Error().WithMetadata( "Alarm" , alarm );
+                    reply.Result = Results.Fail(error);
+
+                    this.ClampState = eClampState.NONE;
+                }
+            }            
+            else
+            {
+                result = this.Unlock_Sync();
+                if ( result == 0 )
+                {
+                    reply.Result = Results.Ok();
+                    this.ClampState = eClampState.UNLOCK;
+                }
+                else
+                {
+                    var alarm = this.sql.AlarmDAL.GetK( result );
+                    if ( alarm == null )
+                        alarm = new Alarm() { Name = "UnKnown Alarm" , Text = "Not Define" };
+
+                    var error = new Error().WithMetadata( "Alarm" , alarm );
+                    reply.Result = Results.Fail( error );
+
+                    this.ClampState = eClampState.NONE;
+                }
+            }
+
+            this.PublishEvent( reply );
+        }
+
         private void ReqFaultReset(AxisControlEventArgs args)
         {
             var axis = this.axes.Where(x => x.Config.AxisName.Equals(args.AxisName)).FirstOrDefault();
@@ -429,6 +532,7 @@ namespace VehicleControlSystem.ControlLayer
                 return 1;
 #endif
 
+            this.ClampState = eClampState.LOCK;
             return EziMOTIONPlusELib.FMM_OK;
         }
 
@@ -472,6 +576,7 @@ namespace VehicleControlSystem.ControlLayer
                 return 4;
 #endif
 
+            this.ClampState = eClampState.UNLOCK;
             return EziMOTIONPlusELib.FMM_OK;
         }
     }

File diff suppressed because it is too large
+ 471 - 465
Dev/OHV/VehicleControlSystem/ControlLayer/Vehicle.cs


+ 1 - 1
Dev/OHV/VehicleControlSystem/Managers/AutoManager.cs

@@ -211,7 +211,7 @@ namespace VehicleControlSystem.Managers
                     switch (this.AutoModeStateProperty)
                     {
                         case eAutoModeState.ErrorStop:
-                                this.AutoModeStateProperty = eAutoModeState.WaitStop;
+                            this.AutoModeStateProperty = eAutoModeState.WaitStop;
                             break;
                         case eAutoModeState.WaitStop:
                             this.AutoModeStateProperty = eAutoModeState.Stop;

+ 13 - 3
Dev/OHV/VehicleControlSystem/VCSystem.cs

@@ -110,7 +110,7 @@ namespace VehicleControlSystem
         #region RspMessage Method
         void ReceivedMessageEvent(VCSMessageEventArgs msg)
         {
-            switch (msg.Kind)
+            switch ( msg.Kind )
             {
                 case VCSMessageEventArgs.eVCSMessageKind.ReqIOObject:
                     ReqIOObjectMessage();
@@ -129,16 +129,26 @@ namespace VehicleControlSystem
                     ReqAlarmReset();
                     break;
                 case VCSMessageEventArgs.eVCSMessageKind.ReqVehicleModeChange:
-                    this.ReqVehicleModeChange(msg);
+                    this.ReqVehicleModeChange( msg );
                     break;
                 case VCSMessageEventArgs.eVCSMessageKind.ReqEStop:
                     ReqEStop();
                     break;
+                case VCSMessageEventArgs.eVCSMessageKind.ReqBuzzerStop:
+                    ReqBuzzerStop();
+                    break;
                 default:
                     break;
             }
         }
 
+        private void ReqBuzzerStop( )
+        {
+            this.IO.OutputOff( "OUT_BUZZER_00" );
+            this.IO.OutputOff( "OUT_BUZZER_01" );
+            this.IO.OutputOff( "OUT_BUZZER_02" );
+        }
+
         private void ReqAlarmReset()
         {
             this.autoManager.IsErrorProcessing = false;
@@ -201,7 +211,7 @@ namespace VehicleControlSystem
             else
             {
                 this.autoManager.AutoModeStateProperty = OHV.Common.Shareds.eAutoModeState.WaitStop;
-                msg = new GUIMessageEventArgs { Kind = GUIMessageEventArgs.eGUIMessageKind.RspManualModeChange, Result = FluentResults.Results.Ok() };
+                msg = new GUIMessageEventArgs {Kind = GUIMessageEventArgs.eGUIMessageKind.RspManualModeChange, Result = FluentResults.Results.Ok() };
             }
 
             GUIMessageEventPublish(msg);

+ 0 - 54
Dev/OHV/ViewTest/CustomControl1.cs

@@ -1,54 +0,0 @@
-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 ViewTest
-{
-    /// <summary>
-    /// XAML 파일에서 이 사용자 지정 컨트롤을 사용하려면 1a 또는 1b단계를 수행한 다음 2단계를 수행하십시오.
-    ///
-    /// 1a단계) 현재 프로젝트에 있는 XAML 파일에서 이 사용자 지정 컨트롤 사용.
-    /// 이 XmlNamespace 특성을 사용할 마크업 파일의 루트 요소에 이 특성을 
-    /// 추가합니다.
-    ///
-    ///     xmlns:MyNamespace="clr-namespace:ViewTest"
-    ///
-    ///
-    /// 1b단계) 다른 프로젝트에 있는 XAML 파일에서 이 사용자 지정 컨트롤 사용.
-    /// 이 XmlNamespace 특성을 사용할 마크업 파일의 루트 요소에 이 특성을 
-    /// 추가합니다.
-    ///
-    ///     xmlns:MyNamespace="clr-namespace:ViewTest;assembly=ViewTest"
-    ///
-    /// 또한 XAML 파일이 있는 프로젝트의 프로젝트 참조를 이 프로젝트에 추가하고
-    /// 다시 빌드하여 컴파일 오류를 방지해야 합니다.
-    ///
-    ///     솔루션 탐색기에서 대상 프로젝트를 마우스 오른쪽 단추로 클릭하고
-    ///     [참조 추가]->[프로젝트]를 차례로 클릭한 다음 이 프로젝트를 선택합니다.
-    ///
-    ///
-    /// 2단계)
-    /// 계속 진행하여 XAML 파일에서 컨트롤을 사용합니다.
-    ///
-    ///     <MyNamespace:CustomControl1/>
-    ///
-    /// </summary>
-    public class CustomControl1 : Control
-    {
-        static CustomControl1()
-        {
-            DefaultStyleKeyProperty.OverrideMetadata(typeof(CustomControl1), new FrameworkPropertyMetadata(typeof(CustomControl1)));
-        }
-    }
-}

+ 0 - 55
Dev/OHV/ViewTest/Properties/AssemblyInfo.cs

@@ -1,55 +0,0 @@
-using System.Reflection;
-using System.Resources;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Windows;
-
-// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해 
-// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면
-// 이러한 특성 값을 변경하세요.
-[assembly: AssemblyTitle("ViewTest")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("ViewTest")]
-[assembly: AssemblyCopyright("Copyright ©  2020")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에 
-// 표시되지 않습니다.  COM에서 이 어셈블리의 형식에 액세스하려면 
-// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요.
-[assembly: ComVisible(false)]
-
-//지역화 가능 애플리케이션 빌드를 시작하려면 다음을 설정하세요.
-//.csproj 파일에서 <PropertyGroup> 내에 <UICulture>CultureYouAreCodingWith</UICulture>를
-//설정하십시오. 예를 들어 소스 파일에서 영어(미국)를
-//사용하는 경우 <UICulture>를 en-US로 설정합니다. 그런 다음 아래
-//NeutralResourceLanguage 특성의 주석 처리를 제거합니다. 아래 줄의 "en-US"를 업데이트하여
-//프로젝트 파일의 UICulture 설정과 일치시킵니다.
-
-//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
-
-
-[assembly:ThemeInfo(
-    ResourceDictionaryLocation.None, //테마별 리소스 사전의 위치
-                             //(페이지 또는 응용 프로그램 리소스 사진에
-                             // 리소스가 없는 경우에 사용됨)
-    ResourceDictionaryLocation.SourceAssembly //제네릭 리소스 사전의 위치
-                                      //(페이지 또는 응용 프로그램 리소스 사진에
-                                      // 리소스가 없는 경우에 사용됨)
-)]
-
-
-// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다.
-//
-//      주 버전
-//      부 버전 
-//      빌드 번호
-//      수정 버전
-//
-// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
-// 기본값으로 할 수 있습니다.
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]

+ 0 - 62
Dev/OHV/ViewTest/Properties/Resources.Designer.cs

@@ -1,62 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-//     이 코드는 도구를 사용하여 생성되었습니다.
-//     런타임 버전:4.0.30319.42000
-//
-//     파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
-//     이러한 변경 내용이 손실됩니다.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace ViewTest.Properties {
-    
-    
-    /// <summary>
-    ///   지역화된 문자열 등을 찾기 위한 강력한 형식의 리소스 클래스입니다.
-    /// </summary>
-    // 이 클래스는 ResGen 또는 Visual Studio와 같은 도구를 통해 StronglyTypedResourceBuilder
-    // 클래스에서 자동으로 생성되었습니다.
-    // 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여
-    // ResGen을 다시 실행하거나 VS 프로젝트를 다시 빌드하십시오.
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    internal class Resources {
-        
-        private static global::System.Resources.ResourceManager resourceMan;
-        
-        private static global::System.Globalization.CultureInfo resourceCulture;
-        
-        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
-        internal Resources() {
-        }
-        
-        /// <summary>
-        ///   이 클래스에서 사용하는 캐시된 ResourceManager 인스턴스를 반환합니다.
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Resources.ResourceManager ResourceManager {
-            get {
-                if ((resourceMan == null)) {
-                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ViewTest.Properties.Resources", typeof(Resources).Assembly);
-                    resourceMan = temp;
-                }
-                return resourceMan;
-            }
-        }
-        
-        /// <summary>
-        ///   이 강력한 형식의 리소스 클래스를 사용하여 모든 리소스 조회에 대해 현재 스레드의 CurrentUICulture 속성을
-        ///   재정의합니다.
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Globalization.CultureInfo Culture {
-            get {
-                return resourceCulture;
-            }
-            set {
-                resourceCulture = value;
-            }
-        }
-    }
-}

+ 0 - 117
Dev/OHV/ViewTest/Properties/Resources.resx

@@ -1,117 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-</root>

+ 0 - 30
Dev/OHV/ViewTest/Properties/Settings.Designer.cs

@@ -1,30 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-//     This code was generated by a tool.
-//     Runtime Version:4.0.30319.42000
-//
-//     Changes to this file may cause incorrect behavior and will be lost if
-//     the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace ViewTest.Properties
-{
-    
-    
-    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
-    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
-    {
-        
-        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-        
-        public static Settings Default
-        {
-            get
-            {
-                return defaultInstance;
-            }
-        }
-    }
-}

+ 0 - 7
Dev/OHV/ViewTest/Properties/Settings.settings

@@ -1,7 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
-  <Profiles>
-    <Profile Name="(Default)" />
-  </Profiles>
-  <Settings />
-</SettingsFile>

+ 0 - 18
Dev/OHV/ViewTest/Themes/Generic.xaml

@@ -1,18 +0,0 @@
-<ResourceDictionary
-    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-    xmlns:local="clr-namespace:ViewTest">
-    <Style TargetType="{x:Type local:CustomControl1}">
-        <Setter Property="Template">
-            <Setter.Value>
-                <ControlTemplate TargetType="{x:Type local:CustomControl1}">
-                    <Border Background="{TemplateBinding Background}"
-                            BorderBrush="{TemplateBinding BorderBrush}"
-                            BorderThickness="{TemplateBinding BorderThickness}">
-
-                    </Border>
-                </ControlTemplate>
-            </Setter.Value>
-        </Setter>
-    </Style>
-</ResourceDictionary>

+ 0 - 16
Dev/OHV/ViewTest/UserControl1.xaml

@@ -1,16 +0,0 @@
-<UserControl x:Class="ViewTest.UserControl1"
-             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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
-             xmlns:local="clr-namespace:ViewTest"
-             mc:Ignorable="d" 
-             d:DesignHeight="450" d:DesignWidth="800"
-             
-             xmlns:prism="http://prismlibrary.com/"
-             prism:ViewModelLocator.AutoWireViewModel="True">
-    <Grid>
-            
-    </Grid>
-</UserControl>

+ 0 - 28
Dev/OHV/ViewTest/UserControl1.xaml.cs

@@ -1,28 +0,0 @@
-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 ViewTest
-{
-    /// <summary>
-    /// UserControl1.xaml에 대한 상호 작용 논리
-    /// </summary>
-    public partial class UserControl1 : UserControl
-    {
-        public UserControl1( )
-        {
-            InitializeComponent();
-        }
-    }
-}

+ 0 - 122
Dev/OHV/ViewTest/ViewTest.csproj

@@ -1,122 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{A9F51664-1F9F-4C97-9C1E-0E02D2FD5920}</ProjectGuid>
-    <OutputType>library</OutputType>
-    <RootNamespace>ViewTest</RootNamespace>
-    <AssemblyName>ViewTest</AssemblyName>
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
-    <FileAlignment>512</FileAlignment>
-    <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
-    <WarningLevel>4</WarningLevel>
-    <Deterministic>true</Deterministic>
-    <NuGetPackageImportStamp>
-    </NuGetPackageImportStamp>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="CommonServiceLocator, Version=2.0.4.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
-      <HintPath>..\packages\CommonServiceLocator.2.0.4\lib\net45\CommonServiceLocator.dll</HintPath>
-    </Reference>
-    <Reference Include="MaterialDesignColors, Version=1.2.2.920, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>..\packages\MaterialDesignColors.1.2.2\lib\net45\MaterialDesignColors.dll</HintPath>
-    </Reference>
-    <Reference Include="MaterialDesignThemes.Wpf, Version=3.0.1.920, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>..\packages\MaterialDesignThemes.3.0.1\lib\net45\MaterialDesignThemes.Wpf.dll</HintPath>
-    </Reference>
-    <Reference Include="Prism, Version=7.2.0.1422, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
-      <HintPath>..\packages\Prism.Core.7.2.0.1422\lib\net45\Prism.dll</HintPath>
-    </Reference>
-    <Reference Include="Prism.Wpf, Version=7.2.0.1422, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
-      <HintPath>..\packages\Prism.Wpf.7.2.0.1422\lib\net45\Prism.Wpf.dll</HintPath>
-    </Reference>
-    <Reference Include="System" />
-    <Reference Include="System.Configuration" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
-      <HintPath>..\packages\System.ValueTuple.4.5.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
-    </Reference>
-    <Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
-      <HintPath>..\packages\Prism.Wpf.7.2.0.1422\lib\net45\System.Windows.Interactivity.dll</HintPath>
-    </Reference>
-    <Reference Include="System.Xml" />
-    <Reference Include="Microsoft.CSharp" />
-    <Reference Include="System.Core" />
-    <Reference Include="System.Xml.Linq" />
-    <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="System.Net.Http" />
-    <Reference Include="System.Xaml">
-      <RequiredTargetFramework>4.0</RequiredTargetFramework>
-    </Reference>
-    <Reference Include="WindowsBase" />
-    <Reference Include="PresentationCore" />
-    <Reference Include="PresentationFramework" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="UserControl1.xaml.cs">
-      <DependentUpon>UserControl1.xaml</DependentUpon>
-    </Compile>
-    <Page Include="Themes\Generic.xaml">
-      <Generator>MSBuild:Compile</Generator>
-      <SubType>Designer</SubType>
-    </Page>
-    <Compile Include="CustomControl1.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Page Include="UserControl1.xaml">
-      <SubType>Designer</SubType>
-      <Generator>MSBuild:Compile</Generator>
-    </Page>
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="Properties\AssemblyInfo.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="Properties\Resources.Designer.cs">
-      <AutoGen>True</AutoGen>
-      <DesignTime>True</DesignTime>
-      <DependentUpon>Resources.resx</DependentUpon>
-    </Compile>
-    <Compile Include="Properties\Settings.Designer.cs">
-      <AutoGen>True</AutoGen>
-      <DependentUpon>Settings.settings</DependentUpon>
-      <DesignTimeSharedInput>True</DesignTimeSharedInput>
-    </Compile>
-    <EmbeddedResource Include="Properties\Resources.resx">
-      <Generator>ResXFileCodeGenerator</Generator>
-      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
-    </EmbeddedResource>
-    <None Include="packages.config" />
-    <None Include="Properties\Settings.settings">
-      <Generator>SettingsSingleFileGenerator</Generator>
-      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
-    </None>
-  </ItemGroup>
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <Import Project="..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets" Condition="Exists('..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets')" />
-  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
-    <PropertyGroup>
-      <ErrorText>이 프로젝트는 이 컴퓨터에 없는 NuGet 패키지를 참조합니다. 해당 패키지를 다운로드하려면 NuGet 패키지 복원을 사용하십시오. 자세한 내용은 http://go.microsoft.com/fwlink/?LinkID=322105를 참조하십시오. 누락된 파일은 {0}입니다.</ErrorText>
-    </PropertyGroup>
-    <Error Condition="!Exists('..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets'))" />
-  </Target>
-</Project>

+ 0 - 9
Dev/OHV/ViewTest/packages.config

@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
-  <package id="CommonServiceLocator" version="2.0.4" targetFramework="net45" />
-  <package id="MaterialDesignColors" version="1.2.2" targetFramework="net45" />
-  <package id="MaterialDesignThemes" version="3.0.1" targetFramework="net45" />
-  <package id="Prism.Core" version="7.2.0.1422" targetFramework="net45" />
-  <package id="Prism.Wpf" version="7.2.0.1422" targetFramework="net45" />
-  <package id="System.ValueTuple" version="4.5.0" targetFramework="net45" />
-</packages>