| | |
| | | Title="{Binding SelectedValue,Mode=OneWay}" |
| | | SizeToContent="Height" |
| | | pu:WindowXModalDialog.Buttons="OK" |
| | | pu:WindowXModalDialog.OKButtonContent="{Binding Converter={StaticResource lc},ConverterParameter='App.Close'}" |
| | | pu:WindowXModalDialog.OKButtonContent="{DynamicResource App.Close}" |
| | | Width="800" |
| | | Height="600" |
| | | Style="{StaticResource ModalWindow}"> |
| | | <Window.Resources> |
| | | <ResourceDictionary> |
| | | <ResourceDictionary.MergedDictionaries> |
| | | <pu:StyleDictionary Includes="TabControl"/> |
| | | <ResourceDictionary Source="/HMI.UI;component/Resources/Font/Font.xaml"/> |
| | | <ResourceDictionary Source="/HMI.UI;component/Style/Colors.xaml"/> |
| | | </ResourceDictionary.MergedDictionaries> |
| | | </ResourceDictionary> |
| | | </Window.Resources> |
| | | |
| | | <Grid Margin="10"> |
| | | <Border BorderThickness="1" BorderBrush="Gray"> |
| | | <Grid> |
| | |
| | | <RowDefinition /> |
| | | </Grid.RowDefinitions> |
| | | |
| | | <ListBox ItemsSource="{Binding Items}" SelectedValue="{Binding SelectedValue}" BorderThickness="0"> |
| | | <ListBox ItemsSource="{Binding Items}" SelectedIndex="{Binding ItemIndex}" BorderThickness="0"> |
| | | <ListBox.ItemsPanel> |
| | | <ItemsPanelTemplate> |
| | | <StackPanel Orientation="Horizontal"/> |
| | |
| | | </DataTemplate> |
| | | </DataGridTemplateColumn.CellTemplate> |
| | | </DataGridTemplateColumn> |
| | | <DataGridTextColumn Width="*" Binding="{Binding DBAddress}" Header="DB地址" /> |
| | | <DataGridTextColumn Width="*" Binding="{Binding StartAddress}" Header="起始地址" /> |
| | | <DataGridTextColumn Width="*" Binding="{Binding Length}" Header="DB长度" /> |
| | | <DataGridTemplateColumn Header="操作" Width="100" IsReadOnly="True" CanUserResize="False"> |
| | | <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 RowLink}" |
| | | Style="{StaticResource EditLink}" |
| | | Margin="0,0,10,0" |
| | | Click="Button_Click" |
| | | DataContext="{Binding }">编辑</Button> |
| | | DataContext="{Binding }"/> |
| | | <Button x:Name="delBtn" Tag="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGridRow},AncestorLevel=1}}" |
| | | Style="{StaticResource DangerLinkButton}" |
| | | Style="{StaticResource DeleteLink}" |
| | | DataContext="{Binding }" |
| | | Click="Button_Click">删除</Button> |
| | | Click="Button_Click"/> |
| | | </StackPanel> |
| | | </DataTemplate> |
| | | </DataGridTemplateColumn.CellTemplate> |