修复窗口大小问题

This commit is contained in:
ShrlAlgo
2025-09-19 09:18:09 +08:00
parent d71019ac38
commit 3fc465959b
34 changed files with 592 additions and 238 deletions

View File

@@ -10,7 +10,7 @@
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
Title="整理管线"
Width="270"
MinHeight="180"
Height="180"
d:DataContext="{d:DesignInstance Type=local:ArrangeMEPCurveViewModel}"
SizeToContent="Height"

View File

@@ -9,8 +9,8 @@
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="线缆布置"
MinWidth="250"
MinHeight="200"
Width="250"
Height="250"
d:DataContext="{d:DesignInstance Type=electricDesign:CableLayoutViewModel}"
SizeToContent="Height"
mc:Ignorable="d">
@@ -41,7 +41,10 @@
ItemsSource="{Binding Sizes}"
SelectedValue="{Binding Size, UpdateSourceTrigger=PropertyChanged}"
SelectedValuePath="Value" />
<TextBox materialDesign:HintAssist.Hint="线缆数量" InputMethod.IsInputMethodEnabled="False" Text="{Binding Count, UpdateSourceTrigger=PropertyChanged}" />
<TextBox
materialDesign:HintAssist.Hint="线缆数量"
InputMethod.IsInputMethodEnabled="False"
Text="{Binding Count, UpdateSourceTrigger=PropertyChanged}" />
<Button Margin="5,15,5,5" Content="布置">
<b:Interaction.Triggers>
<b:EventTrigger EventName="Click">

View File

@@ -12,8 +12,6 @@
Title="避让处理"
Width="300"
Height="520"
MinWidth="200"
MinHeight="250"
d:DataContext="{d:DesignInstance Type=mep:ClashResolveViewModel}"
SizeToContent="Height"
mc:Ignorable="d">
@@ -39,8 +37,14 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<GroupBox Grid.Row="0" Grid.Column="0" Header="角度(°)">
<UniformGrid Height="180" Columns="3" Rows="3">
<GroupBox
Grid.Row="0"
Grid.Column="0"
Header="角度(°)">
<UniformGrid
Height="180"
Columns="3"
Rows="3">
<RadioButton Content="15°">
<RadioButton.IsChecked>
<Binding Converter="{StaticResource ComparisonConverter}" Path="Angle">
@@ -106,8 +110,14 @@
Rows="1">
<GroupBox Header="参考方式">
<UniformGrid Rows="1">
<RadioButton Content="手动" IsChecked="{Binding LocationType, Converter={StaticResource ComparisonConverter}, ConverterParameter={x:Static mep:LocationType.Manual}}" ToolTip="手动选取两点" />
<RadioButton Content="参考" IsChecked="{Binding LocationType, Converter={StaticResource ComparisonConverter}, ConverterParameter={x:Static mep:LocationType.Reference}}" ToolTip="选择相交的两条管线,将翻弯管线偏移一定距离" />
<RadioButton
Content="手动"
IsChecked="{Binding LocationType, Converter={StaticResource ComparisonConverter}, ConverterParameter={x:Static mep:LocationType.Manual}}"
ToolTip="手动选取两点" />
<RadioButton
Content="参考"
IsChecked="{Binding LocationType, Converter={StaticResource ComparisonConverter}, ConverterParameter={x:Static mep:LocationType.Reference}}"
ToolTip="选择相交的两条管线,将翻弯管线偏移一定距离" />
</UniformGrid>
</GroupBox>
<GroupBox Header="调整方式">
@@ -126,7 +136,10 @@
</UniformGrid>
</GroupBox>
<UniformGrid Grid.Row="3" Columns="2">
<TextBox md:HintAssist.Hint="偏移量" md:TextFieldAssist.SuffixText="mm" Text="{Binding Offset, UpdateSourceTrigger=PropertyChanged}" />
<TextBox
md:HintAssist.Hint="偏移量"
md:TextFieldAssist.SuffixText="mm"
Text="{Binding Offset, UpdateSourceTrigger=PropertyChanged}" />
<Button Command="{Binding ResolveCommand}" Content="调整" />
</UniformGrid>

View File

