Browse Source

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

ys-hwang 6 years ago
parent
commit
53aeda6387
35 changed files with 937 additions and 29 deletions
  1. 1 0
      Dev/OHV/OHV.Common/Events/MessageEventArgs.cs
  2. 1 0
      Dev/OHV/OHV.Common/OHV.Common.csproj
  3. 9 0
      Dev/OHV/OHV.LanguageHalper/Languages/Chinese.xaml
  4. 17 0
      Dev/OHV/OHV.LanguageHalper/Languages/Chinese.xaml.cs
  5. 10 0
      Dev/OHV/OHV.LanguageHalper/Languages/English.xaml
  6. 17 0
      Dev/OHV/OHV.LanguageHalper/Languages/English.xaml.cs
  7. 9 0
      Dev/OHV/OHV.LanguageHalper/Languages/Korea.xaml
  8. 17 0
      Dev/OHV/OHV.LanguageHalper/Languages/Korea.xaml.cs
  9. 48 0
      Dev/OHV/OHV.LanguageHalper/LanguagesSelcter.cs
  10. 76 0
      Dev/OHV/OHV.LanguageHalper/OHV.LanguageHelper.csproj
  11. 36 0
      Dev/OHV/OHV.LanguageHalper/Properties/AssemblyInfo.cs
  12. 4 0
      Dev/OHV/OHV.Module.Interactivity/OHV.Module.Interactivity.csproj
  13. 8 0
      Dev/OHV/OHV.Module.Interactivity/PopUp/BatteryConfigView.xaml
  14. 134 0
      Dev/OHV/OHV.ResourecDictionary/LocUtil.cs
  15. 86 0
      Dev/OHV/OHV.ResourecDictionary/OHV.ResourceDic.csproj
  16. 55 0
      Dev/OHV/OHV.ResourecDictionary/Properties/AssemblyInfo.cs
  17. 63 0
      Dev/OHV/OHV.ResourecDictionary/Properties/Resources.Designer.cs
  18. 117 0
      Dev/OHV/OHV.ResourecDictionary/Properties/Resources.resx
  19. 26 0
      Dev/OHV/OHV.ResourecDictionary/Properties/Settings.Designer.cs
  20. 7 0
      Dev/OHV/OHV.ResourecDictionary/Properties/Settings.settings
  21. 8 0
      Dev/OHV/OHV.ResourecDictionary/Resources/StringResource.en-US.xaml
  22. 9 0
      Dev/OHV/OHV.ResourecDictionary/Resources/StringResource.kr-KR.xaml
  23. 1 0
      Dev/OHV/OHV.Vehicle/App.xaml
  24. 12 3
      Dev/OHV/OHV.Vehicle/Concept/D_MainWindow.xaml
  25. 8 0
      Dev/OHV/OHV.Vehicle/Concept/D_MainWindow.xaml.cs
  26. 46 0
      Dev/OHV/OHV.Vehicle/Concept/D_MainWindowViewModel.cs
  27. 6 6
      Dev/OHV/OHV.Vehicle/Config/AlarmDefind..csv
  28. BIN
      Dev/OHV/OHV.Vehicle/Config/IO.xlsx
  29. 4 0
      Dev/OHV/OHV.Vehicle/OHV.Vehicle.csproj
  30. 7 0
      Dev/OHV/OHV.sln
  31. 19 5
      Dev/OHV/VehicleControlSystem/ControlLayer/Clamp.cs
  32. 12 9
      Dev/OHV/VehicleControlSystem/ControlLayer/Conveyor.cs
  33. 37 0
      Dev/OHV/VehicleControlSystem/ControlLayer/Steering.cs
  34. 26 6
      Dev/OHV/VehicleControlSystem/ControlLayer/Vehicle.cs
  35. 1 0
      Dev/OHV/VehicleControlSystem/VehicleControlSystem.csproj

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

