Procházet zdrojové kódy

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

DESKTOP-Kang před 6 roky
rodič
revize
ea64e7424e

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

+ 1 - 1
Dev/OHV/OHV.Module.Interactivity/PopUp/BatteryConfigView.xaml

@@ -235,7 +235,7 @@
             </Grid>
         </Grid>
 
-        <Grid Grid.Column="1" Background="#37474f">
+        <Grid Grid.Column="1" Background="#263238">
             <Border Margin="1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
             <StackPanel>
                 <Button Margin="7,20" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding CloseDialogCommand}" CommandParameter="true">

+ 25 - 11
Dev/OHV/OHV.Module.Interactivity/PopUp/ConveyorControlView.xaml

@@ -46,8 +46,8 @@
 
                 <Grid Grid.Row="0">
                     <Button Content="Conveyor Control" Foreground="Orange" Background="{x:Null}" FontSize="20"
-                            VerticalAlignment="Top"
-                            Width="Auto" Height="Auto"/>
+                            VerticalAlignment="Top" HorizontalAlignment="Left"
+                            Width="Auto" Height="50"/>
                     <StackPanel Orientation="Horizontal"
                                 HorizontalAlignment="Center">
 
@@ -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>
@@ -88,7 +94,9 @@
 
                 <Grid Grid.Row="1">
                     <Button Content="Carrier Control" Foreground="Orange" Background="{x:Null}" FontSize="20"
-                            VerticalAlignment="Top" Width="Auto" Height="Auto"/>
+                            VerticalAlignment="Top" Width="Auto" Height="50"
+                            HorizontalAlignment="Left"/>
+                    
                     <StackPanel Orientation="Horizontal"
                                 HorizontalAlignment="Center">
 
@@ -98,7 +106,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,15 +118,18 @@
                                 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>
                 </Grid>
             </Grid>
         </Grid>
-        
-        <Grid Grid.Column="1" Background="#37474f">
+
+        <Grid Grid.Column="1" Background="#263238">
             <Border Margin="1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
             <StackPanel>
                 <Button Margin="7,20" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding CloseDialogCommand}" CommandParameter="true">

+ 30 - 36
Dev/OHV/OHV.Module.Interactivity/PopUp/OpticalReadingConfigView.xaml

@@ -35,7 +35,6 @@
         <Grid.ColumnDefinitions>
             <ColumnDefinition Width="*"/>
             <ColumnDefinition Width="130"/>
-            <ColumnDefinition Width="130"/>
         </Grid.ColumnDefinitions>
 
         <Grid Grid.Column="0" Margin="15" Background="#37474f">
@@ -176,7 +175,7 @@
             </StackPanel>-->
 
             <!--OutPut-->
-            <Border Grid.Column="0" Margin="30,10" BorderBrush="#FF00FFD3" BorderThickness="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
+            <Border Grid.Column="0" Margin="39,10" BorderBrush="#FF00FFD3" BorderThickness="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
             <StackPanel VerticalAlignment="Center"
                         HorizontalAlignment="Center"
                         Grid.Column="0">
@@ -221,27 +220,38 @@
 
             <StackPanel Grid.Column="1"
                         VerticalAlignment="Center"
-                        HorizontalAlignment="Center">
-                <StackPanel Orientation="Vertical">
-                    <TextBlock Margin="5"><Run Text="Pattern Result" Foreground="Silver" FontSize="20"/></TextBlock>
-                    <TextBlock Margin="5"><Run Text="Moving Detect = 21" Foreground="Silver" FontSize="18"/></TextBlock>
-                    <TextBlock Margin="5"><Run Text="Curve Detect = 31" Foreground="Silver" FontSize="18"/></TextBlock>
-                    <TextBlock Margin="5"><Run Text="Default = 10" Foreground="Silver" FontSize="18"/></TextBlock>
-                </StackPanel>
+                        HorizontalAlignment="Right"
+                        Margin="15">
+                <Button Height="60">
+                    <StackPanel>
+                        <TextBlock><Run Text="Drive Pattern" FontSize="20"/></TextBlock>
+                    </StackPanel>
+                </Button>
+
+                <Button Background="{x:Null}" Height="60"
+                        Command="{Binding PatternResultKyein}"
+                        CommandParameter="D">
+                    <StackPanel>
+                        <TextBlock><Run Text="{Binding DrivePatternResult, FallbackValue=0}" FontSize="25" Foreground="Orange"/></TextBlock>
+                    </StackPanel>
+                </Button>
             </StackPanel>
 
             <StackPanel Grid.Column="2"
                         VerticalAlignment="Center"
