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

OutRelese 추적 중지
AutoView CommandList View 추가.

SK.Kang 6 лет назад
Родитель
Сommit
8fd61570ae
40 измененных файлов с 838 добавлено и 116 удалено
  1. 2 0
      Dev/OHV/OHV.Common/Events/MessageEventArgs.cs
  2. 2 0
      Dev/OHV/OHV.Common/Events/PubSubEvent.cs
  3. 3 1
      Dev/OHV/OHV.Common/Model/Command.cs
  4. 2 0
      Dev/OHV/OHV.Common/Shareds/RegionNames.cs
  5. 6 4
      Dev/OHV/OHV.Module.Interactivity/PopUp/DriveServoView.xaml
  6. 51 58
      Dev/OHV/OHV.Module.Interactivity/PopUp/DriveServoViewModel.cs
  7. 34 0
      Dev/OHV/OHV.Module.ListViews/ListViewController.cs
  8. 133 0
      Dev/OHV/OHV.Module.ListViews/OHV.Module.ListViews.csproj
  9. 36 0
      Dev/OHV/OHV.Module.ListViews/Properties/AssemblyInfo.cs
  10. 12 0
      Dev/OHV/OHV.Module.ListViews/PubSubEvents/ListSelectionChange.cs
  11. 12 0
      Dev/OHV/OHV.Module.ListViews/SubViews/VehicleCommandDeleteView.xaml
  12. 37 0
      Dev/OHV/OHV.Module.ListViews/SubViews/VehicleCommandDeleteView.xaml.cs
  13. 12 0
      Dev/OHV/OHV.Module.ListViews/SubViews/VehicleCommandDeleteViewModel.cs
  14. 76 0
      Dev/OHV/OHV.Module.ListViews/SubViews/VehicleCommandInsertView.xaml
  15. 37 0
      Dev/OHV/OHV.Module.ListViews/SubViews/VehicleCommandInsertView.xaml.cs
  16. 73 0
      Dev/OHV/OHV.Module.ListViews/SubViews/VehicleCommandInsertViewModel.cs
  17. 128 0
      Dev/OHV/OHV.Module.ListViews/Views/CommandListView.xaml
  18. 28 0
      Dev/OHV/OHV.Module.ListViews/Views/CommandListView.xaml.cs
  19. 110 0
      Dev/OHV/OHV.Module.ListViews/Views/CommandListViewModel.cs
  20. 9 0
      Dev/OHV/OHV.Module.ListViews/packages.config
  21. 14 4
      Dev/OHV/OHV.Module.MainViews/Views/AutoView.xaml
  22. 2 1
      Dev/OHV/OHV.SqliteDAL/DAL/AbstractDAL.cs
  23. 1 42
      Dev/OHV/OHV.SqliteDAL/DAL/CommandDAL.cs
  24. 1 0
      Dev/OHV/OHV.Vehicle/App.xaml.cs
  25. 6 6
      Dev/OHV/OHV.Vehicle/Concept/D_MainWindowViewModel.cs
  26. 4 0
      Dev/OHV/OHV.Vehicle/OHV.Vehicle.csproj
  27. 7 0
      Dev/OHV/OHV.sln
  28. BIN
      Dev/OHV/OutRelese/Config/IO.xlsx
  29. BIN
      Dev/OHV/OutRelese/DB/OHVDb.sqlite
  30. BIN
      Dev/OHV/OutRelese/OHV.Common.dll
  31. BIN
      Dev/OHV/OutRelese/OHV.Common.pdb
  32. BIN
      Dev/OHV/OutRelese/OHV.Module.Interactivity.dll
  33. BIN
      Dev/OHV/OutRelese/OHV.Module.Interactivity.pdb
  34. BIN
      Dev/OHV/OutRelese/OHV.Module.MainViews.dll
  35. BIN
      Dev/OHV/OutRelese/OHV.Module.MainViews.pdb
  36. BIN
      Dev/OHV/OutRelese/OHV.SqliteDAL.dll
  37. BIN
      Dev/OHV/OutRelese/OHV.SqliteDAL.pdb
  38. BIN
      Dev/OHV/OutRelese/OHV.Vehicle.exe
  39. BIN
      Dev/OHV/OutRelese/OHV.Vehicle.pdb
  40. BIN
      Dev/OHV/OutRelese/VehicleControlSystem.dll

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

@@ -17,6 +17,7 @@ namespace OHV.Common.Events
         {
             RspIOObject,
             RspIOMapList,
+            RspCommandList,
         }
 
         public eGUIMessageKind Kind { get; set; }
@@ -42,6 +43,7 @@ namespace OHV.Common.Events
         {
             ReqIOObject,
             ReqIOMapList,
+            ReqCommandList,
         }
 
         public eVCSMessageKind Kind { get; set; }

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

@@ -21,4 +21,6 @@ namespace OHV.Common.Events
     public class DirveControlPubSubEvent : PubSubEvent<DriveControlEventArgs> { }
 
     public class IOControlPubSubEvent : PubSubEvent<IOControlEventArgs> { }
+    public class VehicleCommandListChanged : PubSubEvent<string> { }
+
 }

+ 3 - 1
Dev/OHV/OHV.Common/Model/Command.cs

@@ -19,7 +19,9 @@ namespace OHV.Common.Model
         /// <summary>
         /// 두번째 명령을 주었음을 확인 위해.
         /// </summary>
-        public bool IsSecondCommanded { get; set; }
+        public virtual bool IsSecondCommanded { get; set; }
+        public virtual bool IsSelected { get; set; }
+
         public Command()
         {
             CommandID = $"{Guid.NewGuid()}_{DateTime.Now.ToString("HHmmssfff")}";

+ 2 - 0
Dev/OHV/OHV.Common/Shareds/RegionNames.cs

@@ -9,5 +9,7 @@ namespace OHV.Common.Shareds
     public class RegionNames
     {
         public const string MainView = "MainView";
+        public const string VehicleCommandList = "VehicleCommandList";
+        public const string VehicleCommandListSub = "VehicleCommandListSub";
     }
 }