@@ -60,6 +60,7 @@ namespace OHV.Common.Events
 
         public enum eAxisControlKind
         {
+            OriginReturn,
             Stop,
             EStop,
             Move,

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

@@ -85,6 +85,7 @@
     <None Include="App.config" />
     <None Include="packages.config" />
   </ItemGroup>
+  <ItemGroup />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>

+ 9 - 0
Dev/OHV/OHV.LanguageHalper/Languages/Chinese.xaml

@@ -0,0 +1,9 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+                    x:Class="OHV.LanguageHelper.Languages.Chinese"
+                    xmlns:system="clr-namespace:System;assembly=mscorlib"
+                    >
+    <system:String x:Key="MainView_Main">主板</system:String>
+    <system:String x:Key="MainView_Teach">操纵</system:String>
+
+</ResourceDictionary>

+ 17 - 0
Dev/OHV/OHV.LanguageHalper/Languages/Chinese.xaml.cs

@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace OHV.LanguageHelper.Languages
+{
+    public partial class Chinese : ResourceDictionary
+    {
+        public Chinese()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 10 - 0
Dev/OHV/OHV.LanguageHalper/Languages/English.xaml

@@ -0,0 +1,10 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+                    x:Class="OHV.LanguageHelper.Languages.English"
+                    xmlns:system="clr-namespace:System;assembly=mscorlib"
+                    >
+
+    <system:String x:Key="MainView_Main">Main</system:String>
+    <system:String x:Key="MainView_Teach">Teach</system:String>
+
+</ResourceDictionary>

+ 17 - 0
Dev/OHV/OHV.LanguageHalper/Languages/English.xaml.cs

@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace OHV.LanguageHelper.Languages
+{
+    public partial class English : ResourceDictionary
+    {
+        public English()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 9 - 0
Dev/OHV/OHV.LanguageHalper/Languages/Korea.xaml

@@ -0,0 +1,9 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+                    x:Class="OHV.LanguageHelper.Languages.Korean"
+                    xmlns:system="clr-namespace:System;assembly=mscorlib"
+                    >
+    <system:String x:Key="MainView_Main">메뉴</system:String>
+    <system:String x:Key="MainView_Teach">조작</system:String>
+
+</ResourceDictionary>

+ 17 - 0
Dev/OHV/OHV.LanguageHalper/Languages/Korea.xaml.cs

@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace OHV.LanguageHelper.Languages
+{
+    public partial class Korean : ResourceDictionary
+    {
+        public Korean()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 48 - 0
Dev/OHV/OHV.LanguageHalper/LanguagesSelcter.cs

@@ -0,0 +1,48 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using OHV.LanguageHelper.Languages;
+
+namespace OHV.LanguageHalper
+{
+    public enum eLanguageType
+    {
+        English,
+        Korean,
+        Chinese,
+    }
+
+    public static class LanguagesSelcter
+    {
+        static English english = new English();
+        static Korean korean = new Korean();
+        static Chinese chinese = new Chinese();
+
+        public static eLanguageType LanguageType { get; private set; }
+        public static void ChangLanguage(eLanguageType type)
+        {
+            Application.Current.Resources.MergedDictionaries.Remove(english);
+            Application.Current.Resources.MergedDictionaries.Remove(korean);
+            Application.Current.Resources.MergedDictionaries.Remove(chinese);
+
+            switch (type)
+            {
+                case eLanguageType.English:
+                    Application.Current.Resources.MergedDictionaries.Add(english);
+                    break;
+                case eLanguageType.Korean:
+                    Application.Current.Resources.MergedDictionaries.Add(korean);
+                    break;
+                case eLanguageType.Chinese:
+                    Application.Current.Resources.MergedDictionaries.Add(chinese);
+                    break;
+                default:
+                    break;
+            }
+            LanguageType = type;
+        }
+    }
+}

+ 76 - 0
Dev/OHV/OHV.LanguageHalper/OHV.LanguageHelper.csproj

@@ -0,0 +1,76 @@
+<?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>{712D75B5-89DD-4064-BC4B-2F9D9F157604}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>OHV.LanguageHelper</RootNamespace>
+    <AssemblyName>OHV.LanguageHelper</AssemblyName>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <Deterministic>true</Deterministic>
+  </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="PresentationCore" />
+    <Reference Include="PresentationFramework" />
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Windows" />
+    <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="LanguagesSelcter.cs" />
+    <Compile Include="Languages\Chinese.xaml.cs">
+      <DependentUpon>Chinese.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Languages\Korea.xaml.cs">
+      <DependentUpon>Korea.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Languages\English.xaml.cs">
+      <DependentUpon>English.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Page Include="Languages\Chinese.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="Languages\Korea.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="Languages\English.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>

+ 36 - 0
Dev/OHV/OHV.LanguageHalper/Properties/AssemblyInfo.cs

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

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

@@ -195,6 +195,10 @@
       <Project>{0d1f7fbc-bfb0-4ee4-852d-e2a8d62c5708}</Project>
       <Name>OHV.Common</Name>
     </ProjectReference>
+    <ProjectReference Include="..\OHV.LanguageHalper\OHV.LanguageHelper.csproj">
+      <Project>{712d75b5-89dd-4064-bc4b-2f9d9f157604}</Project>
+      <Name>OHV.LanguageHelper</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')" />

+ 8 - 0
Dev/OHV/OHV.Module.Interactivity/PopUp/BatteryConfigView.xaml

@@ -31,6 +31,14 @@
         </Style>
     </prism:Dialog.WindowStyle>
 
+    <UserControl.Resources>
+        <ResourceDictionary>
+            <ResourceDictionary.MergedDictionaries>
+                <ResourceDictionary Source="/OHV.LanguageHelper;component/Languages/English.xaml"/>
+            </ResourceDictionary.MergedDictionaries>
+        </ResourceDictionary>
+    </UserControl.Resources>
+
     <Grid>
         <Grid.ColumnDefinitions>
             <ColumnDefinition Width="*"/>

+ 134 - 0
Dev/OHV/OHV.ResourecDictionary/LocUtil.cs

@@ -0,0 +1,134 @@
+using Microsoft.Win32;
+using System;
+using System.Globalization;
+using System.IO;
+using System.Threading;
+using System.Windows;
+
+namespace OHV.ResourceDic
+{
+    public static class LocUtil
+    {
+        /// <summary>  
+        /// Get application name from an element  
+        /// </summary>  
+        /// <param name="element"></param>  
+        /// <returns></returns>  
+        private static string getAppName(FrameworkElement element)
+        {
+            var elType = element.GetType().ToString();
+            var elNames = elType.Split('.');
+            return elNames[0];
+        }
+        /// <summary>  
+        /// Generate a name from an element base on its class name  
+        /// </summary>  
+        /// <param name="element"></param>  
+        /// <returns></returns>  
+        private static string getElementName(FrameworkElement element)
+        {
+            var elType = element.GetType().ToString();
+            var elNames = elType.Split('.');
+            var elName = "";
+            if (elNames.Length >= 2) elName = elNames[elNames.Length - 1];
+            return elName;
+        }
+        /// <summary>  
+        /// Get current culture info name base on previously saved setting if any,  
+        /// otherwise get from OS language  
+        /// </summary>  
+        /// <param name="element"></param>  
+        /// <returns></returns>  
+        public static string GetCurrentCultureName(FrameworkElement element)
+        {
+            RegistryKey curLocInfo = Registry.CurrentUser.OpenSubKey("GsmLib" + @"\" + getAppName(element), false);  
+                var cultureName = CultureInfo.CurrentUICulture.Name;
+            if (curLocInfo != null)
+            {
+                cultureName = curLocInfo.GetValue(getElementName(element) + ".localization", "en-US").ToString();
+            }
+            return cultureName;
+        }
+        /// <summary>  
+        /// Set language based on previously save language setting,  
+        /// otherwise set to OS lanaguage  
+        /// </summary>  
+        /// <param name="element"></param>  
+        public static void SetDefaultLanguage(FrameworkElement element)
+        {
+            SetLanguageResourceDictionary(element, GetLocXAMLFilePath(getElementName(element), GetCurrentCultureName(element)));
+        }
+        /// <summary>  
+        /// Dynamically load a Localization ResourceDictionary from a file  
+        /// </summary>  
+        public static void SwitchLanguage(FrameworkElement element, string inFiveCharLang)
+        {
+            Thread.CurrentThread.CurrentUICulture = new CultureInfo(inFiveCharLang);
+            SetLanguageResourceDictionary(element, GetLocXAMLFilePath(getElementName(element), inFiveCharLang));
+            // Save new culture info to registry  
+            RegistryKey UserPrefs = Registry.CurrentUser.OpenSubKey("GsmLib" + @"\" + getAppName(element), true);  
+                    if (UserPrefs == null)
+            {
+                // Value does not already exist so create it  
+                RegistryKey newKey = Registry.CurrentUser.CreateSubKey("GsmLib");
+                UserPrefs = newKey.CreateSubKey(getAppName(element));
+            }
+            UserPrefs.SetValue(getElementName(element) + ".localization", inFiveCharLang);
+        }
+        /// <summary>  
+        /// Returns the path to the ResourceDictionary file based on the language character string.  
+        /// </summary>  
+        /// <param name="inFiveCharLang"></param>  
+        /// <returns></returns>  
+        public static string GetLocXAMLFilePath(string element, string inFiveCharLang)
+        {
+            string locXamlFile = element + "." + inFiveCharLang + ".xaml";
+            string directory = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
+            return Path.Combine(directory, "i18N", locXamlFile);
+        }
+        /// <summary>  
+        /// Sets or replaces the ResourceDictionary by dynamically loading  
+        /// a Localization ResourceDictionary from the file path passed in.  
+        /// </summary>  
+        /// <param name="inFile"></param>  
+        private static void SetLanguageResourceDictionary(FrameworkElement element, String inFile)
+        {
+            if (File.Exists(inFile))
+            {
+                // Read in ResourceDictionary File  
+                var languageDictionary = new ResourceDictionary();
+                languageDictionary.Source = new Uri(inFile);
+                // Remove any previous Localization dictionaries loaded  
+                int langDictId = -1;
+                for (int i = 0; i < element.Resources.MergedDictionaries.Count; i++)
+                {
+                    var md = element.Resources.MergedDictionaries[i];
+                    // Make sure your Localization ResourceDictionarys have the ResourceDictionaryName  
+                    // key and that it is set to a value starting with "Loc-".  
+                    if (md.Contains("ResourceDictionaryName"))
+                    {
+                        if (md["ResourceDictionaryName"].ToString().StartsWith("Loc-"))
+                        {
+                            langDictId = i;
+                            break;
+                        }
+                    }
+                }
+                if (langDictId == -1)
+                {
+                    // Add in newly loaded Resource Dictionary  
+                    element.Resources.MergedDictionaries.Add(languageDictionary);
+                }
+                else
+                {
+                    // Replace the current langage dictionary with the new one  
+                    element.Resources.MergedDictionaries[langDictId] = languageDictionary;
+                }
+            }
+            else
+            {
+                MessageBox.Show("'" + inFile + "' not found.");
+            }
+        }
+    }
+}

+ 86 - 0
Dev/OHV/OHV.ResourecDictionary/OHV.ResourceDic.csproj

@@ -0,0 +1,86 @@
+<?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>{246BBF15-AB1E-4C5B-92B7-731C7DF5D56E}</ProjectGuid>
+    <OutputType>library</OutputType>
+    <RootNamespace>OHV.ResourceDic</RootNamespace>
+    <AssemblyName>OHV.ResourceDic</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>
+  </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="System" />
+    <Reference Include="System.Data" />
+    <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>
+    <Page Include="Resources\StringResource.kr-KR.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="Resources\StringResource.en-US.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="LocUtil.cs" />
+    <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="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+  </ItemGroup>
+  <ItemGroup />
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>

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

@@ -0,0 +1,55 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해 
+// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면
+// 이러한 특성 값을 변경하세요.
+[assembly: AssemblyTitle("OHV.ResourecDictionary")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("OHV.ResourecDictionary")]
+[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")]

+ 63 - 0
Dev/OHV/OHV.ResourecDictionary/Properties/Resources.Designer.cs

@@ -0,0 +1,63 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     이 코드는 도구를 사용하여 생성되었습니다.
+//     런타임 버전:4.0.30319.42000
+//
+//     파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
+//     이러한 변경 내용이 손실됩니다.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace OHV.ResourceDic.Properties {
+    using System;
+    
+    
+    /// <summary>
+    ///   지역화된 문자열 등을 찾기 위한 강력한 형식의 리소스 클래스입니다.
+    /// </summary>
+    // 이 클래스는 ResGen 또는 Visual Studio와 같은 도구를 통해 StronglyTypedResourceBuilder
+    // 클래스에서 자동으로 생성되었습니다.
+    // 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여 ResGen을
+    // 다시 실행하거나 VS 프로젝트를 다시 빌드하십시오.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.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 (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OHV.ResourceDic.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;
+            }
+        }
+    }
+}

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

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

+ 26 - 0
Dev/OHV/OHV.ResourecDictionary/Properties/Settings.Designer.cs

@@ -0,0 +1,26 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     이 코드는 도구를 사용하여 생성되었습니다.
+//     런타임 버전:4.0.30319.42000
+//
+//     파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
+//     이러한 변경 내용이 손실됩니다.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace OHV.ResourceDic.Properties {
+    
+    
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.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;
+            }
+        }
+    }
+}

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

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

+ 8 - 0
Dev/OHV/OHV.ResourecDictionary/Resources/StringResource.en-US.xaml

@@ -0,0 +1,8 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+                    xmlns:sys="clr-namespace:System;assembly=mscorlib">
+
+    <sys:String x:Key="ResourceDictionaryName">Loc-en-US</sys:String>
+
+    <sys:String x:Key="MainView_Menu">Main</sys:String>
+</ResourceDictionary>

+ 9 - 0
Dev/OHV/OHV.ResourecDictionary/Resources/StringResource.kr-KR.xaml

@@ -0,0 +1,9 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+                    xmlns:sys="clr-namespace:System;assembly=mscorlib">
+
+    <sys:String x:Key="ResourceDictionaryName">Loc-kr-KR</sys:String>
+
+    <sys:String x:Key="MainView_Menu">메인</sys:String>
+
+</ResourceDictionary>

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

@@ -12,6 +12,7 @@
                 <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 Source="/OHV.LanguageHelper;component/Languages/English.xaml"/>
             </ResourceDictionary.MergedDictionaries>
 
             <!--TODO: Skin Test-->

+ 12 - 3
Dev/OHV/OHV.Vehicle/Concept/D_MainWindow.xaml

@@ -11,7 +11,8 @@
         WindowStyle="None"
         Title="D_MainWindow" Height="1080" Width="1920"
         xmlns:OHVCommonShareds="clr-namespace:OHV.Common.Shareds;assembly=OHV.Common"
-        Background="{x:Null}" WindowStartupLocation="CenterScreen">
+        Background="{x:Null}" WindowStartupLocation="CenterScreen"
+        >
 
     <Grid x:Name="GridMain" Background="{x:Null}">
         <Grid.RowDefinitions>
@@ -28,6 +29,14 @@
                 </LinearGradientBrush>
             </Grid.Background>
 
+            <StackPanel HorizontalAlignment="Left" VerticalAlignment="Center">
+                <Button Margin="10,0,10,0" Command="{Binding ChangeLanguage}"
+                   Style="{DynamicResource MaterialDesignFloatingActionMiniButton}"     
+                   materialDesign:ShadowAssist.ShadowDepth="Depth5" Background="{Binding OcsBrush, FallbackValue={x:Null}}">
+                    OCS
+                </Button>
+            </StackPanel>
+
             <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                 <TextBlock Style="{StaticResource MaterialDesignHeadline3TextBlock}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" FontSize="60" FontWeight="Bold">
                 Over Head Vehicle
@@ -65,7 +74,7 @@
                 <Button Margin="10,0" Background="{x:Null}" Height="Auto" BorderThickness="0" Command="{Binding NavigateCommand}" CommandParameter="AutoView">
                     <StackPanel Orientation="Horizontal">
                         <materialDesign:PackIcon Kind="ViewDashboard" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,0,10,0" Height="30" Width="auto"/>
-                        <TextBlock Text="MAIN" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="25"/>
+                        <TextBlock Text="{DynamicResource ResourceKey=MainView_Main}" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="25"/>
                     </StackPanel>
                 </Button>
 
@@ -79,7 +88,7 @@
                 <Button Margin="10,0" Background="{x:Null}" Height="Auto" BorderThickness="0" Command="{Binding NavigateCommand}" CommandParameter="TeachView">
                     <StackPanel Orientation="Horizontal">
                         <materialDesign:PackIcon Kind="AxisArrow" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,0,10,0" Height="30" Width="auto"/>
-                        <TextBlock Text="TEACH" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="25"/>
+                        <TextBlock Text="{DynamicResource MainView_Teach}" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="25"/>
                     </StackPanel>
                 </Button>
 

+ 8 - 0
Dev/OHV/OHV.Vehicle/Concept/D_MainWindow.xaml.cs

@@ -25,6 +25,8 @@ namespace OHV.Vehicle.Concept
         {
             InitializeComponent();
 
+            //LocUtil.SetDefaultLanguage(this);
+
             App.splashScreen.AddMessage( "Application Start !" );
             App.splashScreen.StepIt();
 
@@ -63,5 +65,11 @@ namespace OHV.Vehicle.Concept
             //throw new NotImplementedException();
             WindowExternal.MaximizeToFirstMonitor(this);
         }
+
+        private void Button_Click(object sender, RoutedEventArgs e)
+        {
+            //LocUtil.SwitchLanguage(this, "kr-KR");
+        }
+
     }
 }

