123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- <Window x:Class="UpgradePackageUploadTool.MainWindow"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:upgradepackageuploadtool="clr-namespace:UpgradePackageUploadTool"
- xmlns:extensions="clr-namespace:UpgradePackageUploadTool.Extensions"
- mc:Ignorable="d"
- Title="Upgrade Package Upload Tool" Height="430" Width="820" WindowStartupLocation="CenterScreen" MinHeight="320">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Grid Grid.Row="0">
- <StackPanel Orientation="Vertical">
- <GroupBox Header="登录信息设置" Margin="5">
- <StackPanel>
- <StackPanel Orientation="Horizontal" Visibility="Collapsed">
- <TextBlock Text="服务器:" Margin="5" VerticalAlignment="Center"></TextBlock>
- <TextBox x:Name="ServerIP_Text" Width="180" VerticalAlignment="Center" TextChanged="ServerIPText_TextChanged" Height="22"></TextBox>
- <TextBlock Text="服务器端口:" Margin="5" VerticalAlignment="Center"></TextBlock>
- <TextBox x:Name="ServerPort_Text" Width="118" VerticalAlignment="Center" TextChanged="ServerPortText_TextChanged" Height="22"></TextBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="服务地址:" Margin="5" VerticalAlignment="Center"></TextBlock>
- <TextBox x:Name="WingServer_Text" Width="180" VerticalAlignment="Center" TextChanged="WingServer_Text_TextChanged" Height="22"></TextBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="用户账号:" Margin="5" VerticalAlignment="Center"></TextBlock>
- <TextBox x:Name="Account_Text" Width="180" VerticalAlignment="Center" TextChanged="Account_Text_TextChanged" Height="22"></TextBox>
- <TextBlock Text="密码:" Margin="5" VerticalAlignment="Center"></TextBlock>
- <PasswordBox x:Name="Password_PasswordBox" Width="160" VerticalAlignment="Center" PasswordChanged="Password_PasswordBox_PasswordChanged" Height="22"></PasswordBox>
- <Button x:Name="ConnectOrDisconnectServer_Button" Margin="15,0,0,0" Content="连接" VerticalAlignment="Center" Click="OnConnectOrDisconnectServer" />
- </StackPanel>
- </StackPanel>
- </GroupBox>
- <GroupBox Header="上传功能设置" Margin="5">
- <StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="更新包名称:" Margin="5" VerticalAlignment="Center" />
- <TextBox x:Name="FileName_Text" Margin="5" Width="159" VerticalAlignment="Center" Height="22" />
- <TextBlock Text="更新包版本:" Margin="5" VerticalAlignment="Center" />
- <TextBox x:Name="Version_Text" Margin="5" Width="100" VerticalAlignment="Center" Height="22" />
- <Button x:Name="GetLatestPackageInfo_Button" Margin="10,0,0,0" Content="查看最新版" VerticalAlignment="Center" Click="OnGetLatestPackage" />
- <Button x:Name="Download_Button" Content="下载" Margin="10,0,0,0" VerticalAlignment="Center" Click="OnDownloadPackage" />
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="更新包路径:" Margin="5" VerticalAlignment="Center" />
- <TextBox x:Name="FilePath_Text" Margin="5" Width="350" VerticalAlignment="Center" IsReadOnly="True" Height="22" />
- <Button x:Name="OpenFile_Button" Margin="10,0,0,0" Content="选择" VerticalAlignment="Center" Click="OnOpenFile" />
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="更新包描述:" Margin="5" VerticalAlignment="Center" />
- <TextBox x:Name="Description_Text" Margin="5" Width="350" VerticalAlignment="Center" Height="22" />
- <Button x:Name="UploadPackage_Button" Content="上传" Margin="10,0,0,0" VerticalAlignment="Center" Click="OnUploadPackage" />
- </StackPanel>
- </StackPanel>
- </GroupBox>
- <DataGrid x:Name="ShowInfo_DataGrid" GridLinesVisibility="Vertical" AutoGenerateColumns="False" IsReadOnly="True" Visibility="Collapsed" SelectionUnit="Cell" Margin="5,20">
- <DataGrid.Columns>
- <DataGridTemplateColumn Header="更新者" Width="0.7*">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBlock TextWrapping="Wrap" Text="{Binding CreateUserName}" VerticalAlignment="Center" />
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Header="更新包版本" Width="*">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBlock TextWrapping="Wrap" Text="{Binding Version}" VerticalAlignment="Center" />
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Header="更新包名称" Width="*">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBlock TextWrapping="Wrap" Text="{Binding FileName}" VerticalAlignment="Center" />
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Header="下载地址" Width="3*">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBlock TextWrapping="Wrap" Text="{Binding FileToken}" VerticalAlignment="Center" />
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Header="更新包大小" Width="*">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBlock TextWrapping="Wrap" Text="{Binding FileSize, Converter={extensions:FileSizeConverter}}" VerticalAlignment="Center" />
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Header="更新时间" Width="0.9*">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBlock TextWrapping="Wrap" Text="{Binding UpdateTime, Converter={extensions:UpdateTimeConverter}}" VerticalAlignment="Center" />
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Header="更新包描述" Width="*">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBlock TextWrapping="Wrap" Text="{Binding Description}" VerticalAlignment="Center" />
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- </DataGrid.Columns>
- </DataGrid>
- </StackPanel>
- </Grid>
- <upgradepackageuploadtool:WaitingSpinner x:Name="Waiting" />
- </Grid>
- </Window>
|