123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337 |
- <UserControl x:Class="VirgoUI.Client.Models.PMs.RFCalibrationView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
- xmlns:cal="http://www.caliburn.org"
- xmlns:controls="http://OpenSEMI.Ctrlib.com/presentation"
- xmlns:deviceControl="clr-namespace:Aitex.Core.UI.DeviceControl;assembly=MECF.Framework.UI.Core"
- xmlns:s="http://schemas.abtsoftware.co.uk/scichart"
- xmlns:converter="clr-namespace:VirgoUI.Client.Models.Converter"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="1920">
- <UserControl.Resources>
- <converter:Bool2Not x:Key="Bool2Not"/>
- </UserControl.Resources>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="300"/>
- <ColumnDefinition Width="900"/>
- <ColumnDefinition Width="600"/>
- </Grid.ColumnDefinitions>
- <DataGrid Grid.Column="0" HorizontalAlignment="Left" CanUserAddRows="False" AutoGenerateColumns="False" RowHeaderWidth="0"
- VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling"
- SelectedItem="{Binding CurrentSelection}"
- ItemsSource="{Binding CalibrationItems}" Margin="0,5,0,0" >
- <DataGrid.Columns>
- <DataGridTemplateColumn Header="Name" Width="280">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding DisplayName}" Margin="5,0" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Left" VerticalAlignment="Center" >
- </TextBlock>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- </DataGrid.Columns>
- </DataGrid>
- <Grid Grid.Column="1">
- <Grid.RowDefinitions>
- <RowDefinition Height="45"/>
- <RowDefinition Height="75"/>
- <RowDefinition Height="15"/>
- <RowDefinition Height="*"/>
- <RowDefinition Height="50"/>
- </Grid.RowDefinitions>
- <Canvas Grid.Row="0">
- <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,1,1,1" Background="{DynamicResource Table_BG_Title}" Grid.Row="1" Padding="5,1" Height="40" Width="120">
- <TextBlock Text="Calibration Item" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center"/>
- </Border>
- <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Content}" Grid.Row="1" Grid.Column="1" Padding="5,1" Canvas.Left="120" Height="40" Width="250">
- <TextBlock Text="{Binding CurrentSelection.DisplayName}" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center"/>
- </Border>
- <Button Content="Save" Grid.Column="1" Width="70" Height="30" Margin="0" Padding="0" Canvas.Left="385" Canvas.Top="4" IsEnabled="{Binding IsSaveEnable}" >
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="Save">
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </Button>
- <Button Content="Reload" Grid.Column="1" Width="70" Height="30" Margin="0" Padding="0" Canvas.Left="473" Canvas.Top="4" >
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="Reload">
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </Button>
- <Button Content="Export" Grid.Column="1" Width="70" Height="30" Padding="0" Canvas.Left="561" Canvas.Top="4" HorizontalAlignment="Left" VerticalAlignment="Center" >
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="Export">
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </Button>
- <deviceControl:AITRfGenerator DeviceData="{Binding CurrentSelectionRF}" Canvas.Left="662" Canvas.Top="10" HorizontalAlignment="Left" VerticalAlignment="Center" ></deviceControl:AITRfGenerator>
- </Canvas>
- <Canvas Grid.Row="1">
- <Border BorderBrush="{DynamicResource Table_BD}" Background="{DynamicResource Table_BG_Content}" BorderThickness="1,1,1,1" Padding="5,1" >
- <StackPanel HorizontalAlignment="Center" VerticalAlignment="Top" Margin="5,10">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="140"/>
- <ColumnDefinition Width="100"/>
- <ColumnDefinition Width="140"/>
- <ColumnDefinition Width="100"/>
- <ColumnDefinition Width="160"/>
- <ColumnDefinition Width="100"/>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="24"/>
- <RowDefinition Height="24"/>
- </Grid.RowDefinitions>
- <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="{DynamicResource Table_BG_Title}" Grid.Row="0" Padding="5,1">
- <TextBlock Text="RF电源序列号" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center"/>
- </Border>
- <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Content}" Grid.Row="0" Grid.Column="1" Padding="5,1">
- <controls:TextBoxEx Text="{Binding Path=GeneratorSerialNumber,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center"/>
- </Border>
- <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Title}" Grid.Row="1" Padding="5,1">
- <TextBlock Text="SensorHead序列号" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center"/>
- </Border>
- <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Grid.Row="1" Grid.Column="1" Padding="5,1">
- <controls:TextBoxEx Text="{Binding Path=SensorSerialNumber,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center"/>
- </Border>
- <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Title}" Grid.Row="0" Grid.Column="2" Padding="5,1">
- <TextBlock Text="RF Physical Max Power" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center"/>
- </Border>
- <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Content}" Grid.Row="0" Grid.Column="3" Padding="5,1">
- <TextBlock Text="{Binding Path=RFPhysicalMaxPower,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center"/>
- </Border>
- <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Title}" Grid.Row="1" Grid.Column="2" Padding="5,1">
- <TextBlock Text="Current RF Max Power" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center"/>
- </Border>
- <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Grid.Row="1" Grid.Column="3" Padding="5,1">
- <TextBlock Text="{Binding Path=CurrentRFMaxPower,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center"/>
- </Border>
- <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Title}" Grid.Row="0" Grid.Column="4" Padding="5,1">
- <TextBlock Text="RF Calibrated Max Power" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="12" FontFamily="Arial" VerticalAlignment="Center"/>
- </Border>
- <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Content}" Grid.Row="0" Grid.Column="5" Padding="5,1">
- <TextBlock Text="{Binding Path=RFCalibratedMaxPower,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged, StringFormat=\{0:F3\}}" VerticalAlignment="Center"/>
- </Border>
- </Grid>
- </StackPanel>
- </Border>
- </Canvas>
- <Canvas Grid.Row="2">
- <TextBlock Text="Select All:" Canvas.Left="74" Canvas.Top="0"/>
- <CheckBox IsEnabled="{Binding IsSelectedAllEnable,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Left" VerticalAlignment="Top" Canvas.Left="143" Canvas.Top="3" >
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Checked">
- <cal:ActionMessage MethodName="SelectedAll">
- </cal:ActionMessage>
- </i:EventTrigger>
- <i:EventTrigger EventName="Unchecked">
- <cal:ActionMessage MethodName="UnselectedAll">
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </CheckBox>
- </Canvas>
- <DataGrid Name="TableData" Grid.Row="3" HorizontalAlignment="Left" CanUserAddRows="False" AutoGenerateColumns="False" RowHeaderWidth="0" Focusable="True"
- VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling"
- ItemsSource="{Binding TableData}" SelectedIndex="{Binding TableDataSelectedIndex,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}" Margin="0,5,0,0" >
- <DataGrid.Columns >
- <DataGridTemplateColumn Header="SetPoint" Width="100">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <controls:TextBoxEx IsEnabled="{Binding SetPointEnable,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Text="{Binding SetPoint,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" MinValue="-999999" MaxValue="999999" EditBoxMode="Decimal" Width="80" Margin="5,0" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Center" VerticalAlignment="Center" >
- </controls:TextBoxEx>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Header="Selected" Width="70">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <CheckBox IsEnabled="{Binding IsSelectedEnable,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" IsChecked="{Binding IsSelected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Margin="5,0" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Center" VerticalAlignment="Center" >
- </CheckBox>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Header="Forward Power (UI)" Width="200">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding ForwardPowerUI,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="180" Margin="5,0" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center" >
- </TextBlock>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Header="Forward Power (Meter)" Width="200">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <controls:TextBoxEx Text="{Binding ForwardPowerMeter,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" MinValue="-999999" MaxValue="999999" EditBoxMode="Decimal" Width="180" Margin="5,0" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Center" VerticalAlignment="Center" >
- </controls:TextBoxEx>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Header="Reflected Power (Meter)" Width="200">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <controls:TextBoxEx Text="{Binding ReflectedPower,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" MinValue="-999999" MaxValue="999999" EditBoxMode="Decimal" Width="180" Margin="5,0" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Center" VerticalAlignment="Center" >
- </controls:TextBoxEx>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Header="%Difference" Width="100">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <Border Background="{Binding DifferenceBackground,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
- <TextBlock Text="{Binding Difference,Mode=OneWay,UpdateSourceTrigger=PropertyChanged, StringFormat=\{0:F3\}}" FontSize="14" Height="25" HorizontalAlignment="Center" TextAlignment="Center"/>
- </Border>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- </DataGrid.Columns>
- </DataGrid>
- <Canvas Grid.Row="4">
- <StackPanel Orientation="Horizontal" IsEnabled="{Binding SystemInManual}">
- <Button Content="Start" Width="70" Height="30" Margin="10" Padding="0" Focusable="False">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="Start">
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </Button>
- <Button Content="Next" Width="70" Height="30" Margin="10" Padding="0" Focusable="False" IsEnabled="{Binding IsNextEnable}">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="Next">
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </Button>
- <Button Content="End" Width="70" Height="30" Margin="10" Padding="0">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="End">
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </Button>
- </StackPanel>
- </Canvas>
- </Grid>
- <Grid Grid.Column="2" Grid.Row="0" Margin="5,0,0,0">
- <s:SciChartSurface Name="sciChart" RenderableSeries="{Binding RenderableSeries}"
- s:ThemeManager.Theme="ExpressionLight"
- Padding="0,0,0,0"
- DebugWhyDoesntSciChartRender="False" BorderBrush="Gray" Focusable="False" IsTabStop="False">
- <!-- Create an X Axis -->
- <s:SciChartSurface.XAxis>
- <s:NumericAxis DrawMinorTicks="False" AxisTitle="SetPoint"
- DrawMinorGridLines="True"
- Margin="0,0,0,0"
- TitleFontSize="15"
- FontSize="20"
- MajorDelta="0.1"
- MinorDelta="0.1" DrawMajorBands="True" Focusable="False"
- BorderThickness="0"
- AutoRange="Always" DrawLabels="True" DrawMajorGridLines="True" DrawMajorTicks="False"
- Id="DefaultAxisId" TitleFontWeight="Normal" >
- <s:NumericAxis.GrowBy>
- <s:DoubleRange Min="0.1" Max="0.1"/>
- </s:NumericAxis.GrowBy>
- </s:NumericAxis>
- </s:SciChartSurface.XAxis>
- <!-- Create a Y Axis -->
- <s:SciChartSurface.YAxis>
- <s:NumericAxis DrawMinorTicks="False" AxisTitle="Actual Forward Power"
- DrawMinorGridLines="False"
- AxisAlignment="Left"
- MinWidth="50" MaxWidth="50"
- HorizontalAlignment="Center"
- CursorTextFormatting="0.######"
- Id="DefaultAxisId" MajorDelta="0.1"
- MinorDelta="0.1" DrawMajorBands="False" Focusable="False"
- BorderThickness="0" AutoRange="Always"
- DrawLabels="True" DrawMajorGridLines="True" DrawMajorTicks="False">
- <s:NumericAxis.GrowBy>
- <s:DoubleRange Min="0.1" Max="0.1"/>
- </s:NumericAxis.GrowBy>
- </s:NumericAxis>
- </s:SciChartSurface.YAxis>
- <s:SciChartSurface.ChartModifier>
- <s:ModifierGroup >
- <s:RubberBandXyZoomModifier x:Name="rubberBandZoomModifier" IsEnabled="True"
- IsXAxisOnly="False"
- ZoomExtentsY="True"
- IsAnimated="True" ExecuteOn="MouseLeftButton" ReceiveHandledEvents="True" />
- <s:CursorModifier IsEnabled="True" ShowTooltipOn="MouseOver" ShowAxisLabels="True"
- SourceMode="AllSeries" ShowTooltip="False" />
- <s:LegendModifier ShowLegend="True" GetLegendDataFor="AllSeries" x:Name="legendModifier"/>
- <s:ZoomExtentsModifier x:Name="zoomExtentsModifier" XyDirection="XYDirection" ExecuteOn="MouseDoubleClick"/>
- <s:ZoomPanModifier x:Name="zoomPanModifier" IsEnabled="True" ClipModeX="None" XyDirection="XYDirection" ExecuteOn="MouseRightButton" ZoomExtentsY="False" />
- <s:RolloverModifier x:Name="rolloverModifier"
- UseInterpolation="False" FontSize="9" IsEnabled="True"
- DrawVerticalLine="False" FontFamily="Arial,SimSun"
- SnapsToDevicePixels="False"
- ShowAxisLabels="False" />
- <s:MouseWheelZoomModifier x:Name="mouseWheelZoomModifier" XyDirection="XYDirection"/>
- </s:ModifierGroup>
- </s:SciChartSurface.ChartModifier>
- </s:SciChartSurface>
- </Grid>
- </Grid>
- </UserControl>
|