+ 6 - 4
Dev/OHV/OHV.Module.Interactivity/PopUp/DriveServoView.xaml

@@ -72,12 +72,13 @@
             </Grid.RowDefinitions>
 
             <!--Position Data Grid View-->
-            <Grid Grid.Row="0" Background="#FF606E83" >
-                <ScrollViewer Background="#FF4B5663">
+            <Grid Grid.Row="0" Background="#FF606E83">
+                <ScrollViewer Background="#FF4B5663" Foreground="White">
                     <StackPanel>
-                        <TextBlock>Drive Point List</TextBlock>
+                        <TextBlock Foreground="White">Drive Point List</TextBlock>
                         <DataGrid ItemsSource="{Binding RouteList}" CanUserSortColumns="True" CanUserAddRows="False" AutoGenerateColumns="False" materialDesign:DataGridAssist.CellPadding="13 8 8 8" 
-                                  materialDesign:DataGridAssist.ColumnHeaderPadding="8" Background="{x:Null}" >
+                                  materialDesign:DataGridAssist.ColumnHeaderPadding="8" Background="{x:Null}" Foreground="White">
+
                             <DataGrid.Resources>
                                 <Style TargetType="{x:Type DataGridRow}">
                                     <Style.Triggers>
@@ -87,6 +88,7 @@
                                     </Style.Triggers>
                                 </Style>
                             </DataGrid.Resources>
+
                             <DataGrid.Columns>
                                 <DataGridTemplateColumn >
                                     <DataGridTemplateColumn.CellTemplate>

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

@@ -19,7 +19,7 @@ namespace OHV.Module.Interactivity.PopUp
     {
         private DelegateCommand<string> _closeDialogCommand;
         public DelegateCommand<string> CloseDialogCommand =>
-            _closeDialogCommand ?? ( _closeDialogCommand = new DelegateCommand<string>( CloseDialog ) );
+            _closeDialogCommand ?? (_closeDialogCommand = new DelegateCommand<string>(CloseDialog));
 
         private string _title = "DriveServoView";
         public string Title
@@ -27,7 +27,7 @@ namespace OHV.Module.Interactivity.PopUp
             get { return this._title; }
             set
             {
-                this.SetProperty( ref this._title , value );
+                this.SetProperty(ref this._title, value);
             }
         }
 
@@ -37,7 +37,7 @@ namespace OHV.Module.Interactivity.PopUp
             get => this._selectedPosition;
             set
             {
-                this.SetProperty( ref this._selectedPosition , value );
+                this.SetProperty(ref this._selectedPosition, value);
             }
         }
 
@@ -45,7 +45,7 @@ namespace OHV.Module.Interactivity.PopUp
         public string SelectDirection
         {
             get => this._selectDirection;
-            set { this.SetProperty( ref this._selectDirection , value ); }
+            set { this.SetProperty(ref this._selectDirection, value); }
         }
 
         #region Motor Left Binding Value
@@ -53,28 +53,28 @@ namespace OHV.Module.Interactivity.PopUp
         public double TargetPosDrive
         {
             get { return this._targetPosDrive; }
-            set { this.SetProperty( ref this._targetPosDrive , value ); }
+            set { this.SetProperty(ref this._targetPosDrive, value); }
         }
 
         private double _currentDrive;
         public double CurrentDrive
         {
             get { return this._currentDrive; }
-            set { this.SetProperty( ref this._currentDrive , value ); }
+            set { this.SetProperty(ref this._currentDrive, value); }
         }
 
         private double _differenceDrive;
         public double DifferenceDrive
         {
             get { return this._differenceDrive; }
-            set { this.SetProperty( ref this._differenceDrive , value ); }
+            set { this.SetProperty(ref this._differenceDrive, value); }
         }
 
         private double _jogVelocity;
         public double JogVelocity
         {
             get { return this._jogVelocity; }
-            set { this.SetProperty( ref this._jogVelocity , value ); }
+            set { this.SetProperty(ref this._jogVelocity, value); }
         }
         #endregion
 
@@ -120,14 +120,7 @@ namespace OHV.Module.Interactivity.PopUp
         public ObservableCollection<Route> RouteList
         {
             get { return this._routeList; }
-            set { SetProperty( ref this._routeList , value ); }
-        }
-
-        private Route _selectedRow = new Route();
-        public Route SelectedRow
-        {
-            get { return this._selectedRow; }
-            set { SetProperty( ref this._selectedRow , value ); }
+            set { SetProperty(ref this._routeList, value); }
         }
 
         public SqliteDAL.DAL.AxisPositionDataDAL axisPositionDataDal;
@@ -135,44 +128,44 @@ namespace OHV.Module.Interactivity.PopUp
         MessageController messageController;
         //SelectionList selectionItems;
 
