ys-hwang 6 rokov pred
rodič
commit
06ef11d521

+ 6 - 0
Dev/OHV/OHV.Module.Interactivity/MessageController.cs

@@ -37,6 +37,7 @@ namespace OHV.Module.Interactivity
             containerRegistry.RegisterDialog<OpticalReadingConfigView , OpticalReadingConfigViewModel>();
             containerRegistry.RegisterDialog<InOutControlView , InOutControlViewModel>();
             containerRegistry.RegisterDialog<ConfigView, ConfigViewModel>();
+            containerRegistry.RegisterDialog<ConveyorControlView , ConveyorControlViewModel>();
         }
 
         public void ShowConfigPopupView()
@@ -96,5 +97,10 @@ namespace OHV.Module.Interactivity
         {
             this.dialogService.ShowDialog( "InOutControlView" , new DialogParameters() , null );
         }
+
+        public void ShowConveyorPopupView()
+        {
+            this.dialogService.ShowDialog( "ConveyorControlView" , new DialogParameters() , null );
+        }
     }
 }

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

@@ -105,6 +105,12 @@
     <Compile Include="PopUp\ConfigViewModel.cs">
       <DependentUpon>ConfigView.xaml</DependentUpon>
     </Compile>
+    <Compile Include="PopUp\ConveyorControlView.xaml.cs">
+      <DependentUpon>ConveyorControlView.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="PopUp\ConveyorControlViewModel.cs">
+      <DependentUpon>ConveyorControlView.xaml</DependentUpon>
+    </Compile>
     <Compile Include="PopUp\DriveServoView.xaml.cs">
       <DependentUpon>DriveServoView.xaml</DependentUpon>
     </Compile>
@@ -173,6 +179,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="PopUp\ConveyorControlView.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
     <Page Include="PopUp\DriveServoView.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>

+ 18 - 6
Dev/OHV/OHV.Module.Interactivity/PopUp/ConveyorControlView.xaml

@@ -58,7 +58,10 @@
                             CommandParameter="CW"
                             Height="100" Width="100"
                             Margin="15">
-                            <TextBlock Text="CW"/>
+                            <StackPanel>
+                                <materialDesign:PackIcon Kind="TransferUp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                                <TextBlock Text="CW" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                            </StackPanel>
                         </Button>
 
                         <Button 
@@ -68,7 +71,10 @@
                             Margin="15"
                             Command="{Binding ConveyorRunCommand}"
                             CommandParameter="CCW">
-                            <TextBlock Text="CCW"/>
+                            <StackPanel>
+                                <materialDesign:PackIcon Kind="TransferDown" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                                <TextBlock Text="CCW" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                            </StackPanel>
                         </Button>
 
                         <Button HorizontalAlignment="Stretch"
@@ -79,8 +85,8 @@
                             Height="100" Width="100"
                             Margin="15">
                             <StackPanel>
-                                <!--<materialDesign:PackIcon Kind="OneUp" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto"/>-->
-                                <TextBlock Text="Stop" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                                <materialDesign:PackIcon Kind="StopCircleOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                                <TextBlock Text="Stop" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
                             </StackPanel>
                         </Button>
                     </StackPanel>
@@ -98,7 +104,10 @@
                                 materialDesign:ButtonAssist.CornerRadius="10"
                                 Command="{Binding PosMoveCommand}"
                                 CommandParameter="Lock">
-                            <TextBlock Text="Lock"/>
+                            <StackPanel>
+                                <materialDesign:PackIcon Kind="ElectricSwitchClosed" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                                <TextBlock Text="Lock" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                            </StackPanel>
                         </Button>
 
                         <Button Margin="15"
@@ -107,7 +116,10 @@
                                 materialDesign:ButtonAssist.CornerRadius="10"
                                 Command="{Binding PosMoveCommand}"
                                 CommandParameter="UnLock">
-                            <TextBlock Text="UnLock"/>
+                            <StackPanel>
+                                <materialDesign:PackIcon Kind="ElectricSwitch" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                                <TextBlock Text="UnLock" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                            </StackPanel>
                         </Button>
 
                     </StackPanel>

+ 4 - 4
Dev/OHV/OHV.Module.MainViews/Views/UnitView.xaml