+ 46 - 0
Dev/OHV/OHV.Vehicle/Concept/D_MainWindowViewModel.cs

@@ -9,9 +9,12 @@ using Prism.Regions;
 using Prism.Services.Dialogs;
 using System;
 using System.Collections.Generic;
+using System.Globalization;
 using System.Linq;
 using System.Text;
+using System.Threading;
 using System.Threading.Tasks;
+using System.Windows;
 using System.Windows.Input;
 using System.Windows.Media;
 using System.Windows.Threading;
@@ -119,6 +122,13 @@ namespace OHV.Vehicle.Concept
 
         private DeskTopInfo dti = new DeskTopInfo();
 
+        public ICommand ChangeLanguage { get; set; }
+
+        private void Execte_ChangeLanguage()
+        {
+            //LanguageHalper.LanguagesSelcter.ChangLanguage(LanguageHalper.eLanguageType.Chinese);
+        }
+
         public D_MainWindowViewModel( IEventAggregator ea , VCSystem cSystem , IRegionManager _regionManager , MessageController messageController )
         {
             this.regionManager = _regionManager;
@@ -133,6 +143,7 @@ namespace OHV.Vehicle.Concept
             //this.TestCommand = new DelegateCommand( ExecuteTextCommand );
             this.NavigateCommand = new DelegateCommand<object>( this.Navigate );
             this.SystemOffCommand = new DelegateCommand( ExecuteSystemOffCommand );
+            this.ChangeLanguage = new DelegateCommand(Execte_ChangeLanguage);
 
             DispatcherTimer dateTimer = new DispatcherTimer();
             dateTimer.Tick += ( object sender , EventArgs e ) =>
@@ -220,5 +231,40 @@ 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);
+
+        }
     }
 }