-        public DriveServoViewModel( IEventAggregator _ea, SqliteManager _sql, MessageController _messageController )
+        public DriveServoViewModel(IEventAggregator _ea, SqliteManager _sql, MessageController _messageController)
         {
             this.eventAggregator = _ea;
-            this.eventAggregator.GetEvent<DirveControlPubSubEvent>().Unsubscribe( UICallbackCommunication );
-            this.eventAggregator.GetEvent<DirveControlPubSubEvent>().Subscribe( UICallbackCommunication , ThreadOption.UIThread );
+            this.eventAggregator.GetEvent<DirveControlPubSubEvent>().Unsubscribe(UICallbackCommunication);
+            this.eventAggregator.GetEvent<DirveControlPubSubEvent>().Subscribe(UICallbackCommunication, ThreadOption.UIThread);
 
             this.sql = _sql;
-            this.RouteList = new ObservableCollection<Route>( sql.RouteDal.All );
+            this.RouteList = new ObservableCollection<Route>(sql.RouteDal.All);
             /* Route 로 변경*/
 
             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( DriveControlEventArgs args )
+        private void UICallbackCommunication(DriveControlEventArgs args)
         {
             //TODO: Drive, Steering 구분
-            if ( args.EventDir == DriveControlEventArgs.eEventDir.ToFront )
+            if (args.EventDir == DriveControlEventArgs.eEventDir.ToFront)
             {
                 switch (args.ControlKind)
                 {
@@ -200,9 +193,9 @@ namespace OHV.Module.Interactivity.PopUp
             }
         }
 
-        void PublishEvent( DriveControlEventArgs args )
+        void PublishEvent(DriveControlEventArgs args)
         {
-            this.eventAggregator.GetEvent<DirveControlPubSubEvent>().Publish( args );
+            this.eventAggregator.GetEvent<DirveControlPubSubEvent>().Publish(args);
         }
 
         void ChangeSteeringDirection(bool isLeft)
@@ -280,22 +273,22 @@ namespace OHV.Module.Interactivity.PopUp
           {
               if (r.Result == ButtonResult.OK)
               {
-                    //value check 
-                    //1차 검사 ID 값이 동일한게 있는지 ?
-                    //2차 검사 Value 값 변화된것들이 있으면 변화된것들 Save 후 Update 해야함.
-                    var d = this.RouteList.ToList();
+                  //value check 
+                  //1차 검사 ID 값이 동일한게 있는지 ?
+                  //2차 검사 Value 값 변화된것들이 있으면 변화된것들 Save 후 Update 해야함.
+                  var d = this.RouteList.ToList();
                   var l = d.Distinct().ToList();
 
-                    //var saveData = new ObservableCollection<AxisPositionData>();
+                  //var saveData = new ObservableCollection<AxisPositionData>();
 
-                }
+              }
           });
         }
 
         private void ExecutePositionDeleteCommand()
         {
-            var d = this.SelectedRow;
             var deleteList = new List<Route>();
+
             foreach (var item in this.RouteList)
             {
                 if (item.IsSelected)
@@ -345,8 +338,8 @@ namespace OHV.Module.Interactivity.PopUp
         {
             await Task.Run(() =>
            {
-                //Axis.Move(this.SelectPosition);
-            });
+               //Axis.Move(this.SelectPosition);
+           });
         }
 
         private void ExecuteSelectPosCommand(object obj)
@@ -374,16 +367,16 @@ namespace OHV.Module.Interactivity.PopUp
         #endregion
 
         #region Dialog Function
-        public bool CanCloseDialog( )
+        public bool CanCloseDialog()
         {
             return true;
         }
 
-        public void OnDialogClosed( )
+        public void OnDialogClosed()
         {
         }
 
-        public void OnDialogOpened( IDialogParameters parameters )
+        public void OnDialogOpened(IDialogParameters parameters)
         {
             var msg = new DriveControlEventArgs
             {
@@ -393,21 +386,21 @@ namespace OHV.Module.Interactivity.PopUp
             this.PublishEvent(msg);
         }
 
-        private void CloseDialog( string parameter )
+        private void CloseDialog(string parameter)
         {
             ButtonResult result = ButtonResult.None;
 
-            if ( parameter?.ToLower() == "true" )
+            if (parameter?.ToLower() == "true")
                 result = ButtonResult.OK;
-            else if ( parameter?.ToLower() == "false" )
+            else if (parameter?.ToLower() == "false")
                 result = ButtonResult.Cancel;
 
-            RaiseRequestClose( new DialogResult( result ) );
+            RaiseRequestClose(new DialogResult(result));
         }
 
-        public virtual void RaiseRequestClose( IDialogResult dialogResult )
+        public virtual void RaiseRequestClose(IDialogResult dialogResult)
         {
-            RequestClose?.Invoke( dialogResult );
+            RequestClose?.Invoke(dialogResult);
         }
         #endregion
     }

+ 34 - 0
Dev/OHV/OHV.Module.ListViews/ListViewController.cs

@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using OHV.Common.Shareds;
+using OHV.Module.ListViews.SubViews;
+using OHV.Module.ListViews.Views;
+using Prism.Ioc;
+using Prism.Modularity;
+using Prism.Mvvm;
+using Prism.Regions;
+
+namespace OHV.Module.ListViews
+{
+    public class ListViewController : IModule
+    {
+        public void OnInitialized(IContainerProvider containerProvider)
+        {
+            ViewModelLocationProvider.Register<CommandListView, CommandListViewModel>();
+            //ViewModelLocationProvider.Register<VehicleCommandDeleteView, VehicleCommandDeleteViewModel>();
+            //ViewModelLocationProvider.Register<VehicleCommandInsertView, VehicleCommandInsertViewModel>();
+
+            var regionManager = containerProvider.Resolve<IRegionManager>();
+            regionManager.RegisterViewWithRegion(RegionNames.VehicleCommandList, typeof(CommandListView));
+            //regionManager.RegisterViewWithRegion(RegionNames.VehicleCommandListSub, typeof(VehicleCommandDeleteView));
+            //regionManager.RegisterViewWithRegion(RegionNames.VehicleCommandListSub, typeof(VehicleCommandInsertView));
+        }
+
+        public void RegisterTypes(IContainerRegistry containerRegistry)
+        {
+        }
+    }
+}

+ 133 - 0
Dev/OHV/OHV.Module.ListViews/OHV.Module.ListViews.csproj