-                        HorizontalAlignment="Center">
-                <Button >
+                        HorizontalAlignment="Left"
+                        Margin="15">
+                <Button Height="60">
                     <StackPanel>
-                        <TextBlock><Run Text="Pattern Result"/></TextBlock>
+                        <TextBlock><Run Text="Curve Pattern" FontSize="20"/></TextBlock>
                     </StackPanel>
                 </Button>
 
-                <Button Background="{x:Null}">
+                <Button Background="{x:Null}" Height="60"
+                        Command="{Binding PatternResultKyein}"
+                        CommandParameter="C">
                     <StackPanel>
-                        <TextBlock><Run Text="{Binding PatternResult, FallbackValue=0}"/></TextBlock>
+                        <TextBlock><Run Text="{Binding CurvePatternResult, FallbackValue=0}" FontSize="25" Foreground="Orange"/></TextBlock>
                     </StackPanel>
                 </Button>
             </StackPanel>
@@ -250,14 +260,7 @@
         <!--Right Sub Menu Grid-->
         <Grid Grid.Column="1" Background="#37474f">
             <StackPanel>
-                <Button Margin="5,50,5,0" HorizontalAlignment="Stretch" Height="69" 
-                        BorderBrush="Gray" BorderThickness="2" 
-                        Command="{Binding DetectPatternSave}" CommandParameter="true">
-                    <StackPanel>
-                        <materialDesign:PackIcon Kind="CalendarExport" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                        <TextBlock Text="Save" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
-                    </StackPanel>
-                </Button>
+                
             </StackPanel>
         </Grid>
 
@@ -265,25 +268,16 @@
         <Grid Grid.Column="2" Background="#263238">
             <Border Margin="1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
             <StackPanel>
-                <Button Margin="5" HorizontalAlignment="Stretch" Height="69" 
-                        BorderBrush="Gray" BorderThickness="2"
-                        Command="{Binding SteeringConnectCommand}" CommandParameter="true">
-                    <StackPanel>
-                        <!--<materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
-                        <TextBlock Text="Connect" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
-                    </StackPanel>
-                </Button>
-
-                <Button Margin="5" HorizontalAlignment="Stretch" Height="69" 
+                <Button Margin="5,10,5,0" HorizontalAlignment="Stretch" Height="69" 
                         BorderBrush="Gray" BorderThickness="2" 
-                        Command="{Binding SteeringDisConnectCommand}" CommandParameter="true">
+                        Command="{Binding DetectPatternSave}" CommandParameter="true">
                     <StackPanel>
-                        <!--<materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
-                        <TextBlock Text="Disonnect" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
+                        <materialDesign:PackIcon Kind="CalendarExport" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
+                        <TextBlock Text="Save" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
                     </StackPanel>
                 </Button>
 
-                <Button Margin="5,50" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" 
+                <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" 
                         Command="{Binding CloseDialogCommand}" CommandParameter="true">
                     <StackPanel>
                         <materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>

+ 35 - 7
Dev/OHV/OHV.Module.Interactivity/PopUp/OpticalReadingConfigViewModel.cs

@@ -39,11 +39,18 @@ namespace OHV.Module.Interactivity.PopUp
             set { this.SetProperty( ref this._opReaderOutThird , value ); }
         }
 