+ 6 - 6
Dev/OHV/OHV.Vehicle/Config/AlarmDefind..csv

@@ -4,12 +4,12 @@
 4,RightClamServoError,Right Clamp Unlock Motion Error,,,1,0
 5,RightClamServoError,Is Not Origin Return,,,1,0
 6,LeftClampServoError,Is Not Origin Return,,,1,0
-7,,,,,,
-8,,,,,,
-9,,,,,,
-10,,,,,,
-11,,,,,,
-12,,,,,,
+7,RightClamServoError,Origin Return Fail,,,1,0
+8,LeftClampServoError,Origin Return Fail,,,1,0
+9,Conveyor,Already Exist Carrier,,,1,0
+10,Conveyor,Loading Time Over,,,1,0
+11,Conveyor,Not Exist Carrier,,,1,0
+12,Conveyor,Unloading Time Over,,,1,0
 13,,,,,,
 14,,,,,,
 15,,,,,,

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


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

@@ -198,6 +198,10 @@
       <Project>{0d1f7fbc-bfb0-4ee4-852d-e2a8d62c5708}</Project>
       <Name>OHV.Common</Name>
     </ProjectReference>
+    <ProjectReference Include="..\OHV.LanguageHalper\OHV.LanguageHelper.csproj">
+      <Project>{712d75b5-89dd-4064-bc4b-2f9d9f157604}</Project>
+      <Name>OHV.LanguageHelper</Name>
+    </ProjectReference>
     <ProjectReference Include="..\OHV.Module.Interactivity\OHV.Module.Interactivity.csproj">
       <Project>{d6402d97-2206-4d55-8097-8da9a01568cb}</Project>
       <Name>OHV.Module.Interactivity</Name>