@@ -0,0 +1,133 @@
+<?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>{0043B4EC-A651-401C-9845-57A7C7576E28}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>OHV.Module.ListViews</RootNamespace>
+    <AssemblyName>OHV.Module.ListViews</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="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="FluentResults">
+      <HintPath>..\Assambly\FluentResults.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="PresentationCore" />
+    <Reference Include="PresentationFramework" />
+    <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.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.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.Xaml" />
+    <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" />
+    <Reference Include="WindowsBase" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="ListViewController.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="PubSubEvents\ListSelectionChange.cs" />
+    <Compile Include="SubViews\VehicleCommandDeleteView.xaml.cs">
+      <DependentUpon>VehicleCommandDeleteView.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="SubViews\VehicleCommandDeleteViewModel.cs">
+      <DependentUpon>VehicleCommandDeleteView.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="SubViews\VehicleCommandInsertView.xaml.cs">
+      <DependentUpon>VehicleCommandInsertView.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="SubViews\VehicleCommandInsertViewModel.cs">
+      <DependentUpon>VehicleCommandInsertView.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\CommandListView.xaml.cs">
+      <DependentUpon>CommandListView.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\CommandListViewModel.cs">
+      <DependentUpon>CommandListView.xaml</DependentUpon>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="packages.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <Page Include="SubViews\VehicleCommandDeleteView.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="SubViews\VehicleCommandInsertView.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Views\CommandListView.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\OHV.Common\OHV.Common.csproj">
+      <Project>{0d1f7fbc-bfb0-4ee4-852d-e2a8d62c5708}</Project>
+      <Name>OHV.Common</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\OHV.SqliteDAL\OHV.SqliteDAL.csproj">
+      <Project>{122d81c8-9ab9-4ced-80d2-9c4f2f9deb4c}</Project>
+      <Name>OHV.SqliteDAL</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <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>

