ys-hwang пре 6 година
родитељ
комит
ec67716de4

+ 181 - 75
Dev/OHV/OHV.Module.Interactivity/PopUp/BatteryConfigView.xaml

@@ -48,74 +48,198 @@
         <Grid Grid.Column="0">
             <Grid Margin="15" Background="#37474f">
                 <Grid.RowDefinitions>
-                    <RowDefinition Height="*"/>
-                    <RowDefinition Height="*"/>
+                    <RowDefinition/>
+                    <RowDefinition/>
                 </Grid.RowDefinitions>
 
                 <Grid Grid.Row="0">
+                    <Grid.ColumnDefinitions>
+                        <ColumnDefinition Width="*"/>
+                        <ColumnDefinition Width="*"/>
+                        <ColumnDefinition Width="*"/>
+                        <ColumnDefinition Width="*"/>
+                        <ColumnDefinition Width="*"/>
+                    </Grid.ColumnDefinitions>
                     <Grid.RowDefinitions>
-                        <RowDefinition/>
-                        <RowDefinition/>
+                        <RowDefinition Height="*"/>
+                        <RowDefinition Height="*"/>
+                        <RowDefinition Height="*"/>
+                        <RowDefinition Height="*"/>
                     </Grid.RowDefinitions>
 
-                    <StackPanel Grid.Row="0" Orientation="Horizontal" 
-                                VerticalAlignment="Center" HorizontalAlignment="Left"
-                                Margin=" 25">
-                        <StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center">
-                            <Button Content="Version" Margin="3" IsEnabled="False"/>
-                            <Button Content="LifeTime" Margin="3" IsEnabled="False"/>
-                        </StackPanel>
-
-                        <StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center">
-                            <Button Content="1.0.0.01" Margin="3" Background="{x:Null}"/>
-                            <Button Content="yyyy-MM-dd" Margin="3" Background="{x:Null}"/>
-                        </StackPanel>
-                    </StackPanel>
-                    
-                    <!--Send Message Buttons-->
-                    <StackPanel Grid.Row="1" Orientation="Horizontal" 
-                                VerticalAlignment="Center" HorizontalAlignment="Left"
-                                Margin="25">
-                        <Button Margin="5">
-                            <StackPanel>
-                                <TextBlock Text="MSG1"/>
-                            </StackPanel>
-                        </Button>
-
-                        <Button Margin="5">
-                            <StackPanel>
-                                <TextBlock Text="MSG2"/>
-                            </StackPanel>
-                        </Button>
-
-                        <Button Margin="5">
-                            <StackPanel>
-                                <TextBlock Text="MSG3"/>
-                            </StackPanel>
-                        </Button>
-
-                        <Button Margin="5">
-                            <StackPanel>
-                                <TextBlock Text="MSG4"/>
-                            </StackPanel>
-                        </Button>
-
-                        <Button Margin="5">
-                            <StackPanel>
-                                <TextBlock Text="MSG5"/>
-                            </StackPanel>
-                        </Button>
-                    </StackPanel>
+                    <!--Voltage-->
+                    <Button Grid.Column="0" Grid.Row="0"
+                            Content="Voltage" Margin="3" VerticalAlignment="Bottom"/>
+
+                    <Border Grid.Row="1" Grid.Column="0" BorderBrush="Gray" BorderThickness="1" Margin="5">
+                        <TextBlock Grid.Column="0" Grid.Row="1"
+                            VerticalAlignment="Center"
+                            HorizontalAlignment="Center"
+                            Foreground="Orange" FontSize="20">
+                            <Run Text="{Binding Voltage, FallbackValue=0.0V}"/>
+                        </TextBlock>
+                    </Border>
+
+                    <!--Current-->
+                    <Button Grid.Column="1" Grid.Row="0"
+                        Content="Current" Margin="3" Width="Auto" VerticalAlignment="Bottom"/>
+                    <Border Grid.Column="1" Grid.Row="1" Margin="5"
+                            BorderBrush="Gray" BorderThickness="1">
+                        <TextBlock Grid.Column="0" Grid.Row="1"
+                               VerticalAlignment="Center"
+                               HorizontalAlignment="Center"
+                               Foreground="Orange" FontSize="20">
+                                <Run Text="{Binding Current, FallbackValue=0.0A}"/>
+                        </TextBlock>
+                    </Border>
+
+                    <!--SOC-->
+                    <Button Grid.Column="2" Grid.Row="0"
+                        Content="SOC" Margin="3" Width="Auto" VerticalAlignment="Bottom"/>
+                    <Border Grid.Column="2" Grid.Row="1" Margin="5"
+                            BorderBrush="Gray" BorderThickness="1">
+                        <TextBlock Grid.Column="0" Grid.Row="1"
+                               VerticalAlignment="Center"
+                               HorizontalAlignment="Center"
+                               Foreground="Orange" FontSize="20">
+                                <Run Text="{Binding SOC, FallbackValue=0%}"/>
+                        </TextBlock>
+                    </Border>
+
+                    <!--Battery State-->
+                    <Button Grid.Column="3" Grid.Row="0"
+                        Content="Battery State" Margin="3" Width="Auto" VerticalAlignment="Bottom"/>
+                    <Border Grid.Column="3" Grid.Row="1" Margin="5"
+                            BorderBrush="Gray" BorderThickness="1">
+                        <TextBlock Grid.Column="0" Grid.Row="1"
+                               VerticalAlignment="Center"
+                               HorizontalAlignment="Center"
+                               Foreground="Orange" FontSize="20">
+                                <Run Text="{Binding BatteryState, FallbackValue=0x0}"/>
+                        </TextBlock>
+                    </Border>
+
+                    <!--Temperature-->
+                    <Button Grid.Column="4" Grid.Row="0"
+                        Content="Temperature" Margin="3" Width="Auto" VerticalAlignment="Bottom"/>
+                    <Border Grid.Column="4" Grid.Row="1" Margin="5"
+                            BorderBrush="Gray" BorderThickness="1">
+                        <TextBlock Grid.Column="0" Grid.Row="1"
+                               VerticalAlignment="Center"
+                               HorizontalAlignment="Center"
+                               Foreground="Orange" FontSize="20">
+                                <Run Text="{Binding Temperature, FallbackValue=C}"/>
+                        </TextBlock>
+                    </Border>
+
+                    <!--ChargeTime-->
+                    <Button Grid.Column="0" Grid.Row="2"
+                        Content="ChargeTime" Margin="3" Width="Auto" VerticalAlignment="Bottom"/>
+                    <Border Grid.Column="0" Grid.Row="3" Margin="5"
+                            BorderBrush="Gray" BorderThickness="1">
+                        <TextBlock Grid.Column="0" Grid.Row="1"
+                               VerticalAlignment="Center"
+                               HorizontalAlignment="Center"
+                               Foreground="Orange" FontSize="20">
+                                <Run Text="{Binding ChargeTime, FallbackValue=min}"/>
+                        </TextBlock>
+                    </Border>
+
+                    <!--DisChargeTime-->
+                    <Button Grid.Column="1" Grid.Row="2"
+                        Content="DisChargeTime" Margin="3" Width="Auto" VerticalAlignment="Bottom"/>
+                    <Border Grid.Column="1" Grid.Row="3" Margin="5"
+                            BorderBrush="Gray" BorderThickness="1">
+                        <TextBlock Grid.Column="0" Grid.Row="1"
+                               VerticalAlignment="Center"
+                               HorizontalAlignment="Center"
+                               Foreground="Orange" FontSize="20">
+                                <Run Text="{Binding DisChargeTime, FallbackValue=min}"/>
+                        </TextBlock>
+                    </Border>
+
+                    <!--SOH-->
+                    <Button Grid.Column="2" Grid.Row="2"
+                        Content="SOH" Margin="3" Width="Auto" VerticalAlignment="Bottom"/>
+                    <Border Grid.Column="2" Grid.Row="3" Margin="5"
+                            BorderBrush="Gray" BorderThickness="1">
+                        <TextBlock Grid.Column="0" Grid.Row="1"
+                               VerticalAlignment="Center"
+                               HorizontalAlignment="Center"
+                               Foreground="Orange" FontSize="20">
+                                <Run Text="{Binding SOH, FallbackValue=0%}"/>
+                        </TextBlock>
+                    </Border>
+
+                    <!--Capacity-->
+                    <Button Grid.Column="3" Grid.Row="2"
+                        Content="Capacity" Margin="3" Width="Auto" VerticalAlignment="Bottom"/>
+                    <Border Grid.Column="3" Grid.Row="3" Margin="5"
+                            BorderBrush="Gray" BorderThickness="1">
+                        <TextBlock Grid.Column="0" Grid.Row="1"
+                               VerticalAlignment="Center"
+                               HorizontalAlignment="Center"
+                               Foreground="Orange" FontSize="20">
+                                <Run Text="{Binding Capacity, FallbackValue=Ah}"/>
+                        </TextBlock>
+                    </Border>
+
+                    <!--Energy-->
+                    <Button Grid.Column="4" Grid.Row="2"
+                        Content="Energy" Margin="3" Width="Auto" VerticalAlignment="Bottom"/>
+                    <Border Grid.Column="4" Grid.Row="3" Margin="5"
+                            BorderBrush="Gray" BorderThickness="1">
+                        <TextBlock Grid.Column="0" Grid.Row="1"
+                               VerticalAlignment="Center"
+                               HorizontalAlignment="Center"
+                               Foreground="Orange" FontSize="20">
+                                <Run Text="{Binding Energy, FallbackValue=Wh}"/>
+                        </TextBlock>
+                    </Border>
                 </Grid>
 
