整理代码
This commit is contained in:
@@ -1,36 +1,38 @@
|
||||
<ui:NeoWindow
|
||||
Title="曲线布置"
|
||||
Width="500"
|
||||
d:DataContext="{d:DesignInstance Type=local:ModelByCurveCreatorViewModel}"
|
||||
mc:Ignorable="d"
|
||||
x:Class="ShrlAlgoToolkit.RevitAddins.RvCommon.ModelByCurveCreatorView"
|
||||
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.RvCommon"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:rvCommon="clr-namespace:ShrlAlgoToolkit.RevitAddins.RvCommon"
|
||||
xmlns:ui="https://github.com/ShrlAlgo/NeoUI"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
Title="曲线布置"
|
||||
Width="500"
|
||||
Height="400"
|
||||
d:DataContext="{d:DesignInstance Type=local:ModelByCurveCreatorViewModel}"
|
||||
Icon="{DynamicResource RevitIcon}"
|
||||
mc:Ignorable="d">
|
||||
<Window.Resources>
|
||||
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
|
||||
</Window.Resources>
|
||||
<ui:Grid Columns="*" Rows="*,Auto,Auto">
|
||||
<ui:Grid
|
||||
Grid.Row="0"
|
||||
ChildMargin="5"
|
||||
Columns="*,*"
|
||||
Grid.Row="0"
|
||||
Rows="*">
|
||||
<GroupBox
|
||||
Grid.Column="0"
|
||||
Grid.Row="0"
|
||||
Header="沿线放样"
|
||||
VerticalAlignment="Stretch">
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Stretch"
|
||||
Header="沿线放样">
|
||||
<ui:StackPanel Spacing="5">
|
||||
<ComboBox
|
||||
ui:SelectorAssist.Placeholder="请选择轮廓类型"
|
||||
ItemTemplate="{StaticResource MultiDisplayMemberPath}"
|
||||
ItemsSource="{Binding ProfileFamilyTypes, Mode=OneWay}"
|
||||
ui:InputAssist.Placeholder="请选择轮廓类型"
|
||||
SelectedItem="{Binding SelectedProfileFamilyType, UpdateSourceTrigger=PropertyChanged}"
|
||||
ToolTip="选择轮廓类型,未选择则不创建,
右键点击清除选择">
|
||||
<b:Interaction.Triggers>
|
||||
@@ -40,9 +42,9 @@
|
||||
</b:Interaction.Triggers>
|
||||
</ComboBox>
|
||||
<ComboBox
|
||||
ui:SelectorAssist.Placeholder="请选择放样的材质"
|
||||
DisplayMemberPath="Name"
|
||||
ItemsSource="{Binding Materials, Mode=OneWay}"
|
||||
ui:InputAssist.Placeholder="请选择放样的材质"
|
||||
SelectedItem="{Binding SelectedMaterial, UpdateSourceTrigger=PropertyChanged}"
|
||||
ToolTip="选择放样模型材质,未选择则为默认材质,
右键点击清除选择">
|
||||
<b:Interaction.Triggers>
|
||||
@@ -52,29 +54,29 @@
|
||||
</b:Interaction.Triggers>
|
||||
</ComboBox>
|
||||
<TextBox
|
||||
InputMethod.IsInputMethodEnabled="False"
|
||||
ui:InputAssist.Prefix="偏移距离X:"
|
||||
ui:InputAssist.Suffix="mm"
|
||||
InputMethod.IsInputMethodEnabled="False"
|
||||
Text="{Binding OffsetX, StringFormat={}{0:N2}, UpdateSourceTrigger=PropertyChanged}"
|
||||
ToolTip="向右偏移设置为正值,
向左偏移为负值" />
|
||||
<TextBox
|
||||
InputMethod.IsInputMethodEnabled="False"
|
||||
ui:InputAssist.Prefix="偏移距离Y:"
|
||||
ui:InputAssist.Suffix="mm"
|
||||
InputMethod.IsInputMethodEnabled="False"
|
||||
Text="{Binding OffsetY, StringFormat={}{0:N2}, UpdateSourceTrigger=PropertyChanged}"
|
||||
ToolTip="向上偏移设置为正值,
向下偏移为负值" />
|
||||
</ui:StackPanel>
|
||||
</GroupBox>
|
||||
<GroupBox
|
||||
Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
Header="沿线布置"
|
||||
VerticalAlignment="Stretch">
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Stretch"
|
||||
Header="沿线布置">
|
||||
<ui:StackPanel Spacing="5">
|
||||
<ComboBox
|
||||
ui:SelectorAssist.Placeholder="请选择实例类型"
|
||||
ItemTemplate="{StaticResource MultiDisplayMemberPath}"
|
||||
ItemsSource="{Binding FamilyTypes, Mode=OneWay}"
|
||||
ui:InputAssist.Placeholder="请选择实例类型"
|
||||
SelectedItem="{Binding SelectedFamilyType, UpdateSourceTrigger=PropertyChanged}"
|
||||
ToolTip="选择需要布置的族实例,未选择则不创建,
右键点击清除选择">
|
||||
<b:Interaction.Triggers>
|
||||
@@ -84,20 +86,20 @@
|
||||
</b:Interaction.Triggers>
|
||||
</ComboBox>
|
||||
<TextBox
|
||||
InputMethod.IsInputMethodEnabled="False"
|
||||
ui:InputAssist.Prefix="水平间距:"
|
||||
ui:InputAssist.Suffix="mm"
|
||||
InputMethod.IsInputMethodEnabled="False"
|
||||
Text="{Binding Spacing, StringFormat={}{0:N2}, UpdateSourceTrigger=PropertyChanged}" />
|
||||
<TextBox
|
||||
InputMethod.IsInputMethodEnabled="False"
|
||||
ui:InputAssist.Prefix="偏移距离X:"
|
||||
ui:InputAssist.Suffix="mm"
|
||||
InputMethod.IsInputMethodEnabled="False"
|
||||
Text="{Binding InstanceOffsetX, StringFormat={}{0:N2}, UpdateSourceTrigger=PropertyChanged}"
|
||||
ToolTip="向右偏移设置为正值,
向左偏移为负值" />
|
||||
<TextBox
|
||||
InputMethod.IsInputMethodEnabled="False"
|
||||
ui:InputAssist.Prefix="偏移距离Y:"
|
||||
ui:InputAssist.Suffix="mm"
|
||||
InputMethod.IsInputMethodEnabled="False"
|
||||
Text="{Binding InstanceOffsetY, StringFormat={}{0:N2}, UpdateSourceTrigger=PropertyChanged}"
|
||||
ToolTip="向上偏移设置为正值,
向下偏移为负值" />
|
||||
</ui:StackPanel>
|
||||
@@ -105,9 +107,9 @@
|
||||
</ui:Grid>
|
||||
<GroupBox
|
||||
Grid.Row="1"
|
||||
Header="中心线类型"
|
||||
Margin="5">
|
||||
<UniformGrid Rows="1" VerticalAlignment="Center">
|
||||
Margin="5"
|
||||
Header="中心线类型">
|
||||
<UniformGrid VerticalAlignment="Center" Rows="1">
|
||||
<RadioButton
|
||||
Content="模型线"
|
||||
IsChecked="{Binding CenterCurveType, ConverterParameter={x:Static rvCommon:CenterCurveType.ModelCurve}, Converter={StaticResource ComparisonConverter}}"
|
||||
@@ -127,20 +129,20 @@
|
||||
Margin="5"
|
||||
Rows="1">
|
||||
<TextBox
|
||||
InputMethod.IsInputMethodEnabled="False"
|
||||
ui:InputAssist.Prefix="最小细分长度:"
|
||||
ui:InputAssist.Suffix="m"
|
||||
InputMethod.IsInputMethodEnabled="False"
|
||||
Text="{Binding Precision, UpdateSourceTrigger=PropertyChanged}"
|
||||
ToolTip="数值越小,越拟合原曲线,
建议模型线(由于单条曲线较长)取值小一些,dwg的曲线(由于单条曲线较短)取值大一些" />
|
||||
<CheckBox
|
||||
Content="两侧布置"
|
||||
HorizontalAlignment="Center"
|
||||
Content="两侧布置"
|
||||
IsChecked="{Binding IsTwoSides}"
|
||||
ToolTip="在中心线两侧布置放样(会合并)和实例" />
|
||||
<Button
|
||||
HorizontalAlignment="Stretch"
|
||||
Command="{Binding CreateTrackCommand}"
|
||||
Content="创建"
|
||||
HorizontalAlignment="Stretch" />
|
||||
Content="创建" />
|
||||
</UniformGrid>
|
||||
</ui:Grid>
|
||||
</ui:NeoWindow>
|
||||
|
||||
Reference in New Issue
Block a user