Zixuan 2 weeks ago
parent
commit
19c78cac20

+ 14 - 4
MinicsUI/Controls/Monitor/StatusPlot.xaml

@@ -51,8 +51,8 @@
                         <ColumnDefinition Width="auto"/>
                         <ColumnDefinition/>
                         <ColumnDefinition Width="auto"/>
-                        <ColumnDefinition Width="8"/>
-                        <ColumnDefinition Width="auto"/>
+                        <!--<ColumnDefinition Width="8"/>
+                        <ColumnDefinition Width="auto"/>-->
                         <!--<ColumnDefinition Width="6"/>-->
                     </Grid.ColumnDefinitions>
                     <TextBlock FontSize="12" FontWeight="Bold" VerticalAlignment="Center" >
@@ -100,8 +100,10 @@
                                     <RowDefinition Height="auto"/>
                                     <RowDefinition Height="16"/>
                                     <RowDefinition Height="auto"/>
+                                    <RowDefinition Height="16"/>
+                                    <RowDefinition Height="auto"/>
                                 </Grid.RowDefinitions>
-                                <TextBlock  VerticalAlignment="Center">
+                                <TextBlock  VerticalAlignment="Center" HorizontalAlignment="Center">
                                      <Run Text="{Binding ElementName=This, Path=DataSource.Address}"/>
                                      <Run>:</Run>
                                      <Run Text="{Binding ElementName=This, Path=DataSource.Port}"/>
@@ -123,12 +125,20 @@
                                         Command="{Binding ElementName=This, Path=MultiTraceCommand}" 
                                         CommandParameter="{Binding ElementName=This, Path=DataSource}"
                                         Click="Button_Click">Trace Log</Button>
+                                <StackPanel Grid.Row="8" Orientation="Horizontal">
+                                    <Button Grid.Row="8" Style="{StaticResource FunctionButton}" Background="{StaticResource NiceGreen}" Height="32" Width="80" Margin="0,0,8,0"
+                                            Click="Button_Click_1">Connect</Button>
+                                    <Button Grid.Row="10" Style="{StaticResource FunctionButton}" Background="{StaticResource DisableColor}" Height="32" Width="88"
+                                            Click="Button_Click_2">Disconnect</Button>
+                                </StackPanel>
                             </Grid>
                         </Border>
                     </Popup>
-                    <CheckBox Grid.Column="8" VerticalAlignment="Center" Style="{StaticResource SwitchCheckBox}"
+                    <!--<StackPanel Grid.Column="8" Orientation="Horizontal" VerticalAlignment="Center">
+                        <CheckBox VerticalAlignment="Center" Style="{StaticResource SwitchCheckBox}"
                               IsChecked="{Binding ElementName=This, Path=DataSource.Enable, Mode=TwoWay}"
                               Visibility="{Binding ElementName=This, Path=User.Authority, Converter={StaticResource Authority}, ConverterParameter=Operator}"/>
+                    </StackPanel>-->
                 </Grid>
             </Border>
 

+ 10 - 0
MinicsUI/Controls/Monitor/StatusPlot.xaml.cs

@@ -132,4 +132,14 @@ public partial class StatusPlot : UserControl
     {
         this.FunctionPop.IsOpen = false;
     }
+
+    private void Button_Click_1(object sender, RoutedEventArgs e)
+    {
+        DataSource.Enable = true;
+    }
+
+    private void Button_Click_2(object sender, RoutedEventArgs e)
+    {
+        DataSource.Enable = false;
+    }
 }

+ 8 - 9
MinicsUI/Views/Regions/HeaterGramHolder.xaml

@@ -13,15 +13,14 @@
             <Border.Effect>
                 <DropShadowEffect BlurRadius="20" Color="Black" Opacity="0.6"  ShadowDepth="5"/>
             </Border.Effect>
-            <Grid HorizontalAlignment="Center" Margin="32">
-                <Grid.ColumnDefinitions>
-                    <ColumnDefinition Width="auto"/>
-                    <ColumnDefinition Width="64"/>
-                    <ColumnDefinition Width="auto"/>
-                </Grid.ColumnDefinitions>
-                <Image Grid.Column="0" Stretch="UniformToFill" Source="/Resources/JACKET HEATER ASSM.JPG" />
-                <Image Grid.Column="2" Stretch="UniformToFill" Source="/Resources/JACKET HEATER ASSM-1.JPG"/>
-            </Grid>
+            <TabControl Background="Transparent">
+                <TabItem Header="Front view" Style="{StaticResource TabTheme}">
+                    <Image Stretch="Uniform" Source="/Resources/JACKET HEATER ASSM.JPG" />
+                </TabItem>
+                <TabItem Header="Left view" Style="{StaticResource TabTheme}">
+                    <Image Stretch="Uniform" Source="/Resources/JACKET HEATER ASSM-1.JPG"/>
+                </TabItem>
+            </TabControl>
         </Border>
     </Grid>
 </UserControl>

+ 4 - 4
MinicsUI/Views/Regions/Monitor.xaml

@@ -21,15 +21,15 @@
             <DropShadowEffect BlurRadius="20" Color="Black" Opacity="0.6"  ShadowDepth="5"/>
         </Border.Effect>
         <Border Margin="4" Background="{StaticResource BackgroundColor}">
-            <Grid Margin="0,4,0,0">
+            <Grid Margin="0,2,0,0">
                 <Grid.RowDefinitions>
                     <RowDefinition Height="auto"/>
                     <RowDefinition />
                 </Grid.RowDefinitions>
                 <Expander x:Name="Filter" Panel.ZIndex="1" Margin="16,0" Background="{StaticResource BackgroundColor}" FlowDirection="LeftToRight" Style="{StaticResource ExpanderStyle1}">
                     <Expander.Header>
-                        <Border Background="{StaticResource LightThemeColor}" Margin="4,0" CornerRadius="4" HorizontalAlignment="Left">
-                            <TextBlock FontSize="14" FontWeight="Bold" Margin="6" Text="{DynamicResource DisplaySetting}"/>
+                        <Border Background="{StaticResource LightThemeColor}" Margin="4,0" CornerRadius="4" >
+                            <TextBlock FontSize="14" FontWeight="Bold" Margin="6,2" Text="{DynamicResource DisplaySetting}"/>
                         </Border>
                     </Expander.Header>
                     <Border BorderBrush="{StaticResource DarkBorderColor}" BorderThickness="1">
@@ -110,7 +110,7 @@
                     </Border>
                 </Expander>
 
-                <Border Background="{StaticResource BackgroundColor}" GotFocus="Filter_LostFocus" Margin="0,30,0,0"  Grid.Row="0" Grid.RowSpan="3">
+                <Border Background="{StaticResource BackgroundColor}" GotFocus="Filter_LostFocus" Margin="0,24,0,0"  Grid.Row="0" Grid.RowSpan="3">
                     <resource:TouchableScrollViewer VerticalScrollBarVisibility="Hidden">
 
                         <ItemsControl ItemsSource="{Binding DisplayMini8}">