-                <Grid Grid.Row="1">
-                    <StackPanel VerticalAlignment="Top">
+                <!--<Grid Grid.Row="1">
+                    <StackPanel VerticalAlignment="Center">
                         <GroupBox
                             Margin="30,0,20,0"
                             Header="Data Receive" FontSize="15">
-                            <TextBox Text="{Binding BatteryReceive, FallbackValue=[Receive] : xxxxx}"/>
+                            <TextBox Text="{Binding BatteryReceive, FallbackValue=[Receive] : xxxxx}" IsReadOnly="True" Foreground="Orange"/>
                         </GroupBox>
                     </StackPanel>
+                </Grid>-->
+                <Grid Grid.Row="1">
+                    <Grid.RowDefinitions>
+                        <RowDefinition/>
+                        <RowDefinition/>
+                    </Grid.RowDefinitions>
+                    <Grid Grid.Row="0">
+                        <Grid.ColumnDefinitions>
+                            <ColumnDefinition/>
+                            <ColumnDefinition/>
+                            <ColumnDefinition/>
+                            <ColumnDefinition/>
+                        </Grid.ColumnDefinitions>
+                        <Grid.RowDefinitions>
+                            <RowDefinition/>
+                            <RowDefinition/>
+                        </Grid.RowDefinitions>
+                        <Border Grid.Row="0" BorderBrush="Gray" BorderThickness="1" Grid.ColumnSpan="4" Grid.RowSpan="2"/>
+
+                        <Ellipse Grid.Column="0" Margin="48,10,53,10" Fill="{Binding SerialOpenState}" Stroke="Gray"/>
+                        <TextBlock Text="Open State" Grid.Column="0"
+                                   VerticalAlignment="Bottom"
+                                   HorizontalAlignment="Center"
+                                   Foreground="White"/>
+                        <Button Command="{Binding BatteryOpenCommand}" Content="Battery Open" Grid.Column="1" Margin="10" Height="Auto" />
+                        <Button Command="{Binding BatteryCloseCommand}" Content="Battery Close" Grid.Column="2" Margin="10" Height="Auto"/>
+                        <Button Content="Pakcet Send" Grid.Column="2" Grid.Row="1" Margin="10" Height="Auto"/>
+                    </Grid>
+                    
+                    <Border Grid.Row="1" BorderBrush="Gray" BorderThickness="1">
+                        <TextBox Grid.Row="1" Text="{Binding BatteryReceive, FallbackValue=[Receive] : xxxxx}" 
+                                 IsReadOnly="True" Foreground="Orange"
+                                 FontSize="20"/>
+                    </Border>
                 </Grid>
             </Grid>
         </Grid>