+ 7 - 0
Dev/OHV/OHV.sln

@@ -39,6 +39,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OHV.Module.Interactivity",
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GSG.NET.Excel", "..\..\..\GSG\GSG\GSG.NET.ExcelMapper\GSG.NET.Excel.csproj", "{83824C10-4BF7-48DD-9CD5-686A552F8E97}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OHV.LanguageHelper", "OHV.LanguageHalper\OHV.LanguageHelper.csproj", "{712D75B5-89DD-4064-BC4B-2F9D9F157604}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -93,6 +95,10 @@ Global
 		{83824C10-4BF7-48DD-9CD5-686A552F8E97}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{83824C10-4BF7-48DD-9CD5-686A552F8E97}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{83824C10-4BF7-48DD-9CD5-686A552F8E97}.Release|Any CPU.Build.0 = Release|Any CPU
+		{712D75B5-89DD-4064-BC4B-2F9D9F157604}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{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
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -110,6 +116,7 @@ Global
 		{CF748E61-69C2-4DEC-A9EC-755B6999077E} = {6C7A1445-7F2F-46C4-9AAD-AEB739F9BD2D}
 		{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}
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 		SolutionGuid = {2222F9E2-CBEF-4156-9636-5DF54ECDDA89}

+ 19 - 5
Dev/OHV/VehicleControlSystem/ControlLayer/Clamp.cs

@@ -52,7 +52,7 @@ namespace VehicleControlSystem.ControlLayer
                     case AxisControlEventArgs.eAxisControlKind.Move:
                         break;
                     case AxisControlEventArgs.eAxisControlKind.Jog:
-                        Task4.Go(() => this.ReqJog(args));
+                        this.ReqJog(args);
                         break;
                     case AxisControlEventArgs.eAxisControlKind.CurrentPosition:
                         break;
@@ -67,6 +67,8 @@ namespace VehicleControlSystem.ControlLayer
                         this.taskCancel.Cancel();
                         this.taskCancel.WaitAll();
                         break;
+                    case AxisControlEventArgs.eAxisControlKind.OriginReturn:
+                        break;
                     default:
                         break;
                 }
