Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
522970f341 | ||
|
|
74208a4f04 | ||
|
|
9cd6500da9 | ||
|
|
c223ca222d |
@@ -71,4 +71,11 @@
|
||||
|
||||
<Folder Include="assets\fonts\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="PreviewWindow.axaml.cs">
|
||||
<DependentUpon>PreviewWindow.axaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
<Window xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" Icon="assets/icon.ico"
|
||||
xmlns:local="using:Logof_Client"
|
||||
x:Class="Logof_Client.PreviewWindow"
|
||||
Title="Datensätze bearbeiten" x:DataType="local:PreviewWindow">
|
||||
<Grid Grid.ColumnDefinitions="*">
|
||||
<ScrollViewer Grid.Column="0" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
|
||||
<DataGrid x:Name="AddressGrid"
|
||||
ItemsSource="{Binding Addresses}"
|
||||
AutoGenerateColumns="False"
|
||||
IsReadOnly="False"
|
||||
SelectionMode="Extended"
|
||||
GridLinesVisibility="All">
|
||||
|
||||
<DataGrid.Columns>
|
||||
|
||||
<DataGridTextColumn Header="ID"
|
||||
Binding="{Binding id}"
|
||||
IsReadOnly="True" />
|
||||
|
||||
<DataGridTextColumn Header="RefSID"
|
||||
Binding="{Binding refsid}" />
|
||||
|
||||
<DataGridTextColumn Header="Anrede"
|
||||
Binding="{Binding anrede}" />
|
||||
|
||||
<DataGridTextColumn Header="Titel"
|
||||
Binding="{Binding titel}" />
|
||||
|
||||
<DataGridTextColumn Header="Vorname"
|
||||
Binding="{Binding vorname}" />
|
||||
|
||||
<DataGridTextColumn Header="Adel"
|
||||
Binding="{Binding adel}" />
|
||||
|
||||
<DataGridTextColumn Header="Name"
|
||||
Binding="{Binding name}" />
|
||||
|
||||
<DataGridTextColumn Header="Namenszusatz"
|
||||
Binding="{Binding namezus}" />
|
||||
|
||||
<DataGridTextColumn Header="Anredzusatz"
|
||||
Binding="{Binding anredzus}" />
|
||||
|
||||
<DataGridTextColumn Header="Straße"
|
||||
Binding="{Binding strasse}" />
|
||||
|
||||
<DataGridTextColumn Header="Straße 2"
|
||||
Binding="{Binding strasse2}" />
|
||||
|
||||
<DataGridTextColumn Header="PLZ"
|
||||
Binding="{Binding plz}" />
|
||||
|
||||
<DataGridTextColumn Header="Ort"
|
||||
Binding="{Binding ort}" />
|
||||
|
||||
<DataGridTextColumn Header="Land"
|
||||
Binding="{Binding land}" />
|
||||
|
||||
<DataGridTextColumn Header="PPLZ"
|
||||
Binding="{Binding pplz}" />
|
||||
|
||||
<DataGridTextColumn Header="Postfach"
|
||||
Binding="{Binding postfach}" />
|
||||
|
||||
<DataGridTextColumn Header="Name 1"
|
||||
Binding="{Binding name1}" />
|
||||
|
||||
<DataGridTextColumn Header="Name 2"
|
||||
Binding="{Binding name2}" />
|
||||
|
||||
<DataGridTextColumn Header="Name 3"
|
||||
Binding="{Binding name3}" />
|
||||
|
||||
<DataGridTextColumn Header="Name 4"
|
||||
Binding="{Binding name4}" />
|
||||
|
||||
<DataGridTextColumn Header="Name 5"
|
||||
Binding="{Binding name5}" />
|
||||
|
||||
<DataGridTextColumn Header="Funktion"
|
||||
Binding="{Binding funktion}" />
|
||||
|
||||
<DataGridTextColumn Header="Funktion 2"
|
||||
Binding="{Binding funktion2}" />
|
||||
|
||||
<DataGridTextColumn Header="Abteilung"
|
||||
Binding="{Binding abteilung}" />
|
||||
|
||||
<DataGridTextColumn Header="Funktion AD"
|
||||
Binding="{Binding funktionad}" />
|
||||
|
||||
</DataGrid.Columns>
|
||||
|
||||
</DataGrid>
|
||||
<!-- <StackPanel x:Name="StkResults" Orientation="Vertical" Margin="10" /> -->
|
||||
</ScrollViewer>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Layout;
|
||||
using Avalonia.Media;
|
||||
|
||||
namespace Logof_Client;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
public partial class PreviewWindow : Window, INotifyPropertyChanged
|
||||
{
|
||||
|
||||
public PreviewWindow(IEnumerable<KasPerson> addresses)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
Addresses = new ObservableCollection<KasPerson>(addresses);
|
||||
|
||||
DataContext = this;
|
||||
}
|
||||
public ObservableCollection<KasPerson> Addresses { get; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@
|
||||
<!-- </DataGrid.Columns> -->
|
||||
<!-- -->
|
||||
<!-- </DataGrid> -->
|
||||
<ListBox ItemsSource="{Binding Results}" SelectedItems="{Binding SelectedResults}">
|
||||
<ListBox ItemsSource="{Binding Results}" SelectionMode="Multiple" x:Name="LbResults" SelectedItems="{Binding SelectedResults}">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel />
|
||||
|
||||
+14
-1
@@ -230,7 +230,20 @@ public partial class ResultWindow : Window, INotifyPropertyChanged
|
||||
|
||||
private void BtnShowSelected_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
// once upon a time, there was a feature like this
|
||||
if (LbResults.SelectedItems.Count > 0)
|
||||
{
|
||||
var selectedPersons = LbResults.SelectedItems
|
||||
.Cast<ResultItem>()
|
||||
.Select(x => x.Person)
|
||||
.ToList();
|
||||
|
||||
if (selectedPersons.Count == 0)
|
||||
return;
|
||||
|
||||
var preview = new PreviewWindow(selectedPersons);
|
||||
preview.Show();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void BtnExecuteFilter_OnClick(object? sender, RoutedEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user