Selaa lähdekoodia

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

# Conflicts:
#	Dev/OHV/OHV.Module.Status/VehicleStatusViewModel.cs
#	Dev/OHV/VehicleControlSystem/Managers/AutoManager.cs
ys-hwang 6 vuotta sitten
vanhempi
commit
a6c118c37a

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

@@ -87,6 +87,13 @@
                                         </Trigger>
                                     </Style.Triggers>
                                 </Style>
+
+                                <Style TargetType="DataGridColumnHeader" BasedOn="{StaticResource MaterialDesignDataGridColumnHeader}">
+                                    <Setter Property="VerticalContentAlignment" Value="Center"/>
+                                    <Setter Property="HorizontalContentAlignment" Value="Center"/>
+                                    <Setter Property="Foreground" Value="White"/>
+                                </Style>
+
                             </DataGrid.Resources>
 
                             <DataGrid.Columns>

+ 7 - 1
Dev/OHV/OHV.Module.ListViews/Views/CommandListView.xaml

@@ -43,11 +43,12 @@
             <RowDefinition Height="*"/>
         </Grid.RowDefinitions>
         <TextBlock VerticalAlignment="Center" FontSize="20" Margin="10,0,0,0">Command List</TextBlock>
-        <Grid Grid.Row="1">
+        <Grid Grid.Row="1" Background="#263238">
             <Grid.ColumnDefinitions>
                 <ColumnDefinition Width="2*"/>
                 <ColumnDefinition Width="*"/>
             </Grid.ColumnDefinitions>
+
             <DataGrid ItemsSource="{Binding CommandList}" CanUserSortColumns="True" CanUserAddRows="False" AutoGenerateColumns="False" materialDesign:DataGridAssist.CellPadding="13 8 8 8" 
                                   materialDesign:DataGridAssist.ColumnHeaderPadding="8" Background="{x:Null}" Foreground="White" IsReadOnly="True" >
 
@@ -61,6 +62,11 @@
                         <Setter Property="TextBlock.TextAlignment" Value="Center" />
                         <Setter Property="FontSize" Value="15"/>
                     </Style>
+                    <Style TargetType="DataGridColumnHeader" BasedOn="{StaticResource MaterialDesignDataGridColumnHeader}">
+                        <Setter Property="VerticalContentAlignment" Value="Center"/>
+                        <Setter Property="HorizontalContentAlignment" Value="Center"/>
+                        <Setter Property="Foreground" Value="White"/>
+                    </Style>
                 </DataGrid.Resources>
 
                 <DataGrid.Columns>

+ 5 - 0
Dev/OHV/OHV.Module.ListViews/Views/SubCommandListView.xaml

@@ -57,6 +57,11 @@
                             </Trigger>
                         </Style.Triggers>
                     </Style>
+                    <Style TargetType="DataGridColumnHeader" BasedOn="{StaticResource MaterialDesignDataGridColumnHeader}">
+                        <Setter Property="VerticalContentAlignment" Value="Center"/>
+                        <Setter Property="HorizontalContentAlignment" Value="Center"/>
+                        <Setter Property="Foreground" Value="White"/>
+                    </Style>
                 </DataGrid.Resources>
 
                 <DataGrid.Columns>

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

@@ -17,6 +17,7 @@ namespace OHV.Module.Status
         public string VehicleState
         {
             get { return vcSystem.autoManager.OperationModeProperty.ToString(); }
+            set { this.SetProperty( ref this._vehicleState , value ); }
         }
         IEventAggregator eventAggregator;
         
@@ -27,13 +28,10 @@ namespace OHV.Module.Status
 
             this.vcSystem = _vcSystem;
 
-            this.vcSystem.autoManager.OperationModeChanged += () => { };//AutoManager_OperationModeChanged;
-        }
-
-        private void AutoManager_OperationModeChanged( )
-        {
-            
+            vcSystem.autoManager.OnOperationModeChanged += ( mode ) => { this.VehicleState = mode.ToString(); };
+            //this.vcSystem.autoManager.OperationModeChanged += () => { };//AutoManager_OperationModeChanged;
         }
+        
 
         public void Init( ) { }
     }

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

@@ -38,9 +38,10 @@ namespace VehicleControlSystem.Managers
                 operationMode = value;
                 logger.D($"[AutoManager] OperationMode - {value}");
 
-                this.OperationModeChanged?.Invoke(this.operationMode);
+                this.OnOperationModeChanged?.Invoke(value);
             }
         }
+        public event Action<eOperatationMode> OnOperationModeChanged;
 
         private delegate void OperationModeChanging();
         public event Action OperationModeChanged;

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

@@ -18,7 +18,7 @@
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>TRACE;DEBUG</DefineConstants>
+    <DefineConstants>TRACE;DEBUG;SIMULATION</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>