瀏覽代碼

정기 업데이트

DESKTOP-Kang 6 年之前
父節點
當前提交
7deabfbead

+ 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>

+ 2 - 0
Dev/OHV/OHV.Module.Status/VehicleStatusViewModel.cs

@@ -29,6 +29,8 @@ namespace OHV.Module.Status
             this.vcSystem = _vcSystem;
 
             this.VehicleState = vcSystem.autoManager.OperationModeProperty.ToString();
+
+            vcSystem.autoManager.OnOperationModeChanged += (mode) => { this.VehicleState = mode.ToString(); };
         }
 
         public void Init( ) { }

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

@@ -37,8 +37,10 @@ namespace VehicleControlSystem.Managers
 
                 operationMode = value;
                 logger.D($"[AutoManager] OperationMode - {value}");
+                this.OnOperationModeChanged?.Invoke(value);
             }
         }
+        public event Action<eOperatationMode> OnOperationModeChanged;
 
         private eAutoModeState autoModeState;
         public eAutoModeState AutoModeStateProperty
@@ -205,7 +207,6 @@ namespace VehicleControlSystem.Managers
                         case eAutoModeState.ErrorStop:
                             if ( !IsErrorProcessing )
                                 this.AutoModeStateProperty = eAutoModeState.WaitStop;
-
                             break;
                         case eAutoModeState.WaitStop:
                             this.AutoModeStateProperty = eAutoModeState.Stop;

+ 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>