204 lines
6.8 KiB
XML
204 lines
6.8 KiB
XML
<mah:MetroWindow xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
|
|
x:Class="PrototypWPFHAG.SearchWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="clr-namespace:PrototypWPFHAG"
|
|
Title="PDF-Verwaltung (Admin)" Height="600" Width="1000"
|
|
WindowTitleBrush="FireBrick"
|
|
Icon="pack://application:,,,/Images/databaseicon.png">
|
|
<Grid>
|
|
<!-- 左侧垂直布局 -->
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="56.527"/>
|
|
<ColumnDefinition Width="143.473"/>
|
|
<!-- 左侧固定宽度 -->
|
|
<ColumnDefinition Width="*"/>
|
|
<!-- 右侧占满剩余空间 -->
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- 左侧区域 -->
|
|
<Border
|
|
BorderBrush="FireBrick"
|
|
BorderThickness="3" Padding="20"
|
|
Grid.ColumnSpan="3"
|
|
/>
|
|
|
|
<StackPanel
|
|
Orientation="Vertical"
|
|
Margin="10,10,772,10"
|
|
Grid.ColumnSpan="3">
|
|
<Grid
|
|
Margin="0,0,0,10"
|
|
Height="85">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition
|
|
Width="*"
|
|
/>
|
|
<ColumnDefinition
|
|
Width="Auto"
|
|
/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition
|
|
Height="Auto"
|
|
/>
|
|
<RowDefinition
|
|
Height="Auto"
|
|
/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Border
|
|
BorderBrush="Gray"
|
|
BorderThickness="1"
|
|
Margin="5,10,0,-85" Grid.Row="1">
|
|
<Canvas
|
|
x:Name="PdfDropCanvas"
|
|
Margin="5,0,0,-24"
|
|
Grid.RowSpan="2"
|
|
AllowDrop="True"
|
|
Background="Transparent"
|
|
DragEnter="PdfDropCanvas_DragEnter"
|
|
Drop="PdfDropCanvas_Drop">
|
|
|
|
<TextBlock
|
|
x:Name="DropHintText"
|
|
Text="PDF hier rein ziehen"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Foreground="Gray"
|
|
/>
|
|
|
|
<!-- Vorschau-Elemente (unsichtbar, bis eine Datei abgelegt wird) -->
|
|
<Image
|
|
x:Name="PdfIcon"
|
|
Source="pack://application:,,,/Images/pdf-icon.png"
|
|
Width="25" Height="25"
|
|
Margin="0,5,0,0"
|
|
Visibility="Collapsed"
|
|
/>
|
|
<TextBlock
|
|
x:Name="PdfFileNameText"
|
|
Margin="40,10,0,0"
|
|
Visibility="Collapsed"
|
|
/>
|
|
</Canvas>
|
|
</Border>
|
|
|
|
|
|
</Grid>
|
|
|
|
<!-- PDFField -->
|
|
<Grid Margin="0,0,0,10">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition
|
|
Width="*"
|
|
/>
|
|
<ColumnDefinition
|
|
Width="Auto"
|
|
/>
|
|
</Grid.ColumnDefinitions>
|
|
<Button
|
|
Content="PDF hochladen"
|
|
Width="auto" Height="30"
|
|
Margin="5,0,0,0"
|
|
Background="LightGreen"
|
|
Click="UploadButton_Click"
|
|
/>
|
|
|
|
</Grid>
|
|
|
|
<StackPanel Orientation="Horizontal" Margin="5,10">
|
|
<RadioButton x:Name="SearchByIdRadio" Content="ID" IsChecked="True"/>
|
|
<RadioButton x:Name="SearchByTextRadio" Content="Text" Margin="10,0"/>
|
|
</StackPanel>
|
|
|
|
<TextBox
|
|
x:Name="SearchTextBox"
|
|
Margin="5,0,0,0"
|
|
/>
|
|
|
|
<Button
|
|
Content="Suchen"
|
|
x:Name="SearchButton"
|
|
Click="SearchButton_Click"
|
|
Margin="5,10,0,10"
|
|
/>
|
|
|
|
<!-- ListField -->
|
|
<ListBox
|
|
x:Name="SearchResultsListBox"
|
|
DisplayMemberPath="Filename"
|
|
Margin="5,0,0,0"
|
|
ItemsSource="{Binding}"
|
|
SelectionMode="Extended"
|
|
SelectionChanged="SearchResultsListBox_SelectionChanged"
|
|
/>
|
|
|
|
<TextBlock
|
|
x:Name="UploadStatusText"
|
|
TextAlignment="Center" Margin="0,35,0,35" Height="27"
|
|
/>
|
|
|
|
<ProgressBar
|
|
x:Name="UploadProgressBar"
|
|
Height="10"
|
|
Minimum="0" Maximum="100"
|
|
Visibility="Collapsed"
|
|
Margin="0,20,0,0"
|
|
/>
|
|
|
|
<Button
|
|
Content="Zurück zur Anmeldung"
|
|
Click="BackToLogIn_Click"
|
|
Margin="5,10,0,0"
|
|
Height="30"
|
|
Background="#ffd64f"
|
|
/>
|
|
|
|
</StackPanel>
|
|
|
|
<!-- 右侧区域 -->
|
|
<Grid
|
|
Grid.Column="2"
|
|
Margin="60,10,10,10">
|
|
|
|
<Label
|
|
Content="PDF-Inhalt:"
|
|
HorizontalAlignment="Left"
|
|
Margin="0,2,0,8"
|
|
/>
|
|
|
|
<ScrollViewer
|
|
x:Name="ContentScrollViewer"
|
|
Margin="0,0,0,35"
|
|
VerticalScrollBarVisibility="Auto"
|
|
HorizontalScrollBarVisibility="Auto">
|
|
|
|
<TextBox
|
|
x:Name="ContentTextBox"
|
|
Text="{Binding SelectedDocument.Content}"
|
|
IsReadOnly="True"
|
|
TextWrapping="Wrap"
|
|
AcceptsReturn="True"
|
|
VerticalScrollBarVisibility="Auto"
|
|
HorizontalScrollBarVisibility="Auto"
|
|
Margin="5,25, 0, 35"
|
|
Height="Auto"
|
|
MinHeight="494"
|
|
/>
|
|
|
|
</ScrollViewer>
|
|
|
|
<!-- 删除按钮 -->
|
|
<Button
|
|
Content="Löschen"
|
|
Width="100"
|
|
Height="30"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Bottom"
|
|
Background="Firebrick"
|
|
Click="DeleteButton_Click"
|
|
/>
|
|
</Grid>
|
|
</Grid>
|
|
</mah:MetroWindow> |