@@ -123,25 +247,7 @@
         <Grid Grid.Column="1" Background="#37474f">
             <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 CloseDialogCommand}" CommandParameter="true">
-                    <StackPanel>
-                        <!--<materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
-                        <TextBlock Text="Open" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
-                    </StackPanel>
-                </Button>
-
-                <Button Margin="5" HorizontalAlignment="Stretch" Height="69" 
-                        BorderBrush="Gray" BorderThickness="2" 
-                        Command="{Binding CloseDialogCommand}" CommandParameter="true">
-                    <StackPanel>
-                        <!--<materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
-                        <TextBlock Text="Close" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
-                    </StackPanel>
-                </Button>
-
-                <Button Margin="5,50" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding CloseDialogCommand}" CommandParameter="true">
+                <Button Margin="7,20" 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"/>
                         <TextBlock Text="Close" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
@@ -155,4 +261,4 @@
 
 <!--<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
     <TextBlock><Run Text="{Binding Title, FallbackValue=Battery Config View}" FontSize="40"/></TextBlock>
-</StackPanel>-->
+</StackPanel>-->

+ 68 - 67
Dev/OHV/OHV.Module.Interactivity/PopUp/ServoConfigView.xaml

@@ -8,8 +8,8 @@
              xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
              prism:ViewModelLocator.AutoWireViewModel="True"
              mc:Ignorable="d" 
