525 lines
36 KiB
XML
525 lines
36 KiB
XML
<UserControl x:Class="InSituLaboratory.Views.Pages.SequentialDistributionView"
|
|
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:local="clr-namespace:InSituLaboratory.Views.Pages"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="450" d:DesignWidth="800">
|
|
<UserControl.Resources>
|
|
<Style TargetType="{x:Type RadioButton}" x:Key="TopTabButtonStyle">
|
|
<Setter Property="Height" Value="33"/>
|
|
<Setter Property="Foreground" Value="#555"/>
|
|
<Setter Property="Cursor" Value="Hand"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type RadioButton}">
|
|
<Grid Background="Transparent">
|
|
<ContentPresenter VerticalAlignment="Center"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsChecked" Value="True">
|
|
<Setter Property="FontWeight" Value="Bold"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<ControlTemplate TargetType="CheckBox" x:Key="LastMonthButtonTemplate">
|
|
<Border Background="#f8f8f8" CornerRadius="8" Name="back">
|
|
<TextBlock Text="{Binding Content,RelativeSource={RelativeSource AncestorType=CheckBox ,Mode=FindAncestor}}"
|
|
VerticalAlignment="Center" HorizontalAlignment="Center"
|
|
Margin="10,4" Name="txt"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsChecked" Value="True">
|
|
<Setter Property="Background" Value="#FFF05005" TargetName="back"/>
|
|
<Setter Property="TextBlock.Foreground" Value="White" TargetName="txt"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</UserControl.Resources>
|
|
|
|
<ScrollViewer>
|
|
<Grid Margin="10,20">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto"/>
|
|
<RowDefinition Height="auto"/>
|
|
<RowDefinition Height="auto"/>
|
|
<RowDefinition Height="auto"/>
|
|
<RowDefinition Height="auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid Grid.Row="0">
|
|
<Border CornerRadius="5" Background="#FAFCFF" Margin="10">
|
|
<Border.Effect>
|
|
<DropShadowEffect BlurRadius="10" ShadowDepth="0" Direction="0" Color="#555" Opacity="0.1"/>
|
|
</Border.Effect>
|
|
</Border>
|
|
<Grid Background="#FAFCFF" Margin="20">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="45"/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
<!--列头-->
|
|
<Border Background="#EFEFEF" Height="1" VerticalAlignment="Bottom"/>
|
|
|
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left">
|
|
<TextBlock Text="时序1" FontSize="14" Margin="15,0" FontWeight="Normal" Foreground="#888" VerticalAlignment="Center"/>
|
|
<TextBlock Text="开始时间:" FontSize="14" Margin="15,0" FontWeight="Normal" Foreground="#888" VerticalAlignment="Center"/>
|
|
<DatePicker Width="130" BorderThickness="0" SelectedDate="{Binding CurrentDate}"/>
|
|
<TextBlock Text="结束时间:" FontSize="14" Margin="15,0" FontWeight="Normal" Foreground="#888" VerticalAlignment="Center"/>
|
|
<DatePicker Width="130" BorderThickness="0" SelectedDate="{Binding CurrentDate}"/>
|
|
</StackPanel>
|
|
|
|
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
|
<!--刷新按钮-->
|
|
<Button Content="刷新" Style="{StaticResource NormalButtonStyle}" Command="{Binding RefreshCommand}" Width="60" Margin="5,0" Background="#88409EFE"/>
|
|
<Button Content="新建" Style="{StaticResource IconWithContentButtonStyle}" Command="{Binding ModifyCommand}" Tag="" >
|
|
<Button.Background>
|
|
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
|
|
<GradientStop Color="#FE582D" Offset="0"/>
|
|
<GradientStop Color="#F1961A" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
</Button.Background>
|
|
</Button>
|
|
<Button Content="下发" Style="{StaticResource NormalButtonStyle}" Command="{Binding SendCommand}" Width="60" Margin="5,0" Background="#88409EFE"/>
|
|
</StackPanel>
|
|
|
|
<Grid Grid.Row="1">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
<Grid Grid.Row="0" TextBlock.FontSize="12" TextBlock.FontWeight="Bold" TextBlock.Foreground="#666">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Text="序号" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
|
<TextBlock Text="传感器ID" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
|
<TextBlock Text="循环时长" Grid.Column="2" VerticalAlignment="Center" Margin="5,0"/>
|
|
</Grid>
|
|
|
|
<ListBox Grid.Row="1" Background="Transparent" BorderThickness="0" ItemsSource="{Binding RecordList}" Margin="0,10">
|
|
<ListBox.ItemContainerStyle>
|
|
<Style TargetType="ListBoxItem">
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ListBoxItem">
|
|
<Border Background="Transparent" Name="border">
|
|
<ContentPresenter/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="border" Property="Background" Value="#F0F6FB"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ListBox.ItemContainerStyle>
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border BorderBrush="#EFEFEF" BorderThickness="0,0,0,1">
|
|
<Grid >
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Text="{Binding Number}" FontWeight="Normal" Width="120" Grid.Column="0" FontSize="12" Margin="120,0" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
<TextBlock Text="{Binding SensorID}" FontSize="12" Grid.Column="1"/>
|
|
<TextBlock Text="{Binding DurationTime}" FontSize="12" Grid.Column="2" Margin="-40,0"/>
|
|
|
|
<!--操作-->
|
|
<StackPanel Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Horizontal">
|
|
<TextBlock VerticalAlignment="Center">
|
|
<Hyperlink Command="{Binding DataContext.ModifyCommand,RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
CommandParameter="{Binding}" TextDecorations="None" Foreground="#409EFE">编辑</Hyperlink>
|
|
</TextBlock>
|
|
<TextBlock Margin="5,3">
|
|
<Hyperlink Command="{Binding DataContext.DeleteCommand,RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
CommandParameter="{Binding}" TextDecorations="None" Foreground="#409EFE">删除</Hyperlink>
|
|
</TextBlock>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<Grid Grid.Row="1">
|
|
<Border CornerRadius="5" Background="#FAFCFF" Margin="10">
|
|
<Border.Effect>
|
|
<DropShadowEffect BlurRadius="10" ShadowDepth="0" Direction="0" Color="#555" Opacity="0.1"/>
|
|
</Border.Effect>
|
|
</Border>
|
|
<Grid Background="#FAFCFF" Margin="20">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="45"/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
<!--列头-->
|
|
<Border Background="#EFEFEF" Height="1" VerticalAlignment="Bottom"/>
|
|
|
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left">
|
|
<TextBlock Text="时序2" FontSize="14" Margin="15,0" FontWeight="Normal" Foreground="#888" VerticalAlignment="Center"/>
|
|
<TextBlock Text="开始时间:" FontSize="14" Margin="15,0" FontWeight="Normal" Foreground="#888" VerticalAlignment="Center"/>
|
|
<DatePicker Width="130" BorderThickness="0" SelectedDate="{Binding CurrentDate}"/>
|
|
<TextBlock Text="结束时间:" FontSize="14" Margin="15,0" FontWeight="Normal" Foreground="#888" VerticalAlignment="Center"/>
|
|
<DatePicker Width="130" BorderThickness="0" SelectedDate="{Binding CurrentDate}"/>
|
|
</StackPanel>
|
|
|
|
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
|
<!--刷新按钮-->
|
|
<Button Content="刷新" Style="{StaticResource NormalButtonStyle}" Command="{Binding RefreshCommand2}" Width="60" Margin="5,0" Background="#88409EFE"/>
|
|
<Button Content="新建" Style="{StaticResource IconWithContentButtonStyle}" Command="{Binding ModifyCommand2}" Tag="" >
|
|
<Button.Background>
|
|
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
|
|
<GradientStop Color="#FE582D" Offset="0"/>
|
|
<GradientStop Color="#F1961A" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
</Button.Background>
|
|
</Button>
|
|
<Button Content="下发" Style="{StaticResource NormalButtonStyle}" Command="{Binding SendCommand2}" Width="60" Margin="5,0" Background="#88409EFE"/>
|
|
</StackPanel>
|
|
|
|
<ListBox Grid.Row="1" Background="Transparent" BorderThickness="0" ItemsSource="{Binding RecordList}" Margin="0,10">
|
|
<ListBox.ItemContainerStyle>
|
|
<Style TargetType="ListBoxItem">
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ListBoxItem">
|
|
<Border Background="Transparent" Name="border">
|
|
<ContentPresenter/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="border" Property="Background" Value="#F0F6FB"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ListBox.ItemContainerStyle>
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border BorderBrush="#EFEFEF" BorderThickness="0,0,0,1">
|
|
<Grid >
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Text="{Binding Number}" FontWeight="Normal" Width="120" Grid.Column="0" FontSize="12" Margin="120,0" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
<TextBlock Text="{Binding SensorID}" FontSize="12" Grid.Column="1"/>
|
|
<TextBlock Text="{Binding DurationTime}" FontSize="12" Grid.Column="2" Margin="-40,0"/>
|
|
|
|
<!--操作-->
|
|
<StackPanel Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Horizontal">
|
|
<TextBlock VerticalAlignment="Center">
|
|
<Hyperlink Command="{Binding DataContext.ModifyCommand,RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
CommandParameter="{Binding}" TextDecorations="None" Foreground="#409EFE">编辑</Hyperlink>
|
|
</TextBlock>
|
|
<TextBlock Margin="5,3">
|
|
<Hyperlink Command="{Binding DataContext.DeleteCommand,RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
CommandParameter="{Binding}" TextDecorations="None" Foreground="#409EFE">删除</Hyperlink>
|
|
</TextBlock>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<Grid Grid.Row="2">
|
|
<Border CornerRadius="5" Background="#FAFCFF" Margin="10">
|
|
<Border.Effect>
|
|
<DropShadowEffect BlurRadius="10" ShadowDepth="0" Direction="0" Color="#555" Opacity="0.1"/>
|
|
</Border.Effect>
|
|
</Border>
|
|
<Grid Background="#FAFCFF" Margin="20">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="45"/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
<!--列头-->
|
|
<Border Background="#EFEFEF" Height="1" VerticalAlignment="Bottom"/>
|
|
|
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left">
|
|
<TextBlock Text="时序3" FontSize="14" Margin="15,0" FontWeight="Normal" Foreground="#888" VerticalAlignment="Center"/>
|
|
<TextBlock Text="开始时间:" FontSize="14" Margin="15,0" FontWeight="Normal" Foreground="#888" VerticalAlignment="Center"/>
|
|
<DatePicker Width="130" BorderThickness="0" SelectedDate="{Binding CurrentDate}"/>
|
|
<TextBlock Text="结束时间:" FontSize="14" Margin="15,0" FontWeight="Normal" Foreground="#888" VerticalAlignment="Center"/>
|
|
<DatePicker Width="130" BorderThickness="0" SelectedDate="{Binding CurrentDate}"/>
|
|
</StackPanel>
|
|
|
|
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
|
<!--刷新按钮-->
|
|
<Button Content="刷新" Style="{StaticResource NormalButtonStyle}" Command="{Binding RefreshCommand3}" Width="60" Margin="5,0" Background="#88409EFE"/>
|
|
<Button Content="新建" Style="{StaticResource IconWithContentButtonStyle}" Command="{Binding ModifyCommand3}" Tag="" >
|
|
<Button.Background>
|
|
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
|
|
<GradientStop Color="#FE582D" Offset="0"/>
|
|
<GradientStop Color="#F1961A" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
</Button.Background>
|
|
</Button>
|
|
<Button Content="下发" Style="{StaticResource NormalButtonStyle}" Command="{Binding SendCommand3}" Width="60" Margin="5,0" Background="#88409EFE"/>
|
|
</StackPanel>
|
|
|
|
<ListBox Grid.Row="1" Background="Transparent" BorderThickness="0" ItemsSource="{Binding RecordList}" Margin="0,10">
|
|
<ListBox.ItemContainerStyle>
|
|
<Style TargetType="ListBoxItem">
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ListBoxItem">
|
|
<Border Background="Transparent" Name="border">
|
|
<ContentPresenter/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="border" Property="Background" Value="#F0F6FB"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ListBox.ItemContainerStyle>
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border BorderBrush="#EFEFEF" BorderThickness="0,0,0,1">
|
|
<Grid >
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Text="{Binding Number}" FontWeight="Normal" Width="120" Grid.Column="0" FontSize="12" Margin="120,0" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
<TextBlock Text="{Binding SensorID}" FontSize="12" Grid.Column="1"/>
|
|
<TextBlock Text="{Binding DurationTime}" FontSize="12" Grid.Column="2" Margin="-40,0"/>
|
|
|
|
<!--操作-->
|
|
<StackPanel Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Horizontal">
|
|
<TextBlock VerticalAlignment="Center">
|
|
<Hyperlink Command="{Binding DataContext.ModifyCommand,RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
CommandParameter="{Binding}" TextDecorations="None" Foreground="#409EFE">编辑</Hyperlink>
|
|
</TextBlock>
|
|
<TextBlock Margin="5,3">
|
|
<Hyperlink Command="{Binding DataContext.DeleteCommand,RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
CommandParameter="{Binding}" TextDecorations="None" Foreground="#409EFE">删除</Hyperlink>
|
|
</TextBlock>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<Grid Grid.Row="3">
|
|
<Border CornerRadius="5" Background="#FAFCFF" Margin="10">
|
|
<Border.Effect>
|
|
<DropShadowEffect BlurRadius="10" ShadowDepth="0" Direction="0" Color="#555" Opacity="0.1"/>
|
|
</Border.Effect>
|
|
</Border>
|
|
<Grid Background="#FAFCFF" Margin="20">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="45"/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
<!--列头-->
|
|
<Border Background="#EFEFEF" Height="1" VerticalAlignment="Bottom"/>
|
|
|
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left">
|
|
<TextBlock Text="时序4" FontSize="14" Margin="15,0" FontWeight="Normal" Foreground="#888" VerticalAlignment="Center"/>
|
|
<TextBlock Text="开始时间:" FontSize="14" Margin="15,0" FontWeight="Normal" Foreground="#888" VerticalAlignment="Center"/>
|
|
<DatePicker Width="130" BorderThickness="0" SelectedDate="{Binding CurrentDate}"/>
|
|
<TextBlock Text="结束时间:" FontSize="14" Margin="15,0" FontWeight="Normal" Foreground="#888" VerticalAlignment="Center"/>
|
|
<DatePicker Width="130" BorderThickness="0" SelectedDate="{Binding CurrentDate}"/>
|
|
</StackPanel>
|
|
|
|
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
|
<!--刷新按钮-->
|
|
<Button Content="刷新" Style="{StaticResource NormalButtonStyle}" Command="{Binding RefreshCommand4}" Width="60" Margin="5,0" Background="#88409EFE"/>
|
|
<Button Content="新建" Style="{StaticResource IconWithContentButtonStyle}" Command="{Binding ModifyCommand4}" Tag="" >
|
|
<Button.Background>
|
|
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
|
|
<GradientStop Color="#FE582D" Offset="0"/>
|
|
<GradientStop Color="#F1961A" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
</Button.Background>
|
|
</Button>
|
|
<Button Content="下发" Style="{StaticResource NormalButtonStyle}" Command="{Binding SendCommand4}" Width="60" Margin="5,0" Background="#88409EFE"/>
|
|
</StackPanel>
|
|
|
|
<ListBox Grid.Row="1" Background="Transparent" BorderThickness="0" ItemsSource="{Binding RecordList}" Margin="0,10">
|
|
<ListBox.ItemContainerStyle>
|
|
<Style TargetType="ListBoxItem">
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ListBoxItem">
|
|
<Border Background="Transparent" Name="border">
|
|
<ContentPresenter/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="border" Property="Background" Value="#F0F6FB"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ListBox.ItemContainerStyle>
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border BorderBrush="#EFEFEF" BorderThickness="0,0,0,1">
|
|
<Grid >
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Text="{Binding Number}" FontWeight="Normal" Width="120" Grid.Column="0" FontSize="12" Margin="120,0" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
<TextBlock Text="{Binding SensorID}" FontSize="12" Grid.Column="1"/>
|
|
<TextBlock Text="{Binding DurationTime}" FontSize="12" Grid.Column="2" Margin="-40,0"/>
|
|
|
|
<!--操作-->
|
|
<StackPanel Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Horizontal">
|
|
<TextBlock VerticalAlignment="Center">
|
|
<Hyperlink Command="{Binding DataContext.ModifyCommand,RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
CommandParameter="{Binding}" TextDecorations="None" Foreground="#409EFE">编辑</Hyperlink>
|
|
</TextBlock>
|
|
<TextBlock Margin="5,3">
|
|
<Hyperlink Command="{Binding DataContext.DeleteCommand,RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
CommandParameter="{Binding}" TextDecorations="None" Foreground="#409EFE">删除</Hyperlink>
|
|
</TextBlock>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<Grid Grid.Row="4">
|
|
<Border CornerRadius="5" Background="#FAFCFF" Margin="10">
|
|
<Border.Effect>
|
|
<DropShadowEffect BlurRadius="10" ShadowDepth="0" Direction="0" Color="#555" Opacity="0.1"/>
|
|
</Border.Effect>
|
|
</Border>
|
|
<Grid Background="#FAFCFF" Margin="20">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="45"/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
<!--列头-->
|
|
<Border Background="#EFEFEF" Height="1" VerticalAlignment="Bottom"/>
|
|
|
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left">
|
|
<TextBlock Text="时序5" FontSize="14" Margin="15,0" FontWeight="Normal" Foreground="#888" VerticalAlignment="Center"/>
|
|
<TextBlock Text="开始时间:" FontSize="14" Margin="15,0" FontWeight="Normal" Foreground="#888" VerticalAlignment="Center"/>
|
|
<DatePicker Width="130" BorderThickness="0" SelectedDate="{Binding CurrentDate}"/>
|
|
<TextBlock Text="结束时间:" FontSize="14" Margin="15,0" FontWeight="Normal" Foreground="#888" VerticalAlignment="Center"/>
|
|
<DatePicker Width="130" BorderThickness="0" SelectedDate="{Binding CurrentDate}"/>
|
|
</StackPanel>
|
|
|
|
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
|
<!--刷新按钮-->
|
|
<Button Content="刷新" Style="{StaticResource NormalButtonStyle}" Command="{Binding RefreshCommand5}" Width="60" Margin="5,0" Background="#88409EFE"/>
|
|
<Button Content="新建" Style="{StaticResource IconWithContentButtonStyle}" Command="{Binding ModifyCommand5}" Tag="" >
|
|
<Button.Background>
|
|
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
|
|
<GradientStop Color="#FE582D" Offset="0"/>
|
|
<GradientStop Color="#F1961A" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
</Button.Background>
|
|
</Button>
|
|
<Button Content="下发" Style="{StaticResource NormalButtonStyle}" Command="{Binding SendCommand5}" Width="60" Margin="5,0" Background="#88409EFE"/>
|
|
</StackPanel>
|
|
<ListBox Grid.Row="1" Background="Transparent" BorderThickness="0" ItemsSource="{Binding RecordList}" Margin="0,10">
|
|
<ListBox.ItemContainerStyle>
|
|
<Style TargetType="ListBoxItem">
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ListBoxItem">
|
|
<Border Background="Transparent" Name="border">
|
|
<ContentPresenter/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="border" Property="Background" Value="#F0F6FB"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ListBox.ItemContainerStyle>
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border BorderBrush="#EFEFEF" BorderThickness="0,0,0,1">
|
|
<Grid >
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Text="{Binding Number}" FontWeight="Normal" Width="120" Grid.Column="0" FontSize="12" Margin="120,0" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
<TextBlock Text="{Binding SensorID}" FontSize="12" Grid.Column="1"/>
|
|
<TextBlock Text="{Binding DurationTime}" FontSize="12" Grid.Column="2" Margin="-40,0"/>
|
|
|
|
<!--操作-->
|
|
<StackPanel Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Horizontal">
|
|
<TextBlock VerticalAlignment="Center">
|
|
<Hyperlink Command="{Binding DataContext.ModifyCommand,RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
CommandParameter="{Binding}" TextDecorations="None" Foreground="#409EFE"> 编辑</Hyperlink>
|
|
</TextBlock>
|
|
<TextBlock Margin="5,3">
|
|
<Hyperlink Command="{Binding DataContext.DeleteCommand,RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
CommandParameter="{Binding}" TextDecorations="None" Foreground="#409EFE">删除</Hyperlink>
|
|
</TextBlock>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</Grid>
|
|
</Grid>
|
|
|
|
</Grid>
|
|
</ScrollViewer>
|
|
</UserControl>
|