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

UI 기능 Debugginfg

SK.Kang 6 éve
szülő
commit
80dd4ccddb

+ 4 - 4
Dev/OHV/OHV.Common/App.config

@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <configuration>
   <configSections>
-    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
-    <section name="entityFramework"
-      type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
-      requirePermission="false"/>
+  <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
+  <section name="entityFramework"
+    type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
+    requirePermission="false"/>
   </configSections>
   <entityFramework>
     <providers>

+ 1 - 0
Dev/OHV/OHV.Common/OHV.Common.csproj

@@ -68,6 +68,7 @@
     <Compile Include="Model\SelectionList.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Shareds\SharedEnumType.cs" />
+    <Compile Include="Shareds\UIModuleRegionNames.cs" />
   </ItemGroup>
   <ItemGroup>
     <None Include="App.config" />

+ 13 - 0
Dev/OHV/OHV.Common/Shareds/UIModuleRegionNames.cs

@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OHV.Common.Shareds
+{
+    public class UIModuleRegionNames
+    {
+        public const string MainView = "MainView";
+    }
+}

+ 32 - 0
Dev/OHV/OHV.Module.MainViews/MainViewModules.cs

@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using OHV.Common.Shareds;
+using OHV.Module.MainViews.Views;
+using Prism.Ioc;
+using Prism.Modularity;
+using Prism.Mvvm;
+using Prism.Regions;
+
+namespace OHV.Module.MainViews
+{
+    public class MainViewModules : IModule
+    {
+
+        public void OnInitialized(IContainerProvider containerProvider)
+        {
+            ViewModelLocationProvider.Register<ModuleAutoView, ModuleAutoViewModel>();
+
+            var regionManager = containerProvider.Resolve<IRegionManager>();
+            regionManager.RegisterViewWithRegion(UIModuleRegionNames.MainView, typeof(ModuleAutoView));
+            regionManager.RegisterViewWithRegion(UIModuleRegionNames.MainView, typeof(DeviceView));
+        }
+
+        public void RegisterTypes(IContainerRegistry containerRegistry)
+        {
+            //throw new NotImplementedException();
+        }
+    }
+}

+ 111 - 0
Dev/OHV/OHV.Module.MainViews/OHV.Module.MainViews.csproj

@@ -0,0 +1,111 @@
+<?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>{EAFDB5FF-20F9-4172-9A11-EC8CF3AB6EDC}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>OHV.Module.MainViews</RootNamespace>
+    <AssemblyName>OHV.Module.MainViews</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="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="MainViewModules.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Views\DeviceView.xaml.cs">
+      <DependentUpon>DeviceView.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\ModuleAutoView.xaml.cs">
+      <DependentUpon>ModuleAutoView.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\ModuleAutoViewModel.cs">
+      <DependentUpon>ModuleAutoView.xaml</DependentUpon>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <Page Include="Views\DeviceView.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Views\ModuleAutoView.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="packages.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\OHV.Common\OHV.Common.csproj">
+      <Project>{0d1f7fbc-bfb0-4ee4-852d-e2a8d62c5708}</Project>
+      <Name>OHV.Common</Name>
+    </ProjectReference>
+  </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.MainViews/Properties/AssemblyInfo.cs

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

+ 21 - 0
Dev/OHV/OHV.Module.MainViews/Views/DeviceView.xaml

@@ -0,0 +1,21 @@
+<UserControl x:Class="OHV.Module.MainViews.Views.DeviceView"
+             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.MainViews.Views"
+                          xmlns:prism="http://prismlibrary.com/"
+             prism:ViewModelLocator.AutoWireViewModel="True"
+
+             mc:Ignorable="d" 
+             d:DesignHeight="450" d:DesignWidth="800">
+    <Grid>
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="1*"/>
+            <ColumnDefinition Width="1*"/>
+        </Grid.ColumnDefinitions>
+
+        <ContentControl prism:RegionManager.RegionName="IOView"/>
+
+    </Grid>
+</UserControl>

+ 4 - 4
Dev/OHV/OHV.Module.Monitoring/Interactivity/ModuleAuto.xaml.cs