+ 36 - 0
Dev/OHV/OHV.Module.ListViews/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해 
+// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면
+// 이러한 특성 값을 변경하세요.
+[assembly: AssemblyTitle("OHV.Module.ListViews")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("OHV.Module.ListViews")]
+[assembly: AssemblyCopyright("Copyright ©  2020")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에 
+// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면
+// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요.
+[assembly: ComVisible(false)]
+
+// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다.
+[assembly: Guid("0043b4ec-a651-401c-9845-57a7c7576e28")]
+
+// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다.
+//
+//      주 버전
+//      부 버전 
+//      빌드 번호
+//      수정 버전
+//
+// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
+// 기본값으로 할 수 있습니다.
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 12 - 0
Dev/OHV/OHV.Module.ListViews/PubSubEvents/ListSelectionChange.cs

@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using OHV.Common.Model;
+using Prism.Events;
+
+namespace OHV.Module.ListViews.PubSubEvents
+{
+    public class VehicleCommandSelectionChange : PubSubEvent<Command> { }
+}

+ 12 - 0
Dev/OHV/OHV.Module.ListViews/SubViews/VehicleCommandDeleteView.xaml

@@ -0,0 +1,12 @@
+<UserControl x:Class="OHV.Module.ListViews.SubViews.VehicleCommandDeleteView"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:local="clr-namespace:OHV.Module.ListViews.SubViews"
+             mc:Ignorable="d" 
+             d:DesignHeight="450" d:DesignWidth="800">
+    <Grid>
+            
+    </Grid>
+</UserControl>

+ 37 - 0
Dev/OHV/OHV.Module.ListViews/SubViews/VehicleCommandDeleteView.xaml.cs

@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+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;
+using Prism.Regions;
+
+namespace OHV.Module.ListViews.SubViews
+{
+    /// <summary>
+    /// VehicleCommandDeleteView.xaml에 대한 상호 작용 논리
+    /// </summary>
+    [ViewSortHint("01")]
+    public partial class VehicleCommandDeleteView : UserControl
+    {
+        public string Header { get; private set; }
+        public VehicleCommandDeleteView()
+        {
+            InitializeComponent();
+
+            if (!DesignerProperties.GetIsInDesignMode(this))
+            {
+                this.Header = "Delete";
+            }
+        }
+    }
+}

+ 12 - 0
Dev/OHV/OHV.Module.ListViews/SubViews/VehicleCommandDeleteViewModel.cs

@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OHV.Module.ListViews.SubViews
+{
+    class VehicleCommandDeleteViewModel
+    {
+    }
+}

+ 76 - 0
Dev/OHV/OHV.Module.ListViews/SubViews/VehicleCommandInsertView.xaml

@@ -0,0 +1,76 @@
+<UserControl x:Class="OHV.Module.ListViews.SubViews.VehicleCommandInsertView"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:local="clr-namespace:OHV.Module.ListViews.SubViews"
+             xmlns:prism="http://prismlibrary.com/"
+             prism:ViewModelLocator.AutoWireViewModel="True"
+             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+             xmlns:System="clr-namespace:System;assembly=mscorlib"
+             xmlns:Shared="clr-namespace:OHV.Common.Shareds;assembly=OHV.Common"
+             mc:Ignorable="d" 
+             d:DesignHeight="450" d:DesignWidth="800">
+
+    <UserControl.Resources>
+        <ResourceDictionary>
+            <ResourceDictionary.MergedDictionaries>
+                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
+                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
+                <ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.DeepPurple.xaml" />
+                <ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Lime.xaml" />
+            </ResourceDictionary.MergedDictionaries>
+
+            <ObjectDataProvider x:Key="CommandType" MethodName="GetValues"
+                            ObjectType="{x:Type System:Enum}">
+                <ObjectDataProvider.MethodParameters>
+                    <x:Type TypeName="Shared:eCommandType"/>
+                </ObjectDataProvider.MethodParameters>
+            </ObjectDataProvider>
+        </ResourceDictionary>
+    </UserControl.Resources>
+
+    <Grid Background="#263238">
+        <Grid.RowDefinitions>
+            <RowDefinition Height="30"/>
+            <RowDefinition Height="Auto"/>
+            <RowDefinition Height="*"/>
+        </Grid.RowDefinitions>
+        <Rectangle Fill="#FFEEEEF2" Grid.Row="1" Margin="5,5,5,0"/>
+        <TextBlock Text="* 신규 등록 사용자 정보를 정확히 입력하여 주시기 바랍니다." Style="{DynamicResource MaterialDesignTextBlock}" Foreground="Orange" VerticalAlignment="Center" Margin="10,0"/>
+
+        <Grid Grid.Row="1" Margin="20,10,20,15" VerticalAlignment="Center">
+            <Grid.RowDefinitions>
+                <RowDefinition Height="*"/>
+                <RowDefinition Height="*"/>
+            </Grid.RowDefinitions>
+
+            <Grid Margin="0,10,0,0" Grid.Row="0" Height="25">
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition Width="120"/>
+                    <ColumnDefinition Width="*"/>
+                </Grid.ColumnDefinitions>
+                <TextBlock Text="TargetID" Style="{DynamicResource MaterialDesignTextBlock}" VerticalAlignment="Center"/>
+                <ComboBox ItemsSource="{Binding TargetIDList}" SelectedItem="{Binding TargetID, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"  Grid.Column="1">
+                </ComboBox>
+            </Grid>
+
+            <Grid Margin="0,10,0,0" Grid.Row="1" Height="25">
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition Width="120"/>
+                    <ColumnDefinition Width="*"/>
+                </Grid.ColumnDefinitions>
+                <TextBlock Text="Type" Style="{DynamicResource MaterialDesignTextBlock}" VerticalAlignment="Center"/>
+                <ComboBox ItemsSource="{Binding Source={StaticResource CommandType}}" SelectedItem="{Binding SelectedCommandType, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"  Grid.Column="1">
+                </ComboBox>
+            </Grid>
+
+        </Grid>
+        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="2" VerticalAlignment="Top" Margin="0,15,0,0">
+            <Button Margin="0,0,10,0" Height="45" Content="Add" Command="{Binding SaveCommand}" Width="100"/>
+
+            <Button Height="45" Content="Cancel" Command="{Binding CancelCommand}" Width="100"/>
+        </StackPanel>
+    </Grid>
+
+</UserControl>

+ 37 - 0
Dev/OHV/OHV.Module.ListViews/SubViews/VehicleCommandInsertView.xaml.cs

@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+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;
+using Prism.Regions;
+
+namespace OHV.Module.ListViews.SubViews
+{
+    /// <summary>
+    /// VehicleCommandInsertView.xaml에 대한 상호 작용 논리
+    /// </summary>
+    [ViewSortHint("02")]
+    public partial class VehicleCommandInsertView : UserControl
+    {
+        public string Header { get; private set; }
+        public VehicleCommandInsertView()
+        {
+            InitializeComponent();
+            
+            if (!DesignerProperties.GetIsInDesignMode(this))
+            {
+                this.Header = "Insert";
+            }
+        }
+    }
+}

+ 73 - 0
Dev/OHV/OHV.Module.ListViews/SubViews/VehicleCommandInsertViewModel.cs

@@ -0,0 +1,73 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Input;
+using OHV.Common.Events;
+using OHV.Common.Model;
+using OHV.Common.Shareds;
+using OHV.Module.ListViews.PubSubEvents;
+using OHV.SqliteDAL;
+using Prism.Commands;
+using Prism.Events;
+using Prism.Mvvm;
+
+namespace OHV.Module.ListViews.SubViews
+{
+    public class VehicleCommandInsertViewModel : BindableBase
+    {
+        private string targetID;
+        public string TargetID
+        {
+            get { return targetID; }
+            set { SetProperty(ref this.targetID, value); }
+        }
+
+        private eCommandType selectedCommandType;
+        public eCommandType SelectedCommandType
+        {
+            get { return selectedCommandType; }
+            set { SetProperty(ref this.selectedCommandType, value); }
+        }
+
+        private List<string> targetIDList;
+
+        public List<string> TargetIDList
+        {
+            get { return targetIDList; }
+            set { SetProperty(ref this.targetIDList, value); }
+        }
+
+
+        public ICommand SaveCommand { get; set; }
+        public ICommand CancelCommand { get; set; }
+
+        IEventAggregator eventAggregator;
+        SqliteManager sql;
+        public VehicleCommandInsertViewModel(IEventAggregator ea, SqliteManager sql)
+        {
+            this.eventAggregator = ea;
+            this.sql = sql;
+
+            this.TargetIDList = sql.RouteDal.All.Select(x => x.Name).ToList();
+            this.TargetIDList.Add("None");
+
+            this.SaveCommand = new DelegateCommand(ExecuteSaveCommand);
+            this.CancelCommand = new DelegateCommand(ExecuteCancelCommand);
+        }
+
+        private void ExecuteCancelCommand()
+        {
+            this.TargetID = "None";
+            this.SelectedCommandType = eCommandType.Move;
+        }
+
+        private void ExecuteSaveCommand()
+        {
+            Command cmd = new Command() { TargetID = TargetID, Type = SelectedCommandType };
+            sql.CommandDAL.Add(cmd);
+        }
+
+    }
+}

+ 128 - 0
Dev/OHV/OHV.Module.ListViews/Views/CommandListView.xaml

@@ -0,0 +1,128 @@
+<UserControl x:Class="OHV.Module.ListViews.Views.CommandListView"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:local="clr-namespace:OHV.Module.ListViews.Views"
+             xmlns:prism="http://prismlibrary.com/"
+             prism:ViewModelLocator.AutoWireViewModel="True"
+             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+             xmlns:System="clr-namespace:System;assembly=mscorlib"
+             xmlns:Shared="clr-namespace:OHV.Common.Shareds;assembly=OHV.Common"
+             mc:Ignorable="d" 
+             d:DesignHeight="600" d:DesignWidth="800" Foreground="White">
+
+    <UserControl.Resources>
+        <ResourceDictionary>
+            <ObjectDataProvider x:Key="CommandType" MethodName="GetValues"
+                            ObjectType="{x:Type System:Enum}">
+                <ObjectDataProvider.MethodParameters>
+                    <x:Type TypeName="Shared:eCommandType"/>
+                </ObjectDataProvider.MethodParameters>
+            </ObjectDataProvider>
+            <ObjectDataProvider x:Key="CommandState" MethodName="GetValues"
+                            ObjectType="{x:Type System:Enum}">
+                <ObjectDataProvider.MethodParameters>
+                    <x:Type TypeName="Shared:eCommandState"/>
+                </ObjectDataProvider.MethodParameters>
+            </ObjectDataProvider>
+
+            <ResourceDictionary.MergedDictionaries>
+                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.DataGrid.xaml" />
+                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
+                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
+                <ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.DeepPurple.xaml" />
+                <ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Lime.xaml" />
+            </ResourceDictionary.MergedDictionaries>
+        </ResourceDictionary>
+    </UserControl.Resources>
+
+    <Grid Background="#263238">
+        <Grid.RowDefinitions>
+            <RowDefinition Height="40"/>
+            <RowDefinition Height="*"/>
+        </Grid.RowDefinitions>
+        <TextBlock VerticalAlignment="Center" FontSize="20" Margin="10,0,0,0">Command List</TextBlock>
+        <Grid Grid.Row="1">
+            <Grid.ColumnDefinitions>
+                <ColumnDefinition Width="2*"/>
+                <ColumnDefinition Width="*"/>
+            </Grid.ColumnDefinitions>
+            <DataGrid ItemsSource="{Binding CommandList}" CanUserSortColumns="True" CanUserAddRows="False" AutoGenerateColumns="False" materialDesign:DataGridAssist.CellPadding="13 8 8 8" 
+                                  materialDesign:DataGridAssist.ColumnHeaderPadding="8" Background="{x:Null}" Foreground="White" IsReadOnly="True">
+
+                <DataGrid.Resources>
+                    <Style TargetType="{x:Type DataGridRow}">
+                        <Style.Triggers>
+                            <Trigger Property="IsSelected" Value="false">
+                                <Setter Property="Background" Value="{x:Null}"></Setter>
+                            </Trigger>
+                        </Style.Triggers>
+                    </Style>
+                </DataGrid.Resources>
+
+                <DataGrid.Columns>
+                    <DataGridTemplateColumn >
+                        <DataGridTemplateColumn.CellTemplate>
+                            <DataTemplate>
+                                <CheckBox IsChecked="{Binding IsSelected, UpdateSourceTrigger=PropertyChanged}"></CheckBox>
+                            </DataTemplate>
+                        </DataGridTemplateColumn.CellTemplate>
+                    </DataGridTemplateColumn>
+
+                    <materialDesign:DataGridTextColumn Header="Target" Binding="{Binding TargetID}" EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnPopupEditingStyle}"></materialDesign:DataGridTextColumn>
+                    <materialDesign:DataGridTextColumn Header="Type" Binding="{Binding Type}" EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnPopupEditingStyle}"></materialDesign:DataGridTextColumn>
+                    <materialDesign:DataGridTextColumn Header="State" Binding="{Binding State}" EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnPopupEditingStyle}"></materialDesign:DataGridTextColumn>
+                    <materialDesign:DataGridTextColumn Header="CreateTime" Binding="{Binding CreateTime}" EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnPopupEditingStyle}"></materialDesign:DataGridTextColumn>
+                    <materialDesign:DataGridTextColumn Header="CommandID" Binding="{Binding Co}" EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnPopupEditingStyle}"></materialDesign:DataGridTextColumn>
+
+                </DataGrid.Columns>
+            </DataGrid>
+
+            <Grid Background="#263238" Grid.Column="1">
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="30"/>
+                    <RowDefinition Height="Auto"/>
+                    <RowDefinition Height="*"/>
+                </Grid.RowDefinitions>
+                <TextBlock Text="Add / Delete" Style="{DynamicResource MaterialDesignTextBlock}" Foreground="Orange" VerticalAlignment="Center" Margin="10,0"/>
+
+                <Grid Grid.Row="1" Margin="20,10,20,15" VerticalAlignment="Center" Background="#263238">
+                    <Grid.RowDefinitions>
+                        <RowDefinition Height="*"/>
+                        <RowDefinition Height="*"/>
+                    </Grid.RowDefinitions>
+
+                    <Grid Margin="0,10,0,0" Grid.Row="0" Height="25" Background="#263238">
+                        <Grid.ColumnDefinitions>
+                            <ColumnDefinition Width="120"/>
+                            <ColumnDefinition Width="*"/>
+                        </Grid.ColumnDefinitions>
+                        <TextBlock Text="TargetID" Style="{DynamicResource MaterialDesignTextBlock}" VerticalAlignment="Center"/>
+                        <ComboBox ItemsSource="{Binding TargetIDList}" SelectedItem="{Binding TargetID, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"  Grid.Column="1">
+                        </ComboBox>
+                    </Grid>
+
+                    <Grid Margin="0,10,0,0" Grid.Row="1" Height="25">
+                        <Grid.ColumnDefinitions>
+                            <ColumnDefinition Width="120"/>
+                            <ColumnDefinition Width="*"/>
+                        </Grid.ColumnDefinitions>
+                        <TextBlock Text="Type" Style="{DynamicResource MaterialDesignTextBlock}" VerticalAlignment="Center"/>
+                        <ComboBox ItemsSource="{Binding Source={StaticResource CommandType}}" SelectedItem="{Binding SelectedCommandType, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"  Grid.Column="1">
+                        </ComboBox>
+                    </Grid>
+
+                </Grid>
+
+                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="2" VerticalAlignment="Top" Margin="0,15,0,0">
+                    <Button Margin="0,0,10,0" Height="45" Content="Add" Command="{Binding SaveCommand}" Width="100"/>
+                    <Button Height="45" Content="Delete" Command="{Binding DeleteCommand}" Width="100"/>
+                </StackPanel>
+            </Grid>
+
+
+        </Grid>
+
+    </Grid>
+</UserControl>