-        private int _patternResult;
-        public int PatternResult
+        private int _curvePatternResult;
+        public int CurvePatternResult
         {
-            get { return this._patternResult; }
-            set { this.SetProperty( ref this._patternResult , value ); }
+            get { return this._curvePatternResult; }
+            set { this.SetProperty( ref this._curvePatternResult , value ); }
+        }
+
+        private int _drivePatternResult;
+        public int DrivePatternResult
+        {
+            get { return this._drivePatternResult; }
+            set { this.SetProperty( ref this._drivePatternResult , value ); }
         }
 
         private bool _resultPatternOne;
@@ -108,6 +115,8 @@ namespace OHV.Module.Interactivity.PopUp
 
         public ICommand DetectPatternSave { get; set; }
         public ICommand ResultPattern { get; set; }
+        public ICommand PatternResultKyein { get; set; }
+
 
         public event Action<IDialogResult> RequestClose;
 
@@ -121,6 +130,25 @@ namespace OHV.Module.Interactivity.PopUp
 
             this.DetectPatternSave = new DelegateCommand( ExecuteDetectPatternSave );
             this.ResultPattern = new DelegateCommand<object>( ExecuteResultPattern );
+            this.PatternResultKyein = new DelegateCommand<object>( ExecutePatternResultKyein );
+        }
+
+        private void ExecutePatternResultKyein( object obj)
+        {
+            var numpad = new CalcuratorView();
+            var result = numpad.ShowDialog(0);
+
+            var pattern = obj.ToString();
+
+            switch(pattern)
+            {
+                case "C":
+                    this.CurvePatternResult = Convert.ToInt32( result );
+                    break;
+                case "D":
+                    this.DrivePatternResult = Convert.ToInt32( result );
+                    break;
+            }
         }
 
         private void ExecuteResultPattern(object _obj)
