387 lines
17 KiB
XML
387 lines
17 KiB
XML
<UserControl
|
||
x:Class="CapMachine.Wpf.Views.DialogHistoryChartRtConfigView"
|
||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||
xmlns:local="clr-namespace:CapMachine.Wpf.Views"
|
||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
xmlns:prism="http://prismlibrary.com/"
|
||
Width="1500"
|
||
Height="900"
|
||
mc:Ignorable="d">
|
||
<UserControl.Resources>
|
||
<Style x:Key="myHeaderStyle" TargetType="{x:Type GridViewColumnHeader}">
|
||
<Setter Property="FontSize" Value="24" />
|
||
<Setter Property="Width" Value="218" />
|
||
</Style>
|
||
<Style x:Key="myHeaderStyle1" TargetType="{x:Type GridViewColumnHeader}">
|
||
<Setter Property="FontSize" Value="16" />
|
||
</Style>
|
||
<Style x:Key="ListViewItemStyle" TargetType="{x:Type ListViewItem}">
|
||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||
</Style>
|
||
</UserControl.Resources>
|
||
<Grid>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition />
|
||
<ColumnDefinition Width="0.25*" />
|
||
<ColumnDefinition />
|
||
<ColumnDefinition Width="0.25*" />
|
||
<ColumnDefinition />
|
||
</Grid.ColumnDefinitions>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition />
|
||
<RowDefinition Height="60" />
|
||
</Grid.RowDefinitions>
|
||
<!-- 最左侧 曲线数据源头 -->
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="100" />
|
||
<RowDefinition />
|
||
</Grid.RowDefinitions>
|
||
<materialDesign:Card Margin="3" materialDesign:ElevationAssist.Elevation="Dp2">
|
||
<StackPanel Orientation="Vertical">
|
||
<StackPanel
|
||
HorizontalAlignment="Left"
|
||
VerticalAlignment="Center"
|
||
Orientation="Horizontal">
|
||
<TextBlock
|
||
Margin="10,0,0,0"
|
||
VerticalAlignment="Center"
|
||
FontFamily="/Assets/Fonts/#iconfont"
|
||
FontSize="24"
|
||
Foreground="Blue"
|
||
Text="" />
|
||
<TextBlock
|
||
Margin="10,3"
|
||
FontSize="30"
|
||
Foreground="Blue"
|
||
Text="曲线数据源" />
|
||
</StackPanel>
|
||
|
||
<TextBlock
|
||
HorizontalAlignment="Center"
|
||
VerticalAlignment="Center"
|
||
FontSize="26"
|
||
Foreground="Gray"
|
||
Text="{Binding SelectedChartSrcData.Name}" />
|
||
</StackPanel>
|
||
|
||
</materialDesign:Card>
|
||
|
||
<materialDesign:Card
|
||
Grid.Row="1"
|
||
Margin="3"
|
||
materialDesign:ElevationAssist.Elevation="Dp2">
|
||
<Border BorderBrush="Black" BorderThickness="1">
|
||
<ListView
|
||
x:Name="LvChartSource"
|
||
Foreground="Black"
|
||
ItemsSource="{Binding ChartSrcDataListViewItems}">
|
||
<i:Interaction.Triggers>
|
||
<i:EventTrigger EventName="SelectionChanged">
|
||
<prism:InvokeCommandAction Command="{Binding SelectionChartSourceCmd}" CommandParameter="{Binding ElementName=LvChartSource, Path=SelectedItem}" />
|
||
</i:EventTrigger>
|
||
</i:Interaction.Triggers>
|
||
<ListView.View>
|
||
<GridView ColumnHeaderContainerStyle="{StaticResource myHeaderStyle1}">
|
||
<GridViewColumn
|
||
Width="50"
|
||
DisplayMemberBinding="{Binding Index}"
|
||
Header="序号" />
|
||
<GridViewColumn
|
||
Width="220"
|
||
DisplayMemberBinding="{Binding Name}"
|
||
Header="名称">
|
||
<!--<GridViewColumn.CellTemplate>
|
||
<DataTemplate>
|
||
<TextBlock Text="{Binding Name}" TextAlignment="Center" />
|
||
</DataTemplate>
|
||
</GridViewColumn.CellTemplate>-->
|
||
</GridViewColumn>
|
||
<GridViewColumn Width="100" Header="状态">
|
||
<GridViewColumn.CellTemplate>
|
||
<DataTemplate>
|
||
<CheckBox IsChecked="{Binding Selected}" IsEnabled="False" />
|
||
</DataTemplate>
|
||
</GridViewColumn.CellTemplate>
|
||
</GridViewColumn>
|
||
</GridView>
|
||
</ListView.View>
|
||
<!-- 设置ListViewItem的背景色,模拟网格效果 -->
|
||
<!--<ListView.ItemContainerStyle>
|
||
<Style TargetType="ListViewItem">
|
||
<Setter Property="Background" Value="LightGray" />
|
||
</Style>
|
||
</ListView.ItemContainerStyle>-->
|
||
</ListView>
|
||
</Border>
|
||
</materialDesign:Card>
|
||
|
||
|
||
|
||
</Grid>
|
||
|
||
<!-- 曲线选择操作 -->
|
||
<materialDesign:Card
|
||
Grid.Column="1"
|
||
Margin="5,3"
|
||
materialDesign:ElevationAssist.Elevation="Dp2">
|
||
<StackPanel VerticalAlignment="Center" Orientation="Vertical">
|
||
<StackPanel.Resources>
|
||
<Style x:Key="btnStyle" TargetType="Button" />
|
||
</StackPanel.Resources>
|
||
<Button
|
||
Margin="5"
|
||
Command="{Binding ChartSourceCmd}"
|
||
CommandParameter="Selected"
|
||
Foreground="White">
|
||
<StackPanel Orientation="Horizontal">
|
||
<TextBlock
|
||
Margin="2,0"
|
||
VerticalAlignment="Center"
|
||
FontFamily="/Assets/Fonts/#iconfont"
|
||
FontSize="14"
|
||
Foreground="White"
|
||
Text="" />
|
||
<TextBlock Text="选择>" />
|
||
</StackPanel>
|
||
</Button>
|
||
<Button
|
||
Margin="5"
|
||
Command="{Binding ChartSourceCmd}"
|
||
CommandParameter="Delete"
|
||
Foreground="White">
|
||
<StackPanel Orientation="Horizontal">
|
||
<TextBlock
|
||
Margin="2,0"
|
||
VerticalAlignment="Center"
|
||
FontFamily="/Assets/Fonts/#iconfont"
|
||
FontSize="14"
|
||
Foreground="White"
|
||
Text="<" />
|
||
<TextBlock Text="删除" />
|
||
</StackPanel>
|
||
</Button>
|
||
</StackPanel>
|
||
</materialDesign:Card>
|
||
|
||
<!-- 中间 已经选择曲线 -->
|
||
<Grid Grid.Row="0" Grid.Column="2">
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="100" />
|
||
<RowDefinition />
|
||
</Grid.RowDefinitions>
|
||
<materialDesign:Card Margin="3" materialDesign:ElevationAssist.Elevation="Dp2">
|
||
<StackPanel Orientation="Vertical">
|
||
<StackPanel
|
||
HorizontalAlignment="Left"
|
||
VerticalAlignment="Center"
|
||
Orientation="Horizontal">
|
||
<TextBlock
|
||
Margin="10,0,0,0"
|
||
VerticalAlignment="Center"
|
||
FontFamily="/Assets/Fonts/#iconfont"
|
||
FontSize="24"
|
||
Foreground="Green"
|
||
Text="" />
|
||
<TextBlock
|
||
Margin="10,3"
|
||
FontSize="30"
|
||
Foreground="Green"
|
||
Text="已选曲线" />
|
||
</StackPanel>
|
||
|
||
<TextBlock
|
||
HorizontalAlignment="Center"
|
||
VerticalAlignment="Center"
|
||
FontSize="26"
|
||
Foreground="Gray"
|
||
Text="{Binding SelectedChartSelectData.Name}" />
|
||
</StackPanel>
|
||
|
||
|
||
</materialDesign:Card>
|
||
|
||
<materialDesign:Card
|
||
Grid.Row="1"
|
||
Margin="3"
|
||
materialDesign:ElevationAssist.Elevation="Dp2">
|
||
<Border BorderBrush="Black" BorderThickness="1">
|
||
<ListView
|
||
x:Name="LvChartConfig"
|
||
Foreground="Black"
|
||
ItemsSource="{Binding ChartSelectDataListViewItems}">
|
||
<i:Interaction.Triggers>
|
||
<i:EventTrigger EventName="SelectionChanged">
|
||
<prism:InvokeCommandAction Command="{Binding SelectedChartConfigCmd}" CommandParameter="{Binding ElementName=LvChartConfig, Path=SelectedItem}" />
|
||
</i:EventTrigger>
|
||
</i:Interaction.Triggers>
|
||
<ListView.View>
|
||
<GridView ColumnHeaderContainerStyle="{StaticResource myHeaderStyle1}">
|
||
<GridViewColumn
|
||
Width="50"
|
||
DisplayMemberBinding="{Binding Index}"
|
||
Header="序号" />
|
||
<GridViewColumn
|
||
Width="220"
|
||
DisplayMemberBinding="{Binding Name}"
|
||
Header="名称" />
|
||
<GridViewColumn
|
||
Width="100"
|
||
DisplayMemberBinding="{Binding YAxis.Unit}"
|
||
Header="Y标尺" />
|
||
</GridView>
|
||
</ListView.View>
|
||
<!-- 设置ListViewItem的背景色,模拟网格效果 -->
|
||
<!--<ListView.ItemContainerStyle>
|
||
<Style TargetType="ListViewItem">
|
||
<Setter Property="Background" Value="LightGray" />
|
||
</Style>
|
||
</ListView.ItemContainerStyle>-->
|
||
</ListView>
|
||
</Border>
|
||
</materialDesign:Card>
|
||
</Grid>
|
||
<!-- Y标尺选择操作 -->
|
||
<materialDesign:Card
|
||
Grid.Column="3"
|
||
Margin="5,3"
|
||
materialDesign:ElevationAssist.Elevation="Dp2">
|
||
<StackPanel VerticalAlignment="Center" Orientation="Vertical">
|
||
<StackPanel.Resources>
|
||
<Style x:Key="btnStyle" TargetType="Button" />
|
||
</StackPanel.Resources>
|
||
<Button
|
||
Margin="5"
|
||
Command="{Binding ChartYAxisSelectCmd}"
|
||
CommandParameter="Selected"
|
||
Foreground="White">
|
||
<StackPanel Orientation="Horizontal">
|
||
<TextBlock
|
||
Margin="2,0"
|
||
VerticalAlignment="Center"
|
||
FontFamily="/Assets/Fonts/#iconfont"
|
||
FontSize="14"
|
||
Foreground="White"
|
||
Text="<" />
|
||
<TextBlock Text="选择" />
|
||
</StackPanel>
|
||
</Button>
|
||
</StackPanel>
|
||
</materialDesign:Card>
|
||
|
||
<!-- Y标尺 -->
|
||
<Grid Grid.Row="0" Grid.Column="4">
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="100" />
|
||
<RowDefinition />
|
||
</Grid.RowDefinitions>
|
||
<materialDesign:Card Margin="3" materialDesign:ElevationAssist.Elevation="Dp2">
|
||
<StackPanel Orientation="Vertical">
|
||
<StackPanel
|
||
HorizontalAlignment="Left"
|
||
VerticalAlignment="Center"
|
||
Orientation="Horizontal">
|
||
<TextBlock
|
||
Margin="10,0,0,0"
|
||
VerticalAlignment="Center"
|
||
FontFamily="/Assets/Fonts/#iconfont"
|
||
FontSize="24"
|
||
Foreground="Blue"
|
||
Text="" />
|
||
<TextBlock
|
||
Margin="10,3"
|
||
FontSize="30"
|
||
Foreground="Blue"
|
||
Text="Y轴标尺" />
|
||
</StackPanel>
|
||
|
||
<TextBlock
|
||
HorizontalAlignment="Center"
|
||
VerticalAlignment="Center"
|
||
FontSize="26"
|
||
Foreground="Gray"
|
||
Text="{Binding SelectedChartYAxisData.Name}" />
|
||
</StackPanel>
|
||
|
||
</materialDesign:Card>
|
||
|
||
<materialDesign:Card
|
||
Grid.Row="1"
|
||
Margin="3"
|
||
materialDesign:ElevationAssist.Elevation="Dp2">
|
||
<Border BorderBrush="Black" BorderThickness="1">
|
||
<ListView
|
||
x:Name="LvChartYAxis"
|
||
Foreground="Black"
|
||
ItemsSource="{Binding ChartYAxisDataListViewItems}">
|
||
<i:Interaction.Triggers>
|
||
<i:EventTrigger EventName="SelectionChanged">
|
||
<prism:InvokeCommandAction Command="{Binding ChartYAxisDataConfigCmd}" CommandParameter="{Binding ElementName=LvChartYAxis, Path=SelectedItem}" />
|
||
</i:EventTrigger>
|
||
</i:Interaction.Triggers>
|
||
<ListView.View>
|
||
<GridView ColumnHeaderContainerStyle="{StaticResource myHeaderStyle1}">
|
||
<GridViewColumn
|
||
Width="50"
|
||
DisplayMemberBinding="{Binding Index}"
|
||
Header="序号" />
|
||
<GridViewColumn
|
||
Width="100"
|
||
DisplayMemberBinding="{Binding Name}"
|
||
Header="标尺名称" />
|
||
<GridViewColumn
|
||
Width="80"
|
||
DisplayMemberBinding="{Binding Min}"
|
||
Header="最小值" />
|
||
<GridViewColumn
|
||
Width="80"
|
||
DisplayMemberBinding="{Binding Max}"
|
||
Header="最大值" />
|
||
<GridViewColumn
|
||
Width="80"
|
||
DisplayMemberBinding="{Binding Unit}"
|
||
Header="单位" />
|
||
</GridView>
|
||
</ListView.View>
|
||
<!-- 设置ListViewItem的背景色,模拟网格效果 -->
|
||
<!--<ListView.ItemContainerStyle>
|
||
<Style TargetType="ListViewItem">
|
||
<Setter Property="Background" Value="LightGray" />
|
||
</Style>
|
||
</ListView.ItemContainerStyle>-->
|
||
</ListView>
|
||
</Border>
|
||
</materialDesign:Card>
|
||
</Grid>
|
||
|
||
<StackPanel
|
||
Grid.Row="1"
|
||
Grid.Column="5"
|
||
VerticalAlignment="Center">
|
||
<Button
|
||
Width="150"
|
||
Height="40"
|
||
Margin="30,0"
|
||
HorizontalAlignment="Right"
|
||
Command="{Binding SaveCmd}"
|
||
FontSize="26"
|
||
Foreground="White">
|
||
<StackPanel Orientation="Horizontal">
|
||
<TextBlock
|
||
Margin="2,0"
|
||
VerticalAlignment="Center"
|
||
FontFamily="/Assets/Fonts/#iconfont"
|
||
FontSize="24"
|
||
Foreground="White"
|
||
Text=" " />
|
||
<TextBlock FontWeight="Bold" Text="关闭" />
|
||
</StackPanel>
|
||
</Button>
|
||
</StackPanel>
|
||
</Grid>
|
||
</UserControl>
|