153 lines
7.2 KiB
XML
153 lines
7.2 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"
|
|
MinWidth="800" MinHeight="500"
|
|
WindowTitleBrush="FireBrick"
|
|
Icon="pack://application:,,,/Images/databaseicon.png"
|
|
ResizeMode="CanResizeWithGrip"
|
|
WindowStartupLocation="CenterScreen">
|
|
|
|
<Border BorderBrush="FireBrick" BorderThickness="3">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="500" MinWidth="400"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- Linke Seite -->
|
|
<Border Grid.Column="0" Margin="10" Padding="10">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<!-- Drag & Drop -->
|
|
<RowDefinition Height="Auto"/>
|
|
<!-- Upload/Auswahl-Buttons -->
|
|
<RowDefinition Height="Auto"/>
|
|
<!-- Suchmodus -->
|
|
<RowDefinition Height="Auto"/>
|
|
<!-- Suchfeld -->
|
|
<RowDefinition Height="*"/>
|
|
<!-- Suchergebnisse -->
|
|
<RowDefinition Height="Auto"/>
|
|
<!-- Status -->
|
|
<RowDefinition Height="Auto"/>
|
|
<!-- Zurück-Button -->
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Drag & Drop Bereich -->
|
|
<Border Grid.Row="0" Height="75" Margin="0,5"
|
|
BorderBrush="Gray" BorderThickness="1">
|
|
<Grid Background="Transparent" AllowDrop="True"
|
|
DragEnter="PdfDropCanvas_DragEnter"
|
|
Drop="PdfDropCanvas_Drop">
|
|
<TextBlock x:Name="DropHintText" Text="PDF hier rein ziehen"
|
|
VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
|
<Image x:Name="PdfIcon" Source="pack://application:,,,/Images/pdf-icon.png"
|
|
Width="25" Height="25" Visibility="Collapsed"/>
|
|
<TextBlock x:Name="PdfFileNameText" Margin="10"
|
|
TextWrapping="Wrap" Visibility="Collapsed"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Upload/Auswahl-Buttons -->
|
|
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,10">
|
|
<Button Content="PDF hochladen"
|
|
Width="210" Height="30"
|
|
Background="LightGreen"
|
|
Click="UploadButton_Click"/>
|
|
|
|
<Button Content="PDF auswählen"
|
|
Width="210" Height="30" Margin="40,0,0,0"
|
|
Background="Firebrick"
|
|
Click="ChoosePdfButton_Click"/>
|
|
</StackPanel>
|
|
|
|
<!-- Suchmodus-Auswahl -->
|
|
<StackPanel Grid.Row="2" Orientation="Horizontal" Margin="0,10">
|
|
<RadioButton x:Name="SearchByIdRadio"
|
|
Content="ID"
|
|
Margin="5"
|
|
IsChecked="True"/>
|
|
<RadioButton x:Name="SearchByTextRadio"
|
|
Content="Text"
|
|
Margin="5"/>
|
|
</StackPanel>
|
|
|
|
<!-- Suchfeld -->
|
|
<StackPanel Grid.Row="3" Margin="0,10">
|
|
<TextBox x:Name="SearchTextBox"
|
|
Margin="0,0,0,5"
|
|
HorizontalAlignment="Stretch"/>
|
|
<Button Content="Suchen"
|
|
x:Name="SearchButton"
|
|
Height="30"
|
|
HorizontalAlignment="Stretch"
|
|
Click="SearchButton_Click"/>
|
|
</StackPanel>
|
|
|
|
<!-- Suchergebnisse -->
|
|
<ListBox Grid.Row="4"
|
|
x:Name="SearchResultsListBox"
|
|
Margin="0,10"
|
|
DisplayMemberPath="DocumentName"
|
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
|
SelectionMode="Extended"
|
|
SelectionChanged="SearchResultsListBox_SelectionChanged"/>
|
|
|
|
<!-- Status & Fortschritt -->
|
|
<StackPanel Grid.Row="5" Orientation="Vertical" Margin="0,10">
|
|
<TextBlock x:Name="UploadStatusText" TextAlignment="Center"/>
|
|
<ProgressBar x:Name="UploadProgressBar"
|
|
Height="10"
|
|
Minimum="0"
|
|
Maximum="100"
|
|
Visibility="Collapsed"/>
|
|
</StackPanel>
|
|
|
|
<!-- Zurück-Button -->
|
|
<Button Grid.Row="6"
|
|
Content="Zurück zur Anmeldung"
|
|
Height="30" Margin="0,10"
|
|
HorizontalAlignment="Stretch"
|
|
Background="#ffd64f"
|
|
Click="BackToLogIn_Click"/>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Rechte Seite -->
|
|
<Border Grid.Column="1" Margin="10">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Label Content="PDF-Inhalt:" Margin="0,0,0,5"/>
|
|
|
|
<TextBox Grid.Row="1"
|
|
x:Name="ContentTextBox"
|
|
TextWrapping="Wrap"
|
|
AcceptsReturn="True"
|
|
VerticalScrollBarVisibility="Auto"
|
|
HorizontalScrollBarVisibility="Auto"
|
|
IsReadOnly="True"/>
|
|
|
|
<Button Grid.Row="2"
|
|
Content="Löschen"
|
|
Width="100" Height="30"
|
|
Margin="0,10"
|
|
HorizontalAlignment="Center"
|
|
Background="Firebrick"
|
|
Click="DeleteButton_Click"/>
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
</Border>
|
|
</mah:MetroWindow> |