| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639 |
- <UserControl x:Class="TeamAAS_VP.Views.Product.ProductHome"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:prism="http://prismlibrary.com/"
- xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
- xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
- xmlns:local="clr-namespace:TeamAAS_VP.Models"
- xmlns:localview="clr-namespace:TeamAAS_VP.Views.Product"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:vm="clr-namespace:TeamAAS_VP.ViewModels.Product"
- xmlns:lex="http://wpflocalizeextension.codeplex.com"
- lex:LocalizeDictionary.DesignCulture="zh-CN"
- lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
- lex:ResxLocalizationProvider.DefaultDictionary="Lang"
- prism:ViewModelLocator.AutoWireViewModel="True"
- mc:Ignorable="d"
- d:DataContext="{d:DesignInstance Type=vm:ProductHomeViewModel}"
- d:Height="600"
- d:Width="1024"
- d:Background="White"
- FontFamily="{DynamicResource DefaultFont}">
- <b:Interaction.Triggers>
- <b:EventTrigger EventName="Loaded">
- <b:InvokeCommandAction Command="{Binding LoadedCommand}" />
- </b:EventTrigger>
- </b:Interaction.Triggers>
- <DockPanel LastChildFill="True">
- <!--列表-->
- <Border DockPanel.Dock="Left"
- Width="220"
- CornerRadius="0,10,10,0">
- <Border.Background>
- <LinearGradientBrush>
- <GradientStop Color="#787878"
- Offset="0" />
- <GradientStop Color="Transparent"
- Offset="1" />
- </LinearGradientBrush>
- </Border.Background>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <!--头部-->
- <Grid Grid.Row="0">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
- <StackPanel Grid.Column="0"
- Margin="10,10,0,0"
- Orientation="Horizontal">
- <materialDesign:PackIcon Kind="FormatListBulleted"
- VerticalAlignment="Top" />
- <TextBlock Text="{lex:Loc 产品列表}"
- Margin="10,0,0,0"
- FontSize="12"
- VerticalAlignment="Top"
- TextAlignment="Center" />
- </StackPanel>
- <Button Height="35"
- Width="35"
- IsEnabled="{Binding IsAllowEdit}"
- Grid.Column="1"
- Style="{StaticResource MaterialDesignIconButton}"
- Command="{Binding CreateCommand}">
- <StackPanel Orientation="Vertical">
- <materialDesign:PackIcon Kind="PlusCircle" />
- <TextBlock Text="{lex:Loc 增加}"
- FontSize="8"
- Foreground="Black"
- HorizontalAlignment="Center"
- TextTrimming="CharacterEllipsis" />
- </StackPanel>
- </Button>
- <Button Height="35"
- Width="35"
- IsEnabled="{Binding IsAllowEdit}"
- Grid.Column="2"
- Style="{StaticResource MaterialDesignIconButton}"
- Command="{Binding RemoveCommand}"
- CommandParameter="{Binding ElementName=ModelsListBox,Path=SelectedItem}">
- <StackPanel Orientation="Vertical">
- <materialDesign:PackIcon Kind="DeleteForever" />
- <TextBlock Text="{lex:Loc 移除}"
- FontSize="8"
- Foreground="Black"
- HorizontalAlignment="Center"
- TextTrimming="CharacterEllipsis" />
- </StackPanel>
- </Button>
- <materialDesign:PopupBox IsEnabled="{Binding IsAllowEdit}"
- Grid.Column="3">
- <StackPanel Margin="5">
- <Button Command="{Binding CopyCommand}"
- CommandParameter="{Binding ElementName=ModelsListBox,Path=SelectedItem}">
- <Button.Content>
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="ContentCopy" />
- <TextBlock Text="{lex:Loc 复制}"
- Margin="3,0"
- VerticalAlignment="Center" />
- </StackPanel>
- </Button.Content>
- </Button>
- <Button Command="{Binding EditNameCommand}"
- CommandParameter="{Binding ElementName=ModelsListBox,Path=SelectedItem}">
- <Button.Content>
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="Rename" />
- <TextBlock Text="{lex:Loc 修改名称}"
- Margin="3,0"
- VerticalAlignment="Center" />
- </StackPanel>
- </Button.Content>
- </Button>
- <Button Command="{Binding SaveCommand}"
- CommandParameter="{Binding ElementName=ModelsListBox,Path=SelectedItem}">
- <Button.Content>
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="ContentSave" />
- <TextBlock Text="{lex:Loc 保存}"
- Margin="3,0"
- VerticalAlignment="Center" />
- </StackPanel>
- </Button.Content>
- </Button>
- <Button Command="{Binding SaveTemplateCommand}"
- CommandParameter="{Binding ElementName=ModelsListBox,Path=SelectedItem}">
- <Button.Content>
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="ContentSaveSettingsOutline" />
- <TextBlock Text="{lex:Loc 保存成模板}"
- Margin="3,0"
- VerticalAlignment="Center" />
- </StackPanel>
- </Button.Content>
- </Button>
- </StackPanel>
- </materialDesign:PopupBox>
- </Grid>
- </Grid>
- <!--产品列表-->
- <ListBox x:Name="ModelsListBox"
- Grid.Row="1"
- Background="Transparent"
- ItemsSource="{Binding Products}"
- SelectedItem="{Binding SelectProduct}"
- BorderBrush="White"
- BorderThickness="1"
- Margin="2,2,2,10">
- <b:Interaction.Triggers>
- <b:EventTrigger EventName="SelectionChanged">
- <b:InvokeCommandAction Command="{Binding ProductSelectionChangedCommand}"
- CommandParameter="{Binding ElementName=ModelsListBox,Path=SelectedItem}" />
- </b:EventTrigger>
- </b:Interaction.Triggers>
- <ListBox.ItemContainerStyle>
- <Style TargetType="ListBoxItem">
- <Setter Property="Background"
- Value="Transparent" />
- </Style>
- </ListBox.ItemContainerStyle>
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Border x:Name="itemBorder"
- BorderThickness="1"
- CornerRadius="8"
- Opacity="1"
- BorderBrush="#CCCCCC"
- Tag="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=localview:ProductHome}, Path=DataContext}">
- <StackPanel Orientation="Vertical"
- HorizontalAlignment="Stretch"
- Background="Transparent"
- Width="200"
- Margin="5">
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="CubeOutline">
- <materialDesign:PackIcon.Style>
- <Style TargetType="materialDesign:PackIcon">
- <Style.Triggers>
- <DataTrigger Binding="{Binding IsLoad}"
- Value="True">
- <Setter Property="Foreground"
- Value="Green" />
- <Setter Property="Width"
- Value="26" />
- <Setter Property="Height"
- Value="26" />
- </DataTrigger>
- <DataTrigger Binding="{Binding IsLoad}"
- Value="False">
- <Setter Property="Foreground"
- Value="Black" />
- <Setter Property="Width"
- Value="20" />
- <Setter Property="Height"
- Value="20" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </materialDesign:PackIcon.Style>
- </materialDesign:PackIcon>
- <TextBlock Text="{Binding Name}"
- FontSize="12"
- FontWeight="Bold"
- VerticalAlignment="Center"
- Margin="5,1"
- TextWrapping="Wrap" />
- </StackPanel>
- <TextBlock Text="{Binding NumberCode}"
- FontSize="12"
- VerticalAlignment="Center"
- Margin="5,1"
- TextWrapping="Wrap" />
- <TextBlock Text="{Binding Description}"
- FontSize="10"
- Foreground="#2c2c2c"
- Margin="5,5"
- TextWrapping="Wrap"
- TextTrimming="CharacterEllipsis" />
- </StackPanel>
- <Border.ContextMenu>
- <ContextMenu DataContext="{Binding RelativeSource={RelativeSource Self}, Path=PlacementTarget.Tag}">
- <MenuItem Header="{lex:Loc 新建}"
- Command="{Binding CreateCommand}"
- Icon="{materialDesign:PackIcon Kind=CreateNewFolderOutline}" />
- <MenuItem Header="{lex:Loc 移除}"
- Command="{Binding RemoveCommand}"
- CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}, Path=PlacementTarget.DataContext}"
- Icon="{materialDesign:PackIcon Kind=Remove}" />
- <Separator />
- <MenuItem Header="{lex:Loc 编辑}"
- Command="{Binding EditCommand}"
- CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}, Path=PlacementTarget.DataContext}"
- Icon="{materialDesign:PackIcon Kind=Edit}" />
- <MenuItem Header="{lex:Loc 复制}"
- Command="{Binding CopyCommand}"
- CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}, Path=PlacementTarget.DataContext}"
- Icon="{materialDesign:PackIcon Kind=ContentCopy}" />
- <Separator />
- <MenuItem Header="{lex:Loc 修改名称}"
- Command="{Binding EditNameCommand}"
- CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}, Path=PlacementTarget.DataContext}"
- Icon="{materialDesign:PackIcon Kind=Rename}" />
- <MenuItem Header="{lex:Loc 保存}"
- Command="{Binding SaveCommand}"
- CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}, Path=PlacementTarget.DataContext}"
- Icon="{materialDesign:PackIcon Kind=ContentSave}" />
- <MenuItem Header="{lex:Loc 保存成模板}"
- Command="{Binding SaveTemplateCommand}"
- CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}, Path=PlacementTarget.DataContext}"
- Icon="{materialDesign:PackIcon Kind=ContentSaveSettingsOutline}" />
- </ContextMenu>
- </Border.ContextMenu>
- </Border>
- <DataTemplate.Triggers>
- <Trigger SourceName="itemBorder"
- Property="IsMouseOver"
- Value="True">
- <Setter TargetName="itemBorder"
- Property="Background"
- Value="#3DB8B8" />
- </Trigger>
- </DataTemplate.Triggers>
- </DataTemplate>
- </ListBox.ItemTemplate>
- <ListBox.ContextMenu>
- <ContextMenu>
- <MenuItem Header="{lex:Loc 新建}"
- Command="{Binding CreateCommand}"
- Icon="{materialDesign:PackIcon Kind=CreateNewFolderOutline}" />
- </ContextMenu>
- </ListBox.ContextMenu>
- </ListBox>
- </Grid>
- </Border>
- <!--内容-->
- <Grid Visibility="{Binding SelectProduct,Converter={StaticResource ObjectToVisibilityConverter}}">
- <Grid.RowDefinitions>
- <RowDefinition Height="*" />
- <RowDefinition Height="auto" />
- </Grid.RowDefinitions>
- <ScrollViewer VerticalScrollBarVisibility="Auto"
- HorizontalScrollBarVisibility="Auto"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Center">
- <StackPanel Orientation="Vertical"
- HorizontalAlignment="Center"
- Margin="20">
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}">
- <lex:BLoc Key="产品名称" />
- <Binding Path="SelectProduct.Name" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}">
- <lex:BLoc Key="产品编号" />
- <Binding Path="SelectProduct.NumberCode" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}">
- <lex:BLoc Key="产品描述" />
- <Binding Path="SelectProduct.Description" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1:yyyy-MM-dd HH:mm:ss}">
- <lex:BLoc Key="最后修改时间" />
- <Binding Path="SelectProduct.DateTime" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <TreeView MinWidth="220"
- ItemsSource="{Binding SelectProduct.CameraProcedures}">
- <TreeView.ItemTemplate>
- <HierarchicalDataTemplate ItemsSource="{Binding ProcedureModels}"
- DataType="{x:Type local:ProcedureModel}">
- <HierarchicalDataTemplate.ItemTemplate>
- <HierarchicalDataTemplate>
- <StackPanel Orientation="Vertical">
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}">
- <lex:BLoc Key="流程名称" />
- <Binding Path="Name" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}">
- <lex:BLoc Key="视觉模式" />
- <Binding Path="VisionModel" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}">
- <lex:BLoc Key="机器人" />
- <Binding Path="RobotId" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <TextBlock Text="{Binding FeederId,StringFormat=Feeder:{0}}" />
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}">
- <lex:BLoc Key="相机" />
- <Binding Path="CameraId" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}">
- <lex:BLoc Key="校准" />
- <Binding Path="CalibrationId" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}us">
- <lex:BLoc Key="相机曝光时间" />
- <Binding Path="ExposureTime" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}">
- <lex:BLoc Key="相机增益" />
- <Binding Path="Gain" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}">
- <lex:BLoc Key="光源亮度" />
- <Binding Path="LightValue" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}">
- <lex:BLoc Key="触发指令" />
- <Binding Path="TriggerCommand" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}">
- <lex:BLoc Key="Feeder振动动作个数" />
- <Binding Path="FeederWorks.Count" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}">
- <lex:BLoc Key="Feeder料仓供料动作个数" />
- <Binding Path="FeederStockWorks.FeederStockWorkList.Count" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}">
- <lex:BLoc Key="Feeder供料动作个数" />
- <Binding Path="FeederStockWorks.FeederWorkList.Count" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}">
- <lex:BLoc Key="供料的Blob最小面积" />
- <Binding Path="MinArea" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}">
- <lex:BLoc Key="末端执行器个数" />
- <Binding Path="ToolInfo.Count" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}ms">
- <lex:BLoc Key="延时拍照" />
- <Binding Path="WaitPhoto" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}ms">
- <lex:BLoc Key="Feeder振动完延时拍照" />
- <Binding Path="WaitFeederStop" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}ms">
- <lex:BLoc Key="吸真空时长" />
- <Binding Path="WaitSuction" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}ms">
- <lex:BLoc Key="破真空时长" />
- <Binding Path="WaitBlow" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}">
- <lex:BLoc Key="视觉引导模式" />
- <Binding Path="VibrationModel" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}">
- <lex:BLoc Key="Feeder最大振动拍照次数" />
- <Binding Path="FeederFailLimit" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}">
- <lex:BLoc Key="发送给机器人的最大点位数量" />
- <Binding Path="OutputPointCountMax" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- </StackPanel>
- </HierarchicalDataTemplate>
- </HierarchicalDataTemplate.ItemTemplate>
- <TextBlock Margin="3,2"
- Text="{Binding Camera}" />
- </HierarchicalDataTemplate>
- </TreeView.ItemTemplate>
- </TreeView>
- <!--<TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}">
- <lex:BLoc Key="点位个数" />
- <Binding Path="SelectProduct.RobotPoint.Points.Count" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}">
- <lex:BLoc Key="托盘个数" />
- <Binding Path="SelectProduct.RobotPoint.Pallets.Count" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>-->
- <Border BorderThickness="1"
- Height="1"
- BorderBrush="Gray" />
- <ListBox ItemsSource="{Binding SelectProduct.RobotPoint.Pallets}">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Vertical">
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}">
- <lex:BLoc Key="托盘名称" />
- <Binding Path="Name" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}">
- <lex:BLoc Key="托盘描述" />
- <Binding Path="Description" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}">
- <lex:BLoc Key="行" />
- <Binding Path="Row" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}">
- <lex:BLoc Key="列" />
- <Binding Path="Column" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}">
- <lex:BLoc Key="排列方式" />
- <Binding Path="Arrangement" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- </StackPanel>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- <Border BorderThickness="1"
- Height="1"
- BorderBrush="Gray" />
- <TextBlock Text="{Binding SelectProduct.Speed,StringFormat=Speed: {0}%}" />
- <TextBlock Text="{Binding SelectProduct.Accel,StringFormat=Accel: {0}%}" />
- <TextBlock Text="{Binding SelectProduct.Speeds,StringFormat=Speeds: {0}mm/s}" />
- <TextBlock Text="{Binding SelectProduct.Accels,StringFormat=Accels: {0}mm/s²}" />
- <TextBlock Text="{Binding SelectProduct.Power,StringFormat=Power: {0}}" />
- <TextBlock>
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}: {1}">
- <lex:BLoc Key="全局参数个数" />
- <Binding Path="SelectProduct.GlobalParamListCollection.Count" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- <Border BorderThickness="1"
- Height="1"
- BorderBrush="Gray" />
- <ListBox ItemsSource="{Binding SelectProduct.GlobalParamListCollection}">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Vertical">
- <TextBlock Text="{Binding Number,StringFormat=Number: {0}}" />
- <TextBlock Text="{Binding Name,StringFormat=Name: {0}}" />
- <TextBlock Text="{Binding Param1,StringFormat=Param1: {0}}" />
- <TextBlock Text="{Binding Param2,StringFormat=Param2: {0}}" />
- <TextBlock Text="{Binding Param3,StringFormat=Param3: {0}}" />
- <TextBlock Text="{Binding Param4,StringFormat=Param4: {0}}" />
- </StackPanel>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- <Border BorderThickness="1"
- Height="1"
- BorderBrush="Gray" />
- </StackPanel>
- </ScrollViewer>
- <Button Grid.Row="1"
- IsEnabled="{Binding IsAllowEdit}"
- Margin="5"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Command="{Binding EditCommand}"
- CommandParameter="{Binding ElementName=ModelsListBox,Path=SelectedItem}">
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="EditBoxOutline" />
- <TextBlock Text="{lex:Loc 编辑}" />
- </StackPanel>
- </Button>
- </Grid>
- </DockPanel>
- </UserControl>
|