@@ -56,8 +56,8 @@
                             Command="{Binding ServoConfigCommand}"
                             Height="150" Width="220">
                             <StackPanel>
-                                <materialDesign:PackIcon Kind="Gear" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="100"/>
-                                <TextBlock FontSize="30" Text="Motor" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
+                                <materialDesign:PackIcon Kind="RobotMowerOutline" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="100"/>
+                                <TextBlock FontSize="30" Text="Driving" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
                             </StackPanel>
                         </Button>
 
@@ -93,7 +93,7 @@
                             </StackPanel>
                         </Button>
 
-                        <Button HorizontalAlignment="Stretch"
+                        <!--<Button HorizontalAlignment="Stretch"
                             Style="{StaticResource MaterialDesignRaisedButton}"
                             Margin="20"
                             materialDesign:ButtonAssist.CornerRadius="20"
@@ -103,7 +103,7 @@
                                 <materialDesign:PackIcon Kind="CarHandBrake" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="auto" Height="100"/>
                                 <TextBlock FontSize="30" Text="Steering" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
                             </StackPanel>
-                        </Button>
+                        </Button>-->
 
                         <Button HorizontalAlignment="Stretch"
                             Style="{StaticResource MaterialDesignRaisedButton}"

+ 7 - 0
Dev/OHV/OHV.Module.MainViews/Views/UnitViewModel.cs

@@ -23,6 +23,7 @@ namespace OHV.Module.MainViews.Views
         public ICommand BatteryPopup { get; set; }
         public ICommand OpticalReaderPopup { get; set; }
         public ICommand ConfigCommand { get; set; }
+        public ICommand ConveyorPopup { get; set; }
 
         public UnitViewModel( IEventAggregator _ea , VCSystem _vcSystem , MessageController _msgController )
         {
@@ -35,6 +36,12 @@ namespace OHV.Module.MainViews.Views
             this.BatteryPopup = new DelegateCommand( ExecuteBatteryCommand );
             this.OpticalReaderPopup = new DelegateCommand( ExecuteOpticalReadCommand );
             this.ConfigCommand = new DelegateCommand(ExecuteConfigCommand);
+            this.ConveyorPopup = new DelegateCommand( ExecuteConveyorCommand );
+        }
+
+        private void ExecuteConveyorCommand( )
+        {
+            this.msgController.ShowConveyorPopupView();
         }
 
         private void ExecuteConfigCommand()

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

@@ -11,24 +11,21 @@ namespace OHV.Module.Status
 {
     public class VehicleStatusViewModel : BindableBase
     {
+        VCSystem vcSystem;
+
         string _vehicleState;
         public string VehicleState
         {
-            get { return this._vehicleState; }
-            set {
-                    this.SetProperty( ref this._vehicleState , value );
-                }
+            get { return vcSystem.autoManager.OperationModeProperty.ToString(); }
         }
         IEventAggregator eventAggregator;
-        VCSystem vcSystem;
+        
 
         public VehicleStatusViewModel(IEventAggregator _ea, VCSystem _vcSystem )
         {
             this.eventAggregator = _ea;
 
             this.vcSystem = _vcSystem;
-
-            this.VehicleState = vcSystem.autoManager.OperationModeProperty.ToString();
         }
 
         public void Init( ) { }

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

@@ -25,7 +25,7 @@
             <SolidColorBrush x:Key="PrimaryHueDarkForegroundBrush" Color="#FFFFFF"/>-->
             <!--ACCENT-->
             <SolidColorBrush x:Key="SecondaryAccentBrush" Color="#689f38"/>
-            <SolidColorBrush x:Key="SecondaryAccentForegroundBrush" Color="#FFFFFF"/>
+            <SolidColorBrush x:Key="SecondaryAccentForegroundBrush" Color="Black"/>
         </ResourceDictionary>
 
     </Application.Resources>

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

@@ -204,7 +204,6 @@ namespace VehicleControlSystem.Managers
                         case eAutoModeState.ErrorStop:
                             if ( !IsErrorProcessing )
                                 this.AutoModeStateProperty = eAutoModeState.WaitStop;
-
                             break;
                         case eAutoModeState.WaitStop:
                             this.AutoModeStateProperty = eAutoModeState.Stop;