优化
This commit is contained in:
@@ -351,7 +351,7 @@ namespace ShrlAlgoToolkit.RevitAddins.Assists
|
||||
//读取参数信息
|
||||
var root = document.DocumentElement;
|
||||
//节点前缀的命名空间
|
||||
var nameSpace = root.GetNamespaceOfui:InputAssist.Prefix("A");
|
||||
var nameSpace = root.GetNamespaceOfPrefix("A");
|
||||
//string nameSpace = root.NamespaceURI;
|
||||
var nsmgr = new XmlNamespaceManager(document.NameTable);
|
||||
;
|
||||
|
||||
@@ -69,8 +69,12 @@
|
||||
Command="{Binding PlaceFloorCommand}"
|
||||
Content="布置"
|
||||
Grid.Row="3"
|
||||
HorizontalAlignment="Stretch"
|
||||
ui:ButtonAssist.Icon="{ui:FontIcon Glyph=,
|
||||
FontFamily={StaticResource BoxIcons}}" />
|
||||
HorizontalAlignment="Stretch"
|
||||
ui:ButtonAssist.Icon="{ui:Icon Glyph=, FontFamily={StaticResource BoxIcons}, Size=16}"/>
|
||||
<!--<ui:ButtonAssist.Icon>
|
||||
<ui:IconElement />
|
||||
</ui:ButtonAssist.Icon>-->
|
||||
|
||||
|
||||
</ui:Grid>
|
||||
</ui:NeoWindow>
|
||||
@@ -41,10 +41,13 @@
|
||||
FontFamily="{StaticResource BoxIcons}"
|
||||
Grid.Row="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
ui:ButtonAssist.Icon="{ui:FontIcon Glyph=,
|
||||
FontFamily={StaticResource BoxIcons}}"
|
||||
Margin="5"
|
||||
ToolTip="{Binding FamilyPath, Mode=OneWay, StringFormat=族目录:{}{0}}" />
|
||||
ToolTip="{Binding FamilyPath, Mode=OneWay, StringFormat=族目录:{}{0}}" >
|
||||
<ui:ButtonAssist.Icon>
|
||||
<ui:IconElement Glyph=""
|
||||
FontFamily="{StaticResource BoxIcons}"/>
|
||||
</ui:ButtonAssist.Icon>
|
||||
</Button>
|
||||
<TreeView
|
||||
Grid.Row="1"
|
||||
ItemsSource="{Binding FolderTreeViewItems}"
|
||||
@@ -76,7 +79,7 @@
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</TextBox>
|
||||
<ui:ListView
|
||||
<ListView
|
||||
Grid.Column="2"
|
||||
Grid.Row="1"
|
||||
Grid.RowSpan="2"
|
||||
@@ -122,7 +125,7 @@
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>-->
|
||||
<ui:ListView.ItemContainerStyle>
|
||||
<ListView.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type ListViewItem}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
@@ -152,13 +155,13 @@
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ui:ListView.ItemContainerStyle>
|
||||
<ui:ListView.ItemsPanel>
|
||||
</ListView.ItemContainerStyle>
|
||||
<ListView.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType={x:Type ScrollContentPresenter}}}" />
|
||||
</ItemsPanelTemplate>
|
||||
</ui:ListView.ItemsPanel>
|
||||
<ui:ListView.ItemTemplate>
|
||||
</ListView.ItemsPanel>
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ui:Card Padding="0">
|
||||
<Grid Height="210" Width="170">
|
||||
@@ -189,14 +192,14 @@
|
||||
</Style>
|
||||
</StackPanel.Style>
|
||||
<Button
|
||||
Appearance="Primary"
|
||||
ui:ButtonAssist.AppearanceType="Primary"
|
||||
Command="{Binding DataContext.ImportFamilyCommand, RelativeSource={RelativeSource AncestorType={x:Type Window}, Mode=FindAncestor}}"
|
||||
CommandParameter="{Binding}"
|
||||
Content="载入"
|
||||
FontFamily="{StaticResource BoxIcons}"
|
||||
ToolTip="将族载入到当前项目" />
|
||||
<Button
|
||||
Appearance="Primary"
|
||||
ui:ButtonAssist.AppearanceType="Primary"
|
||||
Command="{Binding DataContext.LocationFamilyFileCommand, RelativeSource={RelativeSource AncestorType={x:Type Window}, Mode=FindAncestor}}"
|
||||
CommandParameter="{Binding}"
|
||||
Content="定位"
|
||||
@@ -216,8 +219,8 @@
|
||||
</Grid>
|
||||
</ui:Card>
|
||||
</DataTemplate>
|
||||
</ui:ListView.ItemTemplate>
|
||||
<ui:ListView.Template>
|
||||
</ListView.ItemTemplate>
|
||||
<ListView.Template>
|
||||
<ControlTemplate TargetType="{x:Type ListView}">
|
||||
<ScrollViewer
|
||||
HorizontalScrollBarVisibility="Disabled"
|
||||
@@ -231,15 +234,15 @@
|
||||
<WrapPanel IsItemsHost="True" ScrollViewer.CanContentScroll="True" />
|
||||
</ScrollViewer>
|
||||
</ControlTemplate>
|
||||
</ui:ListView.Template>
|
||||
</ui:ListView>
|
||||
</ListView.Template>
|
||||
</ListView>
|
||||
<GridSplitter
|
||||
Grid.Column="3"
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Center"
|
||||
ShowsPreview="True"
|
||||
Width="1" />
|
||||
<ui:DataGrid
|
||||
<DataGrid
|
||||
AutoGenerateColumns="False"
|
||||
CanUserAddRows="False"
|
||||
Grid.Column="4"
|
||||
@@ -248,11 +251,11 @@
|
||||
ItemsSource="{Binding SelectedItem.Parameters, ElementName=CbbSymbols, Mode=TwoWay}"
|
||||
Margin="5"
|
||||
d:ItemsSource="{d:SampleData}">
|
||||
<ui:DataGrid.Columns>
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Binding="{Binding Name}" Header="属性名" />
|
||||
<DataGridTextColumn Binding="{Binding Value}" Header="属性值" />
|
||||
</ui:DataGrid.Columns>
|
||||
</ui:DataGrid>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
<!--<StackPanel
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
@@ -301,11 +304,12 @@
|
||||
Grid.Row="2"
|
||||
Margin="5"
|
||||
Text="{Binding FamilyCount, Mode=OneWay, StringFormat=共计{}{0}个}" />
|
||||
<ui:InfoBar
|
||||
<ui:Alert
|
||||
Grid.Column="2"
|
||||
Grid.Row="2"
|
||||
IsOpen="{Binding ActiveSnackbar}"
|
||||
Message="{Binding Message}" />
|
||||
<!--IsOpen="{Binding ActiveSnackbar}"-->
|
||||
|
||||
<TextBlock
|
||||
Grid.Column="4"
|
||||
Grid.Row="2"
|
||||
|
||||
@@ -68,7 +68,7 @@ public partial class FamilyLibraryViewModel : ObservableObject
|
||||
private bool activeSnackbar;
|
||||
|
||||
[ObservableProperty]
|
||||
private NeoUI.Controls.InfoBar messageQueue = new();
|
||||
private NeoUI.Controls.Alert messageQueue = new();
|
||||
|
||||
[ObservableProperty]
|
||||
private string message;
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
Content="路径选择"
|
||||
Cursor="Hand"
|
||||
HorizontalAlignment="Stretch"
|
||||
ui:ButtonAssist.Icon="{ui:FontIcon '',
|
||||
ui:ButtonAssist.Icon="{ui:Icon '',
|
||||
FontFamily={StaticResource BoxIcons}}" />
|
||||
<ComboBox
|
||||
DisplayMemberPath="Title"
|
||||
@@ -93,7 +93,7 @@
|
||||
CommandParameter="{Binding SelectedItems, ElementName=FamilySaveDg}"
|
||||
Content="导出保存"
|
||||
HorizontalAlignment="Stretch"
|
||||
ui:ButtonAssist.Icon="{ui:FontIcon Glyph=,
|
||||
ui:ButtonAssist.Icon="{ui:Icon Glyph=,
|
||||
FontFamily={StaticResource BoxIcons}}" />
|
||||
</ui:Grid>
|
||||
</TabItem>
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace ShrlAlgoToolkit.RevitAddins.RvFamily;
|
||||
public partial class FamilyProcessorViewModel : ObservableObject
|
||||
{
|
||||
[ObservableProperty]
|
||||
private bool addCategoryui:InputAssist.Prefix;
|
||||
private bool addCategoryPrefix;
|
||||
|
||||
[ObservableProperty]
|
||||
private bool createCategoryFolder;
|
||||
@@ -370,7 +370,7 @@ public partial class FamilyProcessorViewModel : ObservableObject
|
||||
}
|
||||
}
|
||||
|
||||
if (AddCategoryui:InputAssist.Prefix)
|
||||
if (AddCategoryPrefix)
|
||||
{
|
||||
familyFileInfo = $"({categoryInfo}){familyFileInfo}";
|
||||
}
|
||||
|
||||
@@ -171,14 +171,14 @@ public partial class RenameFamilyViewModel : ObservableObject
|
||||
tempName = tempName.Replace(FoundText, string.IsNullOrEmpty(ReplaceText) ? string.Empty : ReplaceText);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(ui:InputAssist.PrefixText))
|
||||
if (!string.IsNullOrEmpty(PrefixText))
|
||||
{
|
||||
tempName = tempName.Insert(0, $"{ui:InputAssist.PrefixText}{Separator}");
|
||||
tempName = tempName.Insert(0, $"{PrefixText}{Separator}");
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(ui:InputAssist.SuffixText))
|
||||
if (!string.IsNullOrEmpty(SuffixText))
|
||||
{
|
||||
tempName += $"{Separator}{ui:InputAssist.SuffixText}";
|
||||
tempName += $"{Separator}{SuffixText}";
|
||||
}
|
||||
|
||||
renameItem.NewFamilyName = tempName;
|
||||
@@ -278,7 +278,7 @@ public partial class RenameFamilyViewModel : ObservableObject
|
||||
GetNewNames();
|
||||
}
|
||||
|
||||
partial void Onui:InputAssist.PrefixTextChanged(string value)
|
||||
partial void OnPrefixTextChanged(string value)
|
||||
{
|
||||
GetNewNames();
|
||||
}
|
||||
@@ -302,7 +302,7 @@ public partial class RenameFamilyViewModel : ObservableObject
|
||||
GetNewNames();
|
||||
}
|
||||
|
||||
partial void Onui:InputAssist.SuffixTextChanged(string value)
|
||||
partial void OnSuffixTextChanged(string value)
|
||||
{
|
||||
GetNewNames();
|
||||
}
|
||||
|
||||
@@ -169,14 +169,14 @@ public partial class RenameTypeViewModel : ObservableObject
|
||||
tempName = tempName.Replace(FoundText, string.IsNullOrEmpty(ReplaceText) ? string.Empty : ReplaceText);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(ui:InputAssist.PrefixText))
|
||||
if (!string.IsNullOrEmpty(PrefixText))
|
||||
{
|
||||
tempName = tempName.Insert(0, $"{ui:InputAssist.PrefixText}{Separator}");
|
||||
tempName = tempName.Insert(0, $"{PrefixText}{Separator}");
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(ui:InputAssist.SuffixText))
|
||||
if (!string.IsNullOrEmpty(SuffixText))
|
||||
{
|
||||
tempName += $"{Separator}{ui:InputAssist.SuffixText}";
|
||||
tempName += $"{Separator}{SuffixText}";
|
||||
}
|
||||
|
||||
renameItem.NewTypeName = tempName;
|
||||
@@ -266,7 +266,7 @@ public partial class RenameTypeViewModel : ObservableObject
|
||||
GetNewNames();
|
||||
}
|
||||
|
||||
partial void Onui:InputAssist.PrefixTextChanged(string value)
|
||||
partial void OnPrefixTextChanged(string value)
|
||||
{
|
||||
GetNewNames();
|
||||
}
|
||||
@@ -289,7 +289,7 @@ public partial class RenameTypeViewModel : ObservableObject
|
||||
GetNewNames();
|
||||
}
|
||||
|
||||
partial void Onui:InputAssist.SuffixTextChanged(string value)
|
||||
partial void OnSuffixTextChanged(string value)
|
||||
{
|
||||
GetNewNames();
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
Spacing="5">
|
||||
<ComboBox
|
||||
DisplayMemberPath="Name"
|
||||
Header="管道系统类型"
|
||||
ui:SelectorAssist.Placeholder="管道系统类型"
|
||||
ItemsSource="{Binding PipingSystemTypes}"
|
||||
SelectedItem="{Binding SelectedPipingSystemType}" />
|
||||
<DataGrid
|
||||
@@ -73,15 +73,15 @@
|
||||
Spacing="5">
|
||||
<ComboBox
|
||||
DisplayMemberPath="Name"
|
||||
Header="风管系统类型:"
|
||||
ui:SelectorAssist.Placeholder="风管系统类型:"
|
||||
ItemsSource="{Binding DuctSystemTypes}"
|
||||
SelectedItem="{Binding SelectedDuctSystem}" />
|
||||
<ComboBox
|
||||
DisplayMemberPath="Name"
|
||||
Header="保温层类型:"
|
||||
ui:SelectorAssist.Placeholder="保温层类型:"
|
||||
ItemsSource="{Binding DuctInsulationTypes}"
|
||||
SelectedItem="{Binding DuctInsulationItem.DuctInsulationType}" />
|
||||
<TextBox Header="保温层厚度:" Text="{Binding DuctInsulationItem.Thickness, UpdateSourceTrigger=PropertyChanged}" />
|
||||
<TextBox ui:SelectorAssist.Placeholder="保温层厚度:" Text="{Binding DuctInsulationItem.Thickness, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</ui:StackPanel>
|
||||
<StackPanel
|
||||
Grid.Column="1"
|
||||
|
||||
@@ -39,7 +39,7 @@ public partial class AnyConnectViewModel : ObservableValidator
|
||||
private double angle = 90;
|
||||
|
||||
[ObservableProperty]
|
||||
private NeoUI.Controls.InfoBar messageQueue = new();
|
||||
private NeoUI.Controls.Alert messageQueue = new();
|
||||
|
||||
[ObservableProperty]
|
||||
private string message;
|
||||
|
||||
@@ -99,8 +99,7 @@
|
||||
VerticalAlignment="Center"
|
||||
Text="排除高度低的管线(mm):" />-->
|
||||
<TextBox
|
||||
Header="排除高度低的管线:"
|
||||
HeaderPlacement="Left"
|
||||
ui:InputAssist.Placeholder="排除高度低的管线:"
|
||||
MinWidth="120"
|
||||
ui:InputAssist.Suffix="mm"
|
||||
Text="1000" />
|
||||
@@ -109,8 +108,7 @@
|
||||
VerticalAlignment="Center"
|
||||
Text="排除长度短的管线(mm):" />-->
|
||||
<TextBox
|
||||
Header="排除长度短的管线:"
|
||||
HeaderPlacement="Left"
|
||||
ui:InputAssist.Placeholder="排除长度短的管线:"
|
||||
MinWidth="120"
|
||||
ui:InputAssist.Suffix="mm"
|
||||
Text="500" />
|
||||
@@ -119,8 +117,7 @@
|
||||
VerticalAlignment="Center"
|
||||
Text="净高要求高度(mm):" />-->
|
||||
<TextBox
|
||||
Header="净高要求高度:"
|
||||
HeaderPlacement="Left"
|
||||
ui:InputAssist.Placeholder="净高要求高度:"
|
||||
MinWidth="120"
|
||||
ui:InputAssist.Suffix="mm"
|
||||
Text="2600" />
|
||||
|
||||
@@ -18,14 +18,12 @@
|
||||
<Button
|
||||
Click="Btn_Click"
|
||||
Content="隐藏元素"
|
||||
ui:ButtonAssist.Icon="{ui:SymbolIcon SlideHide20,
|
||||
False}"
|
||||
ui:ButtonAssist.Icon="{ui:Icon SymbolValue=Hide}"
|
||||
x:Name="HideElements" />
|
||||
<Button
|
||||
Click="Btn_Click"
|
||||
Content="隐藏所有"
|
||||
ui:ButtonAssist.Icon="{ui:SymbolIcon SlideHide24,
|
||||
False}"
|
||||
ui:ButtonAssist.Icon="{ui:Icon SymbolValue=Hide}"
|
||||
ToolTip="在所有视图中隐藏该元素"
|
||||
x:Name="HideElementsAll" />
|
||||
<!--<Button
|
||||
@@ -38,50 +36,42 @@
|
||||
<Button
|
||||
Click="Btn_Click"
|
||||
Content="隐藏类别"
|
||||
ui:ButtonAssist.Icon="{ui:SymbolIcon SlideHide20,
|
||||
True}"
|
||||
ui:ButtonAssist.Icon="{ui:Icon SymbolValue=Hide}"
|
||||
x:Name="HideCategories" />
|
||||
<Button
|
||||
Click="Btn_Click"
|
||||
Content="锁定元素"
|
||||
ui:ButtonAssist.Icon="{ui:SymbolIcon LockClosed20,
|
||||
False}"
|
||||
ui:ButtonAssist.Icon="{ui:Icon SymbolValue=Lock}"
|
||||
x:Name="PinElements" />
|
||||
<Button
|
||||
Click="Btn_Click"
|
||||
Content="锁定类别"
|
||||
ui:ButtonAssist.Icon="{ui:SymbolIcon LockClosed20,
|
||||
True}"
|
||||
ui:ButtonAssist.Icon="{ui:Icon SymbolValue=Lock}"
|
||||
x:Name="PinCategories" />
|
||||
<Button
|
||||
Click="Btn_Click"
|
||||
Content="解锁类别"
|
||||
ui:ButtonAssist.Icon="{ui:SymbolIcon LockOpen20,
|
||||
False}"
|
||||
ui:ButtonAssist.Icon="{ui:Icon SymbolValue=LockOpen}"
|
||||
x:Name="UnpinCategories" />
|
||||
<Button
|
||||
Click="Btn_Click"
|
||||
Content="解锁全部"
|
||||
ui:ButtonAssist.Icon="{ui:SymbolIcon LockOpen20,
|
||||
True}"
|
||||
ui:ButtonAssist.Icon="{ui:Icon SymbolValue=Lock}"
|
||||
x:Name="UnpinAllElements" />
|
||||
<Button
|
||||
Click="Btn_Click"
|
||||
Content="隔离元素"
|
||||
ui:ButtonAssist.Icon="{ui:SymbolIcon SearchVisual20,
|
||||
False}"
|
||||
ui:ButtonAssist.Icon="{ui:Icon SymbolValue=Search}"
|
||||
x:Name="IsolateElements" />
|
||||
<Button
|
||||
Click="Btn_Click"
|
||||
Content="隔离类别"
|
||||
ui:ButtonAssist.Icon="{ui:SymbolIcon SearchVisual20,
|
||||
True}"
|
||||
ui:ButtonAssist.Icon="{ui:Icon SymbolValue=Search}"
|
||||
x:Name="IsolateCategories" />
|
||||
<Button
|
||||
Click="Btn_Click"
|
||||
Content="显示隐藏"
|
||||
ui:ButtonAssist.Icon="{ui:SymbolIcon Eye20,
|
||||
True}"
|
||||
ui:ButtonAssist.Icon="{ui:Icon SymbolValue=Looks}"
|
||||
x:Name="RevealHiddenElements" />
|
||||
</ui:StackPanel>
|
||||
</Grid>
|
||||
|
||||
@@ -29,7 +29,7 @@ public partial class ElementsControlDock : Page, IDockablePaneProvider
|
||||
|
||||
private void Btn_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var btn = (NeoUI.Controls.Button)sender;
|
||||
var btn = (Button)sender;
|
||||
|
||||
ElementClassFilter instanceFilter = new(typeof(FamilyInstance));
|
||||
ElementClassFilter hostFilter = new(typeof(HostObject));
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<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 Theme="Dark" />
|
||||
<ui:ThemesDictionary Mode="Dark" />
|
||||
<ui:ControlsDictionary />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<!--#region Fonts-->
|
||||
|
||||
Reference in New Issue
Block a user