+ 28 - 0
Dev/OHV/OHV.Module.ListViews/Views/CommandListView.xaml.cs

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

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

@@ -0,0 +1,110 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Input;
+using OHV.Common.Events;
+using OHV.Common.Model;
+using OHV.Common.Shareds;
+using OHV.SqliteDAL;
+using Prism.Commands;
+using Prism.Events;
+using Prism.Mvvm;
+
+namespace OHV.Module.ListViews.Views
+{
+    class CommandListViewModel : BindableBase
+    {
+        #region Binding Properties
+        private ObservableCollection<Command> _commandList;
+        public ObservableCollection<Command> CommandList
+        {
+            get { return this._commandList; }
+            set { SetProperty(ref this._commandList, value); }
+        }
+
+        private string targetID;
+        public string TargetID
+        {
+            get { return targetID; }
+            set { SetProperty(ref this.targetID, value); }
+        }
+
+        private eCommandType selectedCommandType;
+        public eCommandType SelectedCommandType
+        {
+            get { return selectedCommandType; }
+            set { SetProperty(ref this.selectedCommandType, value); }
+        }
+
+        private List<string> targetIDList;
+
+        public List<string> TargetIDList
+        {
+            get { return targetIDList; }
+            set { SetProperty(ref this.targetIDList, value); }
+        }
+
+        #endregion
+
+        public ICommand SaveCommand { get; set; }
+        public ICommand DeleteCommand { get; set; }
+
+        IEventAggregator eventAggregator;
+        SqliteManager sql;
+
+        public CommandListViewModel(IEventAggregator ea, SqliteManager sql)
+        {
+            this.eventAggregator = ea;
+            this.sql = sql;
+
+            this.CommandList = new ObservableCollection<Command>(sql.CommandDAL.All);
+
+            this.TargetIDList = sql.RouteDal.All.Select(x => x.Name).ToList();
+            this.TargetIDList.Add("None");
+
+            this.SaveCommand = new DelegateCommand(ExecuteSaveCommand);
+            this.DeleteCommand = new DelegateCommand(ExecuteDeleteCommand);
+
+
+            this.eventAggregator.GetEvent<VehicleCommandListChanged>().Unsubscribe(UICallbackCommunication);
+            this.eventAggregator.GetEvent<VehicleCommandListChanged>().Subscribe(UICallbackCommunication);
+        }
+
+        private void UICallbackCommunication(string obj)
+        {
+            this.CommandList.Clear();
+            this.CommandList.AddRange(sql.CommandDAL.All);
+        }
+
+        private void ExecuteDeleteCommand()
+        {
+            foreach (var item in this.CommandList)
+            {
+                if (item.IsSelected)
+                {
+                    this.sql.CommandDAL.Delete(item);
+                }
+            }
+
+            RefreshCommandLIst();
+        }
+
+        private void ExecuteSaveCommand()
+        {
+            Command cmd = new Command() { TargetID = TargetID, Type = SelectedCommandType };
+            sql.CommandDAL.Add(cmd);
+
+            this.RefreshCommandLIst();
+        }
+
+        void RefreshCommandLIst()
+        {
+            this.CommandList.Clear();
+            this.CommandList.AddRange(sql.CommandDAL.All);
+        }
+
+    }
+}