@@ -13,14 +13,14 @@ using System.Windows.Media.Imaging;
 using System.Windows.Navigation;
 using System.Windows.Shapes;
 
-namespace OHV.Module.Monitoring.Interactivity
+namespace OHV.Module.MainViews.Views
 {
     /// <summary>
-    /// ModuleAuto.xaml에 대한 상호 작용 논리
+    /// DeviceView.xaml에 대한 상호 작용 논리
     /// </summary>
-    public partial class ModuleAuto : UserControl
+    public partial class DeviceView : UserControl
     {
-        public ModuleAuto()
+        public DeviceView()
         {
             InitializeComponent();
         }

+ 8 - 4
Dev/OHV/OHV.Module.Monitoring/Interactivity/ModuleAuto.xaml

@@ -1,12 +1,16 @@
-<UserControl x:Class="OHV.Module.Monitoring.Interactivity.ModuleAuto"
+<UserControl x:Class="OHV.Module.MainViews.Views.ModuleAutoView"
              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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
-             xmlns:local="clr-namespace:OHV.Module.Monitoring.Interactivity"
-             mc:Ignorable="d" 
-             d:DesignHeight="710" d:DesignWidth="1212">
+             xmlns:local="clr-namespace:OHV.Module.MainViews.Views"
+             xmlns:prism="http://prismlibrary.com/"
+             prism:ViewModelLocator.AutoWireViewModel="True"
+             mc:Ignorable="d"
+             d:DesignHeight="710" d:DesignWidth="1212"
+             >
+
     <Grid Background="White">
         <Grid.ColumnDefinitions>
             <ColumnDefinition Width="641*"/>

+ 36 - 0
Dev/OHV/OHV.Module.MainViews/Views/ModuleAutoView.xaml.cs

@@ -0,0 +1,36 @@
+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.MainViews.Views
+{
+    /// <summary>
+    /// ModuleAuto.xaml에 대한 상호 작용 논리
+    /// </summary>
+    public partial class ModuleAutoView : UserControl
+    {
+        public ModuleAutoViewModel ViewModel { get => this.DataContext as ModuleAutoViewModel; }
+        public ModuleAutoView()
+        {
+            InitializeComponent();
+
+            this.Loaded += ModuleAutoView_Loaded;
+        }
+
+        private void ModuleAutoView_Loaded(object sender, RoutedEventArgs e) 
+        {
+            this.ViewModel.Init();
+        }
+    }
+}

+ 5 - 4
Dev/OHV/OHV.Module.Monitoring/Interactivity/ModuleAutoViewModel.cs

@@ -6,15 +6,16 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 
-namespace OHV.Module.Monitoring.Interactivity
+namespace OHV.Module.MainViews.Views
 {
     public class ModuleAutoViewModel : BindableBase
     {
-        IRegionManager regionManager;
-
-
         public ModuleAutoViewModel()
         {
+        }
+
+        public void Init()
+        {
 
         }
     }

+ 9 - 0
Dev/OHV/OHV.Module.MainViews/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>

+ 1 - 1
Dev/OHV/OHV.Module.Monitoring/MonitoringModules.cs

@@ -17,7 +17,7 @@ namespace OHV.Module.Monitoring
             var regionManager = containerProvider.Resolve<IRegionManager>();
             regionManager.RegisterViewWithRegion("IOView", typeof(InOutIOView));
 
-            regionManager.RegisterViewWithRegion("ModuleAuto", typeof(ModuleAuto));
+            //regionManager.RegisterViewWithRegion("ModuleAuto", typeof(ModuleAuto));
         }
 
         public void RegisterTypes(IContainerRegistry containerRegistry)

+ 3 - 13
Dev/OHV/OHV.Module.Monitoring/OHV.Module.Monitoring.csproj

@@ -77,27 +77,14 @@
     <Compile Include="Interactivity\InOutIOViewModel.cs">
       <DependentUpon>InOutIOView.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Interactivity\ModuleAuto.xaml.cs">
-      <DependentUpon>ModuleAuto.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="Interactivity\ModuleAutoViewModel.cs">
-      <DependentUpon>ModuleAuto.xaml</DependentUpon>
-    </Compile>
     <Compile Include="MonitoringModules.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
-  <ItemGroup>
-    <None Include="packages.config" />
-  </ItemGroup>
   <ItemGroup>
     <Page Include="Interactivity\InOutIOView.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
-    <Page Include="Interactivity\ModuleAuto.xaml">
-      <SubType>Designer</SubType>
-      <Generator>MSBuild:Compile</Generator>
-    </Page>
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\..\..\..\GSG\GSG\GSG.NET.WPF\GSG.NET.WPF.csproj">
@@ -113,6 +100,9 @@
       <Name>VehicleControlSystem</Name>
     </ProjectReference>
   </ItemGroup>
+  <ItemGroup>
+    <None Include="packages.config" />
+  </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">

+ 4 - 4
Dev/OHV/OHV.SqliteDAL/App.config

@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <configuration>
   <configSections>
-    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
-    <section name="entityFramework"
-      type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
-      requirePermission="false"/>
+  <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
+  <section name="entityFramework"
+    type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
+    requirePermission="false"/>
   </configSections>
 
   <connectionStrings>

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

@@ -4,7 +4,6 @@ using CommonServiceLocator;
 using GSG.NET.Logging;
 using GSG.NET.Utils;
 using OHV.Common.Events;
-using OHV.Vehicle.Views;
 using Prism.Events;
 using Prism.Ioc;
 using Prism.Modularity;
@@ -85,6 +84,8 @@ namespace OHV.Vehicle
             base.ConfigureModuleCatalog(moduleCatalog);
 
             moduleCatalog.AddModule(typeof(VCSystem));
+            moduleCatalog.AddModule(typeof(OHV.Module.Monitoring.MonitoringModules));
+            moduleCatalog.AddModule(typeof(OHV.Module.MainViews.MainViewModules));
         }
 
     }

