| | |
| | | pu:WindowXModalDialog.OKButtonContent="{DynamicResource App.Close}" |
| | | Width="1000" |
| | | Height="600" |
| | | InteropOwnersMask="False" |
| | | Loaded="WindowX_Loaded" |
| | | WindowStartupLocation="CenterOwner" |
| | | Style="{StaticResource ModalWindow}"> |
| | |
| | | <Button Style="{StaticResource DelBtn}" x:Name="delBatchBtn" Click="Button_Click"/> |
| | | </StackPanel> |
| | | |
| | | <Border Grid.Row="1" BorderThickness="0" BorderBrush="Gray"> |
| | | <Grid Grid.Row="1"> |
| | | |
| | | <TabControl Style="{StaticResource HeaderTabControl}" SelectedIndex="{Binding ItemIndex}" x:Name="tab"> |
| | | <TabItem Header="DB块报警"> |
| | | <ListView Style="{StaticResource DefaultListTable}" ItemsSource="{Binding Datasource}"> |
| | | <!--<ListView Style="{StaticResource DefaultListTable}" ItemsSource="{Binding Datasource}"> |
| | | <ListView.View> |
| | | <GridView AllowsColumnReorder="False"> |
| | | |
| | |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | |
| | | <GridViewColumn Width="300"> |
| | | <GridViewColumn Width="100"> |
| | | <GridViewColumn.Header> |
| | | <TextBlock Text="{DynamicResource Alm.DbAddress}"/> |
| | | </GridViewColumn.Header> |
| | |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | <GridViewColumn Width="200"> |
| | | <GridViewColumn Width="150"> |
| | | <GridViewColumn.Header> |
| | | <TextBlock Text="{DynamicResource Alm.StartAddress}"/> |
| | | </GridViewColumn.Header> |
| | |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | <GridViewColumn Width="200"> |
| | | <GridViewColumn Width="100"> |
| | | <GridViewColumn.Header> |
| | | <TextBlock Text="{DynamicResource Alm.DbLength}"/> |
| | | </GridViewColumn.Header> |
| | |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | |
| | | <GridViewColumn Width="150"> |
| | | <GridViewColumn.Header> |
| | | <TextBlock Text="报警代码"/> |
| | | </GridViewColumn.Header> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <Border Style="{StaticResource CellBorder}"> |
| | | <TextBlock Style="{StaticResource ListTableTextBlock}" |
| | | Text="{Binding AlarmCode}"/> |
| | | </Border> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | |
| | | <GridViewColumn Width="250"> |
| | | <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> |
| | | </GridView> |
| | | </ListView.View> |
| | | </ListView> |
| | | </ListView>--> |
| | | <DataGrid Style="{StaticResource DefaultDataGrid}" |
| | | dp:DataGridHelper.ShowRowNumber="True" |
| | | ItemsSource="{Binding BlockDatasource}"> |
| | | <DataGrid.Columns> |
| | | <DataGridTemplateColumn Width="20" CanUserResize="False"> |
| | | <DataGridTemplateColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <CheckBox VerticalAlignment="Center" |
| | | HorizontalAlignment="Center" IsChecked="{Binding IsSelected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
| | | </DataTemplate> |
| | | </DataGridTemplateColumn.CellTemplate> |
| | | </DataGridTemplateColumn> |
| | | |
| | | <DataGridTextColumn Header="#" |
| | | Binding="{Binding Header, RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}, Mode=FindAncestor}}" |
| | | Width="40"/> |
| | | |
| | | <DataGridTextColumn Width="100" Binding="{Binding DBAddress}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Alm.DbAddress}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | |
| | | <DataGridTextColumn Width="150" Binding="{Binding StartAddress}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Alm.StartAddress}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | |
| | | <DataGridTextColumn Width="100" Binding="{Binding Length}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Alm.DbLength}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | |
| | | <DataGridTextColumn Width="150" Binding="{Binding AlarmCode}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="报警代码"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | |
| | | <DataGridTextColumn Width="*" Binding="{Binding Level}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="级别"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | |
| | | <DataGridTextColumn Width="*" Binding="{Binding Description}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Alm.Description}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | |
| | | <DataGridTemplateColumn Width="120"> |
| | | <DataGridTemplateColumn.Header> |
| | | <TextBlock Text="{DynamicResource App.Opt}"/> |
| | | </DataGridTemplateColumn.Header> |
| | | <DataGridTemplateColumn.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> |
| | | </DataGridTemplateColumn.CellTemplate> |
| | | </DataGridTemplateColumn> |
| | | </DataGrid.Columns> |
| | | </DataGrid> |
| | | </TabItem> |
| | | <TabItem Header="标志位报警"> |
| | | <ListView Style="{StaticResource DefaultListTable}" ItemsSource="{Binding MarkDatasource}"> |
| | | <DataGrid Style="{StaticResource DefaultDataGrid}" |
| | | dp:DataGridHelper.ShowRowNumber="True" |
| | | ItemsSource="{Binding MarkDatasource}"> |
| | | <DataGrid.Columns> |
| | | <DataGridTemplateColumn Width="Auto" CanUserResize="False"> |
| | | <DataGridTemplateColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <CheckBox VerticalAlignment="Center" |
| | | HorizontalAlignment="Center" IsChecked="{Binding IsSelected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
| | | </DataTemplate> |
| | | </DataGridTemplateColumn.CellTemplate> |
| | | </DataGridTemplateColumn> |
| | | |
| | | <DataGridTextColumn Header="#" |
| | | Binding="{Binding Header, RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}, Mode=FindAncestor}}" Width="40"/> |
| | | |
| | | <DataGridTextColumn Width="100" Binding="{Binding DBAddress}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Alm.DbAddress}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | |
| | | <DataGridTextColumn Width="150" Binding="{Binding StartAddress}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Alm.StartAddress}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | |
| | | <DataGridTextColumn Width="100" Binding="{Binding Length}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Alm.DbLength}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | |
| | | <DataGridTextColumn Width="*" Binding="{Binding Description}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Alm.Description}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | |
| | | <DataGridTemplateColumn Width="120"> |
| | | <DataGridTemplateColumn.Header> |
| | | <TextBlock Text="{DynamicResource App.Opt}"/> |
| | | </DataGridTemplateColumn.Header> |
| | | <DataGridTemplateColumn.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> |
| | | </DataGridTemplateColumn.CellTemplate> |
| | | </DataGridTemplateColumn> |
| | | </DataGrid.Columns> |
| | | </DataGrid> |
| | | |
| | | <!--<ListView Style="{StaticResource DefaultListTable}" ItemsSource="{Binding MarkDatasource}"> |
| | | <ListView.View> |
| | | <GridView AllowsColumnReorder="False"> |
| | | |
| | |
| | | </GridViewColumn> |
| | | </GridView> |
| | | </ListView.View> |
| | | </ListView> |
| | | </ListView>--> |
| | | </TabItem> |
| | | </TabControl> |
| | | <!--<Grid> |
| | |
| | | <ControlTemplate TargetType="ListBoxItem"> |
| | | <Border x:Name="border" Background="LightGray" |
| | | Padding="10" Margin="0" BorderThickness="0"> |
| | | --><!-- 内容呈现器 --><!-- |
| | | --> |
| | | <!-- 内容呈现器 --> |
| | | <!-- |
| | | <StackPanel> |
| | | <ContentPresenter Content="{TemplateBinding Content}" |
| | | ContentStringFormat="{TemplateBinding ContentStringFormat}" |
| | |
| | | <Button Style="{StaticResource DelBtn}" x:Name="delBatchBtn" Click="Button_Click"/> |
| | | </StackPanel> |
| | | |
| | | <DataGrid x:Name="table" Grid.Row="2" |
| | | Style="{StaticResource DefaultDataGrid}" ItemsSource="{Binding Datasource}"> |
| | | <DataGrid.Columns> |
| | | <DataGridTemplateColumn Header="" Width="Auto" CanUserResize="False"> |
| | | <DataGridTemplateColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <CheckBox VerticalAlignment="Center" |
| | | IsChecked="{Binding IsSelected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
| | | </DataTemplate> |
| | | </DataGridTemplateColumn.CellTemplate> |
| | | </DataGridTemplateColumn> |
| | | <DataGridTemplateColumn Header="#" CanUserResize="False"> |
| | | <DataGridTemplateColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <TextBlock Text="{Binding Converter={StaticResource rowNumber}, |
| | | RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGridRow},AncestorLevel=1}}"/> |
| | | </DataTemplate> |
| | | </DataGridTemplateColumn.CellTemplate> |
| | | </DataGridTemplateColumn> |
| | | <DataGridTextColumn Width="*" Binding="{Binding DBAddress}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Alm.DbAddress}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTextColumn Width="*" Binding="{Binding StartAddress}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Alm.StartAddress}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTextColumn Width="*" Binding="{Binding Length}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Alm.DbLength}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTemplateColumn Width="100" IsReadOnly="True" CanUserResize="False"> |
| | | <DataGridTemplateColumn.Header> |
| | | <TextBlock Text="{DynamicResource App.Opt}"/> |
| | | </DataGridTemplateColumn.Header> |
| | | <DataGridTemplateColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <StackPanel Orientation="Horizontal"> |
| | | <Button x:Name="editBtn" Tag="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGridRow},AncestorLevel=1}}" |
| | | Style="{StaticResource EditLink}" |
| | | Margin="0,0,10,0" |
| | | Click="Button_Click" |
| | | DataContext="{Binding }"/> |
| | | <Button x:Name="delBtn" Tag="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGridRow},AncestorLevel=1}}" |
| | | Style="{StaticResource DeleteLink}" |
| | | DataContext="{Binding }" |
| | | Click="Button_Click"/> |
| | | </StackPanel> |
| | | </DataTemplate> |
| | | </DataGridTemplateColumn.CellTemplate> |
| | | </DataGridTemplateColumn> |
| | | </DataGrid.Columns> |
| | | </DataGrid> |
| | | |
| | | </Grid>--> |
| | | </Border> |
| | | </Grid> |
| | | </Grid> |
| | | </pu:WindowX> |