| | |
| | | xmlns:dp="clr-namespace:HMI.UI.DpUtil;assembly=HMI.UI" |
| | | mc:Ignorable="d" |
| | | Title="{Binding SelectedValue,Mode=OneWay}" |
| | | SizeToContent="Height" |
| | | pu:WindowXModalDialog.Buttons="OK" |
| | | pu:WindowXModalDialog.OKButtonContent="{DynamicResource App.Close}" |
| | | Width="800" |
| | | Width="1000" |
| | | Height="600" |
| | | Loaded="WindowX_Loaded" |
| | | WindowStartupLocation="CenterOwner" |
| | | Style="{StaticResource ModalWindow}"> |
| | | <pu:WindowX.Resources> |
| | | <ResourceDictionary> |
| | | <ResourceDictionary.MergedDictionaries> |
| | | <ResourceDictionary Source="/HMI.UI;component/Style/PanuonListView.xaml"/> |
| | | </ResourceDictionary.MergedDictionaries> |
| | | |
| | | <Style x:Key="EditLink" TargetType="Button" BasedOn="{StaticResource RowLink}"> |
| | | <Setter Property="Content" Value="{DynamicResource App.Edit}"/> |
| | | <Setter Property="Foreground" Value="{DynamicResource PrimaryColor}"/> |
| | | <Style.Triggers> |
| | | <DataTrigger Binding="{Binding Path=IsMouseOver, |
| | | RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ListViewItem,AncestorLevel=1}}" |
| | | Value="True"> |
| | | <Setter Property="Foreground" Value="#FFF"/> |
| | | </DataTrigger> |
| | | <DataTrigger Binding="{Binding Path=IsSelected, |
| | | RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ListViewItem,AncestorLevel=1}}" |
| | | Value="True"> |
| | | <Setter Property="Foreground" Value="#FFF"/> |
| | | </DataTrigger> |
| | | </Style.Triggers> |
| | | </Style> |
| | | </ResourceDictionary> |
| | | </pu:WindowX.Resources> |
| | | <Grid Margin="10"> |
| | | <Border BorderThickness="1" BorderBrush="Gray"> |
| | | <Grid> |
| | | <Grid.RowDefinitions> |
| | | <RowDefinition Height="Auto"/> |
| | | <RowDefinition /> |
| | | </Grid.RowDefinitions> |
| | | |
| | | <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Right" |
| | | Margin="0,0,0,10" |
| | | dp:StackPanelHelper.ChildSpace="10"> |
| | | <Button Style="{StaticResource AddBtn}" x:Name="addBtn" Click="Button_Click"/> |
| | | <Button Style="{StaticResource RfhBtn}" x:Name="refreshBtn" Click="Button_Click"/> |
| | | <Button Style="{StaticResource ExportBtn}" x:Name="exportBtn" Click="Button_Click"/> |
| | | <Button Style="{StaticResource ImportBtn}" x:Name="importBtn" Click="Button_Click"/> |
| | | <Button Style="{StaticResource DelBtn}" x:Name="delBatchBtn" Click="Button_Click"/> |
| | | </StackPanel> |
| | | |
| | | <Border Grid.Row="1" BorderThickness="0" BorderBrush="Gray"> |
| | | |
| | | <TabControl Style="{StaticResource HeaderTabControl}" SelectedIndex="{Binding ItemIndex}" x:Name="tab"> |
| | | <TabItem Header="DB块报警"> |
| | | <ListView Style="{StaticResource DefaultListTable}" ItemsSource="{Binding Datasource}"> |
| | | <ListView.View> |
| | | <GridView AllowsColumnReorder="False"> |
| | | |
| | | <GridViewColumn Width="30"> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <CheckBox VerticalAlignment="Center" |
| | | IsChecked="{Binding IsSelected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | |
| | | <GridViewColumn Width="60" Header="#"> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <Border Style="{StaticResource CellBorder}"> |
| | | <TextBlock Style="{StaticResource ListTableTextBlock}" Text="{Binding Converter={StaticResource lvRowNumber}, |
| | | RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ListViewItem,AncestorLevel=1}}"/> |
| | | </Border> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | |
| | | <GridViewColumn Width="300"> |
| | | <GridViewColumn.Header> |
| | | <TextBlock Text="{DynamicResource Alm.DbAddress}"/> |
| | | </GridViewColumn.Header> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <Border Style="{StaticResource CellBorder}"> |
| | | <TextBlock Style="{StaticResource ListTableTextBlock}" |
| | | Text="{Binding DBAddress}"/> |
| | | </Border> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | <GridViewColumn Width="200"> |
| | | <GridViewColumn.Header> |
| | | <TextBlock Text="{DynamicResource Alm.StartAddress}"/> |
| | | </GridViewColumn.Header> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <Border Style="{StaticResource CellBorder}"> |
| | | <TextBlock Style="{StaticResource ListTableTextBlock}" |
| | | Text="{Binding StartAddress}"/> |
| | | </Border> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | <GridViewColumn Width="200"> |
| | | <GridViewColumn.Header> |
| | | <TextBlock Text="{DynamicResource Alm.DbLength}"/> |
| | | </GridViewColumn.Header> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <Border Style="{StaticResource CellBorder}"> |
| | | <TextBlock Style="{StaticResource ListTableTextBlock}" |
| | | Text="{Binding Length}"/> |
| | | </Border> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | <GridViewColumn Width="120"> |
| | | <GridViewColumn.Header> |
| | | <TextBlock Text="{DynamicResource App.Opt}"/> |
| | | </GridViewColumn.Header> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <StackPanel Orientation="Horizontal" dp:StackPanelHelper.ChildSpace="10"> |
| | | <Button x:Name="editBtn" Style="{StaticResource EditLink}" |
| | | Click="Button_Click" Tag="{Binding }"/> |
| | | |
| | | <Button x:Name="delBtn" Style="{StaticResource DeleteLink}" |
| | | Click="Button_Click" Tag="{Binding }"/> |
| | | </StackPanel> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | </GridView> |
| | | </ListView.View> |
| | | </ListView> |
| | | </TabItem> |
| | | <TabItem Header="标志位报警"> |
| | | <ListView Style="{StaticResource DefaultListTable}" ItemsSource="{Binding MarkDatasource}"> |
| | | <ListView.View> |
| | | <GridView AllowsColumnReorder="False"> |
| | | |
| | | <GridViewColumn Width="30"> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <CheckBox VerticalAlignment="Center" |
| | | IsChecked="{Binding IsSelected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | |
| | | <GridViewColumn Width="60" Header="#"> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <Border Style="{StaticResource CellBorder}"> |
| | | <TextBlock Style="{StaticResource ListTableTextBlock}" Text="{Binding Converter={StaticResource lvRowNumber}, |
| | | RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ListViewItem,AncestorLevel=1}}"/> |
| | | </Border> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | |
| | | <GridViewColumn Width="220"> |
| | | <GridViewColumn.Header> |
| | | <TextBlock Text="{DynamicResource Alm.DbAddress}"/> |
| | | </GridViewColumn.Header> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <Border Style="{StaticResource CellBorder}"> |
| | | <TextBlock Style="{StaticResource ListTableTextBlock}" |
| | | Text="{Binding DBAddress}"/> |
| | | </Border> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | <GridViewColumn Width="180"> |
| | | <GridViewColumn.Header> |
| | | <TextBlock Text="{DynamicResource Alm.StartAddress}"/> |
| | | </GridViewColumn.Header> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <Border Style="{StaticResource CellBorder}"> |
| | | <TextBlock Style="{StaticResource ListTableTextBlock}" |
| | | Text="{Binding StartAddress}"/> |
| | | </Border> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | <GridViewColumn Width="150"> |
| | | <GridViewColumn.Header> |
| | | <TextBlock Text="{DynamicResource Alm.DbLength}"/> |
| | | </GridViewColumn.Header> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <Border Style="{StaticResource CellBorder}"> |
| | | <TextBlock Style="{StaticResource ListTableTextBlock}" |
| | | Text="{Binding Length}"/> |
| | | </Border> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | <GridViewColumn Width="200"> |
| | | <GridViewColumn.Header> |
| | | <TextBlock Text="{DynamicResource Alm.Description}"/> |
| | | </GridViewColumn.Header> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <Border Style="{StaticResource CellBorder}"> |
| | | <TextBlock Style="{StaticResource ListTableTextBlock}" |
| | | Text="{Binding Description}"/> |
| | | </Border> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | <GridViewColumn Width="120"> |
| | | <GridViewColumn.Header> |
| | | <TextBlock Text="{DynamicResource App.Opt}"/> |
| | | </GridViewColumn.Header> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <StackPanel Orientation="Horizontal" dp:StackPanelHelper.ChildSpace="10"> |
| | | <Button x:Name="editBtn" Style="{StaticResource EditLink}" |
| | | Click="Button_Click" Tag="{Binding }"/> |
| | | |
| | | <Button x:Name="delBtn" Style="{StaticResource DeleteLink}" |
| | | Click="Button_Click" Tag="{Binding }"/> |
| | | </StackPanel> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | </GridView> |
| | | </ListView.View> |
| | | </ListView> |
| | | </TabItem> |
| | | </TabControl> |
| | | <!--<Grid> |
| | | <Grid.RowDefinitions> |
| | | <RowDefinition Height="Auto"/> |
| | | <RowDefinition Height="Auto"/> |
| | |
| | | <ControlTemplate TargetType="ListBoxItem"> |
| | | <Border x:Name="border" Background="LightGray" |
| | | Padding="10" Margin="0" BorderThickness="0"> |
| | | <!-- 内容呈现器 --> |
| | | --><!-- 内容呈现器 --><!-- |
| | | <StackPanel> |
| | | <ContentPresenter Content="{TemplateBinding Content}" |
| | | ContentStringFormat="{TemplateBinding ContentStringFormat}" |
| | |
| | | </DataGridTemplateColumn> |
| | | </DataGrid.Columns> |
| | | </DataGrid> |
| | | </Grid> |
| | | </Grid>--> |
| | | </Border> |
| | | </Grid> |
| | | </pu:WindowX> |