配色更新

This commit is contained in:
GG Z
2025-08-26 21:33:20 +08:00
parent ce4cc7bed0
commit e5f139264e
47 changed files with 432 additions and 606 deletions

View File

@@ -1,24 +1,27 @@
<wpf:NeoWindow
MinHeight="500"
Title="模型检查"
Width="600"
d:DataContext="{d:DesignInstance modelManager:ModelCheckViewModel}"
mc:Ignorable="d"
<n:NeoWindow
x:Class="ShrlAlgoToolkit.RevitAddins.ModelManager.ModelCheckView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ShrlAlgoToolkit.RevitAddins.RvFamily"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:modelManager="clr-namespace:ShrlAlgoToolkit.RevitAddins.ModelManager"
xmlns:wpf="https://github.com/ShrlAlgo/NeoUI"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:n="https://github.com/ShrlAlgo/NeoUI"
Title="模型检查"
Width="600"
MinHeight="500"
d:DataContext="{d:DesignInstance modelManager:ModelCheckViewModel}"
mc:Ignorable="d">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
<!--<ResourceDictionary Source="pack://application:,,,/NeoUI;component/Themes/Light.xaml" />
<ResourceDictionary Source="pack://application:,,,/NeoUI;component/Themes/ColorPalette/LightBlue.xaml"/>
<ResourceDictionary Source="pack://application:,,,/NeoUI;component/Themes/Styles.xaml" />-->
</ResourceDictionary.MergedDictionaries>
<Style TargetType="{x:Type GroupItem}" x:Key="GroupHeaderStyle">
<Style x:Key="GroupHeaderStyle" TargetType="{x:Type GroupItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GroupItem}">
@@ -34,14 +37,14 @@
</Style>
</ResourceDictionary>
</Window.Resources>
<wpf:Grid
<n:Grid
ChildMargin="5"
Columns="*,Auto"
Rows="*,Auto,Auto">
<DataGrid
Grid.ColumnSpan="2"
AutoGenerateColumns="False"
CanUserAddRows="False"
Grid.ColumnSpan="2"
IsReadOnly="True"
ItemsSource="{Binding Items}"
ToolTip="双击行可快速定位">
@@ -87,20 +90,17 @@
<DataGridTextColumn Binding="{Binding Element.Room.Name}" Header="房间" />
</DataGrid.Columns>
</DataGrid>
<StackPanel
<UniformGrid
Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="2"
Grid.Row="1">
<wpf:Card>
<TextBlock Text="{Binding ProjectBasePoint, StringFormat=项目基点:{}{0}}" />
</wpf:Card>
<wpf:Card>
<TextBlock Text="{Binding SharedBasePoint, StringFormat=测量点:{}{0}}" />
</wpf:Card>
</StackPanel>
Columns="1">
<n:Card Content="{Binding ProjectBasePoint, StringFormat=项目基点:{}{0}}" />
<n:Card Content="{Binding SharedBasePoint, StringFormat=测量点:{}{0}}" />
</UniformGrid>
<UniformGrid
Grid.Column="0"
Grid.Row="2"
Grid.Column="0"
Rows="3">
<CheckBox
Content="管线坡度"
@@ -132,30 +132,21 @@
ToolTip="检查管线是否重叠" />
</UniformGrid>
<UniformGrid
Grid.Column="1"
Grid.Row="2"
Grid.Column="1"
Rows="2">
<UniformGrid Rows="2">
<TextBlock Text="{Binding ErrorCount, Mode=TwoWay, StringFormat=错误数量:{}{0}}" TextWrapping="WrapWithOverflow" />
<CheckBox Content="使用剖切框" IsChecked="{Binding UseSectionBox}" />
</UniformGrid>
<UniformGrid Rows="2">
<Button
Command="{Binding CheckModelCommand}"
Content="模型检查"
Margin="5"
Width="80" />
<Button
Command="{Binding ExportToExcelCommand}"
Content="导出结果"
Width="80" />
<Button Command="{Binding CheckModelCommand}" Content="模型检查" />
<Button Command="{Binding ExportToExcelCommand}" Content="导出结果" />
<Button
Command="{Binding ModifyModelCommand}"
Content="矫正错误"
Margin="5"
ToolTip="对参照标高进行修改、立管坡度修正"
Width="80" />
ToolTip="对参照标高进行修改、立管坡度修正" />
</UniformGrid>
</UniformGrid>
</wpf:Grid>
</wpf:NeoWindow>
</n:Grid>
</n:NeoWindow>

View File

