Views/SocketClientView.xaml

(完整代码) 3KB

<UserControl x:Class="MahAppsMetro.Demo.Views.SocketClientView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:MahAppsMetro.Demo.Views"
             xmlns:metro="http://metro.mahapps.com/winfx/xaml/controls"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <Style TargetType="TextBlock">
            <Setter Property="VerticalAlignment" Value="Center" />
        </Style>
    </UserControl.Resources>
    <Grid>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal" Height="35">
                <Border BorderBrush="#CCC" BorderThickness="1,1,0,1" Margin="5,4,0,4">
                    <TextBlock Text="IP:" />
                </Border>
                <TextBox x:Name="tbIP" MinWidth="60" HorizontalContentAlignment="Right" VerticalAlignment="Center" Text="127.0.0.1" FontSize="14" VerticalContentAlignment="Center" BorderThickness="0,1" metro:ControlsHelper.MouseOverBorderBrush="#CCC" metro:ControlsHelper.FocusBorderBrush="#CCC" />
                <Border BorderThickness="0,1" BorderBrush="#CCC" Margin="0,4">
                    <TextBlock Text=":" />
                </Border>
                <TextBox x:Name="tbPort" MinWidth="30" VerticalAlignment="Center" Text="6666" FontSize="14" VerticalContentAlignment="Center" BorderThickness="0,1" metro:ControlsHelper.MouseOverBorderBrush="#CCC" metro:ControlsHelper.FocusBorderBrush="#CCC" />
                <Button x:Name="btnConnect" Content="连 接" VerticalAlignment="Center" metro:ButtonHelper.CornerRadius="0" BorderThickness="0,1,1,1" Cursor="Hand" Click="btnConnect_Click" />
                <Button x:Name="btnDisConnect" Content="断开" VerticalAlignment="Center" metro:ButtonHelper.CornerRadius="0" BorderThickness="0,1,1,1" Cursor="Hand" Click="btnDisConnect_Click" />
            </StackPanel>
            <RichTextBox x:Name="rtbMsg" IsReadOnly="True" Grid.Row="1" />
            <Grid Grid.Row="2">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <DockPanel LastChildFill="False" Grid.Row="0">
                    <Button x:Name="btnSend" Content="发    送" DockPanel.Dock="Right" Margin="5" Click="btnSend_Click" />
                </DockPanel>
                <TextBox x:Name="tbMsg" Grid.Row="1" MinHeight="50" TextWrapping="WrapWithOverflow" FontSize="14" AcceptsReturn="True" />
            </Grid>
            <GridSplitter Grid.Row="2" Height="3" Background="LightGray" HorizontalAlignment="Stretch" VerticalAlignment="Top" />
        </Grid>
    </Grid>
</UserControl>

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。