+ 9 - 0
Dev/OHV/OHV.Module.ListViews/packages.config

@@ -0,0 +1,9 @@
+<?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>

+ 14 - 4
Dev/OHV/OHV.Module.MainViews/Views/AutoView.xaml

@@ -7,9 +7,8 @@
              xmlns:local="clr-namespace:OHV.Module.MainViews.Views"
              xmlns:prism="http://prismlibrary.com/"
              prism:ViewModelLocator.AutoWireViewModel="True"
-             mc:Ignorable="d"             
-             Width="Auto"
-             Height="942"
+             xmlns:OHVCommonShareds="clr-namespace:OHV.Common.Shareds;assembly=OHV.Common"
+             mc:Ignorable="d"  d:DesignHeight="450" d:DesignWidth="800"         
              >
 
     <Grid Background="#37474f">
@@ -17,6 +16,17 @@
             <ColumnDefinition Width="*"/>
         </Grid.ColumnDefinitions>
 
-        <Grid Margin="15" Background="#263238"/>
+        <Grid Margin="15" Background="#263238">
+            <Grid.RowDefinitions>
+                <RowDefinition Height="1*" />
+                <RowDefinition Height="1*" />
+                <RowDefinition Height="1*" />
+            </Grid.RowDefinitions>
+
+            <Grid Grid.Row="0">
+                <ContentControl prism:RegionManager.RegionName="{x:Static OHVCommonShareds:RegionNames.VehicleCommandList}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Width="auto" Height="auto"/>
+            </Grid>
+        </Grid>
+
     </Grid>
 </UserControl>

+ 2 - 1
Dev/OHV/OHV.SqliteDAL/DAL/AbstractDAL.cs

@@ -73,7 +73,8 @@ namespace OHV.SqliteDAL.DAL
         {
             using (var db = new OHVDbContext("OHVDb"))
             {
-                db.Set<T>().Remove(entity);
+                db.Entry(entity).State = EntityState.Deleted;
+                //db.Set<T>().Remove(entity);
                 db.SaveChanges();
             }
         }

+ 1 - 42
Dev/OHV/OHV.SqliteDAL/DAL/CommandDAL.cs