+ 19 - 10
Dev/OHV/OHV.Vehicle/MainWindow.xaml

@@ -7,8 +7,11 @@
         xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
         xmlns:prism="http://prismlibrary.com/"
         prism:ViewModelLocator.AutoWireViewModel="True"
+        xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
         mc:Ignorable="d"
-        Title="{Binding Title}" Height="800" Width="1280">
+        Title="{Binding Title}" Height="800" Width="1280"
+        xmlns:OHVCommonShareds="clr-namespace:OHV.Common.Shareds;assembly=OHV.Common"
+        >
 
     <Window.Resources>
         <Storyboard x:Key="MenuOpen">
@@ -39,7 +42,7 @@
     <Grid Background="{x:Null}">
         <!--<Grid x:Name="GridMain" HorizontalAlignment="Right" VerticalAlignment="Bottom" Height="540" Width="1020"/>-->
         <DockPanel LastChildFill="True">
-            <ContentControl prism:RegionManager.RegionName="ModuleAuto" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="1212" Height="710"/>
+            <ContentControl prism:RegionManager.RegionName="MainView" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="1212" Height="710"/>
         </DockPanel>
         <Grid Height="60" VerticalAlignment="Top" Background="#FF1368BD">
             <TextBlock Text="Over Head Vehicle" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="22" Foreground="White"/>
@@ -50,7 +53,7 @@
                         <Button Content="Settings"/>
                         <Button Content="Help"/>
                         <Separator/>
-                        <Button x:Name="ButtonPopUpLogout" Content="LogOut" Click="ButtonPopUpLogout_Click"/>
+                        <Button x:Name="ButtonPopUpLogout" Content="LogOut" />
                     </StackPanel>
                 </materialDesign:PopupBox>
             </StackPanel>
@@ -67,19 +70,25 @@
                     </Button>
                 </Grid>
 
