| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <Window x:Class="DeviceCenter.AddDevice"
- 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:my="clr-namespace:DeviceCenter.utils"
- mc:Ignorable="d"
- Title="添加设备" Height="400" Width="300" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
- <StackPanel Orientation="Vertical">
- <StackPanel Orientation="Horizontal" Margin="0 10 0 0">
- <Label Content="所在区域" Width="80" HorizontalContentAlignment="Right" Margin="0 0 10 0"/>
- <ComboBox x:Name="cb_area" Width="150" DisplayMemberPath="name" SelectedValuePath="id" SelectionChanged="cb_area_SelectionChanged">
- </ComboBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="0 10 0 0">
- <Label Content="所在楼栋" Width="80" HorizontalContentAlignment="Right" Margin="0 0 10 0"/>
- <ComboBox x:Name="cb_building" Width="150" DisplayMemberPath="name" SelectedValuePath="id" SelectionChanged="cb_building_SelectionChanged">
- </ComboBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="0 10 0 0">
- <Label Content="所在楼层" Width="80" HorizontalContentAlignment="Right" Margin="0 0 10 0"/>
- <ComboBox x:Name="cb_floor" Width="150" DisplayMemberPath="name" SelectedValuePath="id">
- </ComboBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="0 10 0 0">
- <Label Content="设备类型" Width="80" HorizontalContentAlignment="Right" Margin="0 0 10 0"/>
- <ComboBox x:Name="cb_type" Width="150" ItemsSource="{Binding Source={my:EnumerationExtension {x:Type my:Device.Type}}}" />
- </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="0 10 0 0">
- <Label Content="设备名称" Width="80" HorizontalContentAlignment="Right" Margin="0 0 10 0"/>
- <TextBox Name="tb_name" Width="150" VerticalContentAlignment="Center"></TextBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="0 10 0 0">
- <Label Content="IP地址" Width="80" HorizontalContentAlignment="Right" Margin="0 0 10 0"/>
- <TextBox Name="tb_ip" Width="150" VerticalContentAlignment="Center"></TextBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="0 10 0 0">
- <Label Content="端口" Width="80" HorizontalContentAlignment="Right" Margin="0 0 10 0"/>
- <TextBox Name="tb_port" Width="150" VerticalContentAlignment="Center"></TextBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="0 10 0 0">
- <Label Content="用户名" Width="80" HorizontalContentAlignment="Right" Margin="0 0 10 0"/>
- <TextBox Name="tb_username" Width="150" VerticalContentAlignment="Center"></TextBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="0 10 0 0">
- <Label Content="密码" Width="80" HorizontalContentAlignment="Right" Margin="0 0 10 0"/>
- <TextBox Name="tb_password" Width="150" VerticalContentAlignment="Center"></TextBox>
- </StackPanel>
- <Button Content="添加" Width="60" Height="24" Margin="0 10 0 0" Click="Button_Click"></Button>
- </StackPanel>
- </Window>
|