|
| 1 | +<Window x:Class="DataToolChain.CsvToCreateTable" |
| 2 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 3 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 4 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 5 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 6 | + xmlns:local="clr-namespace:DataToolChain" |
| 7 | + mc:Ignorable="d" |
| 8 | + Title="CSV To SQL Create Table" Height="650" Width="850" |
| 9 | + d:DataContext="{d:DesignInstance Type=local:CsvToCreateTableViewModel, IsDesignTimeCreatable=True}" |
| 10 | + > |
| 11 | + <Grid> |
| 12 | + <Grid.RowDefinitions> |
| 13 | + <RowDefinition Height="Auto"/> |
| 14 | + <RowDefinition Height="Auto"/> |
| 15 | + <RowDefinition Height="*"/> |
| 16 | + </Grid.RowDefinitions> |
| 17 | + |
| 18 | + |
| 19 | + <Grid Margin="5"> |
| 20 | + <Grid.ColumnDefinitions> |
| 21 | + <ColumnDefinition Width="Auto"/> |
| 22 | + <ColumnDefinition Width="*"/> |
| 23 | + <ColumnDefinition Width="Auto"/> |
| 24 | + </Grid.ColumnDefinitions> |
| 25 | + <Label VerticalContentAlignment="Center" Margin="5">Input Files:</Label> |
| 26 | + <DataGrid Grid.Column="1" Margin="5" VerticalContentAlignment="Center" Height="200" ItemsSource="{Binding Path=FilePaths, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" /> |
| 27 | + <StackPanel Grid.Column="2" Orientation="Horizontal"> |
| 28 | + <Button Margin="5,5,5,0" Content="..." HorizontalAlignment="Stretch" VerticalAlignment="Top" Width="25" Click="ButtonBrowse_OnClick" Height="25"/> |
| 29 | + <Button Margin="5" Content="Go" HorizontalAlignment="Stretch" VerticalAlignment="Top" Height="25" Width="86" Click="ButtonGoClick"/> |
| 30 | + </StackPanel> |
| 31 | + </Grid> |
| 32 | + |
| 33 | + |
| 34 | + <StackPanel Background="Beige" Grid.Row="1" Margin="5"> |
| 35 | + <StackPanel Orientation="Horizontal"> |
| 36 | + <Label Margin="5" VerticalContentAlignment="Center">Output Table Name:</Label> |
| 37 | + <TextBox HorizontalAlignment="Left" VerticalContentAlignment="Center" Margin="5" Height="24" TextWrapping="Wrap" Text="{Binding Path=TableName, UpdateSourceTrigger=PropertyChanged}" Width="409" /> |
| 38 | + </StackPanel> |
| 39 | + <StackPanel Orientation="Horizontal"> |
| 40 | + <Label Margin="5">Delimiter:</Label> |
| 41 | + <RadioButton Margin="5" IsChecked="{Binding Path=UseTabDelimiter}" GroupName="delimiter" VerticalContentAlignment="Center">Tab</RadioButton> |
| 42 | + <RadioButton Margin="5" VerticalContentAlignment="Center" IsChecked="{Binding Path=UseCommaDelimiter}" GroupName="delimiter">Comma</RadioButton> |
| 43 | + </StackPanel> |
| 44 | + <StackPanel Orientation="Horizontal"> |
| 45 | + <Label Margin="5">Header offset rows:</Label> |
| 46 | + <TextBox HorizontalAlignment="Left" VerticalContentAlignment="Center" Margin="5" Height="24" TextWrapping="Wrap" Text="{Binding Path=HeaderOffsetRows, UpdateSourceTrigger=PropertyChanged}" Width="65" /> |
| 47 | + <Label Margin="5"></Label> |
| 48 | + </StackPanel> |
| 49 | + </StackPanel> |
| 50 | + |
| 51 | + <TextBox Grid.Row="2" Margin="5" TextWrapping="Wrap" Text="{Binding Path=OutputText, Mode=TwoWay}" AcceptsReturn="True" IsUndoEnabled="False" VerticalScrollBarVisibility="Auto" BorderThickness="2" BorderBrush="#FF193EAE" /> |
| 52 | + </Grid> |
| 53 | +</Window> |
0 commit comments