-                <ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled" Foreground="#FF1368BD">
-                    <ListViewItem Height="60">
+                <ListView x:Name="MainViewList" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Foreground="#FF1368BD" >
+                    <i:Interaction.Triggers>
+                        <i:EventTrigger EventName="SelectionChanged">
+                            <i:InvokeCommandAction  Command="{Binding DataContext.NavigateCommand, RelativeSource={RelativeSource AncestorType=ListView}}" CommandParameter="{Binding Path=SelectedValue,ElementName=MainViewList}"/>
+                        </i:EventTrigger>
+                    </i:Interaction.Triggers>
+
+                    <ListViewItem Height="60" x:Name="ModuleAutoView">
                         <StackPanel Orientation="Horizontal">
                             <materialDesign:PackIcon Kind="ViewDashboard" Width="25" Height="25" VerticalAlignment="Center" Margin="10"/>
                             <TextBlock Text="Home" VerticalAlignment="Center" Margin="20, 10"/>
                         </StackPanel>
                     </ListViewItem>
 
-                    <ListViewItem Height="60">
-                        <StackPanel Orientation="Horizontal">
-                            <materialDesign:PackIcon Kind="AxisArrow" Width="25" Height="25" VerticalAlignment="Center" Margin="10"/>
-                            <TextBlock Text="Device" VerticalAlignment="Center" Margin="20, 10"/>
-                        </StackPanel>
+                    <ListViewItem Height="60" x:Name="DeviceView">
+                            <StackPanel Orientation="Horizontal">
+                                <materialDesign:PackIcon Kind="AxisArrow" Width="25" Height="25" VerticalAlignment="Center" Margin="10"/>
+                                <TextBlock Text="Device" VerticalAlignment="Center" Margin="20, 10"/>
+                            </StackPanel>
                     </ListViewItem>
 
                     <ListViewItem Height="60">

+ 13 - 0
Dev/OHV/OHV.Vehicle/MainWindow.xaml.cs

@@ -43,5 +43,18 @@ namespace OHV.Vehicle
             //this.MaximizeToFirstMonitor();
         }
 
+        private void ButtonOpenMenu_Click(object sender, RoutedEventArgs e)
+        {
+            ButtonCloseMenu.Visibility = Visibility.Visible;
+            ButtonOpenMenu.Visibility = Visibility.Collapsed;
+        }
+
+        private void ButtonCloseMenu_Click(object sender, RoutedEventArgs e)
+        {
+            ButtonCloseMenu.Visibility = Visibility.Collapsed;
+            ButtonOpenMenu.Visibility = Visibility.Visible;
+        }
+
+
     }
 }

+ 16 - 11
Dev/OHV/OHV.Vehicle/MainWindowViewModel.cs

@@ -8,6 +8,9 @@ using Prism.Mvvm;
 using VehicleControlSystem;
 using Prism.Modularity;
 using Prism.Regions;
+using OHV.Common.Shareds;
+using System.Windows.Documents;
+using System.Windows.Controls;
 
 namespace OHV.Vehicle
 {
@@ -25,9 +28,10 @@ namespace OHV.Vehicle
         VCSystem VCSystem = null;
 
         public ICommand TestCommand { get; set; }
+        public ICommand NavigateCommand { get; set; }
 
         IRegionManager regionManager;
-        public DelegateCommand<string> NavigateCommand { get; private set; }
+        //public DelegateCommand<string> NavigateCommand { get; private set; }
 
         public MainWindowViewModel(IEventAggregator ea, VCSystem cSystem, IRegionManager _regionManager)
         {
@@ -39,13 +43,14 @@ namespace OHV.Vehicle
             this.TestCommand = new DelegateCommand(ExecuteTextCommand);
 
             this.regionManager = _regionManager;
-            NavigateCommand = new DelegateCommand<string>(Navigate);
+            NavigateCommand = new DelegateCommand<object>(Navigate);
         }
 
-        private void Navigate(string obj)
+        private void Navigate(object obj)
         {
-            if (obj != null)
-                regionManager.RequestNavigate("ModuleAuto", obj);
+            var selectItem = obj as ListViewItem;
+            if (selectItem != null)
+                regionManager.RequestNavigate("MainView", selectItem.Name);
         }
 
         private void UICallbackCommunication(GUIMessageEventArgs obj)
@@ -65,14 +70,14 @@ namespace OHV.Vehicle
         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("ModuleAuto", "ModuleAuto");
+            regionManager.RequestNavigate(UIModuleRegionNames.MainView, "ModuleAutoView");
         }
 
         public void Dispose()

