|
|
<Window x:Class="FileDataUpload.MainWindow"
|
|
|
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:FileDataUpload"
|
|
|
mc:Ignorable="d"
|
|
|
Title="文件数据上传" Height="500" Width="650"
|
|
|
Icon="/templates/icon/fileIcon.ico" Loaded="Window_Loaded">
|
|
|
<!--ResizeMode="CanMinimize"-->
|
|
|
|
|
|
<Border Margin="5" Background="White" CornerRadius="10">
|
|
|
<Border.Effect>
|
|
|
<DropShadowEffect Color="Gray" ShadowDepth="0" BlurRadius="5" Opacity="0.3" Direction="0"></DropShadowEffect>
|
|
|
</Border.Effect>
|
|
|
|
|
|
<Grid>
|
|
|
<Grid.RowDefinitions>
|
|
|
<RowDefinition Height="150"/>
|
|
|
<RowDefinition Height="300"/>
|
|
|
<!--<RowDefinition Height="*"/>-->
|
|
|
</Grid.RowDefinitions>
|
|
|
<!--顶部 菜单栏-->
|
|
|
<StackPanel Grid.Row="0">
|
|
|
<Grid>
|
|
|
<Grid.RowDefinitions>
|
|
|
<RowDefinition Height="50"/>
|
|
|
<RowDefinition Height="50"/>
|
|
|
<RowDefinition Height="50"/>
|
|
|
</Grid.RowDefinitions>
|
|
|
<StackPanel Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Left" Orientation="Horizontal">
|
|
|
<Label Content="服务IP:" Height="30" FontSize="18" Foreground="#007DFA" Width="75" />
|
|
|
<TextBox Text="{Binding BorkerIp}" Height="28" Width="150" FontSize="16" Foreground="#007DFA" Margin="0,0,10,0"/>
|
|
|
|
|
|
<Label Content="端口号:" Height="30" FontSize="18" Foreground="#007DFA" Width="75" />
|
|
|
<TextBox Text="{Binding BorkerPort}" Height="28" Width="90" FontSize="16" Foreground="#007DFA" Margin="0,0,10,0"/>
|
|
|
|
|
|
<Label Content="客户端Id:" Height="30" FontSize="18" Foreground="#007DFA" Width="90" />
|
|
|
<TextBox Text="{Binding ClientId}" Height="28" Width="120" FontSize="16" Foreground="#007DFA"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
<StackPanel Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Left" Orientation="Horizontal">
|
|
|
|
|
|
<Label Content="用户名:" Height="30" FontSize="18" Foreground="#007DFA" Width="80" />
|
|
|
<TextBox Text="{Binding UserName}" Height="28" Width="95" FontSize="16" Foreground="#007DFA" Margin="0,0,10,0"/>
|
|
|
|
|
|
<Label Content="密码:" Height="30" FontSize="18" Foreground="#007DFA" Width="60" />
|
|
|
<TextBox Text="{Binding Password}" Height="28" Width="95" FontSize="16" Foreground="#007DFA" Margin="0,0,10,0"/>
|
|
|
|
|
|
<Label Content="主题:" Height="30" FontSize="18" Foreground="#007DFA" Width="80" />
|
|
|
<TextBox Text="{Binding Topical}" Height="28" Width="190" FontSize="16" Foreground="#007DFA"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
<StackPanel Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left" Orientation="Horizontal">
|
|
|
|
|
|
<Button Content="连接" Command="{Binding ConnectCommand}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="20,0"/>
|
|
|
<Button Content="断开" Command="{Binding DisConnectCommand}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#FF0033" BorderBrush="#FF0033" Margin="0,0"/>
|
|
|
<Button Content="订阅" Command="{Binding SubscriptionCommand}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="20,0"/>
|
|
|
<Button Content="取消订阅" Command="{Binding UnsubscribeCommand}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#FF0033" BorderBrush="#FF0033" Margin="0,0,20,0"/>
|
|
|
<Button Content="上传数据" Command="{Binding UploadFileDataCommand}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#99CC33" BorderBrush="#99CC33" Margin="0,0"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
</Grid>
|
|
|
</StackPanel>
|
|
|
<!--中部 数据查看-->
|
|
|
<StackPanel Grid.Row="1" Background="AliceBlue">
|
|
|
<Border Width="130" VerticalAlignment="Center" HorizontalAlignment="Left" BorderBrush="AliceBlue" BorderThickness="1,1,1,1" CornerRadius="2" Background="AliceBlue">
|
|
|
<TextBlock Text="日志输出" FontSize="15" Foreground="Gray" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
|
|
</Border>
|
|
|
<ListBox x:Name="listBox" Height="277" ItemsSource="{Binding ListBoxData}" Background="AliceBlue" BorderBrush="CornflowerBlue"/>
|
|
|
</StackPanel>
|
|
|
<!--底部 日志显示-->
|
|
|
<!--<StackPanel Grid.Row="2" Background="AliceBlue">
|
|
|
|
|
|
<Grid>
|
|
|
<Grid.ColumnDefinitions>
|
|
|
<ColumnDefinition Width="500"/>
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
</Grid.ColumnDefinitions>
|
|
|
<StackPanel Grid.Column="0" Background="AliceBlue" VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Left">
|
|
|
<TextBox Text="{Binding MessageStr}" Height="90" Width="500" FontSize="18" Foreground="#007DFA" Margin="0,10,0,0" />
|
|
|
</StackPanel>
|
|
|
|
|
|
<StackPanel Grid.Column="1" Background="AliceBlue" VerticalAlignment="Top" Orientation="Vertical" HorizontalAlignment="Left">
|
|
|
<Button Content="选择文件" Command="{Binding ChooseFileCommand}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#99CC33" BorderBrush="#99CC33" Margin="10,15"/>
|
|
|
<Button Content="推送消息" Command="{Binding PushMessageCommand}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009933" BorderBrush="#009933" Margin="10,0"/>
|
|
|
</StackPanel>
|
|
|
</Grid>
|
|
|
|
|
|
</StackPanel>-->
|
|
|
</Grid>
|
|
|
</Border>
|
|
|
</Window>
|