-             Width="800"
-             Height="550"
+             Width="1000"
+             Height="600"
              Background="#455a64">
 
     <prism:Dialog.WindowStyle>
@@ -35,28 +35,77 @@
         <Grid.ColumnDefinitions>
             <ColumnDefinition/>
             <ColumnDefinition Width="130"/>
-            <ColumnDefinition Width="130"/>
         </Grid.ColumnDefinitions>
 
         <Grid Grid.Column="0">
             <Grid Margin="15,15" Background="#37474f">
                 <Grid.RowDefinitions>
-                    <RowDefinition/>
-                    <RowDefinition/>
-                    <RowDefinition/>
-                    <RowDefinition/>
-                    <RowDefinition/>
+                    <RowDefinition Height="*"/>
+                    <RowDefinition Height="*"/>
                 </Grid.RowDefinitions>
-                <Grid.ColumnDefinitions>
-                    <ColumnDefinition/>
-                    <ColumnDefinition/>
-                    <ColumnDefinition/>
-                    <ColumnDefinition/>
-                    <ColumnDefinition/>
-                </Grid.ColumnDefinitions>
-
-                <!--Current Pos & Limit(+),(-)-->
-                <Border Margin="2,101,0,10" BorderBrush="#FF00FFD3" 
+
+                <Grid Grid.Row="0">
+                    <Border Margin="5" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
+                    <Button Background="{x:Null}" Foreground="Orange" Margin="10,10,568,226" Height="Auto">
+                        <TextBlock Text="Drive" FontSize="30"/>
+                    </Button>
+                    <StackPanel Orientation="Horizontal"
+                                HorizontalAlignment="Center"
+                                VerticalAlignment="Center">
+
+                        <StackPanel Orientation="Vertical"
+                                    VerticalAlignment="Center">
+                            <Button Content="Name" Background="{x:Null}" FontSize="20"/>
+                            <Button Content="ID" Background="{x:Null}" FontSize="20"/>
+                            <Button Content="IP" Background="{x:Null}" FontSize="20"/>
+                            <Button Content="Scale" Background="{x:Null}" FontSize="20"/>
+                        </StackPanel>
+
+                        <StackPanel Orientation="Vertical" 
+                                    VerticalAlignment="Center">
+                            <Button Content="{Binding DriveName, FallbackValue=OHV_DRIVE}" FontSize="20" Background="{x:Null}"/>
+                            <Button Content="{Binding DriveID, FallbackValue=Drive}" FontSize="20" Background="{x:Null}"/>
+                            <Button Content="{Binding DriveIP, FallbackValue=192.168.0.1}" FontSize="20" Background="{x:Null}"/>
+                            <Button Content="{Binding DriveScale, FallbackValue=0.001}" FontSize="20" Background="{x:Null}"/>
+                        </StackPanel>
+                    </StackPanel>
+                </Grid>
+
+                <Grid Grid.Row="1">
+                    <Border Margin="5" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
+                    <Button Background="{x:Null}" Foreground="Orange" Margin="10,10,568,226" Height="Auto">
+                        <TextBlock Text="Lock Servo" FontSize="30"/>
+                    </Button>
+                    <StackPanel Orientation="Horizontal"
+                                HorizontalAlignment="Center"
+                                VerticalAlignment="Center">
+
+                        <StackPanel Orientation="Vertical"
+                                    VerticalAlignment="Center">
+                            <Button Content="Name" Background="{x:Null}" FontSize="20" Height="Auto"/>
+                            <Button Content="ID" Background="{x:Null}" FontSize="20" Height="Auto"/>
+                            <Button Content="IP" Background="{x:Null}" FontSize="20" Height="Auto"/>
+                            <Button Content="Scale" Background="{x:Null}" FontSize="20" Height="Auto"/>
+                        </StackPanel>
+
+                        <StackPanel Orientation="Vertical" 
+                                    VerticalAlignment="Center">
+                            <Button Content="{Binding LockLeftName, FallbackValue=Axis_CarrierLock_Left}" Background="{x:Null}" FontSize="20" Height="Auto"/>
+                            <Button Content="{Binding LockLeftID, FallbackValue=1}" Background="{x:Null}" FontSize="20" Height="Auto"/>
+                            <Button Content="{Binding LockLeftIP, FallbackValue=100.100.100.20}" Background="{x:Null}" FontSize="20" Height="Auto" />
+                            <Button Content="{Binding LockLeftScale, FallbackValue=0.001}" Background="{x:Null}" FontSize="20" Height="Auto"/>
+                        </StackPanel>
+                        <StackPanel Orientation="Vertical"
+                                    VerticalAlignment="Center">
+                            <Button Content="{Binding LockRightName, FallbackValue=Axis_CarrierLock_Right}" FontSize="20" Background="{x:Null}" Height="Auto"/>
+                            <Button Content="{Binding LockRightID, FallbackValue=2}" FontSize="20" Background="{x:Null}" Height="Auto"/>
+                            <Button Content="{Binding LockRightIP, FallbackValue=100.100.100.21}" FontSize="20" Background="{x:Null}" Height="Auto"/>
+                            <Button Content="{Binding LockRightScale, FallbackValue=0.001}" FontSize="20" Background="{x:Null}" Height="Auto"/>
+                        </StackPanel>
+                    </StackPanel>
+                </Grid>
+
+                <!--<Border Margin="2,101,0,10" BorderBrush="#FF00FFD3" 
                         BorderThickness="1" VerticalAlignment="Stretch"
                         HorizontalAlignment="Stretch" Grid.Column="1" 
                         Grid.ColumnSpan="3" Grid.RowSpan="2"/>
