<Window x:Class="HDD_Demo.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="HDD Information(HDD硬盘信息)" Height="350" Width="930" WindowStartupLocation="CenterScreen" ResizeMode="CanMinimize">
    <Grid Margin="10">
        <Grid.RowDefinitions>
            <RowDefinition Height="60" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal">
            <TextBlock Text="IP(IP地址):" VerticalAlignment="Center"/>
            <TextBox x:Name="tb_ip" Margin="3,0,0,0" Text="172.23.12.14" Height="25" Width="100"/>
            <TextBlock Margin="5,0,0,0" Text="Port(端口):" VerticalAlignment="Center"/>
            <TextBox x:Name="tb_port" Margin="3,0,0,0" Text="37777" Width="60" Height="25" />
            <TextBlock Margin="5,0,0,0" Text="Name(用户名):" VerticalAlignment="Center"/>
            <TextBox x:Name="tb_name" Margin="3,0,0,0" Text="admin" Width="80" Height="25"/>
            <TextBlock Margin="5,0,0,0" Text="Password(密码)" VerticalAlignment="Center"/>
            <PasswordBox x:Name="tb_password" Margin="3,0,0,0" Password="admin123" Width="80" Height="25" />
            <Button x:Name="btn_login" Margin="10,0,0,0" Content="Login(登录)" Width="80" Height="30" Click="btn_login_Click"/>
            <Button x:Name="btn_Get" Margin="10,0,0,0" Content="GetDiskInfo(获取硬盘信息)" Width="160" Height="30" Click="btn_Get_Click"/>
        </StackPanel>
        <ListView x:Name="list" Grid.Row="1">
            <ListView.View>
                <GridView>
                    <GridViewColumn Header="Disk Number(硬盘号)" DisplayMemberBinding="{Binding DiskNumber}" Width="130" />
                    <GridViewColumn Header="FreeSpace(空闲容量)(MB)" DisplayMemberBinding="{Binding FreeSpace}" Width="150" />
                    <GridViewColumn Header="TotalSpace(总容量)(MB)" DisplayMemberBinding="{Binding TotalSpace}" Width="140" />
                    <GridViewColumn Header="Type(类型)" DisplayMemberBinding="{Binding DiskType}" Width="110" />
                    <GridViewColumn Header="Status(状态)" DisplayMemberBinding="{Binding DiskStatus}" Width="110" />
                    <GridViewColumn Header="Subarea Number(分区号)" DisplayMemberBinding="{Binding SubareaNumber}" Width="150" />
                    <GridViewColumn Header="Signal(标识)" DisplayMemberBinding="{Binding Signal}" Width="100"/>
                </GridView>
            </ListView.View>
        </ListView>
    </Grid>
</Window>
