2026-01-02 17:30:41 +08:00
|
|
|
<ui:MelWindow
|
2026-02-22 20:03:42 +08:00
|
|
|
Height="450"
|
|
|
|
|
Icon="{DynamicResource RevitIcon}"
|
|
|
|
|
Title="{Binding WinTitle}"
|
|
|
|
|
Width="800"
|
|
|
|
|
d:DataContext="{d:DesignInstance Type=windows:MessageViewModel}"
|
|
|
|
|
mc:Ignorable="d"
|
|
|
|
|
x:Class="ShrlAlgoToolkit.RevitAddins.Common.Controls.MessageWin"
|
2024-09-22 11:05:41 +08:00
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
|
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
2026-02-22 20:03:42 +08:00
|
|
|
xmlns:local="clr-namespace:ShrlAlgoToolkit.RevitAddins.Common.Controls"
|
2024-09-22 11:05:41 +08:00
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
2026-01-02 17:30:41 +08:00
|
|
|
xmlns:ui="https://github.com/ShrlAlgo/Melskin"
|
2026-02-22 20:03:42 +08:00
|
|
|
xmlns:windows="clr-namespace:ShrlAlgoToolkit.RevitAddins.Common.Controls"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
2024-09-22 11:05:41 +08:00
|
|
|
<Window.Resources>
|
2025-04-24 20:56:10 +08:00
|
|
|
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
|
2024-09-22 11:05:41 +08:00
|
|
|
</Window.Resources>
|
|
|
|
|
<!--<Window.DataContext>
|
|
|
|
|
<local:ErrorResolveViewModel />
|
|
|
|
|
</Window.DataContext>-->
|
2025-04-24 20:56:10 +08:00
|
|
|
<ui:StackPanel Margin="5" Spacing="5">
|
2024-09-22 11:05:41 +08:00
|
|
|
<DataGrid
|
|
|
|
|
AutoGenerateColumns="False"
|
|
|
|
|
CanUserAddRows="False"
|
|
|
|
|
IsReadOnly="True"
|
|
|
|
|
ItemsSource="{Binding ErrorModels}"
|
2026-02-22 20:03:42 +08:00
|
|
|
ToolTip="双击行可快速定位"
|
|
|
|
|
ui:StackPanel.Fill="Fill">
|
2024-09-22 11:05:41 +08:00
|
|
|
<b:Interaction.Triggers>
|
|
|
|
|
<b:EventTrigger EventName="MouseDoubleClick">
|
|
|
|
|
<b:InvokeCommandAction Command="{Binding ShowElementCommand}" CommandParameter="{Binding SelectedItem, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=DataGrid}}" />
|
|
|
|
|
</b:EventTrigger>
|
|
|
|
|
</b:Interaction.Triggers>
|
|
|
|
|
<DataGrid.Columns>
|
|
|
|
|
<DataGridTextColumn Binding="{Binding Element.Category.Name}" Header="类别名称" />
|
|
|
|
|
<DataGridTextColumn Binding="{Binding Element.Name}" Header="元素名称" />
|
|
|
|
|
<DataGridTextColumn Binding="{Binding Host.Name}" Header="主体" />
|
|
|
|
|
<DataGridTextColumn Binding="{Binding Element.Id}" Header="元素Id" />
|
|
|
|
|
<DataGridTextColumn Binding="{Binding ErrorMessage}" Header="错误信息" />
|
|
|
|
|
<DataGridTemplateColumn Header="操作">
|
|
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
<!-- 按钮参数绑定到当前行的绑定的Item -->
|
|
|
|
|
<Button
|
|
|
|
|
Command="{Binding DataContext.ShowElementCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=DataGrid}}"
|
|
|
|
|
CommandParameter="{Binding}"
|
|
|
|
|
Content="定位构件" />
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
|
|
</DataGridTemplateColumn>
|
|
|
|
|
</DataGrid.Columns>
|
|
|
|
|
</DataGrid>
|
2025-04-24 20:56:10 +08:00
|
|
|
<ui:StackPanel Grid.Row="1" Orientation="Horizontal">
|
2026-02-22 20:03:42 +08:00
|
|
|
<ui:Heading Text="注:错误需人处理、或无法处理" ui:StackPanel.Fill="Fill" />
|
2024-09-22 11:05:41 +08:00
|
|
|
<TextBlock Text="{Binding Count, StringFormat=错误数量:{0}}" />
|
|
|
|
|
<TextBlock Text="{Binding Footer}" />
|
2025-04-24 20:56:10 +08:00
|
|
|
</ui:StackPanel>
|
|
|
|
|
</ui:StackPanel>
|
2026-01-02 17:30:41 +08:00
|
|
|
</ui:MelWindow>
|