@@ -105,7 +154,6 @@
                     </StackPanel>
                 </Button>
 
-                <!--JogVelocity, Jog(-), Jog(+)-->
                 <Button
                     Margin="5"
                     Grid.Row="2" 
@@ -144,61 +192,14 @@
                         <materialDesign:PackIcon Kind="ArrowRightBoldCircleOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
                         <TextBlock><Run Text="Jog(+)"/></TextBlock>
                     </StackPanel>
-                </Button>
+                </Button>-->
 
             </Grid>
         </Grid>
 
-        <Grid Grid.Column="1" Background="#37474f">
-            <StackPanel>
-                <Button Margin="7,20" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding AxisSelectCommand}">
-                    <StackPanel>
-                        <materialDesign:PackIcon Kind="GearBox" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                        <TextBlock Text="Drive#1" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                    </StackPanel>
-                </Button>
-
-
-                <Button Margin="7,20" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding AxisSelectCommand}">
-                    <StackPanel>
-                        <materialDesign:PackIcon Kind="GearBox" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                        <TextBlock Text="Lock#2" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                    </StackPanel>
-                </Button>
-            </StackPanel>
-        </Grid>
-
         <Grid Grid.Column="2" HorizontalAlignment="Stretch" Background="#263238">
             <Border Margin="1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
             <StackPanel>