@@ -141,9 +169,9 @@ namespace OHV.Module.Interactivity.PopUp
             {
                 if ( r.Result == ButtonResult.OK )
                 {
-                    bool[] bitResult = new bool[] { this.ResultPatternOne , this.ResultPatternTwo , this.ResultPatternThree , this.ResultPatternFour , this.ResultPatternFive };
-                    var result = new System.Collections.BitArray( bitResult );
-                    this.PatternResult = ConvertToByte( result );
+                    //bool[] bitResult = new bool[] { this.ResultPatternOne , this.ResultPatternTwo , this.ResultPatternThree , this.ResultPatternFour , this.ResultPatternFive };
+                    //var result = new System.Collections.BitArray( bitResult );
+                    //this.PatternResult = ConvertToByte( result );
 
                     //this.Publish(this.PatternResult);
                 }

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

+ 110 - 4
Dev/OHV/OHV.Module.Status/VehicleStatusView.xaml

@@ -12,15 +12,121 @@
              >
 
     <Grid Background="#263238">
-        <Grid Margin="15">
-            <Border BorderBrush="Gray" BorderThickness="1"/>
+        <Grid Margin="5">
+            <Grid.ColumnDefinitions>
+                <ColumnDefinition Width="*"/>
+                <ColumnDefinition Width="*"/>
+                <ColumnDefinition Width="*"/>
+                <ColumnDefinition Width="*"/>
+            </Grid.ColumnDefinitions>
+
+            <Grid.RowDefinitions>
+                <RowDefinition Height="*"/>
+                <RowDefinition Height="*"/>
+                <RowDefinition Height="*"/>
+            </Grid.RowDefinitions>
+
+            <StackPanel Orientation="Vertical"
+                        VerticalAlignment="Center"
+                        HorizontalAlignment="Center"
+                        Grid.Column="0"
+                        Grid.Row="1">
+                <TextBlock Margin="5" Text="Clamp State" Foreground="Silver" FontSize="25"/>
+                <TextBlock Margin="5" HorizontalAlignment="Center" 
+                           Text="{Binding VehicleClampState, FallbackValue=OFF}" Foreground="Orange" FontSize="30"/>
+            </StackPanel>
+
+            <StackPanel Orientation="Vertical"
+                        VerticalAlignment="Center"
+                        HorizontalAlignment="Center"
+                        Grid.Column="1" 
+                        Grid.Row="1">
+
+                <TextBlock Margin="5" Text="Conveyor" Foreground="Silver" FontSize="25"/>
+                <TextBlock Margin="5" HorizontalAlignment="Center" 
+                           Text="{Binding VehicleCVState, FallbackValue=OFF}" Foreground="Orange" FontSize="30"/>
+            </StackPanel>
+
+            <StackPanel Orientation="Vertical"
+                        VerticalAlignment="Center"
+                        HorizontalAlignment="Center"
+                        Grid.Column="2"
+                        Grid.Row="1">
+                <TextBlock Margin="5" Text="Vehicle Position" Foreground="Silver" FontSize="25"/>
+                <TextBlock Margin="5" HorizontalAlignment="Center" 
+                           Text="{Binding VehicleCurrentPos, FallbackValue=1517}" Foreground="Orange" FontSize="30"/>
+            </StackPanel>
+
+
             <StackPanel Orientation="Vertical"
                         VerticalAlignment="Center"
-                        HorizontalAlignment="Center">
-                <TextBlock Margin="5" Text="Vehicle Current State" Foreground="Silver" FontSize="30"/>
+                        HorizontalAlignment="Center"
+                        Grid.Column="4" 
+                        Grid.Row="1">
+
+                <TextBlock Margin="5" Text="Vehicle Mode" Foreground="Silver" FontSize="25"/>
                 <TextBlock Margin="5" HorizontalAlignment="Center" 
                            Text="{Binding VehicleState, FallbackValue=IDLE}" Foreground="Orange" FontSize="30"/>
             </StackPanel>
+
+            <StackPanel Orientation="Vertical"
+                        VerticalAlignment="Center"
+                        HorizontalAlignment="Left" 
+                        Grid.Column="0"
+                        Grid.Row="2">
+
+                <Button Background="{x:Null}">
+                    <StackPanel Orientation="Horizontal">
+                        <Ellipse Margin="0,0,16,0" Width="20" Height="20" Fill="Red"/>
+                        <TextBlock Text="CV SPD-H"/>
+                    </StackPanel>
+                </Button>
+
+                <Button Background="{x:Null}">
+                    <StackPanel Orientation="Horizontal">
+                        <Ellipse Margin="0,0,19,0" Width="20" Height="20" Fill="Red"/>
+                        <TextBlock Text="CV SPD-L"/>
+                    </StackPanel>
+                </Button>
+
+                <Button Background="{x:Null}">
+                    <StackPanel Orientation="Horizontal">
+                        <Ellipse Margin="0,0,10,0" Width="20" Height="20" Fill="Red"/>
+                        <TextBlock Text="CV EntryIN"/>
+                    </StackPanel>
+                </Button>
+
+                
+            </StackPanel>
+
+            <StackPanel Orientation="Vertical"
+                        VerticalAlignment="Center"
+                        HorizontalAlignment="Left" 
+                        Grid.Column="1"
+                        Grid.Row="2">
+
+                <Button Background="{x:Null}">
+                    <StackPanel Orientation="Horizontal">
+                        <Ellipse Margin="0,0,10,0" Width="20" Height="20" Fill="Red"/>
+                        <TextBlock Text="CV Slow-S"/>
+                    </StackPanel>
+                </Button>
+
+                <Button Background="{x:Null}">
+                    <StackPanel Orientation="Horizontal">
+                        <Ellipse Margin="0,0,10,0" Width="20" Height="20" Fill="Red"/>
+                        <TextBlock Text="CV Stop-S"/>
+                    </StackPanel>
+                </Button>
+
+                <Button Background="{x:Null}">
+                    <StackPanel Orientation="Horizontal">
+                        <Ellipse Margin="0,0,10,0" Width="20" Height="20" Fill="Red"/>
+                        <TextBlock Text="CV-ERROR"/>
+                    </StackPanel>
+                </Button>
+
+            </StackPanel>
         </Grid>
     </Grid>
 </UserControl>

+ 8 - 8
Dev/OHV/OHV.Module.Status/VehicleStatusViewModel.cs

@@ -11,16 +11,16 @@ 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(); }
+            set { this.SetProperty( ref this._vehicleState , value ); }
         }
         IEventAggregator eventAggregator;
