RobotConfigAddOrEditView.xaml 6.44 KB
<Window
    x:Class="HHECS.RobotTool.View.RobotConfigView.RobotConfigAddOrEditView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:hc="https://handyorg.github.io/handycontrol"
    xmlns:local="clr-namespace:HHECS.RobotTool.View.RobotConfigView"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:viewmodel="clr-namespace:HHECS.RobotTool.ViewModel.RobotConfigVM"
    Title="新增基础配置"
    Width="280"
    Height="430"
    d:DataContext="{d:DesignInstance Type=viewmodel:RobotConfigAddOrEditVM}"
    ResizeMode="NoResize"
    WindowStartupLocation="CenterScreen"
    mc:Ignorable="d">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="40" />
        </Grid.RowDefinitions>
        <hc:UniformSpacingPanel
            HorizontalAlignment="Center"
            ChildWrapping="Wrap"
            Spacing="10">
            <hc:ElementGroup
                Height="30"
                VerticalAlignment="Center"
                Layout="Stack">
                <Border Padding="6,0" Style="{StaticResource BorderRegion}">
                    <TextBlock VerticalAlignment="Center" Text="编号" />
                </Border>
                <TextBox MinWidth="200" Text="{Binding RobotConfig.Code, UpdateSourceTrigger=PropertyChanged}" />
            </hc:ElementGroup>
            <hc:ElementGroup
                Height="30"
                VerticalAlignment="Center"
                Layout="Stack">
                <Border Padding="6,0" Style="{StaticResource BorderRegion}">
                    <TextBlock VerticalAlignment="Center" Text="名称" />
                </Border>
                <TextBox MinWidth="200" Text="{Binding RobotConfig.Name, UpdateSourceTrigger=PropertyChanged}" />
            </hc:ElementGroup>
            <hc:ElementGroup
                Height="30"
                VerticalAlignment="Center"
                Layout="Stack">
                <Border Padding="6,0" Style="{StaticResource BorderRegion}">
                    <TextBlock VerticalAlignment="Center" Text="坡口预留间隙(mm)" />
                </Border>
                <TextBox MinWidth="123" Text="{Binding RobotConfig.ReservedGap, UpdateSourceTrigger=PropertyChanged}" />
            </hc:ElementGroup>
            <hc:ElementGroup
                Height="30"
                VerticalAlignment="Center"
                Layout="Stack">
                <Border Padding="6,0" Style="{StaticResource BorderRegion}">
                    <TextBlock VerticalAlignment="Center" Text="盖面后单边所需增加余宽(mm)" />
                </Border>
                <TextBox
                    MinWidth="60"
                    HorizontalAlignment="Stretch"
                    Text="{Binding RobotConfig.WeldWidth, UpdateSourceTrigger=PropertyChanged}" />
            </hc:ElementGroup>
            <hc:ElementGroup
                Height="30"
                VerticalAlignment="Center"
                Layout="Stack">
                <Border Padding="6,0" Style="{StaticResource BorderRegion}">
                    <TextBlock VerticalAlignment="Center" Text="坡口钝边大小(mm)" />
                </Border>
                <TextBox
                    MinWidth="123"
                    HorizontalAlignment="Stretch"
                    Text="{Binding RobotConfig.BluntEdgeSize, UpdateSourceTrigger=PropertyChanged}" />
            </hc:ElementGroup>
            <hc:ElementGroup
                Height="30"
                VerticalAlignment="Center"
                Layout="Stack">
                <Border Padding="6,0" Style="{StaticResource BorderRegion}">
                    <TextBlock VerticalAlignment="Center" Text="盖面后所需焊缝余高(mm)" />
                </Border>
                <TextBox
                    MinWidth="85"
                    HorizontalAlignment="Stretch"
                    Text="{Binding RobotConfig.WeldHeight, UpdateSourceTrigger=PropertyChanged}" />
            </hc:ElementGroup>
            <hc:ElementGroup
                Height="30"
                VerticalAlignment="Center"
                Layout="Stack">
                <Border Padding="6,0" Style="{StaticResource BorderRegion}">
                    <TextBlock VerticalAlignment="Center" Text="焊丝直径(mm)" />
                </Border>
                <TextBox
                    MinWidth="145"
                    HorizontalAlignment="Stretch"
                    Text="{Binding RobotConfig.WeldingWire, UpdateSourceTrigger=PropertyChanged}" />
            </hc:ElementGroup>
            <hc:ElementGroup
                Height="30"
                VerticalAlignment="Center"
                Layout="Stack">
                <Border Padding="6,0" Style="{StaticResource BorderRegion}">
                    <TextBlock VerticalAlignment="Center" Text="焊缝长度(mm)" />
                </Border>
                <TextBox
                    MinWidth="147"
                    HorizontalAlignment="Stretch"
                    Text="{Binding RobotConfig.WeldLength, UpdateSourceTrigger=PropertyChanged}" />
            </hc:ElementGroup>
            <hc:ElementGroup
                Height="30"
                VerticalAlignment="Center"
                Layout="Stack">
                <Border Padding="6,0" Style="{StaticResource BorderRegion}">
                    <TextBlock VerticalAlignment="Center" Text="备注" />
                </Border>
                <TextBox
                    MinWidth="200"
                    HorizontalAlignment="Stretch"
                    Text="{Binding RobotConfig.Remark, UpdateSourceTrigger=PropertyChanged}"
                    VerticalScrollBarVisibility="Auto" />
            </hc:ElementGroup>
        </hc:UniformSpacingPanel>

        <hc:UniformSpacingPanel
            Grid.Row="1"
            HorizontalAlignment="Center"
            Spacing="60">
            <Button
                hc:IconElement.Geometry="{StaticResource SaveGeometry}"
                Command="{Binding SaveCommand}"
                Content="保存"
                Style="{StaticResource ButtonPrimary}" />
            <Button
                hc:IconElement.Geometry="{StaticResource CloseGeometry}"
                Command="{Binding CancelCommand}"
                Content="取消"
                Style="{StaticResource ButtonDefault}" />
        </hc:UniformSpacingPanel>
    </Grid>
</Window>