@@ -8,21 +8,8 @@ using OHV.Common.Shareds;
 
 namespace OHV.SqliteDAL.DAL
 {
-    public class CommandDAL
+    public class CommandDAL : GenericDAL<Command>
     {
-        public List<Command> All 
-        { 
-            get 
-            {
-                List<Command> ll = new List<Command>();
-                using (var db = new OHVDbContext("OHVDb"))
-                {
-                    ll = db.Set<Command>().ToList();
-                }
-                return ll;
-            }
-        }
-
         public Command GetCmd()
         {
             Command cmd;
@@ -33,34 +20,6 @@ namespace OHV.SqliteDAL.DAL
             return cmd;
         }
 
-
-        public void Clean()
-        {
-            using (var db = new OHVDbContext("OHVDb"))
-            {
-                db.Set<Command>().RemoveRange(db.Set<Command>());
-                db.SaveChanges();
-            }
-        }
-
-        public void Delete(Command cmd)
-        {
-            using (var db = new OHVDbContext("OHVDb"))
-            {
-                db.Set<Command>().Remove(cmd);
-                db.SaveChanges();
-            }
-        }
-
-        public void Add(Command cmd)
-        {
-            using (var db = new OHVDbContext("OHVDb"))
-            {
-                db.Set<Command>().Add(cmd);
-                db.SaveChanges();
-            }
-        }
-
         public void UpdateState(string id, eCommandState state)
         {
             using (var db = new OHVDbContext("OHVDb"))

+ 1 - 0
Dev/OHV/OHV.Vehicle/App.xaml.cs

@@ -128,6 +128,7 @@ namespace OHV.Vehicle
             moduleCatalog.AddModule(typeof(OHV.Module.Monitoring.MonitoringModules));
             moduleCatalog.AddModule(typeof(OHV.Module.MainViews.MainViewModules));
             moduleCatalog.AddModule(typeof(OHV.Module.Interactivity.MessageController));
+            moduleCatalog.AddModule(typeof(OHV.Module.ListViews.ListViewController));
         }
 
     }

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

@@ -195,7 +195,7 @@ namespace OHV.Vehicle.Concept
         private void Navigate( object obj )
         {
             var selectItem = obj.ToString();
-            if ( selectItem != null )
+            if ( !string.IsNullOrEmpty(selectItem ))
                 regionManager.RequestNavigate( "MainView" , selectItem );
         }
 
@@ -217,11 +217,11 @@ namespace OHV.Vehicle.Concept
         public void InitViewModel( )
         {
             //VCSystem.Instance.Init();
-            var containerRegistry = ServiceLocator.Current.GetInstance<VCSystem>();
-            if ( containerRegistry.Equals( this.VCSystem ) )
-            {
-                Console.WriteLine( "==" );
-            }
+            //var containerRegistry = ServiceLocator.Current.GetInstance<VCSystem>();
+            //if ( containerRegistry.Equals( this.VCSystem ) )
+            //{
+            //    Console.WriteLine( "==" );
+            //}
             //var vsys = containerRegistry.GetContainer().Resolve<IContainerProvider>();
 
             regionManager.RequestNavigate( RegionNames.MainView , "AutoView" );

+ 4 - 0
Dev/OHV/OHV.Vehicle/OHV.Vehicle.csproj

@@ -228,6 +228,10 @@
       <Project>{d6402d97-2206-4d55-8097-8da9a01568cb}</Project>
       <Name>OHV.Module.Interactivity</Name>
     </ProjectReference>
+    <ProjectReference Include="..\OHV.Module.ListViews\OHV.Module.ListViews.csproj">
+      <Project>{0043b4ec-a651-401c-9845-57a7c7576e28}</Project>
+      <Name>OHV.Module.ListViews</Name>
+    </ProjectReference>
     <ProjectReference Include="..\OHV.Module.MainViews\OHV.Module.MainViews.csproj">
       <Project>{eafdb5ff-20f9-4172-9a11-ec8cf3ab6edc}</Project>
       <Name>OHV.Module.MainViews</Name>

+ 7 - 0
Dev/OHV/OHV.sln

@@ -41,6 +41,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GSG.NET.Excel", "..\..\..\G
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OHV.LanguageHelper", "OHV.LanguageHalper\OHV.LanguageHelper.csproj", "{712D75B5-89DD-4064-BC4B-2F9D9F157604}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OHV.Module.ListViews", "OHV.Module.ListViews\OHV.Module.ListViews.csproj", "{0043B4EC-A651-401C-9845-57A7C7576E28}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -99,6 +101,10 @@ Global
 		{712D75B5-89DD-4064-BC4B-2F9D9F157604}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{712D75B5-89DD-4064-BC4B-2F9D9F157604}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{712D75B5-89DD-4064-BC4B-2F9D9F157604}.Release|Any CPU.Build.0 = Release|Any CPU
+		{0043B4EC-A651-401C-9845-57A7C7576E28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{0043B4EC-A651-401C-9845-57A7C7576E28}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{0043B4EC-A651-401C-9845-57A7C7576E28}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{0043B4EC-A651-401C-9845-57A7C7576E28}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -117,6 +123,7 @@ Global
 		{EAFDB5FF-20F9-4172-9A11-EC8CF3AB6EDC} = {6C7A1445-7F2F-46C4-9AAD-AEB739F9BD2D}
 		{D6402D97-2206-4D55-8097-8DA9A01568CB} = {6C7A1445-7F2F-46C4-9AAD-AEB739F9BD2D}
 		{712D75B5-89DD-4064-BC4B-2F9D9F157604} = {B2DE533E-C8A8-41CD-97CB-E88905233610}
+		{0043B4EC-A651-401C-9845-57A7C7576E28} = {6C7A1445-7F2F-46C4-9AAD-AEB739F9BD2D}
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 		SolutionGuid = {2222F9E2-CBEF-4156-9636-5DF54ECDDA89}

BIN
Dev/OHV/OutRelese/Config/IO.xlsx


BIN
Dev/OHV/OutRelese/DB/OHVDb.sqlite


BIN
Dev/OHV/OutRelese/OHV.Common.dll


BIN
Dev/OHV/OutRelese/OHV.Common.pdb


BIN
Dev/OHV/OutRelese/OHV.Module.Interactivity.dll


BIN
Dev/OHV/OutRelese/OHV.Module.Interactivity.pdb


BIN
Dev/OHV/OutRelese/OHV.Module.MainViews.dll


BIN
Dev/OHV/OutRelese/OHV.Module.MainViews.pdb


BIN
Dev/OHV/OutRelese/OHV.SqliteDAL.dll


BIN
Dev/OHV/OutRelese/OHV.SqliteDAL.pdb


BIN
Dev/OHV/OutRelese/OHV.Vehicle.exe


BIN
Dev/OHV/OutRelese/OHV.Vehicle.pdb


BIN
Dev/OHV/OutRelese/VehicleControlSystem.dll