@@ -113,6 +115,19 @@ namespace VehicleControlSystem.ControlLayer
                 this.JogMove(arg.AxisName, E_JogMoveDir.Negative, 0);
         }
 
+        void ReqOriginReturn(AxisControlEventArgs arg)
+        {
+            int result = 0;
+            if (arg.AxisName.Equals(ConstString.AXIS_CARRIER_LOCK_LEFT))
+                result = this.LeftOriginReturn();
+            else
+                result = this.RightOriginReturn();
+
+            //결과를 UI에 알려 줘야 하는데.
+            if (result != EziMOTIONPlusELib.FMM_OK) { }
+
+        }
+
         void CreateAxis()
         {
             sql.AxisConfigDAL.All.ForEach(config =>
@@ -208,11 +223,10 @@ namespace VehicleControlSystem.ControlLayer
 
         public int JogMove(string axisName, E_JogMoveDir dir, int velocity)
         {
-            logger.D($"JogMove - Axis[{axisName} / Dir[{dir}] / vel[{velocity}]");
+            logger.D($"JogMove - Axis[{axisName}] / Dir[{dir}] / vel[{velocity}]");
 
-            //var axis = this.axes.Where(x => x.Config.AxisName.Equals(axisName)).Single();
-            //return axis.JogMove(dir, velocity);
-            return 0;
+            var axis = this.axes.Where(x => x.Config.AxisName.Equals(axisName)).Single();
+            return axis.JogMove(dir, velocity);
         }
 
         public int MoveToLockPosition(string axisName)

+ 12 - 9
Dev/OHV/VehicleControlSystem/ControlLayer/Conveyor.cs

@@ -11,6 +11,7 @@ namespace VehicleControlSystem.ControlLayer
     public class Conveyor
     {
         IIO iO = null;
+
         public Conveyor(IIO io)
         {
             this.iO = io;
@@ -19,21 +20,23 @@ namespace VehicleControlSystem.ControlLayer
         void OnOffConveyor(bool isOn, bool isCW)
         {
             if (isCW)
-                this.iO.OutputOn("OUT_Conveyor_CWCCW");
+                this.iO.OutputOn("OUT_CV_CWCCW");
             else
-                this.iO.OutputOff("OUT_Conveyor_CWCCW");
+                this.iO.OutputOff("OUT_CV_CWCCW");
 
             if (isOn)
-                this.iO.OutputOn("OUT_Conveyor_Run");
+                this.iO.OutputOn("OUT_CV_RUN");
             else
-                this.iO.OutputOff("OUT_Conveyor_Run");
+                this.iO.OutputOff("OUT_CV_RUN");
         }
 
-        bool IsDetectedCarrier() => this.iO.IsOn("IN_Carrier_Detect");
+        bool IsDetectedLoadStart() => this.iO.IsOn("IN_CV_DETECT_00");
+        bool IsDetectedLoadSlow() => this.iO.IsOn("IN_CV_DETECT_01");
+        bool IsDetectedLoadStop() => this.iO.IsOn("IN_CV_DETECT_02");
 
         int Load_Carrier()
         {
-            if (IsDetectedCarrier())
+            if (IsDetectedLoadStart())
                 return 9;
 
             OnOffConveyor(true, true);
@@ -47,7 +50,7 @@ namespace VehicleControlSystem.ControlLayer
                     return 10;
                 }
 
-                if (IsDetectedCarrier())
+                if (IsDetectedLoadStart())
                     break;
             }
 
@@ -56,7 +59,7 @@ namespace VehicleControlSystem.ControlLayer
 
         int UnloadCarrier()
         {
-            if (!IsDetectedCarrier())
+            if (!IsDetectedLoadStart())
                 return 11;
 
             OnOffConveyor(true, true);
@@ -70,7 +73,7 @@ namespace VehicleControlSystem.ControlLayer
                     return 12;
                 }
 
-                if (!IsDetectedCarrier())
+                if (!IsDetectedLoadStart())
                     break;
             }
 

+ 37 - 0
Dev/OHV/VehicleControlSystem/ControlLayer/Steering.cs

@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using OHV.SqliteDAL;
+using Prism.Events;
+using VehicleControlSystem.ControlLayer.IO;
+
+namespace VehicleControlSystem.ControlLayer
+{
+    public class Steering
+    {
+        IIO iO = null;
+        SqliteManager sql = null;
+        IEventAggregator eventAggregator = null;
+
+        public Steering(IIO io, SqliteManager sql, IEventAggregator ea)
+        {
+            this.iO = io;
+            this.sql = sql;
+            this.eventAggregator = ea;
+        }
+
+        bool ControlSteering(bool isConering = false)
+        {
+            if (isConering)
+            {
+            }
+            else
+            {
+            }
+
+            return true;
+        }
+    }
+}

+ 26 - 6
Dev/OHV/VehicleControlSystem/ControlLayer/Vehicle.cs

@@ -1,4 +1,5 @@
 using System;
+using System.Collections;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
@@ -84,11 +85,11 @@ namespace VehicleControlSystem.ControlLayer
 
             this.obstacleBitList.AddRange(new string[]
             {
-                "OUT_Obstruction_Bit_00",
-                "OUT_Obstruction_Bit_01",
-                "OUT_Obstruction_Bit_02",
-                "OUT_Obstruction_Bit_03",
-                "OUT_Obstruction_Bit_04",
+                "OUT_OBSTRUCTION_PATTERN_00",
+                "OUT_OBSTRUCTION_PATTERN_01",
+                "OUT_OBSTRUCTION_PATTERN_02",
+                "OUT_OBSTRUCTION_PATTERN_03",
+                "OUT_OBSTRUCTION_PATTERN_04",
             });
 
             this.eventAggregator = ea;
@@ -396,6 +397,7 @@ namespace VehicleControlSystem.ControlLayer
         }
 
         /// <summary>
+        /// if no is zero, Laser Off
         /// bit Off, On, On, On,On Area1
         /// </summary>
         /// <param name="no"> 0 == Off Laser</param>
@@ -411,12 +413,30 @@ namespace VehicleControlSystem.ControlLayer
                     this.iO.OutputOff(b);
                 else
                     this.iO.OutputOn(b);
+                bitIndex++;
             });
 
-
             return true;
         }
 
+        int GetObstacleDetectPattern()
+        {
+            int bitIndex = 0;
+
+            BitArray bitArray = new BitArray(this.obstacleBitList.Count);
+
+            this.obstacleBitList.ForEach(b =>
+            {
+                if (this.iO.IsOn(b))
+                    bitArray.Set(bitIndex, false);
+                else
+                    bitArray.Set(bitIndex, true);
+                bitIndex++;
+            });
+
+            return BitUtils.ChgInt32(bitArray);
+        }
+
         #endregion
     }
 }

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

@@ -107,6 +107,7 @@
     <Compile Include="ControlLayer\Serial\BatteryTabos\Manager.cs" />
     <Compile Include="ControlLayer\Serial\BatteryTabos\QueObject.cs" />
     <Compile Include="ControlLayer\Serial\BatteryTabos\Rs232c.cs" />
+    <Compile Include="ControlLayer\Steering.cs" />
     <Compile Include="ControlLayer\Vehicle.cs" />
     <Compile Include="Managers\AutoManager.cs" />
     <Compile Include="Managers\HostManager.cs" />