| | |
| | | <Window x:Class="DataLoader.MainWindow" |
| | | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| | | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| | | Height="480" Width="600" |
| | | Height="500" Width="750" |
| | | Loaded="Window_Loaded" |
| | | Title="数据入库" WindowStartupLocation="CenterScreen"> |
| | | Title="数据入库 v1.4" WindowStartupLocation="CenterScreen"> |
| | | <Window.Resources> |
| | | <Style x:Key="btn" TargetType="Button"> |
| | | <Setter Property="Background" Value="#005699"/> |
| | | <Setter Property="BorderBrush" Value="#136BAF"/> |
| | | <Setter Property="BorderThickness" Value="1"/> |
| | | <Setter Property="Foreground" Value="White"/> |
| | | <Setter Property="FontSize" Value="15"/> |
| | | <Setter Property="Width" Value="60"/> |
| | | <Setter Property="Height" Value="30"/> |
| | | <Setter Property="Cursor" Value="Hand"/> |
| | | <Style.Triggers> |
| | | <Trigger Property="IsMouseOver" Value="True"> |
| | | <Setter Property="Foreground" Value="Red"/> |
| | | </Trigger> |
| | | </Style.Triggers> |
| | | </Style> |
| | | <Style x:Key="tb" TargetType="TextBox"> |
| | | <Setter Property="VerticalAlignment" Value="Center"/> |
| | | <Setter Property="HorizontalAlignment" Value="Stretch"/> |
| | | <Setter Property="Height" Value="30"/> |
| | | <Setter Property="FontSize" Value="20"/> |
| | | </Style> |
| | | </Window.Resources> |
| | | <Grid x:Name="gMain"> |
| | | <Grid.RowDefinitions> |
| | | <RowDefinition Height="40"/> |
| | |
| | | </Grid.RowDefinitions> |
| | | |
| | | <Grid.ColumnDefinitions> |
| | | <ColumnDefinition Width="70" /> |
| | | <ColumnDefinition Width="180" /> |
| | | <ColumnDefinition Width="70" /> |
| | | <ColumnDefinition Width="180" /> |
| | | <ColumnDefinition /> |
| | | <ColumnDefinition Width="5*" /> |
| | | <ColumnDefinition Width="18*" /> |
| | | <ColumnDefinition Width="4*" /> |
| | | <ColumnDefinition Width="18*" /> |
| | | <ColumnDefinition Width="7*" /> |
| | | </Grid.ColumnDefinitions> |
| | | |
| | | <Label Grid.Row="0" Grid.Column="0" Content="用户ID:" VerticalAlignment="Center" HorizontalAlignment="Right" /> |
| | | <TextBox x:Name="tbUid" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Left" Height="30" Width="180" FontSize="20"/> |
| | | <Label Grid.Row="0" Grid.Column="2" Content="令牌:" VerticalAlignment="Center" HorizontalAlignment="Right" /> |
| | | <TextBox x:Name="tbToken" Grid.Row="0" Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Left" Height="30" Width="180" FontSize="20"/> |
| | | <Border Grid.Row="0" Grid.Column="4" BorderBrush="#136BAF" BorderThickness="1" Cursor="Hand" Width="60" Height="30"> |
| | | <TextBlock Text="登 录" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Center" MouseLeftButtonDown="Login_MouseLeftButtonDown"/> |
| | | </Border> |
| | | <TextBox x:Name="tbUid" Grid.Row="0" Grid.Column="1" Style="{StaticResource tb}" Text="1"/> |
| | | <Label Grid.Row="0" Grid.Column="2" Content="目录ID:" VerticalAlignment="Center" HorizontalAlignment="Right" /> |
| | | <TextBox x:Name="tbDir" Grid.Row="0" Grid.Column="3" Style="{StaticResource tb}" Text="1"/> |
| | | <!--<Label Grid.Row="0" Grid.Column="2" Content="令牌:" VerticalAlignment="Center" HorizontalAlignment="Right" /> |
| | | <TextBox x:Name="tbToken" Grid.Row="0" Grid.Column="3" Style="{StaticResource tb}"/> |
| | | <Button Grid.Row="0" Grid.Column="4" Content="登 录" Style="{StaticResource btn}" Click="Login_MouseLeftButtonDown"/>--> |
| | | <Button Grid.Row="0" Grid.Column="4" Content="设 置" Style="{StaticResource btn}" Click="Login_MouseLeftButtonDown"/> |
| | | |
| | | <Label Grid.Row="1" Grid.Column="0" Content="源目录:" VerticalAlignment="Center" HorizontalAlignment="Right" /> |
| | | <TextBox x:Name="tbSource" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="3" VerticalAlignment="Center" HorizontalAlignment="Left" Height="30" Width="430" FontSize="20"/> |
| | | <Border Grid.Row="1" Grid.Column="4" BorderBrush="#136BAF" BorderThickness="1" Cursor="Hand" Width="60" Height="30"> |
| | | <TextBlock Text="选 择" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Center" MouseLeftButtonDown="Source_MouseLeftButtonDown"/> |
| | | </Border> |
| | | <Label Grid.Row="1" Grid.Column="0" Content="数据目录:" VerticalAlignment="Center" HorizontalAlignment="Right" /> |
| | | <TextBox x:Name="tbSource" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="3" Style="{StaticResource tb}" Text="{Binding Path=SourcePath, Mode=TwoWay}"/> |
| | | <Button x:Name="btnSource" Grid.Row="1" Grid.Column="4" Content="选 择" Style="{StaticResource btn}" Click="Source_MouseLeftButtonDown"/> |
| | | |
| | | <Label Grid.Row="2" Grid.Column="0" Content="入库目录:" VerticalAlignment="Center" HorizontalAlignment="Right" /> |
| | | <TextBox x:Name="tbTarget" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="3" VerticalAlignment="Center" HorizontalAlignment="Left" Height="30" Width="430" FontSize="20"/> |
| | | <Border Grid.Row="2" Grid.Column="4" BorderBrush="#136BAF" BorderThickness="1" Cursor="Hand" Width="60" Height="30"> |
| | | <TextBlock Text="选 择" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Center" MouseLeftButtonDown="Target_MouseLeftButtonDown"/> |
| | | </Border> |
| | | <TextBox x:Name="tbTarget" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="3" Style="{StaticResource tb}" Text="{Binding Path=TargetPath, Mode=TwoWay}"/> |
| | | |
| | | <ScrollViewer Grid.Row="3" Grid.RowSpan="3" Grid.Column="0" Grid.ColumnSpan="4" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Margin="2"> |
| | | <ListView> |
| | | <Label Grid.Row="3" Grid.Column="0" Content="起始编号:" VerticalAlignment="Center" HorizontalAlignment="Right" /> |
| | | <TextBox x:Name="tbStart" Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="3" Style="{StaticResource tb}" Text="1"/> |
| | | |
| | | <ScrollViewer Grid.Row="4" Grid.RowSpan="3" Grid.Column="0" Grid.ColumnSpan="4" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Margin="2"> |
| | | <ListView x:Name="lvView"> |
| | | <ListView.View> |
| | | <GridView> |
| | | <GridView.Columns> |
| | | <GridViewColumn Header="序号" Width="50" DisplayMemberBinding="{Binding ID}"></GridViewColumn> |
| | | <GridViewColumn Header="路径" Width="355" DisplayMemberBinding="{Binding FilePath}"></GridViewColumn> |
| | | <GridViewColumn Header="状态" Width="80" DisplayMemberBinding="{Binding Status}"></GridViewColumn> |
| | | <!--<GridViewColumn Header="序号" Width="50" DisplayMemberBinding="{Binding Path=ID, Mode=OneWay}"/>--> |
| | | <GridViewColumn Header="序号" Width="Auto"> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <TextBlock Text="{Binding Path=ID, Mode=OneWay}" TextAlignment="Center" MinWidth="{Binding Path=ActualWidth, ElementName=column}" HorizontalAlignment="Center"/> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | <GridViewColumn Header="路径" Width="Auto" DisplayMemberBinding="{Binding Path=FilePath, Mode=OneWay}"/> |
| | | <GridViewColumn Header="运行状态" Width="120" DisplayMemberBinding="{Binding Path=Status, Mode=OneWay}"/> |
| | | </GridView.Columns> |
| | | </GridView> |
| | | </ListView.View> |
| | | </ListView> |
| | | </ScrollViewer> |
| | | <Border Grid.Row="3" Grid.Column="4" BorderBrush="#136BAF" BorderThickness="1" Cursor="Hand" Width="60" Height="30"> |
| | | <TextBlock Text="导 入" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Center" MouseLeftButtonDown="Import_MouseLeftButtonDown"/> |
| | | </Border> |
| | | |
| | | <Button x:Name="btnTarget" Grid.Row="2" Grid.Column="4" Content="选 择" Style="{StaticResource btn}" Click="Target_MouseLeftButtonDown"/> |
| | | <Button x:Name="btnLoad" Grid.Row="3" Grid.Column="4" Content="加 载" Style="{StaticResource btn}" Click="Load_MouseLeftButtonDown"/> |
| | | <Button x:Name="btnImport" Grid.Row="4" Grid.Column="4" Content="导 入" Style="{StaticResource btn}" Click="Import_MouseLeftButtonDown"/> |
| | | </Grid> |
| | | </Window> |