@@ -1,4 +1,8 @@
namespace ShrlAlgoToolkit.RevitAddins.ModelManager
using System.Windows;
using NeoUI.Appearance;
namespace ShrlAlgoToolkit.RevitAddins.ModelManager
{
/// <summary>
/// ModelCheckView.xaml 的交互逻辑
@@ -7,7 +11,9 @@
{
public ModelCheckView()
{
//this.Style = (Style)this.FindResource("NeoWindowStyle");
InitializeComponent();
//ThemeManager.ApplyResourcesToElement(this);
}
}
}

View File

@@ -43,7 +43,7 @@
<DataGrid.Columns>
<DataGridCheckBoxColumn
Binding="{Binding IsSelected, Mode=OneWayToSource, RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}}}"
ElementStyle="{StaticResource DataGridCheckBoxElementDefaultStyle}"
ElementStyle="{StaticResource DataGridCheckBox}"
Header="选择"
Width="60" />
<DataGridTextColumn Binding="{Binding FamilyCategory.Name}" Header="族类别" />
@@ -122,7 +122,7 @@
<DataGrid.Columns>
<DataGridCheckBoxColumn
Binding="{Binding IsSelected, Mode=OneWayToSource, RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}}}"
ElementStyle="{StaticResource DataGridCheckBoxElementDefaultStyle}"
ElementStyle="{StaticResource DataGridCheckBox}"
Header="选择"
Width="60" />
<DataGridTextColumn Binding="{Binding FamilyCategory.Name}" Header="族类别" />

View File

@@ -8,25 +8,17 @@
xmlns:ui="https://github.com/ShrlAlgo/NeoUI"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<!--<materialDesign:BundledTheme
BaseTheme="Light"
PrimaryColor="LightBlue"
SecondaryColor="Green" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Dark.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesign3.Defaults.xaml" />-->
<!--<ResourceDictionary Source="pack://application:,,,/Wpf.Ui;component/Resources/Theme/Dark.xaml" />
<ResourceDictionary Source="pack://application:,,,/Wpf.Ui;component/Resources/Wpf.Ui.xaml" />-->
<ui:ThemesDictionary Mode="Dark" />
<ui:ControlsDictionary />
<ResourceDictionary Source="pack://application:,,,/NeoUI;component/Themes/Light.xaml" />
<ResourceDictionary Source="pack://application:,,,/NeoUI;component/Themes/ColorPalette/LightBlue.xaml"/>
<ResourceDictionary Source="pack://application:,,,/NeoUI;component/Themes/Styles.xaml" />
<!--<ui:ThemesDictionary Mode="Light" Palette="Blue"/>
<ui:ControlsDictionary/>-->
</ResourceDictionary.MergedDictionaries>
<!--#region Fonts-->
<!--<FontFamily x:Key="SegoeFluentIcons">pack://application:,,,/ShrlAlgo.RvKits;component/Fonts/#Segoe Fluent Icons</FontFamily>
<FontFamily x:Key="FontAwesome">pack://application:,,,/ShrlAlgo.RvKits;component/Fonts/#Font Awesome 6 Free Regular</FontFamily>-->
<!--<FontFamily x:Key="IconFont">pack://application:,,,/ShrlAlgo.RvKits;component/Fonts/#iconfont</FontFamily>-->
<FontFamily x:Key="BoxIcons">pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/Fonts/#BoxIcons</FontFamily>
<FontFamily x:Key="SourceHanSansSC">pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/Fonts/#Source Han Sans SC</FontFamily>
<!--#endregion-->
<!--<Viewbox x:Key="RevitIcon">
<Grid>
<Path Data="M821.333333 912H202.666667a26.666667 26.666667 0 0 1-26.666667-26.666667V138.666667a26.666667 26.666667 0 0 1 26.666667-26.666667h477.792L848 279.541333V885.333333a26.666667 26.666667 0 0 1-26.666667 26.666667z" Fill="#138FFB" />
@@ -58,17 +50,6 @@
<converters:ColorToBrushConverter x:Key="ColorToBrushConverter" />
<converters:ComparisonConverter x:Key="ComparisonConverter" />
<!--#endregion-->
<Style TargetType="ui:NeoWindow">
<!-- <Setter Property="ui:Design.Background" Value="{DynamicResource WindowBackground}" /> -->
<!-- <Setter Property="ui:Design.Foreground" Value="{DynamicResource WindowForeground}" /> -->
<Setter Property="FontFamily" Value="{StaticResource SourceHanSansSC}" />
<Setter Property="SizeToContent" Value="Height" />
<Setter Property="ShowInTaskbar" Value="False" />
<Setter Property="MaxHeight" Value="800" />
<!--<Setter Property="TitleIcon" Value="{ui:SymbolIcon Toolbox20}" />-->
<!--<Setter Property="TitleIcon" Value="{ui:ImageIcon Resources/revit-Fill.png}" />-->
</Style>
<DataTemplate DataType="{x:Type familyLibrary:FamilyModel}" x:Key="FamilyGalleryItemTemplate">
<Grid>