소스 검색

Busy Bar 추가

ys-hwang 5 년 전
부모
커밋
6516fe647b

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

@@ -103,6 +103,21 @@
     <Reference Include="System.Net.Http" />
     <Reference Include="System.Xml" />
     <Reference Include="WindowsBase" />
+    <Reference Include="Xceed.Wpf.AvalonDock, Version=4.0.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
+      <HintPath>..\packages\Extended.Wpf.Toolkit.4.0.1\lib\net40\Xceed.Wpf.AvalonDock.dll</HintPath>
+    </Reference>
+    <Reference Include="Xceed.Wpf.AvalonDock.Themes.Aero, Version=4.0.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
+      <HintPath>..\packages\Extended.Wpf.Toolkit.4.0.1\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll</HintPath>
+    </Reference>
+    <Reference Include="Xceed.Wpf.AvalonDock.Themes.Metro, Version=4.0.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
+      <HintPath>..\packages\Extended.Wpf.Toolkit.4.0.1\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll</HintPath>
+    </Reference>
+    <Reference Include="Xceed.Wpf.AvalonDock.Themes.VS2010, Version=4.0.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
+      <HintPath>..\packages\Extended.Wpf.Toolkit.4.0.1\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll</HintPath>
+    </Reference>
+    <Reference Include="Xceed.Wpf.Toolkit, Version=4.0.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
+      <HintPath>..\packages\Extended.Wpf.Toolkit.4.0.1\lib\net40\Xceed.Wpf.Toolkit.dll</HintPath>
+    </Reference>
   </ItemGroup>
   <ItemGroup>
     <Compile Include="MessageController.cs" />

+ 3 - 0
Dev/OHV/OHV.Module.Interactivity/PopUp/DriveServoView.xaml

@@ -12,6 +12,7 @@
              Background="#CC282C34"
              xmlns:System="clr-namespace:System;assembly=mscorlib"
              xmlns:SharedEnum="clr-namespace:OHV.Common.Model;assembly=OHV.Common"
+             xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
              >
 
     <prism:Dialog.WindowStyle>
@@ -595,6 +596,8 @@
                     </Button>
                 </StackPanel>
             </Grid>
+            <xctk:BusyIndicator x:Name="MyProgress" Grid.RowSpan="2" Grid.ColumnSpan="2" IsBusy="{Binding IsBusy, FallbackValue=true}" BusyContent="{Binding BusyText}">
+            </xctk:BusyIndicator>
         </Grid>
     </Border>
 

+ 23 - 3
Dev/OHV/OHV.Module.Interactivity/PopUp/DriveServoViewModel.cs

@@ -193,6 +193,15 @@ namespace OHV.Module.Interactivity.PopUp
             set { SetProperty( ref this.currentTag , value ); }
         }
 
+        private bool isBusy;
+
+        public bool IsBusy
+        {
+            get { return isBusy; }
+            set {SetProperty(ref this.isBusy, value); }
+        }
+
+
         ZmqManager zmqManager;
 
         public DriveServoViewModel(IEventAggregator _ea , SqliteManager _sql , MessageController _messageController , VCSystem system)
@@ -441,11 +450,10 @@ namespace OHV.Module.Interactivity.PopUp
                         if (args.Result.IsSuccess)
                         {
                             this.messageController.ShowNotificationView("Drive On Success");
-                            LockUtils.Wait(300);
-                            this.messageController.busy.SetBusyState(true);
                         }
                         else
                         {
+                            CurrentBusyCheck();
                             //this.messageController.ShowNotificationView("Drive On Fail", false);
                         }
                         break;
@@ -462,6 +470,17 @@ namespace OHV.Module.Interactivity.PopUp
             }
         }
 