@@ -11,10 +11,8 @@
Title="快速剖面"
Width="250"
Height="180"
MinHeight="180"
d:DataContext="{d:DesignInstance Type=local:QuickViewSectionViewModel}"
SizeToContent="Height"
mc:Ignorable="d">
<controls:MaterialWindow.Resources>
<ResourceDictionary Source="pack://application:,,,/Szmedi.RvKits;component/WPFUI.xaml" />
@@ -22,7 +20,10 @@
<StackPanel Margin="5">
<GroupBox Grid.Row="0" Header="剖面线">
<UniformGrid Rows="1">
<RadioButton HorizontalAlignment="Center" Content="平行" IsChecked="{Binding IsParallel}" />
<RadioButton
HorizontalAlignment="Center"
Content="平行"
IsChecked="{Binding IsParallel}" />
<RadioButton
x:Name="Perpendicular"
HorizontalAlignment="Center"
@@ -31,7 +32,10 @@
</UniformGrid>
</GroupBox>
<UniformGrid Rows="1">
<Button HorizontalAlignment="Stretch" Command="{Binding CreateViewSectionCommand}" Content="创建" />
<Button
HorizontalAlignment="Stretch"
Command="{Binding CreateViewSectionCommand}"
Content="创建" />
<Button
Margin="5"
HorizontalAlignment="Stretch"

View File

@@ -11,11 +11,8 @@
Title="旋转实例"
Width="250"
Height="340"
MinWidth="250"
MinHeight="300"
SizeToContent="Height"
d:DataContext="{d:DesignInstance Type={x:Type local:RotateMEPViewModel}}"
SizeToContent="Height"
mc:Ignorable="d">
<controls:MaterialWindow.Resources>
<ResourceDictionary Source="pack://application:,,,/Szmedi.RvKits;component/WPFUI.xaml" />
@@ -26,7 +23,10 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<GroupBox Grid.Row="0" Grid.Column="0" Header="角度(°)">
<GroupBox
Grid.Row="0"
Grid.Column="0"
Header="角度(°)">
<UniformGrid Columns="3" Rows="3">
<RadioButton Content="15°">
<RadioButton.IsChecked>

View File

@@ -11,8 +11,6 @@
Title="创建立管"
Width="250"
Height="320"
MinWidth="250"
MinHeight="280"
d:DataContext="{d:DesignInstance mep:StandMepCurveViewModel}"
SizeToContent="Height"
WindowStartupLocation="CenterOwner"
@@ -34,7 +32,10 @@
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<StackPanel>
<RadioButton x:Name="RbPipe" Content="水管" IsChecked="{Binding IsPipe}" />
<RadioButton
x:Name="RbPipe"
Content="水管"
IsChecked="{Binding IsPipe}" />
<StackPanel Visibility="{Binding IsPipe, Converter={x:Static md:BooleanToVisibilityConverter.CollapsedInstance}}">
<ComboBox
md:HintAssist.Hint="管道类型"
@@ -47,7 +48,10 @@
ItemsSource="{Binding PipeSystemTypes}"
SelectedItem="{Binding SelectedPipeSystemType}" />
</StackPanel>
<RadioButton x:Name="RbDuct" Content="风管" IsChecked="{Binding IsDuct}" />
<RadioButton
x:Name="RbDuct"
Content="风管"
IsChecked="{Binding IsDuct}" />
<StackPanel Visibility="{Binding IsDuct, Converter={x:Static md:BooleanToVisibilityConverter.CollapsedInstance}}">
<ComboBox
md:HintAssist.Hint="风管类型"
@@ -60,14 +64,20 @@
ItemsSource="{Binding DuctSystemTypes}"
SelectedItem="{Binding SelectedDuctSystemType}" />
</StackPanel>
<RadioButton x:Name="RbConduit" Content="线管" IsChecked="{Binding IsConduit}" />
<RadioButton
x:Name="RbConduit"
Content="线管"
IsChecked="{Binding IsConduit}" />
<ComboBox
md:HintAssist.Hint="线管类型"
ItemTemplate="{StaticResource MultiDisplayMemberPath}"
ItemsSource="{Binding ConduitTypes}"
SelectedItem="{Binding SelectedConduitType}"
Visibility="{Binding IsConduit, Converter={x:Static md:BooleanToVisibilityConverter.CollapsedInstance}}" />
<RadioButton x:Name="RbCableTray" Content="桥架" IsChecked="{Binding IsCableTray}" />
<RadioButton
x:Name="RbCableTray"
Content="桥架"
IsChecked="{Binding IsCableTray}" />
<ComboBox
md:HintAssist.Hint="桥架类型"
ItemTemplate="{StaticResource MultiDisplayMemberPath}"