WinEquipmentAddOrEdit.xaml 4.25 KB
<win:BaseWindow
    xmlns:win="clr-namespace:HHECS.View.Win" x:Class="HHECS.View.EquipmentInfo.WinEquipmentAddOrEdit"
        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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:HHECS.View.EquipmentInfo"
        mc:Ignorable="d"
        Title="EquipmentAddOrEdit" Height="302.4" Width="432.8">
    <Window.Resources>
        <Style TargetType="StackPanel">
            <Setter Property="Orientation" Value="Horizontal"/>
            <Setter Property="HorizontalAlignment" Value="Right"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="Margin" Value="0,0,20,0"/>
        </Style>
        <Style TargetType="TextBlock">
            <Setter Property="HorizontalAlignment" Value="Center"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
        </Style>
        <Style TargetType="TextBox" BasedOn="{StaticResource TextBoxStyle}">
            <Setter Property="HorizontalAlignment" Value="Center"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="Width" Value="100"/>
        </Style>
    </Window.Resources>
    <Grid x:Name="GridMain">
        <Grid.RowDefinitions>
            <RowDefinition></RowDefinition>
            <RowDefinition></RowDefinition>
            <RowDefinition></RowDefinition>
            <RowDefinition></RowDefinition>
            <RowDefinition></RowDefinition>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition></ColumnDefinition>
            <ColumnDefinition></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="0">
            <TextBlock>设备编码:</TextBlock>
            <TextBox x:Name ="TxtEquipmentCode" Text="{Binding Code}"></TextBox>
        </StackPanel>
        <StackPanel Grid.Row="0" Grid.Column="1">
            <TextBlock>设备名:</TextBlock>
            <TextBox x:Name ="TxtEquipmentName" Text="{Binding Name}"></TextBox>
        </StackPanel>
        <StackPanel Grid.Row="1" Grid.Column="0">
            <TextBlock>设备类型:</TextBlock>
            <ComboBox x:Name="CBEquipmentType" Width="100" SelectedValue="{Binding EquipmentTypeId}"></ComboBox>
        </StackPanel>
        <StackPanel Grid.Row="1" Grid.Column="1">
            <TextBlock>自身地址:</TextBlock>
            <TextBox x:Name ="TxtEquipmentSelfAddress" Text="{Binding SelfAddress}"></TextBox>
        </StackPanel>
        <StackPanel Grid.Row="2" Grid.Column="0">
            <TextBlock>IP:</TextBlock>
            <TextBox x:Name ="TxtEquipmentIP" Text="{Binding IP}"></TextBox>
        </StackPanel>
        <StackPanel Grid.Row="2" Grid.Column="1">
            <TextBlock>巷道:</TextBlock>
            <TextBox x:Name ="TxtEquipmentRoadWay" Text="{Binding RoadWay}"></TextBox>
        </StackPanel>
        <StackPanel Grid.Row="3" Grid.Column="0">
            <TextBlock>站台索引:</TextBlock>
            <TextBox x:Name ="TxtEquipmentStationIndex" Text="{Binding StationIndex}"></TextBox>
        </StackPanel>
        <StackPanel Grid.Row="3" Grid.Column="1">
            <TextBlock>货插索引:</TextBlock>
            <TextBox x:Name ="TxtEquipmentRowIndex" Text="{Binding RowIndex}"/>
        </StackPanel>
        <StackPanel Grid.Row="4" Grid.Column="0">
            <TextBlock>描述:</TextBlock>
            <TextBox x:Name ="TxtEquipmentDescription" Text="{Binding Description}"></TextBox>
        </StackPanel>
        <StackPanel Grid.Row="4" Grid.Column="1" HorizontalAlignment="Center">
            <TextBlock>禁用:</TextBlock>
            <CheckBox x:Name ="TxtEquipmentDisable" IsChecked="{Binding Disable}"></CheckBox>
        </StackPanel>
        <StackPanel HorizontalAlignment="Center" Grid.Row="5" Margin="0,4,20,4" Grid.ColumnSpan="2">
            <Button x:Name="BtnSave" Click="BtnSave_Click" Content="保存"/>
            <Button x:Name="BtnCancel" Click="BtnCancel_Click" Content="取消" Margin="20,2,2,2"/>
        </StackPanel>
    </Grid>
</win:BaseWindow>