+        async private void CurrentBusyCheck()
+        {
+            //TODO: Time 조건 추가 할것 07-16
+            await Task.Run( () =>
+             {
+                 LockUtils.Wait( 3000 );
+             } );
+
+            this.IsBusy = false;
+        }
+
         private void ResponseVehicleState(DriveControlEventArgs args)
         {
             var state = CastTo<VehicleInfo>.From<object>( args.Args );
@@ -639,6 +658,8 @@ namespace OHV.Module.Interactivity.PopUp
 
         private void ExecuteServoOnCommand()
         {
+            this.IsBusy = true;
+
             var msg = new DriveControlEventArgs
             {
                 EventDir = DriveControlEventArgs.eEventDir.ToBack ,
@@ -646,7 +667,6 @@ namespace OHV.Module.Interactivity.PopUp
             };
 
             this.PublishEvent( msg );
-            this.messageController.ShowBusyBar("Batch Command", "Wait DriveOn..");
         }
 
         private void ExecuteCurrentToTargetCommand()

+ 1 - 0
Dev/OHV/OHV.Module.Interactivity/packages.config

@@ -2,6 +2,7 @@
 <packages>
   <package id="CommonServiceLocator" version="2.0.4" targetFramework="net45" />
   <package id="DynamicExpresso.Core" version="2.3.1" targetFramework="net45" />
+  <package id="Extended.Wpf.Toolkit" version="4.0.1" 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" />

+ 28 - 35
Dev/OHV/OHV.Vehicle/App.config

@@ -1,38 +1,31 @@
 <?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" />
-	</configSections>
-
-	<connectionStrings>
-		<add name="OHVDb" connectionString="data source=C:\DB\OHVDb.sqlite;foreign keys=true" providerName="System.Data.SQLite" />
-	</connectionStrings>
-
-	<startup>
-		<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
-	</startup>
-
-	<entityFramework>
-		<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
-			<parameters>
-				<parameter value="mssqllocaldb" />
-			</parameters>
-		</defaultConnectionFactory>
-		<providers>
-			<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
-			<provider invariantName="System.Data.SQLite" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
-			<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
-		</providers>
-	</entityFramework>
-
-	<system.data>
-		<DbProviderFactories>
-			<remove invariant="System.Data.SQLite.EF6" />
-			<add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
-			<remove invariant="System.Data.SQLite" />
-			<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
-		</DbProviderFactories>
-	</system.data>
-
+  <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" />
+  </configSections>
+  <connectionStrings>
+    <add name="OHVDb" connectionString="data source=C:\DB\OHVDb.sqlite;foreign keys=true" providerName="System.Data.SQLite" />
+  </connectionStrings>
+  <startup>
+    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
+  </startup>
+  <entityFramework>
+    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
+      <parameters>
+        <parameter value="mssqllocaldb" />
+      </parameters>
+    </defaultConnectionFactory>
+    <providers>
+      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
+      <provider invariantName="System.Data.SQLite" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
+      <provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
+    </providers>
+  </entityFramework>
+  <system.data>
+    <DbProviderFactories>
+      <remove invariant="System.Data.SQLite.EF6" />
+      <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
+    <remove invariant="System.Data.SQLite" /><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /></DbProviderFactories>
+  </system.data>
 </configuration>

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

@@ -110,15 +110,12 @@
     </Reference>
     <Reference Include="Prism, Version=7.2.0.1422, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
       <HintPath>..\packages\Prism.Core.7.2.0.1422\lib\net45\Prism.dll</HintPath>
-      <Private>True</Private>
     </Reference>
     <Reference Include="Prism.Unity.Wpf, Version=7.2.0.1422, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
       <HintPath>..\packages\Prism.Unity.7.2.0.1422\lib\net45\Prism.Unity.Wpf.dll</HintPath>
-      <Private>True</Private>
     </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>
-      <Private>True</Private>
     </Reference>
     <Reference Include="Quartz, Version=1.0.3.2, Culture=neutral, PublicKeyToken=f6b8c98a402cc8a4, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
@@ -130,32 +127,25 @@
     <Reference Include="System.Data" />
     <Reference Include="System.Data.SQLite, Version=1.0.112.1, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
       <HintPath>..\packages\System.Data.SQLite.Core.1.0.112.2\lib\net40\System.Data.SQLite.dll</HintPath>
-      <Private>True</Private>
     </Reference>
     <Reference Include="System.Data.SQLite.EF6, Version=1.0.112.1, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
       <HintPath>..\packages\System.Data.SQLite.EF6.1.0.112.2\lib\net40\System.Data.SQLite.EF6.dll</HintPath>
-      <Private>True</Private>
     </Reference>
     <Reference Include="System.Data.SQLite.Linq, Version=1.0.112.1, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
       <HintPath>..\packages\System.Data.SQLite.Linq.1.0.112.2\lib\net40\System.Data.SQLite.Linq.dll</HintPath>
-      <Private>True</Private>
     </Reference>
     <Reference Include="System.Management" />
     <Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
       <HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard1.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
-      <Private>True</Private>
     </Reference>
     <Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
       <HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.2\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Extensions.dll</HintPath>
-      <Private>True</Private>
     </Reference>
     <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>
-      <Private>True</Private>
     </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>
-      <Private>True</Private>
     </Reference>
     <Reference Include="System.Xml" />
     <Reference Include="Microsoft.CSharp" />
@@ -168,11 +158,9 @@
     </Reference>
     <Reference Include="Unity.Abstractions, Version=5.11.1.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
       <HintPath>..\packages\Unity.Abstractions.5.11.1\lib\net45\Unity.Abstractions.dll</HintPath>
-      <Private>True</Private>
     </Reference>
     <Reference Include="Unity.Container, Version=5.11.1.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
       <HintPath>..\packages\Unity.Container.5.11.1\lib\net45\Unity.Container.dll</HintPath>
-      <Private>True</Private>
     </Reference>
     <Reference Include="WindowsBase" />
     <Reference Include="PresentationCore" />