-        VCSystem vcSystem;
+        
 
         public VehicleStatusViewModel(IEventAggregator _ea, VCSystem _vcSystem )
         {
@@ -28,10 +28,10 @@ namespace OHV.Module.Status
 
             this.vcSystem = _vcSystem;
 
-            this.VehicleState = vcSystem.autoManager.OperationModeProperty.ToString();
-
-            vcSystem.autoManager.OnOperationModeChanged += (mode) => { this.VehicleState = mode.ToString(); };
+            vcSystem.autoManager.OnOperationModeChanged += ( mode ) => { this.VehicleState = mode.ToString(); };
+            //this.vcSystem.autoManager.OperationModeChanged += () => { };//AutoManager_OperationModeChanged;
         }
+        
 
         public void Init( ) { }
     }

+ 5 - 5
Dev/OHV/OHV.SqliteDAL/DAL/AbstractDAL.cs

@@ -22,7 +22,7 @@ namespace OHV.SqliteDAL.DAL
         public delegate void DlgChangedProperty();
         public event DlgChangedProperty ChangedProperty;
 
-        protected virtual void OnChangedPropertiy()
+        protected virtual void OnChangedProperty()
         {
             ChangedProperty?.BeginInvoke(null, null);
         }
@@ -90,7 +90,7 @@ namespace OHV.SqliteDAL.DAL
                 db.Set<T>().Add(entity);
                 db.SaveChanges();
             }
-            OnChangedPropertiy();
+            OnChangedProperty();
         }
 
         public void Delete(T entity)
@@ -101,7 +101,7 @@ namespace OHV.SqliteDAL.DAL
                 //db.Set<T>().Remove(entity);
                 db.SaveChanges();
             }
-            OnChangedPropertiy();
+            OnChangedProperty();
         }
 
         public virtual void Update(T entity)
@@ -111,7 +111,7 @@ namespace OHV.SqliteDAL.DAL
                 db.Entry(entity).State = EntityState.Modified;
                 db.SaveChanges();
             }
-            OnChangedPropertiy();
+            OnChangedProperty();
         }
 
         public void Clean()
@@ -121,7 +121,7 @@ namespace OHV.SqliteDAL.DAL
                 db.Set<T>().RemoveRange(db.Set<T>());
                 db.SaveChanges();
             }
-            OnChangedPropertiy();
+            OnChangedProperty();
         }
     }
 

+ 2 - 2
Dev/OHV/OHV.SqliteDAL/DAL/CommandDAL.cs

@@ -26,7 +26,7 @@ namespace OHV.SqliteDAL.DAL
             var cmd = GetK(id);
             cmd.State = state;
             Update(cmd);
-            base.OnChangedPropertiy();
+            base.OnChangedProperty();
         }
 
         public void UpdateResult(string id, eCommandResult result)
@@ -37,7 +37,7 @@ namespace OHV.SqliteDAL.DAL
                 cmd.Result = result;
                 db.SaveChanges();
             }
-            base.OnChangedPropertiy();
+            base.OnChangedProperty();
         }
 
         public int GetCount()

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

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

@@ -37,6 +37,7 @@ namespace VehicleControlSystem.Managers
 
                 operationMode = value;
                 logger.D($"[AutoManager] OperationMode - {value}");
+
                 this.OnOperationModeChanged?.Invoke(value);
             }
         }