ExcelHelper/Views/Pages/SqlQueryPage.xaml

88 lines
3.0 KiB
Plaintext
Raw Normal View History

2025-01-06 12:19:00 +08:00
<Page
x:Class="ExcelHelper.Views.Pages.SqlQueryPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:avalonEdit="http://icsharpcode.net/sharpdevelop/avalonedit"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:local="clr-namespace:ExcelHelper.Views.Pages"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="SqlQueryPage"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
2025-01-22 16:56:28 +08:00
<RowDefinition Height="Auto" />
2025-01-06 12:19:00 +08:00
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="200" />
</Grid.ColumnDefinitions>
<StackPanel
Grid.Row="0"
HorizontalAlignment="Left"
Orientation="Horizontal">
<TextBlock
Margin="10"
VerticalAlignment="Center"
Text="储存类型:" />
<hc:ComboBox
x:Name="SqlQueryComboBox"
Width="200"
Margin="10"
DisplayMemberPath="Name"
SelectedValuePath="Sql" />
<Button
x:Name="ExecuteButton"
Margin="10"
VerticalAlignment="Center"
Click="ExecuteButton_Click"
Content="执行" />
</StackPanel>
<avalonEdit:TextEditor
Name="TextEditor"
Grid.Row="1"
2025-01-22 16:56:28 +08:00
Grid.Column="0"
2025-01-06 12:19:00 +08:00
MinHeight="200"
VerticalAlignment="Stretch"
FontFamily="Consolas"
FontSize="14pt"
LineNumbersForeground="Black"
ShowLineNumbers="True"
SyntaxHighlighting="SQL" />
2025-01-22 16:56:28 +08:00
<ListBox
x:Name="FunctionListBox"
Grid.Row="1"
Grid.Column="1"
Margin="5"
SelectionChanged="FunctionListBox_SelectionChanged">
<ListBoxItem Content="INSTALL spatial; LOAD spatial;" />
<ListBoxItem Content="st_read()" />
<!-- ...add more functions if needed... -->
</ListBox>
2025-01-06 12:19:00 +08:00
<DataGrid
x:Name="ResultDataGrid"
Grid.Row="2"
Grid.Column="0"
Grid.ColumnSpan="2"
Margin="5"
2025-01-22 16:56:28 +08:00
HorizontalAlignment="Stretch"
ColumnWidth="*"
hc:DataGridAttach.CanUnselectAllWithBlankArea="True"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
MinColumnWidth="100" />
<StackPanel
Grid.Row="3"
Orientation="Horizontal">
<TextBlock
x:Name="StatusTextBlock"
Margin="5"
Text="准备就绪" />
</StackPanel>
2025-01-06 12:19:00 +08:00
</Grid>
</Page>