-                <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding ServoOnCommand}">
-                    <StackPanel>
-                        <materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                        <TextBlock Text="Servo On" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                    </StackPanel>
-                </Button>
-
-                <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding ServoOffCommand}">
-                    <StackPanel>
-                        <materialDesign:PackIcon Kind="PowerPlugOff" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                        <TextBlock Text="Servo Off" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                    </StackPanel>
-                </Button>
-
-                <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding FaultResetCommand}">
-                    <StackPanel>
-                        <materialDesign:PackIcon Kind="CircleArrows" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                        <TextBlock Text="Alarm Rst" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
-                    </StackPanel>
-                </Button>
-
-                <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding OriginCommand}">
-                    <StackPanel>
-                        <materialDesign:PackIcon Kind="Origin" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
-                        <TextBlock Text="Origin" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
-                    </StackPanel>
-                </Button>
-
                 <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"/>

+ 70 - 42
Dev/OHV/OHV.Module.Interactivity/PopUp/ServoConfigViewModel.cs

@@ -1,4 +1,6 @@
-using Prism.Commands;
+using OHV.Common.Shareds;
+using OHV.SqliteDAL;
+using Prism.Commands;
 using Prism.Mvvm;
 using Prism.Services.Dialogs;
 using System;
@@ -23,33 +25,6 @@ namespace OHV.Module.Interactivity.PopUp
 
         public event Action<IDialogResult> RequestClose;
 
-        Brush _limitNe = Brushes.Gray;
-        public Brush LimitNE
-        {
-            get { return this._limitNe; }
-            set { this.SetProperty( ref this._limitNe , value ); }
-        }
-        Brush _limitPv = Brushes.Gray;
-        public Brush LimitPV
-        {
-            get { return this._limitPv; }
-            set { this.SetProperty( ref this._limitPv , value ); }
-        }
-        Brush _home = Brushes.Gray;
-        public Brush Home
-        {
-            get { return this._home; }
-            set { this.SetProperty( ref this._home , value ); }
-        }
-
-        public ICommand ServoOnCommand { get; set; }
-        public ICommand ServoOffCommand { get; set; }
-        public ICommand FaultResetCommand { get; set; }
-        public ICommand OriginCommand { get; set; }
-        public ICommand AxisSelectCommand { get; set; }
-
-        DispatcherTimer dispatcherTimer;
-
         public string Title
         {
             get { return this._title; }
@@ -59,38 +34,91 @@ namespace OHV.Module.Interactivity.PopUp
             }
         }
 
-        public ServoConfigViewModel( )
+        #region Left
+        string _lockLeftName;
+        public string LockLeftName
         {
-            this.ServoOnCommand = new DelegateCommand( ExecuteServoOnCommand );
-            this.ServoOffCommand = new DelegateCommand( ExecuteServoOffCommand );
-            this.FaultResetCommand = new DelegateCommand( ExecuteFaultResetCommand );
-            this.OriginCommand = new DelegateCommand( ExecuteOriginCommand );
-
-            this.dispatcherTimer = new DispatcherTimer( TimeSpan.FromMilliseconds( 500 ) , DispatcherPriority.Render ,
-                                                       this.AxisCurrentPosUpdate , Application.Current.Dispatcher );
+            get { return this._lockLeftName; }
+            set { this.SetProperty( ref this._lockLeftName , value ); }
         }
 
-        private void AxisCurrentPosUpdate( object sender , EventArgs e )
+        int _lockLeftID;
+        public int LockLeftID
         {
-            //this.CurrentPosition = this.axis.CurrentPosition;
+            get { return this._lockLeftID; }
+            set { this.SetProperty( ref this._lockLeftID , value ); }
         }
 
-        private void ExecuteOriginCommand( )
+        string _lockLeftIP;
+        public string LockLeftIP
         {
+            get { return this._lockLeftIP; }
+            set { this.SetProperty( ref this._lockLeftIP , value ); }
         }
 
-        private void ExecuteFaultResetCommand( )
+        double _lockLeftScale;
+        public double LockLeftScale
         {
+            get { return this._lockLeftScale; }
+            set { this.SetProperty( ref this._lockLeftScale , value ); }
+        }
+        #endregion
+        #region Right
+        string _lockRightName;
+        public string LockRightName
+        {
+            get { return this._lockRightName; }
+            set { this.SetProperty( ref this._lockRightName , value ); }
         }
 