+ 6 - 2
Dev/OHV/OHV.Vehicle/OHV.Vehicle.csproj

@@ -180,6 +180,10 @@
       <Project>{0d1f7fbc-bfb0-4ee4-852d-e2a8d62c5708}</Project>
       <Name>OHV.Common</Name>
     </ProjectReference>
+    <ProjectReference Include="..\OHV.Module.MainViews\OHV.Module.MainViews.csproj">
+      <Project>{eafdb5ff-20f9-4172-9a11-ec8cf3ab6edc}</Project>
+      <Name>OHV.Module.MainViews</Name>
+    </ProjectReference>
     <ProjectReference Include="..\OHV.Module.Monitoring\OHV.Module.Monitoring.csproj">
       <Project>{cf748e61-69c2-4dec-a9ec-755b6999077e}</Project>
       <Name>OHV.Module.Monitoring</Name>
@@ -199,10 +203,10 @@
     </PropertyGroup>
     <Error Condition="!Exists('..\packages\EntityFramework.6.3.0\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.3.0\build\EntityFramework.props'))" />
     <Error Condition="!Exists('..\packages\EntityFramework.6.3.0\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.3.0\build\EntityFramework.targets'))" />
-    <Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.112.0\build\net45\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.112.0\build\net45\System.Data.SQLite.Core.targets'))" />
     <Error Condition="!Exists('..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets'))" />
+    <Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.112.0\build\net45\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.112.0\build\net45\System.Data.SQLite.Core.targets'))" />
   </Target>
   <Import Project="..\packages\EntityFramework.6.3.0\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.3.0\build\EntityFramework.targets')" />
-  <Import Project="..\packages\System.Data.SQLite.Core.1.0.112.0\build\net45\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.112.0\build\net45\System.Data.SQLite.Core.targets')" />
   <Import Project="..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets" Condition="Exists('..\packages\MaterialDesignThemes.3.0.1\build\MaterialDesignThemes.targets')" />
+  <Import Project="..\packages\System.Data.SQLite.Core.1.0.112.0\build\net45\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.112.0\build\net45\System.Data.SQLite.Core.targets')" />
 </Project>

+ 7 - 0
Dev/OHV/OHV.sln

@@ -33,6 +33,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VehicleControlSystem", "Veh
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OHV.Module.Monitoring", "OHV.Module.Monitoring\OHV.Module.Monitoring.csproj", "{CF748E61-69C2-4DEC-A9EC-755B6999077E}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OHV.Module.MainViews", "OHV.Module.MainViews\OHV.Module.MainViews.csproj", "{EAFDB5FF-20F9-4172-9A11-EC8CF3AB6EDC}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -75,6 +77,10 @@ Global
 		{CF748E61-69C2-4DEC-A9EC-755B6999077E}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{CF748E61-69C2-4DEC-A9EC-755B6999077E}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{CF748E61-69C2-4DEC-A9EC-755B6999077E}.Release|Any CPU.Build.0 = Release|Any CPU
+		{EAFDB5FF-20F9-4172-9A11-EC8CF3AB6EDC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{EAFDB5FF-20F9-4172-9A11-EC8CF3AB6EDC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{EAFDB5FF-20F9-4172-9A11-EC8CF3AB6EDC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{EAFDB5FF-20F9-4172-9A11-EC8CF3AB6EDC}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -90,6 +96,7 @@ Global
 		{D045DC91-1AD5-4EBF-A062-0C6C5FE203C5} = {EB9D988A-D44D-4EBF-8BB5-ABCE85AC4811}
 		{73BAB40E-FC7D-4AB5-85CA-B4CF221DFBD1} = {E991DE17-D541-45A9-85B0-1AA1B0D50D89}
 		{CF748E61-69C2-4DEC-A9EC-755B6999077E} = {6C7A1445-7F2F-46C4-9AAD-AEB739F9BD2D}
+		{EAFDB5FF-20F9-4172-9A11-EC8CF3AB6EDC} = {6C7A1445-7F2F-46C4-9AAD-AEB739F9BD2D}
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 		SolutionGuid = {2222F9E2-CBEF-4156-9636-5DF54ECDDA89}