-        private void ExecuteServoOffCommand( )
+        int _lockRightID;
+        public int LockRightID
         {
+            get { return this._lockRightID; }
+            set { this.SetProperty( ref this._lockRightID , value ); }
         }
 
-        private void ExecuteServoOnCommand( )
+        string _lockRightIP;
+        public string LockRightIP
         {
+            get { return this._lockRightIP; }
+            set { this.SetProperty( ref this._lockRightIP , value ); }
         }
 
+        double _lockRightScale;
+        public double LockRightScale
+        {
+            get { return this._lockRightScale; }
+            set { this.SetProperty( ref this._lockRightScale , value ); }
+        } 
+        #endregion
+
+        SqliteManager sql;
+
+        public ServoConfigViewModel( SqliteManager _sql )
+        {
+            this.sql = _sql;
+
+            //this.LockLeftID = sql.AxisConfigDAL.GetK( ConstString.AXIS_CARRIER_LOCK_LEFT ).Id;
+            sql.AxisConfigDAL.All.ForEach( x =>
+             {
+                 switch(x.Id)
+                 {
+                     case 1:
+                         this.LockLeftID = x.Id;
+                         this.LockLeftIP = x.Address;
+                         this.LockLeftName = x.Name;
+                         this.LockLeftScale = x.Scale;
+                         break;
+                     case 2:
+                         this.LockRightID = x.Id;
+                         this.LockRightIP = x.Address;
+                         this.LockRightName = x.Name;
+                         this.LockRightScale = x.Scale;
+                         break;
+                 }
+             } );
+        }
 
         #region Dialog 
         public bool CanCloseDialog( )

+ 9 - 3
Dev/OHV/OHV.Module.MainViews/Views/HistoryViewModel.cs

@@ -32,10 +32,16 @@ namespace OHV.Module.MainViews.Views
             this.AlarmResetCommand = new DelegateCommand( ExecuteAlarmResetCommand );
         }
 
-        private void ExecuteAlarmResetCommand( )
+        async private void ExecuteAlarmResetCommand( )
         {
-            // Alarm Data Reset
-            //Thread.Sleep(100)?
+            //Grid Refresh 대안 찾을것
+            var backupList = this.AlarmList.ToList();
+            this.AlarmList.Clear();
+
+            await Task.Delay( 1000 );
+
+            var e = new ObservableCollection<Alarm>( backupList );
+            this.AlarmList = e;
         }
 
         public void Init( ) { }

+ 9 - 9
Dev/OHV/OHV.Vehicle/Concept/D_MainWindow.xaml

@@ -159,9 +159,9 @@
                     </Border>
                     <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
                         <StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center">
-                            <Button Content="Vehicle ID" Margin="3" IsEnabled="False"/>
-                            <Button Content="Vehicle IP" Margin="3" IsEnabled="False"/>
-                            <Button Content="OCS IP" Margin="3" IsEnabled="False"/>
+                            <Button Content="Vehicle ID" Margin="3" Background="{x:Null}"/>
+                            <Button Content="Vehicle IP" Margin="3" Background="{x:Null}"/>
+                            <Button Content="OCS IP" Margin="3" Background="{x:Null}"/>
                         </StackPanel>
 
                         <StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center">
@@ -177,10 +177,10 @@
                     </Border>
                     <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
                         <StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center">
-                            <Button Content="Version" Margin="3" IsEnabled="False"/>
-                            <Button Margin="3" IsEnabled="False" Height="50">
+                            <Button Content="Version" Margin="3" Background="{x:Null}"/>
+                            <Button Margin="3" Height="50" Background="{x:Null}">
                                 <StackPanel>
-                                    <TextBlock HorizontalAlignment="Center"><Run>List Builded</Run></TextBlock>
+                                    <TextBlock HorizontalAlignment="Center"><Run>Last Builded</Run></TextBlock>
                                     <TextBlock HorizontalAlignment="Center"><Run>Time</Run></TextBlock>
                                 </StackPanel>
                             </Button>
@@ -200,9 +200,9 @@
                     </Border>
                     <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
                         <StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center">
-                            <Button Content="CPU" Margin="3" IsEnabled="False"/>
-                            <Button Content="Memory" Margin="3" IsEnabled="False"/>
-                            <Button Content="C Drive" Margin="3" IsEnabled="False"/>
+                            <Button Content="CPU" Margin="3" Background="{x:Null}"/>
+                            <Button Content="Memory" Margin="3" Background="{x:Null}"/>
+                            <Button Content="C Drive" Margin="3" Background="{x:Null}"/>
                         </StackPanel>
 
                         <StackPanel>

+ 25 - 4
Dev/OHV/OHV.Vehicle/Concept/D_MainWindowViewModel.cs

@@ -2,6 +2,7 @@
 using OHV.Common.Events;
 using OHV.Common.Shareds;
 using OHV.Module.Interactivity;
+using OHV.SqliteDAL;
 using Prism.Commands;
 using Prism.Events;
 using Prism.Mvvm;
@@ -73,13 +74,26 @@ namespace OHV.Vehicle.Concept
             }
         }
 
-        private string _vehicleID = "VehicleControlSystem 1.0.0.1";
+        private string _vehicleID;
         public string VehicleID
         {
             get { return this._vehicleID; }
             set { this.SetProperty( ref this._vehicleID , value ); }
         }
 
+        private string _vehicleIP = "127.0.0.1";
+        public string VehicleIP
+        {
+            get { return this._vehicleIP; }
+            set { this.SetProperty( ref this._vehicleIP , value ); }
+        }
+        private string _ocsIP;
+        public string OcsIP
+        {
+            get { return this._ocsIP; }
+            set { this.SetProperty( ref this._ocsIP , value ); }
+        }
+
         private Brush _ocsBrush;// = Brushes.Gray;
         private Brush _batteryBrush;// = Brushes.Gray;
         private Brush _laserBrush;// = Brushes.Gray;
@@ -145,16 +159,23 @@ namespace OHV.Vehicle.Concept
             //LanguageHalper.LanguagesSelcter.ChangLanguage(LanguageHalper.eLanguageType.Chinese);
         }
 
-        public D_MainWindowViewModel( IEventAggregator ea , VCSystem cSystem , IRegionManager _regionManager , MessageController messageController )
+        SqliteManager sql;
+
+        public D_MainWindowViewModel( IEventAggregator _ea , VCSystem cSystem , IRegionManager _regionManager , MessageController _msgController, SqliteManager _sql )
         {
             this.regionManager = _regionManager;
 
-            this.eventAggregator = ea;
+            this.eventAggregator = _ea;
             this.eventAggregator.GetEvent<GUIMessagePubSubEvent>().Subscribe( UICallbackCommunication , ThreadOption.UIThread );
             this.eventAggregator.GetEvent<HostConnectedPubSubEvent>().Subscribe( OcsConnectCallBack , ThreadOption.UIThread , false );
 
             this.VCSystem = cSystem;
-            this.messageController = messageController;
+            this.messageController = _msgController;
+            this.sql = _sql;
+
+            this.VehicleID = sql.ConfigDal.GetK( ConstString.VehicleID ).Value;
+            //this.VehicleIP = sql.ConfigDal.GetK( ConstString.Addr ).Value;
+            this.OcsIP = sql.ConfigDal.GetK( ConstString.Addr ).Value;
 
             //this.TestCommand = new DelegateCommand( ExecuteTextCommand );
             this.NavigateCommand = new DelegateCommand<object>( this.Navigate );

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

@@ -13,7 +13,7 @@
     <FileAlignment>512</FileAlignment>
     <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
     <WarningLevel>4</WarningLevel>
-    <Deterministic>False</Deterministic>
+    <Deterministic>True</Deterministic>
     <NuGetPackageImportStamp>
     </NuGetPackageImportStamp>
     <PublishUrl>게시\</PublishUrl>

+ 3 - 3
Dev/OHV/OHV.Vehicle/Properties/AssemblyInfo.cs

@@ -50,6 +50,6 @@ using System.Windows;
 //
 // 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
 // 기본값으로 할 수 있습니다.
- [assembly: AssemblyVersion("1.0.*")]
-//[assembly: AssemblyVersion( "1.0.0.0" )]
-//[assembly: AssemblyFileVersion( "1.0.0.0" )]
+//[assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion( "1.0.0.0" )]
+[assembly: AssemblyFileVersion( "1.0.0.0" )]