Merge branch 'master' of ssh://float.beyondsoft.de/git/beyondSoft/BeWo

This commit is contained in:
Christian
2025-04-15 00:51:31 +02:00
344 changed files with 46612 additions and 11116 deletions

2
.gitignore vendored
View File

@@ -3,6 +3,8 @@
.editorconfig
DebugConfig.txt
Host/Multitenancy/demo.config
*.log.txt
*temp.txt
# Folder
bin[Rr]elease/

View File

@@ -1,5 +1,6 @@
using BeWo.AI.View;
using BeWo.View;
using BeWo.View.Windows;
using BS.Shared;
using BS.Shared.Translation;
using System;

View File

@@ -1,18 +1,23 @@
<view:BeWoView x:Class="BeWo.AI.View.AiChatView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:view="clr-namespace:BeWo.View"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:validation="clr-namespace:BeWo.Validation"
xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared"
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:controls="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
mc:Ignorable="d" VerticalAlignment="Stretch" Focusable="True">
<view:BeWoView
x:Class="BeWo.AI.View.AiChatView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:validation="clr-namespace:BeWo.Validation"
xmlns:view="clr-namespace:BeWo.View"
Width="Auto"
Height="Auto"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Focusable="True"
mc:Ignorable="d">
<view:BeWoView.Resources>
<!--<Expander x:Name="ExpanderTemplate" IsExpanded="True">
<Expander.Header>
@@ -25,60 +30,120 @@
</Expander.Header>
</Expander>-->
</view:BeWoView.Resources>
<Grid Margin="0" Background="{DynamicResource ObjectEditBackgroundBrush}">
<Grid Margin="0" Background="{DynamicResource ObjectEditBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<dxlc:LayoutControl Orientation="Vertical" Padding="0">
<dxlc:LayoutGroup dxlc:LayoutControl.AllowVerticalSizing="True" Height="200">
<dxlc:LayoutControl Padding="0" Orientation="Vertical">
<dxlc:LayoutGroup Height="200" dxlc:LayoutControl.AllowVerticalSizing="True">
<Grid Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Button Grid.Row="0" Content="Einstellungen" HorizontalAlignment="Left" Click="btnSettings_Click"/>
<Popup Grid.Row="0" Grid.RowSpan="3" StaysOpen="True" Placement="MousePoint" Width="400" Height="300" x:Name="PopupTemplate">
<Grid Background="{DynamicResource ObjectEditBackgroundBrush}" Margin="2,2,2,2">
<Button
Grid.Row="0"
HorizontalAlignment="Left"
Click="btnSettings_Click"
Content="Einstellungen" />
<Popup
x:Name="PopupTemplate"
Grid.Row="0"
Grid.RowSpan="3"
Width="400"
Height="300"
Placement="MousePoint"
StaysOpen="True">
<Grid Margin="2,2,2,2" Background="{DynamicResource ObjectEditBackgroundBrush}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Content="{t:Translate Datensatz Template}"></Label>
<TextBox x:Name="TextBoxTemplate" Grid.Row="1" MinHeight="60" AcceptsReturn="True" AcceptsTab="True" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"></TextBox>
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Grid.Row="2" Content="Übernehmen" Click="btnSaveSettings_Click" Margin="3"/>
<Button Grid.Row="2" Content="Abbrechen" Click="btnCancelSettings_Click" Margin="3"/>
<Label Grid.Row="0" Content="{t:Translate Datensatz Template}" />
<TextBox
x:Name="TextBoxTemplate"
Grid.Row="1"
MinHeight="60"
AcceptsReturn="True"
AcceptsTab="True"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto" />
<StackPanel
Grid.Row="2"
HorizontalAlignment="Right"
Orientation="Horizontal">
<Button
Grid.Row="2"
Margin="3"
Click="btnSaveSettings_Click"
Content="Übernehmen" />
<Button
Grid.Row="2"
Margin="3"
Click="btnCancelSettings_Click"
Content="Abbrechen" />
</StackPanel>
</Grid>
</Popup>
<Label Grid.Row="1" Content="{t:Translate Formulieren Sie hier Ihre Anfrage}"></Label>
<TextBox x:Name="TextBoxAnfrage" Grid.Row="2" MinHeight="60" AcceptsReturn="True" AcceptsTab="True" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"></TextBox>
<Label Grid.Row="1" Content="{t:Translate Formulieren Sie hier Ihre Anfrage}" />
<TextBox
x:Name="TextBoxAnfrage"
Grid.Row="2"
MinHeight="60"
AcceptsReturn="True"
AcceptsTab="True"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto" />
</Grid>
</dxlc:LayoutGroup>
<dxlc:LayoutGroup dxlc:LayoutControl.AllowVerticalSizing="True">
<Grid Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label Content="{t:Translate Ergebnis}"></Label>
<TextBox x:Name="TextBoxErgebnis" Grid.Row="1" MinHeight="60" AcceptsReturn="True" AcceptsTab="True" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" TextWrapping="Wrap" ></TextBox>
<Label Content="{t:Translate Ergebnis}" />
<TextBox
x:Name="TextBoxErgebnis"
Grid.Row="1"
MinHeight="60"
AcceptsReturn="True"
AcceptsTab="True"
HorizontalScrollBarVisibility="Disabled"
TextWrapping="Wrap"
VerticalScrollBarVisibility="Auto" />
</Grid>
</dxlc:LayoutGroup>
</dxlc:LayoutControl>
<StackPanel Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Center" Height="Auto" Margin="5,10,10,10" HorizontalAlignment="Right">
<Button x:Name="btnSend" Content="{t:Translate Absenden}" Margin="0,0,3,0" Height="25" Click="btnSend_Click"/>
<Button x:Name="btnClose" Content=" Schließen " Margin="0,0,3,0" Height="25" Click="btnClose_Click"/>
<StackPanel
Grid.Row="1"
Height="Auto"
Margin="5,10,10,10"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Orientation="Horizontal">
<Button
x:Name="btnSend"
Height="25"
Margin="0,0,3,0"
Click="btnSend_Click"
Content="{t:Translate Absenden}" />
<Button
x:Name="btnClose"
Height="25"
Margin="0,0,3,0"
Click="btnClose_Click"
Content=" Schließen " />
</StackPanel>
</Grid>
</view:BeWoView>

View File

@@ -94,6 +94,32 @@
</StartupObject>
</PropertyGroup>
<ItemGroup>
<Compile Include="Converter\NewlineConverter.cs" />
<Compile Include="ServiceProxy\GeneratedAiEnhancedService.cs" />
<Compile Include="ViewModel\AiConfigVM.cs" />
<Compile Include="View\Detail\AI\AiConfigView.xaml.cs">
<DependentUpon>AiConfigView.xaml</DependentUpon>
</Compile>
<Compile Include="View\Detail\AI\AiConversationChatModalPopup.xaml.cs">
<DependentUpon>AiConversationChatModalPopup.xaml</DependentUpon>
</Compile>
<Compile Include="View\TemplateSelectors\AiConversationMessageTemplateSelector.cs" />
<Compile Include="View\Windows\AiWindowBuilder.cs" />
<Compile Include="View\Windows\AnimatedBeWoWindow.xaml.cs">
<DependentUpon>AnimatedBeWoWindow.xaml</DependentUpon>
</Compile>
<Page Include="View\Detail\AI\AiConfigView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Detail\AI\AiConversationChatModalPopup.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="View\Windows\AnimatedBeWoWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Reference Include="Blacklight.Wpf.Controls, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Lib\Blacklight.Wpf.Controls.dll</HintPath>
@@ -324,6 +350,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\ControlStyles\WindowStyles.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\DataTemplates\ControlTemplates.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -332,6 +362,14 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\DataTemplates\WindowTemplates.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\Features\AIChatStyles.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Styles\ModernOrangeBlack.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -410,6 +448,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Detail\AI\AiConversationChatView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Detail\CustomerVermittlungArbeitView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -669,6 +711,10 @@
<Page Include="View\Document\DokumenteView.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</Page>
<Page Include="View\Master\AiConversationView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Master\SchedulingMasterView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -1124,6 +1170,7 @@
<Compile Include="SchulbegleitenderDienst\WochenansichtVM.cs" />
<Compile Include="SchulbegleitenderDienst\WochenVertretung.cs" />
<Compile Include="Security\EncryptionUtils.cs" />
<Compile Include="ServiceProxy\GeneratedOperationsEnhancedService.cs" />
<Compile Include="UploadDialog.xaml.cs">
<DependentUpon>UploadDialog.xaml</DependentUpon>
</Compile>
@@ -1198,9 +1245,13 @@
<Compile Include="ViewModel\AdditionalServiceGroupOfPeopleVM.cs" />
<Compile Include="ViewModel\AdditionalServiceRegionVM.cs" />
<Compile Include="ViewModel\AdditionalServiceVM.cs" />
<Compile Include="ViewModel\AiConversationMessageVM.cs" />
<Compile Include="ViewModel\AiConversationVM.cs" />
<Compile Include="ViewModel\BaseVM.cs" />
<Compile Include="ViewModel\CustomerVermittlungArbeitVM.cs" />
<Compile Include="ViewModel\ListViewModel\AbstractListVM.cs" />
<Compile Include="ViewModel\ListViewModel\AiConversationMessageListVM.cs" />
<Compile Include="ViewModel\ListViewModel\AiConversationListVM.cs" />
<Compile Include="ViewModel\ListViewModel\CustomerVermittlungArbeitListVM.cs" />
<Compile Include="ViewModel\Wohnhilfe\CustomerWohnhilfeBereichBundVM.cs" />
<Compile Include="ViewModel\Wohnhilfe\CustomerWohnhilfeBereichEinkommenUndArbeitVM.cs" />
@@ -1332,6 +1383,9 @@
<Compile Include="View\Detail\Administration\SoziotherapieSettingsView.xaml.cs">
<DependentUpon>SoziotherapieSettingsView.xaml</DependentUpon>
</Compile>
<Compile Include="View\Detail\AI\AiConversationChatView.xaml.cs">
<DependentUpon>AiConversationChatView.xaml</DependentUpon>
</Compile>
<Compile Include="View\Detail\CustomerVermittlungArbeitView.xaml.cs">
<DependentUpon>CustomerVermittlungArbeitView.xaml</DependentUpon>
</Compile>
@@ -1375,7 +1429,7 @@
<Compile Include="View\HilfeplanImportView.xaml.cs">
<DependentUpon>HilfeplanImportView.xaml</DependentUpon>
</Compile>
<Compile Include="View\BeWoWindowBuilder.cs" />
<Compile Include="View\Windows\BeWoWindowBuilder.cs" />
<Compile Include="View\Controls\DPCtrlEmployeeContractTooltip.xaml.cs">
<DependentUpon>DPCtrlEmployeeContractTooltip.xaml</DependentUpon>
</Compile>
@@ -1546,6 +1600,9 @@
<Compile Include="View\Document\DokumenteView.xaml.cs">
<DependentUpon>DokumenteView.xaml</DependentUpon>
</Compile>
<Compile Include="View\Master\AiConversationView.xaml.cs">
<DependentUpon>AiConversationView.xaml</DependentUpon>
</Compile>
<Compile Include="View\Master\SchedulingMasterView.xaml.cs">
<DependentUpon>SchedulingMasterView.xaml</DependentUpon>
</Compile>
@@ -3444,7 +3501,14 @@
<ItemGroup>
<Resource Include="Ressources\Icons\chatbot.png" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Resource Include="Ressources\Icons\chatbot2.png" />
</ItemGroup>
<ItemGroup>
<Folder Include="Converter\Features\" />
<Folder Include="Scripts\" />
<Folder Include="View\Controls\Popup\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>

View File

@@ -82,6 +82,7 @@
<conv:RadioBoolToIntConverter x:Key="RadioBoolToIntConverter" />
<conv:EnumTranslationConverter x:Key="EnumTranslationConverter" />
<conv:TooltipTextConverter x:Key="TooltipTextConverter" />
<conv:NewlineConverter x:Key="NewlineConverter" />
<conv:ValidationConverter x:Key="ValidationConverter" />
<conv:ValueConverterGroup x:Key="Validation2BrushConverter">
@@ -605,9 +606,13 @@
Grid.RowSpan="1"
Grid.Column="0"
Grid.ColumnSpan="2"
Padding="5,5,5,5">
Padding="5,5,5,5"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<ContentPresenter
Margin="0,0,0,0"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Content="{TemplateBinding Content}"
ContentStringFormat="{TemplateBinding ContentStringFormat}"
ContentTemplate="{TemplateBinding ContentTemplate}"

View File

@@ -35,6 +35,7 @@ using DevExpress.Xpf.Grid;
using DevExpress.Xpf.Scheduling;
using DevExpress.XtraScheduler;
using System.ServiceModel;
using BeWo.View.Windows;
namespace BeWo
{
@@ -50,6 +51,7 @@ namespace BeWo
public static LoginControl LoginControl;
public static MainControl MainControl;
public static string ShortVersion = "3.24";
public static string Version = "Version 3.24";
@@ -557,6 +559,8 @@ namespace BeWo
val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.DontUpdateApprovalPeriodDates);
AppSettings.DontUpdateApprovalPeriodDates = val != null && val.Equals("1");
// REFACTOR: getUserSetting verwenden?
AppSettings.ModuleAiEnabled = getUserSetting(SettingsKeys.ModuleAiEnabled);
switch (_Mandator.BeWoClientType)
{
@@ -626,6 +630,7 @@ namespace BeWo
//AppSettings.AllowGkvAbrechnung = true;
//AppSettings.AllowGkvAbrechnung = false;
//showInfoButtonInCalender = true;
AppSettings.ModuleAiEnabled = true;
#endif
AppSettings.ShowDatevFields = showDatevFields;
@@ -673,6 +678,13 @@ namespace BeWo
}
}
private static bool getUserSetting(string key)
{
var val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, key);
var allowed = val != null && val.Equals("1");
return allowed;
}
internal static Uri SiteOfOrigin
{
get
@@ -1360,6 +1372,10 @@ namespace BeWo
{
abc.Close();
}
else if (title.IndexOf("Fenster") >= 0)
{
abc.Close();
}
}
MainControl.HideCurrentModalViewWindows();

View File

@@ -1,10 +1,20 @@
<Window x:Class="BeWo.ConfirmDemoDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="BeWoPlaner" Height="240" Width="360" WindowStartupLocation="CenterScreen" WindowStyle="None" ResizeMode="NoResize" >
<Grid Background="{x:Null}" Margin="0,0,0,0">
<Border BorderThickness="1" Padding="5,5,5,5" BorderBrush="Black" Background="{DynamicResource LoginBackgroundColor}">
<Window
x:Class="BeWo.ConfirmDemoDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="BeWoPlaner"
Width="360"
Height="240"
ResizeMode="NoResize"
WindowStartupLocation="CenterScreen"
WindowStyle="None">
<Grid Margin="0,0,0,0" Background="{x:Null}">
<Border
Padding="5,5,5,5"
Background="{DynamicResource LoginBackgroundColor}"
BorderBrush="Black"
BorderThickness="1">
<Grid Opacity="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
@@ -17,27 +27,63 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Image Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Top" Source="Ressources\Icons\bewoplaner_logo_small.png" Height="45" Margin="7,7,0,0"/>
<Image
Grid.Row="0"
Height="45"
Margin="7,7,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Source="Ressources\Icons\bewoplaner_logo_small.png" />
<Grid Grid.Row="1" Margin="0,10,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" ></RowDefinition>
<RowDefinition Height="Auto" ></RowDefinition>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock TextWrapping="Wrap" Margin="3" FontSize="14">WICHTIG! Bitte tragen Sie keine echten Daten bei Ihren Tests ein, da es sich um einen öffentlichen Testzugang handelt, auf den jeder Zugriff hat!</TextBlock>
<Button x:Name="CountButton" Grid.Row="2" Grid.Column="1" Width="120" Margin="3,25,3,3" IsDefault="True" HorizontalAlignment="Right" Click="ButtonBase_OnClick">OK</Button>
<TextBlock
Margin="3"
FontSize="14"
TextWrapping="Wrap">
WICHTIG! Bitte tragen Sie keine echten Daten bei Ihren Tests ein, da es sich um einen öffentlichen Testzugang handelt, auf den jeder Zugriff hat!
</TextBlock>
<Button
x:Name="CountButton"
Grid.Row="2"
Grid.Column="1"
Width="120"
Margin="3,25,3,3"
HorizontalAlignment="Right"
Click="ButtonBase_OnClick"
IsDefault="True">
OK
</Button>
<!--<Button Grid.Row="2" Grid.Column ="2" Width="100" Margin="3" IsCancel="True" IsEnabled="False" HorizontalAlignment="Right">Abbrechen</Button>-->
</Grid>
</Grid>
</Border>
<Line Grid.ColumnSpan="4" Stroke="#FFADADAD" X1="14" Y1="70" X2="585" Y2="70" StrokeThickness="1"></Line>
<Line x:Name="linkLine" Stroke="#FFADADAD" X1="14" Y1="340" X2="585" Y2="340" StrokeThickness="1" Margin="0,30,0,-30"></Line>
<Line
Grid.ColumnSpan="4"
Stroke="#FFADADAD"
StrokeThickness="1"
X1="14"
X2="585"
Y1="70"
Y2="70" />
<Line
x:Name="linkLine"
Margin="0,30,0,-30"
Stroke="#FFADADAD"
StrokeThickness="1"
X1="14"
X2="585"
Y1="340"
Y2="340" />
</Grid>
</Window>

View File

@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
namespace BeWo.Converter
{
public class NewlineConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return value?.ToString()?
.Replace("\\r\\n", "\r\n")
.Replace("\\n", "\r\n")
.Replace("\\r", "\r\n");
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}

View File

@@ -485,6 +485,9 @@ namespace BeWo.Core.Config
public bool ShowAIInternal { get; set; }
public bool AllowGkvAbrechnung { get; set; }
public bool ModuleAiEnabled { get; set; }
public bool ShowWohnhilfe { get; set; }
public bool ShowImportAbschlagszahlungen { get; set; }

View File

@@ -10,7 +10,8 @@ namespace BeWo
FeatureCustomerWohnhilfe,
FeatureWohnheimWohneinheit,
FeatureAuswertungenQuittierungsbelege,
FeatureDakota
FeatureDakota,
FeatureAiModule
}
public class DebugConfig
@@ -47,8 +48,8 @@ namespace BeWo
/// - Wohnhilfe: 5
/// </summary>
public int? SelectIndex { get; set; }
public bool EnableAutoRemoteDebugging { get; set; }
public bool EnableAllUserRightsInDebug { get; set; } = false;
public static DebugConfig SimpleAutoLogin => new DebugConfig()
{
@@ -139,6 +140,19 @@ namespace BeWo
EnableAutoRemoteDebugging = true
});
name2config.Add("FeatureAiModule",
new DebugConfig()
{
DebugConfigMode = DebugConfigMode.FeatureAiModule,
AutoLogin = true,
//SelectView = UIContext.AiConversation,
//SelectIndex = 8,
//DefaultLoginUsername = "m1",
//DefaultLoginPassword = "bewobewo",
//DefaultProfilename = "5000000000",
EnableAutoRemoteDebugging = true
});
return name2config;
}
#endif

View File

@@ -1,10 +1,18 @@
<Window x:Class="BeWo.EnterTenantDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="BeWoPlaner" Height="240" Width="320" WindowStartupLocation="CenterScreen" WindowStyle="ToolWindow">
<Grid Background="{x:Null}" Margin="0,0,0,0">
<Border BorderThickness="0" Padding="5,5,5,5" Background="{DynamicResource LoginBackgroundColor}">
<Window
x:Class="BeWo.EnterTenantDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="BeWoPlaner"
Width="320"
Height="240"
WindowStartupLocation="CenterScreen"
WindowStyle="ToolWindow">
<Grid Margin="0,0,0,0" Background="{x:Null}">
<Border
Padding="5,5,5,5"
Background="{DynamicResource LoginBackgroundColor}"
BorderThickness="0">
<Grid Opacity="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
@@ -17,7 +25,13 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Image Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Top" Source="Ressources\Icons\bewoplaner_logo_small.png" Height="45" Margin="7,7,0,0"/>
<Image
Grid.Row="0"
Height="45"
Margin="7,7,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Source="Ressources\Icons\bewoplaner_logo_small.png" />
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
@@ -25,24 +39,70 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" ></RowDefinition>
<RowDefinition Height="Auto" ></RowDefinition>
<RowDefinition Height="Auto" ></RowDefinition>
<RowDefinition Height="Auto" ></RowDefinition>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock Grid.ColumnSpan="3" TextWrapping="Wrap" Margin="3">Bitte geben Sie Ihre 10-stellige Kundennummer ein:</TextBlock>
<TextBox x:Name="txtTenant" Grid.ColumnSpan="3" Grid.Row="1" Margin="3"></TextBox>
<Button Grid.Row="2" Grid.Column ="1" Width="100" Margin="3" IsDefault="True" Click="ButtonBase_OnClick">OK</Button>
<Button Grid.Row="2" Grid.Column ="2" Width="100" Margin="3" IsCancel="True" >Abbrechen</Button>
<CheckBox Grid.ColumnSpan="3" Grid.Row="3" Margin="3" Checked="ToggleButton_OnChecked" Unchecked="ToggleButton_OnUnchecked">Demo Zugang nutzen</CheckBox>
<TextBlock
Grid.ColumnSpan="3"
Margin="3"
TextWrapping="Wrap">
Bitte geben Sie Ihre 10-stellige Kundennummer ein:
</TextBlock>
<TextBox
x:Name="txtTenant"
Grid.Row="1"
Grid.ColumnSpan="3"
Margin="3" />
<Button
Grid.Row="2"
Grid.Column="1"
Width="100"
Margin="3"
Click="ButtonBase_OnClick"
IsDefault="True">
OK
</Button>
<Button
Grid.Row="2"
Grid.Column="2"
Width="100"
Margin="3"
IsCancel="True">
Abbrechen
</Button>
<CheckBox
Grid.Row="3"
Grid.ColumnSpan="3"
Margin="3"
Checked="ToggleButton_OnChecked"
Unchecked="ToggleButton_OnUnchecked">
Demo Zugang nutzen
</CheckBox>
</Grid>
</Grid>
</Border>
<Line Grid.ColumnSpan="4" Stroke="#FFADADAD" X1="14" Y1="70" X2="585" Y2="70" StrokeThickness="1"></Line>
<Line x:Name="linkLine" Stroke="#FFADADAD" X1="14" Y1="340" X2="585" Y2="340" StrokeThickness="1" Margin="0,30,0,-30"></Line>
<Line
Grid.ColumnSpan="4"
Stroke="#FFADADAD"
StrokeThickness="1"
X1="14"
X2="585"
Y1="70"
Y2="70" />
<Line
x:Name="linkLine"
Margin="0,30,0,-30"
Stroke="#FFADADAD"
StrokeThickness="1"
X1="14"
X2="585"
Y1="340"
Y2="340" />
</Grid>
</Window>

View File

@@ -1,14 +1,22 @@
<Page x:Class="BeWo.LockedPage"
Title="LockedPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
mc:Ignorable="d" Width="Auto" Background="{StaticResource LoginBackground}" SnapsToDevicePixels="False" Focusable="True">
<Page
x:Class="BeWo.LockedPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="LockedPage"
Width="Auto"
Background="{StaticResource LoginBackground}"
Focusable="True"
SnapsToDevicePixels="False"
mc:Ignorable="d">
<Page.Resources>
<Storyboard x:Key="OnLoaded1">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GridLogin" Storyboard.TargetProperty="(UIElement.Opacity)">
<DoubleAnimationUsingKeyFrames
BeginTime="00:00:00"
Storyboard.TargetName="GridLogin"
Storyboard.TargetProperty="(UIElement.Opacity)">
<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0" />
<SplineDoubleKeyFrame KeyTime="00:00:01" Value="1" />
</DoubleAnimationUsingKeyFrames>
@@ -21,7 +29,14 @@
</Page.Triggers>
<Grid>
<StackPanel HorizontalAlignment="Center">
<Grid Background="{x:Null}" Height="400" Width="600" Visibility="Visible" x:Name="GridLogin" RenderTransformOrigin="0.5,0.5" Margin="0,0,0,0">
<Grid
x:Name="GridLogin"
Width="600"
Height="400"
Margin="0,0,0,0"
Background="{x:Null}"
RenderTransformOrigin="0.5,0.5"
Visibility="Visible">
<Grid.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
@@ -30,7 +45,12 @@
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Grid.RenderTransform>
<Border CornerRadius="7,7,7,7" BorderThickness="2,2,2,2" Padding="5,5,5,5" BorderBrush="#FF606060" Background="{DynamicResource LoginBackgroundColor}">
<Border
Padding="5,5,5,5"
Background="{DynamicResource LoginBackgroundColor}"
BorderBrush="#FF606060"
BorderThickness="2,2,2,2"
CornerRadius="7,7,7,7">
<Grid Opacity="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100" />
@@ -44,31 +64,142 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Image Grid.Row="0" Grid.ColumnSpan="4" HorizontalAlignment="Left" VerticalAlignment="Top" Source="Ressources\Icons\bewoplaner_logo_small.png" Height="45" Margin="7,7,0,0"/>
<Label VerticalAlignment="Top" HorizontalAlignment="Right" Content="Version x.x.x" Foreground="#FF818181" Margin="5,7,3,0" Grid.Row="0" Grid.ColumnSpan="4" Grid.Column="0" FontSize="10" x:Name="LblVersion" />
<StackPanel Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="2" Margin="0,100,0,0" MaxWidth="330">
<Label x:Name="lblGesperrt" Content="Gesperrt" Foreground="#FF000000" FontSize="12" FontWeight="Bold" Margin="0,30,0,0" HorizontalAlignment="Center" />
<TextBlock Text="Bitte melden Sie sich an, um den BeWoPlaner zu entsperren." TextWrapping="Wrap" Foreground="#FF000000" FontSize="12" />
<Image
Grid.Row="0"
Grid.ColumnSpan="4"
Height="45"
Margin="7,7,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Source="Ressources\Icons\bewoplaner_logo_small.png" />
<Label
x:Name="LblVersion"
Grid.Row="0"
Grid.Column="0"
Grid.ColumnSpan="4"
Margin="5,7,3,0"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Content="Version x.x.x"
FontSize="10"
Foreground="#FF818181" />
<StackPanel
Grid.Row="0"
Grid.Column="1"
Grid.ColumnSpan="2"
MaxWidth="330"
Margin="0,100,0,0">
<Label
x:Name="lblGesperrt"
Margin="0,30,0,0"
HorizontalAlignment="Center"
Content="Gesperrt"
FontSize="12"
FontWeight="Bold"
Foreground="#FF000000" />
<TextBlock
FontSize="12"
Foreground="#FF000000"
Text="Bitte melden Sie sich an, um den BeWoPlaner zu entsperren."
TextWrapping="Wrap" />
</StackPanel>
<Label Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Right" Content="{markup:Translate Benutzername:}" Foreground="#FF000000" Background="#00000000" />
<Label Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left" Content="Passwort:" Foreground="#FF000000" Background="#00000000" />
<TextBox TabIndex="0" SnapsToDevicePixels="True" Grid.Column="2" Grid.Row="1" Margin="10,10,20,10" Height="24" x:Name="TextBoxUsername" HorizontalAlignment="Stretch" Text="" />
<PasswordBox Margin="10,0,20,0" Height="24" Grid.Column="2" Grid.Row="2" x:Name="PasswordBoxPassword" Password="" HorizontalAlignment="Stretch" TabIndex="1" />
<Button Margin="10,30,20,50" Height="30" x:Name="ButtonLogin" Grid.Column="2" Grid.Row="3" HorizontalAlignment="Stretch" Content="Anmelden" IsDefault="True" Foreground="White" TabIndex="2" />
<Label VerticalAlignment="Bottom" HorizontalAlignment="Left" Content="Copyright 2010 | ownSoft GmbH" Foreground="#FF818181" Margin="5,0,0,3" Grid.Row="3" Grid.ColumnSpan="3" Grid.Column="0" FontSize="10" />
<TextBlock Grid.Row="3" Grid.Column="3" HorizontalAlignment="Right" VerticalAlignment="Bottom" FontSize="10" Margin="0,0,12,10">
<Hyperlink TargetName="newWindow" Foreground="#FF818181" NavigateUri="https://www.ownsoft.de/">www.ownsoft.de</Hyperlink>
<Label
Grid.Row="1"
Grid.Column="1"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Background="#00000000"
Content="{markup:Translate Benutzername:}"
Foreground="#FF000000" />
<Label
Grid.Row="2"
Grid.Column="1"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Background="#00000000"
Content="Passwort:"
Foreground="#FF000000" />
<TextBox
x:Name="TextBoxUsername"
Grid.Row="1"
Grid.Column="2"
Height="24"
Margin="10,10,20,10"
HorizontalAlignment="Stretch"
SnapsToDevicePixels="True"
TabIndex="0"
Text="" />
<PasswordBox
x:Name="PasswordBoxPassword"
Grid.Row="2"
Grid.Column="2"
Height="24"
Margin="10,0,20,0"
HorizontalAlignment="Stretch"
Password=""
TabIndex="1" />
<Button
x:Name="ButtonLogin"
Grid.Row="3"
Grid.Column="2"
Height="30"
Margin="10,30,20,50"
HorizontalAlignment="Stretch"
Content="Anmelden"
Foreground="White"
IsDefault="True"
TabIndex="2" />
<Label
Grid.Row="3"
Grid.Column="0"
Grid.ColumnSpan="3"
Margin="5,0,0,3"
HorizontalAlignment="Left"
VerticalAlignment="Bottom"
Content="Copyright 2010 | ownSoft GmbH"
FontSize="10"
Foreground="#FF818181" />
<TextBlock
Grid.Row="3"
Grid.Column="3"
Margin="0,0,12,10"
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
FontSize="10">
<Hyperlink
Foreground="#FF818181"
NavigateUri="https://www.ownsoft.de/"
TargetName="newWindow">
www.ownsoft.de
</Hyperlink>
</TextBlock>
</Grid>
</Border>
<Line Grid.ColumnSpan="4" Stroke="#FFADADAD" X1="14" Y1="70" X2="585" Y2="70" StrokeThickness="1"></Line>
<Line Grid.ColumnSpan="4" Stroke="#FFADADAD" X1="14" Y1="370" X2="585" Y2="370" StrokeThickness="1"></Line>
<Line
Grid.ColumnSpan="4"
Stroke="#FFADADAD"
StrokeThickness="1"
X1="14"
X2="585"
Y1="70"
Y2="70" />
<Line
Grid.ColumnSpan="4"
Stroke="#FFADADAD"
StrokeThickness="1"
X1="14"
X2="585"
Y1="370"
Y2="370" />
</Grid>
<Rectangle Width="600" Height="400" RenderTransformOrigin="0.5,0.5">
<Rectangle
Width="600"
Height="400"
RenderTransformOrigin="0.5,0.5">
<Rectangle.OpacityMask>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0.418">
<GradientStop Color="#00000000" Offset="0" />
<GradientStop Color="#4CFFFFFF" Offset="1" />
<LinearGradientBrush StartPoint="0.5,0.418" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#00000000" />
<GradientStop Offset="1" Color="#4CFFFFFF" />
</LinearGradientBrush>
</Rectangle.OpacityMask>
<Rectangle.RenderTransform>

View File

@@ -1,15 +1,25 @@
<UserControl x:Class="BeWo.LoginControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
mc:Ignorable="d"
Width="Auto" Background="{StaticResource LoginBackground}"
d:DesignHeight="600" d:DesignWidth="800">
<Grid Name="grid_root" >
<UserControl
x:Class="BeWo.LoginControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Width="Auto"
d:DesignHeight="600"
d:DesignWidth="800"
Background="{StaticResource LoginBackground}"
mc:Ignorable="d">
<Grid Name="grid_root">
<StackPanel HorizontalAlignment="Center">
<Grid Background="{x:Null}" Height="400" Width="600" Visibility="Visible" x:Name="gridLogin" RenderTransformOrigin="0.5,0.5" Margin="0,0,0,0">
<Grid
x:Name="gridLogin"
Width="600"
Height="400"
Margin="0,0,0,0"
Background="{x:Null}"
RenderTransformOrigin="0.5,0.5"
Visibility="Visible">
<Grid.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
@@ -18,7 +28,13 @@
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Grid.RenderTransform>
<Border CornerRadius="7,7,7,7" BorderThickness="2,2,2,2" Padding="5,5,5,5" BorderBrush="#FF606060" Background="{DynamicResource LoginBackgroundColor}" KeyDown="UIElement_OnKeyDown">
<Border
Padding="5,5,5,5"
Background="{DynamicResource LoginBackgroundColor}"
BorderBrush="#FF606060"
BorderThickness="2,2,2,2"
CornerRadius="7,7,7,7"
KeyDown="UIElement_OnKeyDown">
<Grid Opacity="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100" />
@@ -34,152 +50,369 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Image Grid.Row="0" Grid.ColumnSpan="4" HorizontalAlignment="Left" VerticalAlignment="Top" Source="Ressources\Icons\bewoplaner_logo_small.png" Height="44" Margin="7,7,0,0"/>
<Label VerticalAlignment="Top" HorizontalAlignment="Right" Content="Version x.x.x" Foreground="#FF818181" Margin="5,7,3,0" Grid.Row="0" Grid.ColumnSpan="4"
Grid.Column="0" FontSize="10" x:Name="lblVersion" />
<StackPanel Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="2" Margin="0,80,0,0">
<Label Content="Herzlich willkommen beim BeWoPlaner!" Foreground="#FF000000" FontSize="12" FontWeight="Bold" Margin="0,30,0,0" />
<Label Content="{markup:Translate Bitte geben Sie Ihren Benutzernamen und Ihr Passwort ein.}" Foreground="#FF000000" FontSize="12" />
<Image
Grid.Row="0"
Grid.ColumnSpan="4"
Height="44"
Margin="7,7,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Source="Ressources\Icons\bewoplaner_logo_small.png" />
<Label
x:Name="lblVersion"
Grid.Row="0"
Grid.Column="0"
Grid.ColumnSpan="4"
Margin="5,7,3,0"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Content="Version x.x.x"
FontSize="10"
Foreground="#FF818181" />
<StackPanel
Grid.Row="0"
Grid.Column="1"
Grid.ColumnSpan="2"
Margin="0,80,0,0">
<Label
Margin="0,30,0,0"
Content="Herzlich willkommen beim BeWoPlaner!"
FontSize="12"
FontWeight="Bold"
Foreground="#FF000000" />
<Label
Content="{markup:Translate Bitte geben Sie Ihren Benutzernamen und Ihr Passwort ein.}"
FontSize="12"
Foreground="#FF000000" />
</StackPanel>
<Label x:Name="lblPin" Content="PIN:" Grid.Column="1" Grid.Row="1" Foreground="#FF000000" Background="#00000000" VerticalAlignment="Center" Visibility="Collapsed"/>
<TextBox x:Name="PINTextBox" Grid.Column="2" Grid.Row="1" Margin="10,0,20,0" Height="24" SnapsToDevicePixels="True" HorizontalAlignment="Stretch" Visibility="Collapsed"/>
<Label
x:Name="lblPin"
Grid.Row="1"
Grid.Column="1"
VerticalAlignment="Center"
Background="#00000000"
Content="PIN:"
Foreground="#FF000000"
Visibility="Collapsed" />
<TextBox
x:Name="PINTextBox"
Grid.Row="1"
Grid.Column="2"
Height="24"
Margin="10,0,20,0"
HorizontalAlignment="Stretch"
SnapsToDevicePixels="True"
Visibility="Collapsed" />
<Label Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Right" Content="{markup:Translate Benutzername:}" Foreground="#FF000000" Background="#00000000" />
<Label Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Left" Content="Passwort:" Foreground="#FF000000" Background="#00000000" />
<Label
Grid.Row="2"
Grid.Column="1"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Background="#00000000"
Content="{markup:Translate Benutzername:}"
Foreground="#FF000000" />
<Label
Grid.Row="3"
Grid.Column="1"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Background="#00000000"
Content="Passwort:"
Foreground="#FF000000" />
<TextBox TabIndex="0" SnapsToDevicePixels="True" Grid.Column="2" Grid.Row="2" Margin="10,10,20,10" Height="24" x:Name="TextBox_Username" HorizontalAlignment="Stretch" Text="" GotFocus="TextBox_Username_OnGotFocus" />
<TextBox
x:Name="TextBox_Username"
Grid.Row="2"
Grid.Column="2"
Height="24"
Margin="10,10,20,10"
HorizontalAlignment="Stretch"
GotFocus="TextBox_Username_OnGotFocus"
SnapsToDevicePixels="True"
TabIndex="0"
Text="" />
<PasswordBox Margin="10,0,20,0" Height="24" Grid.Column="2" Grid.Row="3" x:Name="PasswordBox_Password" Password="" HorizontalAlignment="Stretch" GotFocus="PasswordBox_Password_OnGotFocus" TabIndex="1"/>
<PasswordBox
x:Name="PasswordBox_Password"
Grid.Row="3"
Grid.Column="2"
Height="24"
Margin="10,0,20,0"
HorizontalAlignment="Stretch"
GotFocus="PasswordBox_Password_OnGotFocus"
Password=""
TabIndex="1" />
<Label x:Name="profileLabel" Grid.Column="1" Grid.Row="5" Content="Profil:" Foreground="#FF000000" FontSize="12" Visibility="Collapsed" VerticalAlignment="Center"/>
<StackPanel x:Name="profileStackPanel" Grid.Row="5" Grid.Column="2" Orientation="Horizontal" Margin="0,10,20,0" Visibility="Collapsed" >
<ComboBox HorizontalAlignment="Left" x:Name="profileSelectionComboBox" Width="175" Height="24" ItemsSource="{Binding Path=ProfileList}" SelectedIndex="0" Margin="10,0,0,0" />
<Button Click="button_addProfile_Click" Content="@" FontFamily="Webdings" FontSize="14" Height="23" Width="23" Margin="3,0,0,0" ToolTip="Profile bearbeiten"/>
<Label
x:Name="profileLabel"
Grid.Row="5"
Grid.Column="1"
VerticalAlignment="Center"
Content="Profil:"
FontSize="12"
Foreground="#FF000000"
Visibility="Collapsed" />
<StackPanel
x:Name="profileStackPanel"
Grid.Row="5"
Grid.Column="2"
Margin="0,10,20,0"
Orientation="Horizontal"
Visibility="Collapsed">
<ComboBox
x:Name="profileSelectionComboBox"
Width="175"
Height="24"
Margin="10,0,0,0"
HorizontalAlignment="Left"
ItemsSource="{Binding Path=ProfileList}"
SelectedIndex="0" />
<Button
Width="23"
Height="23"
Margin="3,0,0,0"
Click="button_addProfile_Click"
Content="@"
FontFamily="Webdings"
FontSize="14"
ToolTip="Profile bearbeiten" />
</StackPanel>
<Label x:Name="proxyLabel" Grid.Column="1" Grid.Row="6" Content="Proxy:" Foreground="#FF000000" FontSize="12" Visibility="Collapsed" VerticalAlignment="Center"/>
<Label
x:Name="proxyLabel"
Grid.Row="6"
Grid.Column="1"
VerticalAlignment="Center"
Content="Proxy:"
FontSize="12"
Foreground="#FF000000"
Visibility="Collapsed" />
<StackPanel x:Name="proxyStackPanel" Grid.Row="6" Grid.Column="2" Orientation="Horizontal" Margin="0,5,20,0" Visibility="Collapsed">
<TextBox HorizontalAlignment="Left" x:Name="proxyTextBox" Width="175" Height="24" Margin="10,0,0,0" IsReadOnly="True"/>
<Button Click="button_configureProxy_Click" Content="@" FontFamily="Webdings" FontSize="14" Height="23" Width="23" Margin="3,0,0,0" ToolTip="Proxy bearbeiten"/>
<StackPanel
x:Name="proxyStackPanel"
Grid.Row="6"
Grid.Column="2"
Margin="0,5,20,0"
Orientation="Horizontal"
Visibility="Collapsed">
<TextBox
x:Name="proxyTextBox"
Width="175"
Height="24"
Margin="10,0,0,0"
HorizontalAlignment="Left"
IsReadOnly="True" />
<Button
Width="23"
Height="23"
Margin="3,0,0,0"
Click="button_configureProxy_Click"
Content="@"
FontFamily="Webdings"
FontSize="14"
ToolTip="Proxy bearbeiten" />
</StackPanel>
<ToggleButton x:Name="showProfileSelectionBtn" Click="ShowProfileStackPanel" HorizontalAlignment="Right" Content="Erweitert" Grid.Row="4" Grid.Column="2" Margin="0,5,20,0" Foreground="#FF818181">
<ToggleButton.Template>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="18"/>
</Grid.ColumnDefinitions>
<ContentPresenter x:Name="ButtonContent"/>
<Path Grid.Column="1"
x:Name="Down_Arrow"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Fill="{TemplateBinding Foreground}"
Data="M 0 0 L 4 4 L 8 0 L 4 2 Z" Margin="0,3,0,0"
/>
<Path Grid.Column="1"
x:Name="Down_Arrow2"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Fill="{TemplateBinding Foreground}"
Data="M 0 0 L 4 4 L 8 0 L 4 2 Z" Margin="0,-3,0,0"
/>
<Path Grid.Column="1"
x:Name="Up_Arrow"
Visibility="Collapsed"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Fill="{TemplateBinding Foreground}"
Data="M 0 4 L 4 0 L 8 4 L 4 2 Z" Margin="0,-3,0,0"
/>
<Path Grid.Column="1"
x:Name="Up_Arrow2"
Visibility="Collapsed"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Fill="{TemplateBinding Foreground}"
Data="M 0 4 L 4 0 L 8 4 L 4 2 Z" Margin="0,3,0,0"
/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Fill" Value="#FF333333" TargetName="Down_Arrow"/>
<Setter Property="Fill" Value="#FF333333" TargetName="Down_Arrow2"/>
<Setter Property="Fill" Value="#FF333333" TargetName="Up_Arrow"/>
<Setter Property="Fill" Value="#FF333333" TargetName="Up_Arrow2"/>
<Setter Property="TextBlock.Foreground" Value="#FF333333" TargetName="ButtonContent"/>
</Trigger>
<Trigger Property="IsChecked" Value="true">
<Setter Property="Visibility" Value="Collapsed" TargetName="Down_Arrow"/>
<Setter Property="Visibility" Value="Collapsed" TargetName="Down_Arrow2"/>
<Setter Property="Visibility" Value="Visible" TargetName="Up_Arrow"/>
<Setter Property="Visibility" Value="Visible" TargetName="Up_Arrow2"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</ToggleButton.Template>
<ToggleButton.Triggers>
<EventTrigger RoutedEvent="Button.Click">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetName="gridLogin"
Storyboard.TargetProperty="Height"
From="{Binding HeightFrom, UpdateSourceTrigger=PropertyChanged}" To="{Binding HeightTo, UpdateSourceTrigger=PropertyChanged}" Duration="0:0:0.1"
AutoReverse="False" Completed="AnimationComplete" />
<DoubleAnimation
Storyboard.TargetName="linkLine"
Storyboard.TargetProperty="Y1"
From="{Binding LineYCoordFrom, UpdateSourceTrigger=PropertyChanged}" To="{Binding LineYCoordTo, UpdateSourceTrigger=PropertyChanged}" Duration="0:0:0.1"
AutoReverse="False" Completed="Animation2Complete" />
<DoubleAnimation
Storyboard.TargetName="linkLine"
Storyboard.TargetProperty="Y2"
From="{Binding LineYCoordFrom, UpdateSourceTrigger=PropertyChanged}" To="{Binding LineYCoordTo, UpdateSourceTrigger=PropertyChanged}" Duration="0:0:0.1"
AutoReverse="False" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</ToggleButton.Triggers>
</ToggleButton>
<StackPanel Margin="10,30,20,50" Grid.Column="2" Grid.Row="7" Orientation="Vertical" HorizontalAlignment="Stretch">
<Button Height="30" x:Name="button_login" HorizontalAlignment="Stretch" Content="Anmelden" Click="button_login_Click" IsDefault="True" Foreground="White" Margin="3" />
<TextBlock VerticalAlignment="Center" Visibility="Collapsed" HorizontalAlignment="Center" Foreground="{DynamicResource MainGroupBoxForegroundBrush}" Margin="3">
<Hyperlink RequestNavigate="PasswortVergessenLinkOnRequestNavigate" NavigateUri="#" >
<TextBlock Text="Passwort vergessen" HorizontalAlignment="Center" FontSize="10" VerticalAlignment="Center" />
</Hyperlink>
</TextBlock>
</StackPanel>
<TextBlock x:Name="txtCopyright" Grid.Row="7" Grid.Column="0" Grid.ColumnSpan="3" HorizontalAlignment="Left" VerticalAlignment="Bottom" FontSize="10" Margin="10,5,0,5" Text="Copyright 2022 | ownSoft GmbH" Foreground="#FF818181"/>
<TextBlock Grid.Row="7" Grid.Column="3" HorizontalAlignment="Right" VerticalAlignment="Bottom" FontSize="10" Margin="0,5,12,5">
<Hyperlink x:Name="hyperlink" TargetName="newWindow" Foreground="#FF818181" NavigateUri="https://www.ownsoft.de" RequestNavigate="Hyperlink_OnRequestNavigate">www.ownsoft.de</Hyperlink>
<ToggleButton
x:Name="showProfileSelectionBtn"
Grid.Row="4"
Grid.Column="2"
Margin="0,5,20,0"
HorizontalAlignment="Right"
Click="ShowProfileStackPanel"
Content="Erweitert"
Foreground="#FF818181">
<ToggleButton.Template>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="18" />
</Grid.ColumnDefinitions>
<ContentPresenter x:Name="ButtonContent" />
<Path
x:Name="Down_Arrow"
Grid.Column="1"
Margin="0,3,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="M 0 0 L 4 4 L 8 0 L 4 2 Z"
Fill="{TemplateBinding Foreground}" />
<Path
x:Name="Down_Arrow2"
Grid.Column="1"
Margin="0,-3,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="M 0 0 L 4 4 L 8 0 L 4 2 Z"
Fill="{TemplateBinding Foreground}" />
<Path
x:Name="Up_Arrow"
Grid.Column="1"
Margin="0,-3,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="M 0 4 L 4 0 L 8 4 L 4 2 Z"
Fill="{TemplateBinding Foreground}"
Visibility="Collapsed" />
<Path
x:Name="Up_Arrow2"
Grid.Column="1"
Margin="0,3,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="M 0 4 L 4 0 L 8 4 L 4 2 Z"
Fill="{TemplateBinding Foreground}"
Visibility="Collapsed" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="Down_Arrow" Property="Fill" Value="#FF333333" />
<Setter TargetName="Down_Arrow2" Property="Fill" Value="#FF333333" />
<Setter TargetName="Up_Arrow" Property="Fill" Value="#FF333333" />
<Setter TargetName="Up_Arrow2" Property="Fill" Value="#FF333333" />
<Setter TargetName="ButtonContent" Property="TextBlock.Foreground" Value="#FF333333" />
</Trigger>
<Trigger Property="IsChecked" Value="true">
<Setter TargetName="Down_Arrow" Property="Visibility" Value="Collapsed" />
<Setter TargetName="Down_Arrow2" Property="Visibility" Value="Collapsed" />
<Setter TargetName="Up_Arrow" Property="Visibility" Value="Visible" />
<Setter TargetName="Up_Arrow2" Property="Visibility" Value="Visible" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</ToggleButton.Template>
<ToggleButton.Triggers>
<EventTrigger RoutedEvent="Button.Click">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
AutoReverse="False"
Completed="AnimationComplete"
Storyboard.TargetName="gridLogin"
Storyboard.TargetProperty="Height"
From="{Binding HeightFrom, UpdateSourceTrigger=PropertyChanged}"
To="{Binding HeightTo, UpdateSourceTrigger=PropertyChanged}"
Duration="0:0:0.1" />
<DoubleAnimation
AutoReverse="False"
Completed="Animation2Complete"
Storyboard.TargetName="linkLine"
Storyboard.TargetProperty="Y1"
From="{Binding LineYCoordFrom, UpdateSourceTrigger=PropertyChanged}"
To="{Binding LineYCoordTo, UpdateSourceTrigger=PropertyChanged}"
Duration="0:0:0.1" />
<DoubleAnimation
AutoReverse="False"
Storyboard.TargetName="linkLine"
Storyboard.TargetProperty="Y2"
From="{Binding LineYCoordFrom, UpdateSourceTrigger=PropertyChanged}"
To="{Binding LineYCoordTo, UpdateSourceTrigger=PropertyChanged}"
Duration="0:0:0.1" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</ToggleButton.Triggers>
</ToggleButton>
<StackPanel
Grid.Row="7"
Grid.Column="2"
Margin="10,30,20,50"
HorizontalAlignment="Stretch"
Orientation="Vertical">
<Button
x:Name="button_login"
Height="30"
Margin="3"
HorizontalAlignment="Stretch"
Click="button_login_Click"
Content="Anmelden"
Foreground="White"
IsDefault="True" />
<TextBlock
Margin="3"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Foreground="{DynamicResource MainGroupBoxForegroundBrush}"
Visibility="Collapsed">
<Hyperlink NavigateUri="#" RequestNavigate="PasswortVergessenLinkOnRequestNavigate">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="10"
Text="Passwort vergessen" />
</Hyperlink>
</TextBlock>
</StackPanel>
<TextBlock
x:Name="txtCopyright"
Grid.Row="7"
Grid.Column="0"
Grid.ColumnSpan="3"
Margin="10,5,0,5"
HorizontalAlignment="Left"
VerticalAlignment="Bottom"
FontSize="10"
Foreground="#FF818181"
Text="Copyright 2022 | ownSoft GmbH" />
<TextBlock
Grid.Row="7"
Grid.Column="3"
Margin="0,5,12,5"
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
FontSize="10">
<Hyperlink
x:Name="hyperlink"
Foreground="#FF818181"
NavigateUri="https://www.ownsoft.de"
RequestNavigate="Hyperlink_OnRequestNavigate"
TargetName="newWindow">
www.ownsoft.de
</Hyperlink>
</TextBlock>
</Grid>
</Border>
<Line Grid.ColumnSpan="4" Stroke="#FFADADAD" X1="14" Y1="70" X2="585" Y2="70" StrokeThickness="1"></Line>
<Line x:Name="linkLine" Stroke="#FFADADAD" X1="14" Y1="340" X2="585" Y2="340" StrokeThickness="1" Margin="0,30,0,-30"></Line>
<Line
Grid.ColumnSpan="4"
Stroke="#FFADADAD"
StrokeThickness="1"
X1="14"
X2="585"
Y1="70"
Y2="70" />
<Line
x:Name="linkLine"
Margin="0,30,0,-30"
Stroke="#FFADADAD"
StrokeThickness="1"
X1="14"
X2="585"
Y1="340"
Y2="340" />
</Grid>
<Rectangle Width="600" Height="400" RenderTransformOrigin="0.5,0.5">
<Rectangle
Width="600"
Height="400"
RenderTransformOrigin="0.5,0.5">
<Rectangle.OpacityMask>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0.418">
<GradientStop Color="#00000000" Offset="0" />
<GradientStop Color="#4CFFFFFF" Offset="1" />
<LinearGradientBrush StartPoint="0.5,0.418" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#00000000" />
<GradientStop Offset="1" Color="#4CFFFFFF" />
</LinearGradientBrush>
</Rectangle.OpacityMask>
<Rectangle.RenderTransform>
@@ -195,6 +428,6 @@
</Rectangle.Fill>
</Rectangle>
</StackPanel>
<Border x:Name="profileEditPopUp" />
<Border x:Name="profileEditPopUp" />
</Grid>
</UserControl>

View File

@@ -1,6 +1,20 @@
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="BeWo.LogoPage" x:Name="Page" WindowTitle="Page" FlowDirection="LeftToRight" Width="640" Height="480" WindowWidth="640" WindowHeight="480" xmlns:BeWo="clr-namespace:BeWo">
<Page
x:Class="BeWo.LogoPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:BeWo="clr-namespace:BeWo"
x:Name="Page"
Width="640"
Height="480"
FlowDirection="LeftToRight"
WindowHeight="480"
WindowTitle="Page"
WindowWidth="640">
<Grid x:Name="LayoutRoot" Width="300" Height="300">
<BeWo:BSLogoControl Width="400" Height="400" />
</Grid>
<Grid
x:Name="LayoutRoot"
Width="300"
Height="300">
<BeWo:BSLogoControl Width="400" Height="400" />
</Grid>
</Page>

View File

@@ -8,8 +8,8 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:r="clr-namespace:BeWo.Security"
xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup"
d:DesignHeight="300"
d:DesignWidth="300"
d:DesignHeight="1080"
d:DesignWidth="1920"
Background="{DynamicResource ApplicationBackground}"
RenderTransformOrigin="0.5,0.5"
SnapsToDevicePixels="True"
@@ -830,6 +830,27 @@
</TransformGroup>
</Button.RenderTransform>
</localView:ImageButton>
<localView:ImageButton
x:Name="button_ai_chat"
Width="90"
HorizontalAlignment="Stretch"
Background="{StaticResource ModuleAiChatTabItem}"
Click="button_ai_chat_Click"
Content="{t:Translate AiModuleMenuItem}"
ImageSource="Ressources\Icons\chatbot2.png"
RenderTransformOrigin="0.5,0.5"
Style="{StaticResource NavBarButton}"
Visibility="Collapsed">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Button.RenderTransform>
</localView:ImageButton>
</StackPanel>
</Grid>
</ScrollViewer>

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,16 @@
<Window x:Class="BeWo.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="BeWoPlaner" Height="768" Width="1024" WindowStartupLocation="CenterScreen" WindowState="Maximized"
BorderThickness="1" Closing="MainWindow_OnClosing" SizeChanged="Window_SizeChanged">
<Window
x:Class="BeWo.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="BeWoPlaner"
Width="1024"
Height="768"
BorderThickness="1"
Closing="MainWindow_OnClosing"
SizeChanged="Window_SizeChanged"
WindowStartupLocation="CenterScreen"
WindowState="Maximized">
<Grid x:Name="rootGrid">
<ComboBox Width="100"></ComboBox>
<ComboBox Width="100" />
</Grid>
</Window>

View File

@@ -1,13 +1,20 @@
<Window x:Class="BeWo.OpenOrSaveDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="OpenOrSaveDialog" Height="150" Width="300"
WindowStartupLocation="CenterOwner"
WindowStyle="None"
AllowsTransparency="True"
Background="Transparent" ResizeMode="NoResize" >
<Window
x:Class="BeWo.OpenOrSaveDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="OpenOrSaveDialog"
Width="300"
Height="150"
AllowsTransparency="True"
Background="Transparent"
ResizeMode="NoResize"
WindowStartupLocation="CenterOwner"
WindowStyle="None">
<Grid>
<GroupBox Style="{StaticResource MainContentGroupBoxWithoutMaximizeBtnStyle}" Header="Download" MouseLeftButtonDown="UIElement_OnMouseLeftButtonDown">
<GroupBox
Header="Download"
MouseLeftButtonDown="UIElement_OnMouseLeftButtonDown"
Style="{StaticResource MainContentGroupBoxWithoutMaximizeBtnStyle}">
<Grid Background="{DynamicResource ObjectEditBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
@@ -18,10 +25,35 @@
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Question}" Grid.ColumnSpan="3" HorizontalAlignment="Center" VerticalAlignment="Center" TextWrapping="Wrap" TextAlignment="Center" Foreground="#FF202020"/>
<Button Margin="0,0,0,5" Grid.Row="1" Grid.Column="0" Content="Öffnen" Width="85" Command="Open" />
<Button Margin="0,0,0,5" Grid.Row="1" Grid.Column="1" Content="Speichern" Width="85" Command="Save" />
<Button Margin="0,0,0,5" Grid.Row="1" Grid.Column="2" Content="Abbrechen" Width="85" Command="Close" />
<TextBlock
Grid.ColumnSpan="3"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Foreground="#FF202020"
Text="{Binding Question}"
TextAlignment="Center"
TextWrapping="Wrap" />
<Button
Grid.Row="1"
Grid.Column="0"
Width="85"
Margin="0,0,0,5"
Command="Open"
Content="Öffnen" />
<Button
Grid.Row="1"
Grid.Column="1"
Width="85"
Margin="0,0,0,5"
Command="Save"
Content="Speichern" />
<Button
Grid.Row="1"
Grid.Column="2"
Width="85"
Margin="0,0,0,5"
Command="Close"
Content="Abbrechen" />
</Grid>
</GroupBox>
</Grid>

View File

@@ -1,20 +1,75 @@
<Window x:Class="BeWo.ProxyLoginView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
Title="Proxy Einstellungen" Height="200" Width="300">
<Window
x:Class="BeWo.ProxyLoginView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
Title="Proxy Einstellungen"
Width="300"
Height="200">
<Grid>
<Button x:Name="proxyOK" Content="OK" HorizontalAlignment="Left" Margin="75,120,0,0" VerticalAlignment="Top" Width="100" Click="proxyOK_Click"/>
<Button x:Name="proxyAbbr" Content="Abbrechen" HorizontalAlignment="Left" Margin="180,120,0,0" VerticalAlignment="Top" Width="100" Click="proxyAbbr_Click"/>
<Label Content="Proxyname:" HorizontalAlignment="Left" Margin="10,15,0,0" VerticalAlignment="Top" Width="100"/>
<Label Content="{markup:Translate Benutzername:}" HorizontalAlignment="Left" Margin="10,45,0,0" VerticalAlignment="Top" Width="100"/>
<Label Content="Passwort:" HorizontalAlignment="Left" Margin="10,75,0,0" VerticalAlignment="Top" Width="100"/>
<TextBox x:Name="proxynametxt" HorizontalAlignment="Left" Height="23" Margin="120,15,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="160" SelectionOpacity="0.5" />
<TextBox x:Name="proxybenutzer" HorizontalAlignment="Left" Height="23" Margin="120,45,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="160" SelectionOpacity="0.5"/>
<PasswordBox x:Name="proxypasswort" HorizontalAlignment="Left" Height="23" Margin="120,75,0,0" VerticalAlignment="Top" Width="160" SelectionOpacity="0.5"/>
<Button
x:Name="proxyOK"
Width="100"
Margin="75,120,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Click="proxyOK_Click"
Content="OK" />
<Button
x:Name="proxyAbbr"
Width="100"
Margin="180,120,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Click="proxyAbbr_Click"
Content="Abbrechen" />
<Label
Width="100"
Margin="10,15,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Content="Proxyname:" />
<Label
Width="100"
Margin="10,45,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Content="{markup:Translate Benutzername:}" />
<Label
Width="100"
Margin="10,75,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Content="Passwort:" />
<TextBox
x:Name="proxynametxt"
Width="160"
Height="23"
Margin="120,15,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
SelectionOpacity="0.5"
TextWrapping="Wrap" />
<TextBox
x:Name="proxybenutzer"
Width="160"
Height="23"
Margin="120,45,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
SelectionOpacity="0.5"
TextWrapping="Wrap" />
<PasswordBox
x:Name="proxypasswort"
Width="160"
Height="23"
Margin="120,75,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
SelectionOpacity="0.5" />
</Grid>
</Window>

View File

@@ -1,31 +1,71 @@
<Window x:Class="BeWo.PwVergessenView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
Title="PwVergessenView" Height="135" Width="322" WindowStartupLocation="CenterScreen" WindowStyle="None"
AllowsTransparency="True"
Background="Transparent"
ResizeMode="NoResize">
<Window
x:Class="BeWo.PwVergessenView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
Title="PwVergessenView"
Width="322"
Height="135"
AllowsTransparency="True"
Background="Transparent"
ResizeMode="NoResize"
WindowStartupLocation="CenterScreen"
WindowStyle="None">
<Grid>
<GroupBox Header="Passwort anfordern" Style="{DynamicResource MainContentGroupBoxWithoutMaximizeBtnStyle}" MouseLeftButtonDown="RootGroupBox_OnMouseLeftButtonDown">
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Height="20" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="Red" Margin="3,8,3,3"/>
<Label Grid.Row="1" Grid.Column="0" Margin="3" Content="{markup:Translate Benutzername}" />
<TextBox x:Name="BenutzernamenTextBox" Grid.Row="1" Grid.Column="1" MaxLines="1" Margin="3" />
<StackPanel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Stretch">
<Button Margin="3" Content="Neues Passwort anfordern" Width="150" Click="AnfordernClick" IsDefault="True" VerticalContentAlignment="Center" />
<Button Margin="3" Content="Abbrechen" Width="150" Command="Close" />
</StackPanel>
</Grid>
</GroupBox>
</Grid>
<GroupBox
Header="Passwort anfordern"
MouseLeftButtonDown="RootGroupBox_OnMouseLeftButtonDown"
Style="{DynamicResource MainContentGroupBoxWithoutMaximizeBtnStyle}">
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock
Grid.Row="0"
Grid.Column="0"
Grid.ColumnSpan="2"
Height="20"
Margin="3,8,3,3"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Foreground="Red" />
<Label
Grid.Row="1"
Grid.Column="0"
Margin="3"
Content="{markup:Translate Benutzername}" />
<TextBox
x:Name="BenutzernamenTextBox"
Grid.Row="1"
Grid.Column="1"
Margin="3"
MaxLines="1" />
<StackPanel
Grid.Row="2"
Grid.Column="0"
Grid.ColumnSpan="2"
HorizontalAlignment="Stretch"
Orientation="Horizontal">
<Button
Width="150"
Margin="3"
VerticalContentAlignment="Center"
Click="AnfordernClick"
Content="Neues Passwort anfordern"
IsDefault="True" />
<Button
Width="150"
Margin="3"
Command="Close"
Content="Abbrechen" />
</StackPanel>
</Grid>
</GroupBox>
</Grid>
</Window>

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -1,171 +1,379 @@
<dx:DXWindow x:Class="BeWo.Scheduler.View.RequestAnswerView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:drawing="http://schemas.devexpress.com/winfx/2008/xaml/scheduler/internal"
xmlns:view="clr-namespace:BeWo.Scheduler.View"
mc:Ignorable="d" ShowIcon="False" MinHeight="300" MinWidth="500"
Height="400" Width="650" dx:ThemeManager.ThemeName="Office2010Black" WindowStartupLocation="CenterScreen" Closing="RequestAnswerView_OnClosing">
<dx:DXWindow.Resources>
<drawing:TimeSpanToDateTimeConverter x:Key="TimeSpanToDateTimeConverter"/>
<view:LVItemConverter x:Key="LvItemConverter" />
<view:OriginatorExtraxtor x:Key="OriginatorExtraxtor" />
<view:Int2VisibilityConverter x:Key="Int2VisibilityConverter" />
<view:SerienterminDauerAnzeigeConverter x:Key="SerienterminDauerAnzeigeConverter" />
<LinearGradientBrush x:Key="NavigationContentBrush" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF04B4D0" Offset="0" />
<GradientStop Color="#FF038195" Offset="1" />
</LinearGradientBrush>
</dx:DXWindow.Resources>
<dx:DXWindow
x:Class="BeWo.Scheduler.View.RequestAnswerView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:drawing="http://schemas.devexpress.com/winfx/2008/xaml/scheduler/internal"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:view="clr-namespace:BeWo.Scheduler.View"
Width="650"
Height="400"
MinWidth="500"
MinHeight="300"
dx:ThemeManager.ThemeName="Office2010Black"
Closing="RequestAnswerView_OnClosing"
ShowIcon="False"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<dx:DXWindow.Resources>
<drawing:TimeSpanToDateTimeConverter x:Key="TimeSpanToDateTimeConverter" />
<view:LVItemConverter x:Key="LvItemConverter" />
<view:OriginatorExtraxtor x:Key="OriginatorExtraxtor" />
<view:Int2VisibilityConverter x:Key="Int2VisibilityConverter" />
<view:SerienterminDauerAnzeigeConverter x:Key="SerienterminDauerAnzeigeConverter" />
<LinearGradientBrush x:Key="NavigationContentBrush" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#FF04B4D0" />
<GradientStop Offset="1" Color="#FF038195" />
</LinearGradientBrush>
</dx:DXWindow.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<ListView x:Name="OTListView" Grid.Column="0" MinWidth="120" SelectionMode="Single" Margin="3" ItemsSource="{Binding Path=OffeneTermine, UpdateSourceTrigger=PropertyChanged}" MaxWidth="300" SelectionChanged="Selector_OnSelected" Background="{StaticResource NavigationContentBrush}" SelectedIndex="0">
<ListView.ItemContainerStyle>
<Style TargetType="{x:Type ListViewItem}">
<Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, AncestorType={x:Type ItemsControl}, Mode=FindAncestor}}" />
<Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, AncestorType={x:Type ItemsControl}, Mode=FindAncestor}}" />
<Setter Property="Margin" Value="0,2,1,0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Grid>
<Border CornerRadius="5" MinHeight="20" Background="Transparent" />
<Border x:Name="ItemBorder" CornerRadius="5" MinHeight="20" Background="#FF000000">
<Border.OpacityMask>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#19000000" Offset="0" />
<GradientStop Color="#26000000" Offset="1" />
</LinearGradientBrush>
</Border.OpacityMask>
</Border>
<Border x:Name="ItemContent" CornerRadius="5" MinHeight="20">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5,3,5,3" OpacityMask="{x:Null}" SnapsToDevicePixels="True">
<TextBlock VerticalAlignment="Center" Text="{Binding Converter={StaticResource LvItemConverter}, ConverterParameter=LabelId}" FontSize="12" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" />
</Grid>
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="OpacityMask" TargetName="ItemBorder">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#33000000" Offset="0" />
<GradientStop Color="#66000000" Offset="1" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="ListBoxItem.IsSelected" Value="True">
<Setter Property="OpacityMask" TargetName="ItemBorder">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#99000000" Offset="0" />
<GradientStop Color="#CC000000" Offset="1" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="ListBoxItem.IsSelected" Value="True" />
<Condition Property="Selector.IsSelectionActive" Value="False" />
</MultiTrigger.Conditions>
<Setter Property="OpacityMask" TargetName="ItemBorder">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#99000000" Offset="0" />
<GradientStop Color="#B2000000" Offset="1" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListView.ItemContainerStyle>
</ListView>
<Grid Grid.Column="1" Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock Grid.ColumnSpan="4" HorizontalAlignment="Center" Visibility="{Binding Path=SelektierterTermin, Converter={StaticResource Int2VisibilityConverter}, ConverterParameter=TerminVerstrichen}" Foreground="#9a0000">Dieser Termin liegt in der Vergangenheit</TextBlock>
<Label Grid.Column="0" Grid.Row="1" Content="Betreff" Margin="3" />
<TextBox Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="1" Height="23" Margin="3" Text="{Binding Path=SelektierterTermin.Subject}" IsReadOnly="True" />
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<ListView
x:Name="OTListView"
Grid.Column="0"
MinWidth="120"
MaxWidth="300"
Margin="3"
Background="{StaticResource NavigationContentBrush}"
ItemsSource="{Binding Path=OffeneTermine, UpdateSourceTrigger=PropertyChanged}"
SelectedIndex="0"
SelectionChanged="Selector_OnSelected"
SelectionMode="Single">
<ListView.ItemContainerStyle>
<Style TargetType="{x:Type ListViewItem}">
<Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, AncestorType={x:Type ItemsControl}, Mode=FindAncestor}}" />
<Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, AncestorType={x:Type ItemsControl}, Mode=FindAncestor}}" />
<Setter Property="Margin" Value="0,2,1,0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Grid>
<Border
MinHeight="20"
Background="Transparent"
CornerRadius="5" />
<Border
x:Name="ItemBorder"
MinHeight="20"
Background="#FF000000"
CornerRadius="5">
<Border.OpacityMask>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#19000000" />
<GradientStop Offset="1" Color="#26000000" />
</LinearGradientBrush>
</Border.OpacityMask>
</Border>
<Border
x:Name="ItemContent"
MinHeight="20"
CornerRadius="5">
<Grid
Margin="5,3,5,3"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
OpacityMask="{x:Null}"
SnapsToDevicePixels="True">
<TextBlock
VerticalAlignment="Center"
FontFamily="Microsoft Sans Serif"
FontSize="12"
Foreground="#FFD2D2D2"
Text="{Binding Converter={StaticResource LvItemConverter}, ConverterParameter=LabelId}" />
</Grid>
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="ItemBorder" Property="OpacityMask">
<Setter.Value>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#33000000" />
<GradientStop Offset="1" Color="#66000000" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="ListBoxItem.IsSelected" Value="True">
<Setter TargetName="ItemBorder" Property="OpacityMask">
<Setter.Value>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#99000000" />
<GradientStop Offset="1" Color="#CC000000" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="ListBoxItem.IsSelected" Value="True" />
<Condition Property="Selector.IsSelectionActive" Value="False" />
</MultiTrigger.Conditions>
<Setter TargetName="ItemBorder" Property="OpacityMask">
<Setter.Value>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#99000000" />
<GradientStop Offset="1" Color="#B2000000" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListView.ItemContainerStyle>
</ListView>
<Grid Grid.Row="0" Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label Grid.Column="0" Grid.Row="2" Content="Ort" Margin="3" />
<TextBox Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="2" Height="23" Margin="3" Text="{Binding Path=SelektierterTermin.Location}" IsReadOnly="True" />
<TextBlock
Grid.ColumnSpan="4"
HorizontalAlignment="Center"
Foreground="#9a0000"
Visibility="{Binding Path=SelektierterTermin, Converter={StaticResource Int2VisibilityConverter}, ConverterParameter=TerminVerstrichen}">
Dieser Termin liegt in der Vergangenheit
</TextBlock>
<Label
Grid.Row="1"
Grid.Column="0"
Margin="3"
Content="Betreff" />
<TextBox
Grid.Row="1"
Grid.Column="1"
Grid.ColumnSpan="3"
Height="23"
Margin="3"
IsReadOnly="True"
Text="{Binding Path=SelektierterTermin.Subject}" />
<Label Grid.Column="0" Grid.Row="3" Content="Organisator" Margin="3" />
<TextBox Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="3" Height="23" Margin="3" Text="{Binding Path=SelektierterTermin, Converter={StaticResource OriginatorExtraxtor}}" IsReadOnly="True" />
<Label
Grid.Row="2"
Grid.Column="0"
Margin="3"
Content="Ort" />
<TextBox
Grid.Row="2"
Grid.Column="1"
Grid.ColumnSpan="3"
Height="23"
Margin="3"
IsReadOnly="True"
Text="{Binding Path=SelektierterTermin.Location}" />
<Label Grid.Column="0" Grid.Row="4" VerticalAlignment="Center" Content="Start" Margin="3"/>
<dxe:DateEdit Grid.Column="1" Grid.Row="4" MaskType="DateTimeAdvancingCaret" Background="White" Height="23" MinWidth="80" Margin="3" IsEnabled="True" EditValue="{Binding SelektierterTermin.Start}" IsReadOnly="True" PopupOpening="PopupBaseEdit_OnPopupOpening" />
<dxe:TextEdit IsEnabled="True" Grid.Column="2" Grid.Row="4" MaskType="DateTime" Mask="t" MaskUseAsDisplayFormat="True" Margin="3" Height="23" EditValue ="{Binding SelektierterTermin.StartTime, Converter={StaticResource TimeSpanToDateTimeConverter}, Mode=OneWay}" IsReadOnly="True"/>
<dxe:CheckEdit IsEnabled="False" Grid.Column="3" Grid.Row="4" Content="Ganztägig" EditValue ="{Binding SelektierterTermin.AllDay}" HorizontalAlignment="Right" Margin="3" IsReadOnly="True" />
<Label
Grid.Row="3"
Grid.Column="0"
Margin="3"
Content="Organisator" />
<TextBox
Grid.Row="3"
Grid.Column="1"
Grid.ColumnSpan="3"
Height="23"
Margin="3"
IsReadOnly="True"
Text="{Binding Path=SelektierterTermin, Converter={StaticResource OriginatorExtraxtor}}" />
<Label Grid.Column="0" Grid.Row="5" VerticalAlignment="Center" Content="Ende" Margin="3"/>
<dxe:DateEdit IsEnabled="True" Grid.Column="1" Grid.Row="5" MaskType="DateTimeAdvancingCaret" Background="White" Height="23" MinWidth="80" Margin="3" EditValue="{Binding SelektierterTermin.End}" IsReadOnly="True" PopupOpening="PopupBaseEdit_OnPopupOpening" />
<dxe:TextEdit IsEnabled="True" Grid.Column="2" Grid.Row="5" MaskType="DateTime" Mask="t" MaskUseAsDisplayFormat="True" Margin="3" Height="23" EditValue ="{Binding SelektierterTermin.EndTime, Converter={StaticResource TimeSpanToDateTimeConverter}, Mode=OneWay}" IsReadOnly="True"/>
<Label
Grid.Row="4"
Grid.Column="0"
Margin="3"
VerticalAlignment="Center"
Content="Start" />
<dxe:DateEdit
Grid.Row="4"
Grid.Column="1"
Height="23"
MinWidth="80"
Margin="3"
Background="White"
EditValue="{Binding SelektierterTermin.Start}"
IsEnabled="True"
IsReadOnly="True"
MaskType="DateTimeAdvancingCaret"
PopupOpening="PopupBaseEdit_OnPopupOpening" />
<dxe:TextEdit
Grid.Row="4"
Grid.Column="2"
Height="23"
Margin="3"
EditValue="{Binding SelektierterTermin.StartTime, Converter={StaticResource TimeSpanToDateTimeConverter}, Mode=OneWay}"
IsEnabled="True"
IsReadOnly="True"
Mask="t"
MaskType="DateTime"
MaskUseAsDisplayFormat="True" />
<dxe:CheckEdit
Grid.Row="4"
Grid.Column="3"
Margin="3"
HorizontalAlignment="Right"
Content="Ganztägig"
EditValue="{Binding SelektierterTermin.AllDay}"
IsEnabled="False"
IsReadOnly="True" />
<Label Grid.Column="0" Grid.Row="6" VerticalAlignment="Center" Content="Serientermin" Margin="3" Visibility="{Binding Path=SelektierterTermin, Converter={StaticResource Int2VisibilityConverter}, ConverterParameter=SerienterminLabel}" />
<TextBlock Grid.Column="1" Grid.Row="6" Grid.ColumnSpan="3" Margin="3" Padding="0" Foreground="Black" VerticalAlignment="Center"
Text="{Binding Path=SelektierterTermin, Converter={StaticResource SerienterminDauerAnzeigeConverter}}"
Visibility="{Binding Path=SelektierterTermin, Converter={StaticResource Int2VisibilityConverter}, ConverterParameter=SerienterminLabel}"
TextWrapping="WrapWithOverflow"/>
<Label Grid.Column="0" Grid.Row="7" Margin="3" Content="Notiz"/>
<TextBox Grid.Column="1" Grid.Row="7" Grid.ColumnSpan="3" AcceptsReturn="True" VerticalScrollBarVisibility="Auto" VerticalAlignment="Stretch" HorizontalScrollBarVisibility="Disabled" Margin="3" TextWrapping="Wrap" Text="{Binding Path=SelektierterTermin.Description}" IsReadOnly="True" />
<Label
Grid.Row="5"
Grid.Column="0"
Margin="3"
VerticalAlignment="Center"
Content="Ende" />
<dxe:DateEdit
Grid.Row="5"
Grid.Column="1"
Height="23"
MinWidth="80"
Margin="3"
Background="White"
EditValue="{Binding SelektierterTermin.End}"
IsEnabled="True"
IsReadOnly="True"
MaskType="DateTimeAdvancingCaret"
PopupOpening="PopupBaseEdit_OnPopupOpening" />
<dxe:TextEdit
Grid.Row="5"
Grid.Column="2"
Height="23"
Margin="3"
EditValue="{Binding SelektierterTermin.EndTime, Converter={StaticResource TimeSpanToDateTimeConverter}, Mode=OneWay}"
IsEnabled="True"
IsReadOnly="True"
Mask="t"
MaskType="DateTime"
MaskUseAsDisplayFormat="True" />
<Grid Grid.Row="8" Grid.Column="0" Grid.ColumnSpan="4">
<Label
Grid.Row="6"
Grid.Column="0"
Margin="3"
VerticalAlignment="Center"
Content="Serientermin"
Visibility="{Binding Path=SelektierterTermin, Converter={StaticResource Int2VisibilityConverter}, ConverterParameter=SerienterminLabel}" />
<TextBlock
Grid.Row="6"
Grid.Column="1"
Grid.ColumnSpan="3"
Margin="3"
Padding="0"
VerticalAlignment="Center"
Foreground="Black"
Text="{Binding Path=SelektierterTermin, Converter={StaticResource SerienterminDauerAnzeigeConverter}}"
TextWrapping="WrapWithOverflow"
Visibility="{Binding Path=SelektierterTermin, Converter={StaticResource Int2VisibilityConverter}, ConverterParameter=SerienterminLabel}" />
<Label
Grid.Row="7"
Grid.Column="0"
Margin="3"
Content="Notiz" />
<TextBox
Grid.Row="7"
Grid.Column="1"
Grid.ColumnSpan="3"
Margin="3"
VerticalAlignment="Stretch"
AcceptsReturn="True"
HorizontalScrollBarVisibility="Disabled"
IsReadOnly="True"
Text="{Binding Path=SelektierterTermin.Description}"
TextWrapping="Wrap"
VerticalScrollBarVisibility="Auto" />
<Grid
Grid.Row="8"
Grid.Column="0"
Grid.ColumnSpan="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button x:Name="AlleBestaetigen" Grid.Column="0" Content="Alle bestätigen" Margin="3" Click="ButtonBase_OnClick" Width="100" />
<StackPanel x:Name="ZusagenStack" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal" Visibility="{Binding Path=SelektierterTermin, Converter={StaticResource Int2VisibilityConverter}, ConverterParameter=ZusagenStack}">
<Button
x:Name="AlleBestaetigen"
Grid.Column="0"
Width="100"
Margin="3"
Click="ButtonBase_OnClick"
Content="Alle bestätigen" />
<StackPanel
x:Name="ZusagenStack"
Grid.Column="1"
HorizontalAlignment="Right"
Orientation="Horizontal"
Visibility="{Binding Path=SelektierterTermin, Converter={StaticResource Int2VisibilityConverter}, ConverterParameter=ZusagenStack}">
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
<Button Margin="3" Content="Zusagen" Click="Zusagen_OnClick" IsEnabled="{Binding SelektierterTermin, Converter={StaticResource ObjectBoolConverter}}" />
<Button Margin="3" Content="Mit Vorbehalt" Click="MitVorbehalt_OnClick" IsEnabled="{Binding SelektierterTermin, Converter={StaticResource ObjectBoolConverter}}" />
<Button Margin="3" Content="Absagen" Click="Absagen_OnClick" IsEnabled="{Binding SelektierterTermin, Converter={StaticResource ObjectBoolConverter}}" />
<Button
Margin="3"
Click="Zusagen_OnClick"
Content="Zusagen"
IsEnabled="{Binding SelektierterTermin, Converter={StaticResource ObjectBoolConverter}}" />
<Button
Margin="3"
Click="MitVorbehalt_OnClick"
Content="Mit Vorbehalt"
IsEnabled="{Binding SelektierterTermin, Converter={StaticResource ObjectBoolConverter}}" />
<Button
Margin="3"
Click="Absagen_OnClick"
Content="Absagen"
IsEnabled="{Binding SelektierterTermin, Converter={StaticResource ObjectBoolConverter}}" />
</StackPanel>
</StackPanel>
</Grid>
<Button x:Name="OkButton" Grid.Row="8" Grid.Column="0" Grid.ColumnSpan="4" HorizontalAlignment="Right" Margin="3" Width="100" Content="OK" Click="OK_OnClick" Visibility="{Binding Path=SelektierterTermin, Converter={StaticResource Int2VisibilityConverter}, ConverterParameter=OKBtn}" />
</Grid>
</Grid>
<Button Grid.Row="1" x:Name="CloseBtn" Content="Schließen" HorizontalAlignment="Right" Margin="3" Width="100" Click="CloseButton_Click" />
<Button
x:Name="OkButton"
Grid.Row="8"
Grid.Column="0"
Grid.ColumnSpan="4"
Width="100"
Margin="3"
HorizontalAlignment="Right"
Click="OK_OnClick"
Content="OK"
Visibility="{Binding Path=SelektierterTermin, Converter={StaticResource Int2VisibilityConverter}, ConverterParameter=OKBtn}" />
</Grid>
</Grid>
<Button
x:Name="CloseBtn"
Grid.Row="1"
Width="100"
Margin="3"
HorizontalAlignment="Right"
Click="CloseButton_Click"
Content="Schließen" />
</Grid>
</dx:DXWindow>

File diff suppressed because it is too large Load Diff

View File

@@ -1,22 +1,26 @@
<dx:DXWindow x:Class="BeWo.Scheduling.View.AppointmentRecurrenceEditView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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"
xmlns:dxsch="http://schemas.devexpress.com/winfx/2008/xaml/scheduling"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
mc:Ignorable="d"
Loaded="AppointmentRecurrenceEditView_OnLoaded"
Background="{StaticResource ObjectEditBackgroundBrush}"
ResizeMode="NoResize"
Closing="AppointmentRecurrenceEditView_OnClosing"
Title="AppointmentRecurrenceEditView" Height="Auto" Width="507" SizeToContent="Height">
<dx:DXWindow
x:Class="BeWo.Scheduling.View.AppointmentRecurrenceEditView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxsch="http://schemas.devexpress.com/winfx/2008/xaml/scheduling"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="AppointmentRecurrenceEditView"
Width="507"
Height="Auto"
Background="{StaticResource ObjectEditBackgroundBrush}"
Closing="AppointmentRecurrenceEditView_OnClosing"
Loaded="AppointmentRecurrenceEditView_OnLoaded"
ResizeMode="NoResize"
SizeToContent="Height"
mc:Ignorable="d">
<Window.Resources>
<Style x:Key="RecurrenceInfoControlStyle" TargetType="dxsch:RecurrenceInfoControlBase">
<Setter Property="RecurrenceInfo" Value="{Binding RecurrenceInfo}"/>
<Setter Property="RecurrenceInfo" Value="{Binding RecurrenceInfo}" />
<Style.Triggers>
<Trigger Property="Visibility" Value="Collapsed">
<Setter Property="RecurrenceInfo" Value="{x:Null}"/>
<Setter Property="RecurrenceInfo" Value="{x:Null}" />
</Trigger>
</Style.Triggers>
</Style>
@@ -39,17 +43,47 @@
<RowDefinition Height="*" />
<RowDefinition Height="6" />
</Grid.RowDefinitions>
<Border BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.ColumnSpan="4" Grid.Column="0" CornerRadius="4" Grid.Row="1" Grid.RowSpan="3"/>
<Border SnapsToDevicePixels="True" x:Name="Header" Grid.Column="1" Padding="3,1,3,0" Grid.Row="0" Grid.RowSpan="2">
<ContentPresenter ContentSource="Header" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
<Border
Grid.Row="1"
Grid.RowSpan="3"
Grid.Column="0"
Grid.ColumnSpan="4"
Background="{TemplateBinding Background}"
BorderBrush="Transparent"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4" />
<Border
x:Name="Header"
Grid.Row="0"
Grid.RowSpan="2"
Grid.Column="1"
Padding="3,1,3,0"
SnapsToDevicePixels="True">
<ContentPresenter
ContentSource="Header"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
<ContentPresenter Grid.ColumnSpan="2" Grid.Column="1" Margin="{TemplateBinding Padding}" Grid.Row="2" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
<Border SnapsToDevicePixels="True" Grid.Column="0" BorderBrush="Gray" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="4" CornerRadius="4" Grid.Row="1" Grid.RowSpan="3">
<ContentPresenter
Grid.Row="2"
Grid.Column="1"
Grid.ColumnSpan="2"
Margin="{TemplateBinding Padding}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
<Border
Grid.Row="1"
Grid.RowSpan="3"
Grid.Column="0"
Grid.ColumnSpan="4"
BorderBrush="Gray"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="4"
SnapsToDevicePixels="True">
<Border.OpacityMask>
<MultiBinding ConverterParameter="7" Converter="{StaticResource BorderGapMaskConverter}">
<Binding ElementName="Header" Path="ActualWidth"/>
<Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}"/>
<Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}"/>
<MultiBinding Converter="{StaticResource BorderGapMaskConverter}" ConverterParameter="7">
<Binding ElementName="Header" Path="ActualWidth" />
<Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}" />
<Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}" />
</MultiBinding>
</Border.OpacityMask>
</Border>
@@ -65,35 +99,73 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<GroupBox Grid.Row="0" Header="Serienmuster" Style="{StaticResource GroupBoxStyle}" Margin="5">
<GroupBox
Grid.Row="0"
Margin="5"
Header="Serienmuster"
Style="{StaticResource GroupBoxStyle}">
<DockPanel>
<dxsch:RecurrenceTypeControl DockPanel.Dock="Left" RecurrenceTypes="{Binding AvailableRecurrenceTypes}" RecurrenceType="{Binding RecurrenceInfo.Type, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<dxsch:RecurrenceTypeControl
DockPanel.Dock="Left"
RecurrenceType="{Binding RecurrenceInfo.Type, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
RecurrenceTypes="{Binding AvailableRecurrenceTypes}" />
<StackPanel Orientation="Horizontal">
<Separator />
</StackPanel>
<StackPanel MinHeight="90">
<dxsch:DailyRecurrenceControl Style="{StaticResource RecurrenceInfoControlStyle}" Visibility="{Binding RecurrenceInfo.Type, Converter={dxsch:RecurrenceTypeToVisibilityConverter VisibleValue=Daily}}"/>
<dxsch:WeeklyRecurrenceControl Style="{StaticResource RecurrenceInfoControlStyle}" Visibility="{Binding RecurrenceInfo.Type, Converter={dxsch:RecurrenceTypeToVisibilityConverter VisibleValue=Weekly}}" FirstDayOfWeek="{Binding FirstDayOfWeek}"/>
<dxsch:MonthlyRecurrenceControl Style="{StaticResource RecurrenceInfoControlStyle}" Visibility="{Binding RecurrenceInfo.Type, Converter={dxsch:RecurrenceTypeToVisibilityConverter VisibleValue=Monthly}}"/>
<dxsch:YearlyRecurrenceControl x:Name="YearlyRecurrence" Style="{StaticResource RecurrenceInfoControlStyle}" Visibility="{Binding RecurrenceInfo.Type, Converter={dxsch:RecurrenceTypeToVisibilityConverter VisibleValue=Yearly}}"/>
<dxsch:DailyRecurrenceControl Style="{StaticResource RecurrenceInfoControlStyle}" Visibility="{Binding RecurrenceInfo.Type, Converter={dxsch:RecurrenceTypeToVisibilityConverter VisibleValue=Daily}}" />
<dxsch:WeeklyRecurrenceControl
FirstDayOfWeek="{Binding FirstDayOfWeek}"
Style="{StaticResource RecurrenceInfoControlStyle}"
Visibility="{Binding RecurrenceInfo.Type, Converter={dxsch:RecurrenceTypeToVisibilityConverter VisibleValue=Weekly}}" />
<dxsch:MonthlyRecurrenceControl Style="{StaticResource RecurrenceInfoControlStyle}" Visibility="{Binding RecurrenceInfo.Type, Converter={dxsch:RecurrenceTypeToVisibilityConverter VisibleValue=Monthly}}" />
<dxsch:YearlyRecurrenceControl
x:Name="YearlyRecurrence"
Style="{StaticResource RecurrenceInfoControlStyle}"
Visibility="{Binding RecurrenceInfo.Type, Converter={dxsch:RecurrenceTypeToVisibilityConverter VisibleValue=Yearly}}" />
</StackPanel>
</DockPanel>
</GroupBox>
<GroupBox Grid.Row="1" Header="Serienende" Style="{StaticResource GroupBoxStyle}" Margin="5">
<dxsch:RecurrenceRangeControl RecurrenceInfo="{Binding RecurrenceInfo}"/>
<GroupBox
Grid.Row="1"
Margin="5"
Header="Serienende"
Style="{StaticResource GroupBoxStyle}">
<dxsch:RecurrenceRangeControl RecurrenceInfo="{Binding RecurrenceInfo}" />
</GroupBox>
<Grid Grid.Row="2" VerticalAlignment="Bottom" Margin="0">
<Border Height="40" Margin="0,10,0,0" VerticalAlignment="Bottom" Background="#FF000000">
<Grid
Grid.Row="2"
Margin="0"
VerticalAlignment="Bottom">
<Border
Height="40"
Margin="0,10,0,0"
VerticalAlignment="Bottom"
Background="#FF000000">
<Border.OpacityMask>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#19000000" Offset="0" />
<GradientStop Color="#33FFFFFF" Offset="1" />
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#19000000" />
<GradientStop Offset="1" Color="#33FFFFFF" />
</LinearGradientBrush>
</Border.OpacityMask>
</Border>
<StackPanel VerticalAlignment="Bottom" Height="40" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Content="OK" Width="80" Height="25" Margin="3" Click="OkButton_Click" />
<Button Content="Abbrechen" Width="80" Height="25" Margin="3" Click="CloseButton_OnClick" />
<StackPanel
Height="40"
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Orientation="Horizontal">
<Button
Width="80"
Height="25"
Margin="3"
Click="OkButton_Click"
Content="OK" />
<Button
Width="80"
Height="25"
Margin="3"
Click="CloseButton_OnClick"
Content="Abbrechen" />
</StackPanel>
</Grid>
</Grid>

View File

@@ -1,14 +1,23 @@
<Window x:Class="BeWo.SchulbegleitenderDienst.KrankheitsZeitraumView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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"
xmlns:view="clr-namespace:BeWo.SchulbegleitenderDienst.View"
mc:Ignorable="d"
Background="Transparent" WindowStartupLocation="CenterScreen"
d:DataContext="{d:DesignData Type=AbsenceTimeEditViewModel}"
SizeToContent="WidthAndHeight" WindowStyle="None" AllowsTransparency="True">
<GroupBox Header="Zeitraum auswählen" x:Name="rootGroupBox" Style="{DynamicResource MainContentGroupBoxWithoutMaximizeBtnStyle}" Background="Transparent" MouseLeftButtonDown="RootGroupBox_OnMouseLeftButtonDown" >
<Window
x:Class="BeWo.SchulbegleitenderDienst.KrankheitsZeitraumView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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"
xmlns:view="clr-namespace:BeWo.SchulbegleitenderDienst.View"
d:DataContext="{d:DesignData Type=AbsenceTimeEditViewModel}"
AllowsTransparency="True"
Background="Transparent"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterScreen"
WindowStyle="None"
mc:Ignorable="d">
<GroupBox
x:Name="rootGroupBox"
Background="Transparent"
Header="Zeitraum auswählen"
MouseLeftButtonDown="RootGroupBox_OnMouseLeftButtonDown"
Style="{DynamicResource MainContentGroupBoxWithoutMaximizeBtnStyle}">
<Grid>
<view:AbsenceTimeEditView />
</Grid>

View File

@@ -1,298 +1,536 @@
<Window x:Class="BeWo.SchulbegleitenderDienst.VertretenderKlientSearchView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:view="clr-namespace:BeWo.View"
xmlns:controls="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:search="clr-namespace:BeWo.View.Search"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
Title="Vertretung auswählen" Height="650" Width="750" WindowStartupLocation="CenterScreen"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
ResizeMode="CanResizeWithGrip" WindowStyle="None" Background="Transparent">
<Window
x:Class="BeWo.SchulbegleitenderDienst.VertretenderKlientSearchView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:search="clr-namespace:BeWo.View.Search"
xmlns:view="clr-namespace:BeWo.View"
Title="Vertretung auswählen"
Width="750"
Height="650"
Background="Transparent"
ResizeMode="CanResizeWithGrip"
WindowStartupLocation="CenterScreen"
WindowStyle="None">
<GroupBox Header="{markup:Translate Vertretenden auswählen}" x:Name="rootGroupBox" Style="{DynamicResource MainContentGroupBoxWithoutMaximizeBtnStyle}" MouseLeftButtonDown="RootGroupBox_OnMouseLeftButtonDown" >
<GroupBox
x:Name="rootGroupBox"
Header="{markup:Translate Vertretenden auswählen}"
MouseLeftButtonDown="RootGroupBox_OnMouseLeftButtonDown"
Style="{DynamicResource MainContentGroupBoxWithoutMaximizeBtnStyle}">
<Grid>
<Grid Background="White" x:Name="rootGroupBoxMitarbeiter" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="225"/>
<RowDefinition Height="125"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- ############################### Oberes 1/3 auswahl Kriterien ################################################ -->
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="250" />
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="100"/>
<RowDefinition Height="125"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<GroupBox Header="{markup:Translate Mitarbeiter Wunsch Kriterien}" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Style="{StaticResource ObjectEditGroupBox}" Margin="3,3,3,3" >
<!-- Ready machen für teilweise funktion / Combobox zur auswahl der tokens und TextBox zur anzeige der ausgewählten tokens -->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid x:Name="rootGroupBoxMitarbeiter" Background="White">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="225" />
<RowDefinition Height="125" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<!-- ############################### Oberes 1/3 auswahl Kriterien ################################################ -->
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="250" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="100" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="100" />
<RowDefinition Height="125" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<GroupBox
Grid.Row="0"
Grid.Column="0"
Grid.ColumnSpan="2"
Margin="3,3,3,3"
Header="{markup:Translate Mitarbeiter Wunsch Kriterien}"
Style="{StaticResource ObjectEditGroupBox}">
<!-- Ready machen für teilweise funktion / Combobox zur auswahl der tokens und TextBox zur anzeige der ausgewählten tokens -->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!-- <controls:NullItemComboBox Grid.Row="0" Grid.Column="0" x:Name="MitarbeiterWunschAuswahl" SelectionChanged="MitarbeiterWunschAuswahl_OnSelectionChanged" Width="200" Height="23" Visibility="Collapsed" /> -->
<TextBox Grid.Row="1" Grid.Column="0" Margin="3" x:Name="MitarbeiterWunschAnzeige" MinHeight="50" TextWrapping="Wrap" Width="200" IsReadOnly="True" />
</Grid>
</GroupBox>
<!-- <controls:NullItemComboBox Grid.Row="0" Grid.Column="0" x:Name="MitarbeiterWunschAuswahl" SelectionChanged="MitarbeiterWunschAuswahl_OnSelectionChanged" Width="200" Height="23" Visibility="Collapsed" /> -->
<GroupBox Header="{markup:Translate Mitarbeiter Ausschluss Kriterien}" Grid.Row="0" Grid.Column="2" Grid.ColumnSpan="2" Style="{StaticResource ObjectEditGroupBox}" Margin="3,3,3,3">
<!-- Ready machen für teilweise funktion <ColumnDefinition Width="Auto"/>
<TextBox
x:Name="MitarbeiterWunschAnzeige"
Grid.Row="1"
Grid.Column="0"
Width="200"
MinHeight="50"
Margin="3"
IsReadOnly="True"
TextWrapping="Wrap" />
</Grid>
</GroupBox>
<GroupBox
Grid.Row="0"
Grid.Column="2"
Grid.ColumnSpan="2"
Margin="3,3,3,3"
Header="{markup:Translate Mitarbeiter Ausschluss Kriterien}"
Style="{StaticResource ObjectEditGroupBox}">
<!-- Ready machen für teilweise funktion <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/> <RowDefinition Height="Auto"/>-->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!-- <controls:NullItemComboBox Grid.Row="0" Grid.Column="0" x:Name="MitarbeiterAussschlussAuswahl" SelectionChanged="MitarbeiterAussschlussAuswahl_OnSelectionChanged" Width="200" Height="23" Visibility="Collapsed"/> -->
<!-- <controls:NullItemComboBox Grid.Row="0" Grid.Column="0" x:Name="MitarbeiterAussschlussAuswahl" SelectionChanged="MitarbeiterAussschlussAuswahl_OnSelectionChanged" Width="200" Height="23" Visibility="Collapsed"/> -->
<TextBox Grid.Row="1" Margin="3" Grid.Column="0" x:Name="MitarbeiterAussschlussAnzeige" Width="200" MinHeight="50" TextWrapping="Wrap" IsReadOnly="True"/>
<TextBox
x:Name="MitarbeiterAussschlussAnzeige"
Grid.Row="1"
Grid.Column="0"
Width="200"
MinHeight="50"
Margin="3"
IsReadOnly="True"
TextWrapping="Wrap" />
</Grid>
</GroupBox>
</Grid>
</GroupBox>
<GroupBox Header="{markup:Translate Klient Wunsch Kriterien}" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Style="{StaticResource ObjectEditGroupBox}" Margin="3,3,3,3" >
<GroupBox
Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="2"
Margin="3,3,3,3"
Header="{markup:Translate Klient Wunsch Kriterien}"
Style="{StaticResource ObjectEditGroupBox}">
<!-- ############### wird durch Token Combobox mit devexpress vers. 17 ersetzt ################################## -->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<controls:NullItemComboBox Grid.Row="0" Grid.Column="0" x:Name="KlientWunschAuswahl" SelectionChanged="KlientWunschAuswahl_OnSelectionChanged" Width="200" Height="23" />
<!-- ############### wird durch Token Combobox mit devexpress vers. 17 ersetzt ################################## -->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBox Grid.Row="1" Margin="3" Grid.Column="0" x:Name="KlientWunschAnzeige" Width="200" MinHeight="50" TextWrapping="Wrap" IsReadOnly="True"/>
</Grid>
<controls:NullItemComboBox
x:Name="KlientWunschAuswahl"
Grid.Row="0"
Grid.Column="0"
Width="200"
Height="23"
SelectionChanged="KlientWunschAuswahl_OnSelectionChanged" />
<!-- ############################################################################################################## -->
</GroupBox>
<TextBox
x:Name="KlientWunschAnzeige"
Grid.Row="1"
Grid.Column="0"
Width="200"
MinHeight="50"
Margin="3"
IsReadOnly="True"
TextWrapping="Wrap" />
<GroupBox Header="{markup:Translate Klient Ausschluss Kriterien}" Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2" Style="{StaticResource ObjectEditGroupBox}" Margin="3,3,3,3" >
</Grid>
<!-- ############### wird durch Token Combobox mit devexpress vers. 17 ersetzt ################################## -->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<controls:NullItemComboBox Grid.Row="0" Grid.Column="0" x:Name="KlientAussschlussAuswahl" SelectionChanged="KlientAussschlussAuswahl_OnSelectionChanged" Width="200" Height="23" />
<!-- ############################################################################################################## -->
</GroupBox>
<GroupBox
Grid.Row="1"
Grid.Column="2"
Grid.ColumnSpan="2"
Margin="3,3,3,3"
Header="{markup:Translate Klient Ausschluss Kriterien}"
Style="{StaticResource ObjectEditGroupBox}">
<!-- ############### wird durch Token Combobox mit devexpress vers. 17 ersetzt ################################## -->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<controls:NullItemComboBox
x:Name="KlientAussschlussAuswahl"
Grid.Row="0"
Grid.Column="0"
Width="200"
Height="23"
SelectionChanged="KlientAussschlussAuswahl_OnSelectionChanged" />
<TextBox
x:Name="KlientAussschlussAnzeige"
Grid.Row="1"
Grid.Column="0"
Width="200"
MinHeight="50"
Margin="3"
IsReadOnly="True"
TextWrapping="Wrap" />
</Grid>
<!-- ############################################################################################################## -->
</GroupBox>
<GroupBox
Grid.Row="0"
Grid.Column="4"
Margin="3,3,3,3"
Header="Geschlecht"
Style="{StaticResource ObjectEditGroupBox}">
<WrapPanel Orientation="Horizontal">
<CheckBox
x:Name="RBMaennlich"
Margin="3,3,3,3"
Click="RBMaennlich_OnClick"
Content="männlich"
IsChecked="True" />
<CheckBox
x:Name="RBWeiblich"
Margin="3,3,3,3"
Click="RBWeiblich_OnClick"
Content="weiblich"
IsChecked="True" />
</WrapPanel>
</GroupBox>
<Grid
Grid.Row="1"
Margin="3,3,3,3"
Column="4">
<Grid.RowDefinitions>
<RowDefinition Height="60" />
<RowDefinition Height="60" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<GroupBox
Grid.Row="0"
Margin="1"
Header="{markup:Translate Klienten PLZ}"
Style="{StaticResource ObjectEditGroupBox}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<WrapPanel
Grid.Column="0"
Margin="1"
HorizontalAlignment="Left"
Orientation="Horizontal">
<Label Content="Plz:" />
<Label x:Name="LabelPlzMitarbeiter" Width="50" />
</WrapPanel>
<WrapPanel
Grid.Column="1"
Margin="1"
HorizontalAlignment="Right"
Orientation="Horizontal">
<Label Content="Ort:" />
<Label x:Name="LabelOrtMitarbeiter" Width="100" />
</WrapPanel>
</Grid>
</GroupBox>
<GroupBox
Grid.Row="1"
Margin="1"
Header="Suche nach"
Style="{StaticResource ObjectEditGroupBox}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<WrapPanel
Grid.Column="0"
Margin="1"
HorizontalAlignment="Left"
Orientation="Horizontal">
<Label Content="Plz:" />
<dxe:TextEdit
x:Name="PlzMitarbeiter"
Width="50"
Height="23"
VerticalContentAlignment="Center"
EditValueChanged="PlzMitarbeiter_OnEditValueChanged"
Mask="\d{1,5}"
MaskType="RegEx"
ShowError="False" />
</WrapPanel>
<WrapPanel
Grid.Column="1"
Margin="1"
HorizontalAlignment="Right"
Orientation="Horizontal">
<Label Content="Ort:" />
<TextBox
x:Name="OrtMitarbeiter"
Width="100"
Height="23"
VerticalContentAlignment="Center"
TextChanged="OrtMitarbeiter_OnTextChanged" />
</WrapPanel>
</Grid>
</GroupBox>
<TextBox Grid.Row="1" Margin="3" Grid.Column="0" x:Name="KlientAussschlussAnzeige" Width="200" MinHeight="50" TextWrapping="Wrap" IsReadOnly="True"/>
</Grid>
<!-- ############################################################################################################## -->
</GroupBox>
</Grid>
<GroupBox Header="Geschlecht" Grid.Row="0" Grid.Column="4" Style="{StaticResource ObjectEditGroupBox}" Margin="3,3,3,3">
<WrapPanel Orientation="Horizontal">
<CheckBox Content="männlich" Margin="3,3,3,3" Click="RBMaennlich_OnClick" x:Name="RBMaennlich" IsChecked="True"/>
<CheckBox Content="weiblich" Margin="3,3,3,3" Click="RBWeiblich_OnClick" x:Name="RBWeiblich" IsChecked="True" />
</WrapPanel>
</GroupBox>
<Grid Column="4" Grid.Row="1" Margin="3,3,3,3">
<Grid.RowDefinitions>
<RowDefinition Height="60"/>
<RowDefinition Height="60"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<GroupBox Grid.Row="0" Margin="1" Style="{StaticResource ObjectEditGroupBox}" Header="{markup:Translate Klienten PLZ}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<WrapPanel Orientation="Horizontal" Margin="1" HorizontalAlignment="Left" Grid.Column="0">
<Label Content ="Plz:" />
<Label x:Name="LabelPlzMitarbeiter" Width="50" />
</WrapPanel>
<WrapPanel Orientation="Horizontal" Margin="1" HorizontalAlignment="Right" Grid.Column="1">
<Label Content="Ort:"/>
<Label x:Name="LabelOrtMitarbeiter" Width="100" />
</WrapPanel>
</Grid>
</GroupBox>
<GroupBox Grid.Row="1" Margin="1" Style="{StaticResource ObjectEditGroupBox}" Header="Suche nach">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<WrapPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="1" Grid.Column="0">
<Label Content="Plz:" />
<dxe:TextEdit x:Name="PlzMitarbeiter" Height="23" Width="50" VerticalContentAlignment="Center" EditValueChanged="PlzMitarbeiter_OnEditValueChanged" MaskType="RegEx" Mask="\d{1,5}" ShowError="False" />
</WrapPanel>
<WrapPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="1" Grid.Column="1">
<Label Content="Ort:" />
<TextBox x:Name="OrtMitarbeiter" Height="23" Width="100" VerticalContentAlignment="Center" TextChanged="OrtMitarbeiter_OnTextChanged" />
</WrapPanel>
</Grid>
</GroupBox>
</Grid>
</Grid>
<!-- ##################################################################################################################### -->
<!--Bereich einfügen um auszuwählen ob ganzen tag oder nur teilweise -->
<GroupBox Header="Vertretungs Zeitraum" Grid.Row="1" Grid.Column="0" Style="{StaticResource ObjectEditGroupBox}" Margin="3,3,3,3" >
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<CheckBox Grid.Column="2" Grid.Row="0" Grid.ColumnSpan="2" Content="ganztägig" Unchecked="KVCheckBox_OnUnchecked" Checked="KVCheckBox_OnChecked"
HorizontalAlignment="Left" x:Name="KVCheckBox" />
<Label Grid.Row="1" Grid.Column="0" Content="Vertretung ab" />
<Label Grid.Row="2" Grid.Column="0" Content="Vertretung bis" />
<Label Grid.Row="1" Grid.Column="2" Content="Uhrzeit von" x:Name="KVLabelUhrzeitVon" />
<Label Grid.Row="2" Grid.Column="2" Content="Uhrzeit bis" x:Name="KVLabelUhrzeitBis" />
<dxe:DateEdit x:Name="KVDatepickerVon" MaskType="DateTimeAdvancingCaret" Grid.Column="1" Grid.Row="1" Margin="3" Height="23" Width="125" EditValueChanged="KVDatepickerVon_OnEditValueChanged"/>
<dxe:DateEdit x:Name="KVDatepickerBis" MaskType="DateTimeAdvancingCaret" Grid.Column="1" Grid.Row="2" Margin="3" Height="23" Width="125" EditValueChanged="KVDatepickerBis_OnEditValueChanged" />
<dxe:TextEdit Grid.Column="3" Grid.Row="1" MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True" x:Name="KVDatepicker_UhrzeitVon"
MaskUseAsDisplayFormat="True" InvalidValueBehavior="AllowLeaveEditor"
Height="23" Grid.ColumnSpan="2" Visibility="Visible" Width="75"
Margin="3,3,3,3"/>
<dxe:TextEdit Grid.Column="3" Grid.Row="2" MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True" x:Name="KVDatepicker_UhrzeitBis"
MaskUseAsDisplayFormat="True" InvalidValueBehavior="AllowLeaveEditor" Width="75"
Height="23" Grid.ColumnSpan="2" Visibility="Visible"
Margin="3,3,3,3"/>
</Grid>
</GroupBox>
<!--##################################################################-->
<!-- ##################################### unterer 2/3 Mitarbeiter Controll ####################################### -->
<!--<search:EmployeeSearchView Grid.Row="2" Grid.Column="0" x:Name="MitarbeiterVertretungsearchview" Margin="3,3,3,3" ItemSelected="MitarbeiterVertretungsearchview_OnItemSelected" />-->
<!-- Aus der SearchView ein Grid Bauen das mehr Informationen Enthält / zurzeit Name Adresse Arbeitszeit -->
<dxg:GridControl x:Name="GridDataControlKlientVertretungsearchview" Visibility="Visible" Grid.Row="2" Grid.Column="0" AllowDrop="true" Margin="3,3,3,3" VerticalContentAlignment="Center" >
<dxg:GridControl.Columns >
<dxg:GridColumn FieldName="Name" Width="155" ReadOnly="True" Header="Name"/>
<dxg:GridColumn FieldName="Postleitzahl" Width="75" ReadOnly="True" Header="Postleitzahl" />
<dxg:GridColumn FieldName="Strasse" Width="100" ReadOnly="True" Header="Strasse" />
<dxg:GridColumn FieldName="Stadt" Width="105" ReadOnly="True" Header="Stadt" />
<dxg:GridColumn FieldName="Geschlecht" Width="75" ReadOnly="True" Header="Geschlecht" />
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView AllowPerPixelScrolling="True" ShowTotalSummary="False" AutoWidth="True" />
</dxg:GridControl.View>
</dxg:GridControl>
<!-- ##################################################################################################################### -->
<!-- Bereich einfügen um auszuwählen ob ganzen tag oder nur teilweise -->
<GroupBox
Grid.Row="1"
Grid.Column="0"
Margin="3,3,3,3"
Header="Vertretungs Zeitraum"
Style="{StaticResource ObjectEditGroupBox}">
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<CheckBox
x:Name="KVCheckBox"
Grid.Row="0"
Grid.Column="2"
Grid.ColumnSpan="2"
HorizontalAlignment="Left"
Checked="KVCheckBox_OnChecked"
Content="ganztägig"
Unchecked="KVCheckBox_OnUnchecked" />
<Label
Grid.Row="1"
Grid.Column="0"
Content="Vertretung ab" />
<Label
Grid.Row="2"
Grid.Column="0"
Content="Vertretung bis" />
<Label
x:Name="KVLabelUhrzeitVon"
Grid.Row="1"
Grid.Column="2"
Content="Uhrzeit von" />
<Label
x:Name="KVLabelUhrzeitBis"
Grid.Row="2"
Grid.Column="2"
Content="Uhrzeit bis" />
<dxe:DateEdit
x:Name="KVDatepickerVon"
Grid.Row="1"
Grid.Column="1"
Width="125"
Height="23"
Margin="3"
EditValueChanged="KVDatepickerVon_OnEditValueChanged"
MaskType="DateTimeAdvancingCaret" />
<dxe:DateEdit
x:Name="KVDatepickerBis"
Grid.Row="2"
Grid.Column="1"
Width="125"
Height="23"
Margin="3"
EditValueChanged="KVDatepickerBis_OnEditValueChanged"
MaskType="DateTimeAdvancingCaret" />
<dxe:TextEdit
x:Name="KVDatepicker_UhrzeitVon"
Grid.Row="1"
Grid.Column="3"
Grid.ColumnSpan="2"
Width="75"
Height="23"
Margin="3,3,3,3"
InvalidValueBehavior="AllowLeaveEditor"
Mask="(0?\d|1\d|2[0-3]):[0-5]\d"
MaskShowPlaceHolders="True"
MaskType="RegEx"
MaskUseAsDisplayFormat="True"
ShowError="False"
Visibility="Visible" />
<dxe:TextEdit
x:Name="KVDatepicker_UhrzeitBis"
Grid.Row="2"
Grid.Column="3"
Grid.ColumnSpan="2"
Width="75"
Height="23"
Margin="3,3,3,3"
InvalidValueBehavior="AllowLeaveEditor"
Mask="(0?\d|1\d|2[0-3]):[0-5]\d"
MaskShowPlaceHolders="True"
MaskType="RegEx"
MaskUseAsDisplayFormat="True"
ShowError="False"
Visibility="Visible" />
</Grid>
</GroupBox>
<!-- ################################################################## -->
<!-- ##################################### unterer 2/3 Mitarbeiter Controll ####################################### -->
<!--<search:EmployeeSearchView Grid.Row="2" Grid.Column="0" x:Name="MitarbeiterVertretungsearchview" Margin="3,3,3,3" ItemSelected="MitarbeiterVertretungsearchview_OnItemSelected" />-->
<!-- Aus der SearchView ein Grid Bauen das mehr Informationen Enthält / zurzeit Name Adresse Arbeitszeit -->
<dxg:GridControl
x:Name="GridDataControlKlientVertretungsearchview"
Grid.Row="2"
Grid.Column="0"
Margin="3,3,3,3"
VerticalContentAlignment="Center"
AllowDrop="true"
Visibility="Visible">
<dxg:GridControl.Columns>
<dxg:GridColumn
Width="155"
FieldName="Name"
Header="Name"
ReadOnly="True" />
<dxg:GridColumn
Width="75"
FieldName="Postleitzahl"
Header="Postleitzahl"
ReadOnly="True" />
<dxg:GridColumn
Width="100"
FieldName="Strasse"
Header="Strasse"
ReadOnly="True" />
<dxg:GridColumn
Width="105"
FieldName="Stadt"
Header="Stadt"
ReadOnly="True" />
<dxg:GridColumn
Width="75"
FieldName="Geschlecht"
Header="Geschlecht"
ReadOnly="True" />
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView
AllowPerPixelScrolling="True"
AutoWidth="True"
ShowTotalSummary="False" />
</dxg:GridControl.View>
</dxg:GridControl>
<!-- ################################################################################################## Margin="3,3,3,3" -->
<StackPanel Grid.Row="3" Grid.Column="0">
<WrapPanel
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Orientation="Horizontal">
<Button
Width="90"
Margin="3,3,3,3"
Click="ButtonBase_OnClick"
Content="Übernehmen" />
<Button
Width="90"
Margin="3,3,3,3"
Click="ButtonClose_OnClick"
Content="Schließen" />
</WrapPanel>
</StackPanel>
<!-- ####################### Closed="popup_Closed" Opened="popup_Opened"###StaysOpen="False"Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" #################################################################################### -->
</Grid>
<!-- ################################################################################################## Margin="3,3,3,3"-->
<StackPanel Grid.Row="3" Grid.Column="0" >
<WrapPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom" >
<Button Content="Übernehmen" Width="90" Click="ButtonBase_OnClick" Margin="3,3,3,3" />
<Button Content="Schließen" Width="90" Click="ButtonClose_OnClick" Margin="3,3,3,3"/>
</WrapPanel>
</StackPanel>
<!-- ####################### Closed="popup_Closed" Opened="popup_Opened"###StaysOpen="False"Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" #################################################################################### -->
</Grid>
</Grid>
</GroupBox>
</GroupBox>
</Window>

View File

@@ -1,163 +1,420 @@
<Window x:Class="BeWo.SchulbegleitenderDienst.VertretungsSearchView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
Title="Vertretung auswählen" SizeToContent="WidthAndHeight" AllowsTransparency="True" WindowStartupLocation="CenterScreen"
ResizeMode="CanResizeWithGrip" WindowStyle="None" Background="Transparent" d:DataContext="{d:DesignData VertretungsSearchView}">
<Window.Resources>
<Window
x:Class="BeWo.SchulbegleitenderDienst.VertretungsSearchView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="Vertretung auswählen"
d:DataContext="{d:DesignData VertretungsSearchView}"
AllowsTransparency="True"
Background="Transparent"
ResizeMode="CanResizeWithGrip"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterScreen"
WindowStyle="None"
mc:Ignorable="d">
<Window.Resources>
<dxmvvm:NumericToVisibilityConverter x:Key="NumericToVisibilityConverter" Inverse="True" />
<ControlTemplate x:Key="{dxgt:TableViewThemeKey ResourceKey=DataPresenterTemplate, ThemeName=Office2010Black}" TargetType="{x:Type dxg:DataPresenter}">
<Border Background="White">
<Grid>
<ContentPresenter/>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="Es wurden keine Datensätze gefunden" Opacity="1"
Visibility="{Binding VisibleRowCount, Converter={StaticResource NumericToVisibilityConverter}, RelativeSource={RelativeSource AncestorType=dxg:GridControl}}" />
<ContentPresenter />
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
Opacity="1"
Text="Es wurden keine Datensätze gefunden"
Visibility="{Binding VisibleRowCount, Converter={StaticResource NumericToVisibilityConverter}, RelativeSource={RelativeSource AncestorType=dxg:GridControl}}" />
</Grid>
</Border>
</ControlTemplate>
</Window.Resources>
<GroupBox Header="Vertretung auswählen" x:Name="rootGroupBox" Style="{DynamicResource MainContentGroupBoxWithoutMaximizeBtnStyle}" MouseLeftButtonDown="RootGroupBox_OnMouseLeftButtonDown" >
<Grid>
<Grid Background="White" x:Name="GridMain">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0" Margin="3,3,3,0" HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="{markup:Translate Klient/in:}" Margin="3,2,3,0" FontWeight="Bold"/>
<Label x:Name="lblCustomerName" Grid.Row="1" Grid.Column="0" Grid.RowSpan="2" Margin="3,0,3,2" Content="Max Mustermann"/>
<Label Grid.Row="0" Grid.Column="1" Content="Schule:" Margin="15,2,2,0" FontWeight="Bold"/>
<Label x:Name="lblSchoolName" Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" Margin="15,0,3,2" Content="Max Mustermann"/>
<Label Grid.Row="0" Grid.Column="2" Content="Betreuungszeiten:" Margin="15,2,2,0" FontWeight="Bold"/>
<Label x:Name="lblBetreuungszeiten" Grid.Row="1" Grid.Column="2" Grid.RowSpan="2" Margin="15,0,3,2" Content="Max Mustermann"/>
<GroupBox
x:Name="rootGroupBox"
Header="Vertretung auswählen"
MouseLeftButtonDown="RootGroupBox_OnMouseLeftButtonDown"
Style="{DynamicResource MainContentGroupBoxWithoutMaximizeBtnStyle}">
<Grid>
<Grid x:Name="GridMain" Background="White">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid
Grid.Row="0"
Margin="3,3,3,0"
HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label
Grid.Row="0"
Grid.Column="0"
Margin="3,2,3,0"
Content="{markup:Translate Klient/in:}"
FontWeight="Bold" />
<Label
x:Name="lblCustomerName"
Grid.Row="1"
Grid.RowSpan="2"
Grid.Column="0"
Margin="3,0,3,2"
Content="Max Mustermann" />
<Label Grid.Row="0" Grid.Column="3" Content="{markup:Translate Klient Wunschkriterien}" Margin="15,2,3,0" FontWeight="Bold"/>
<dxg:LookUpEdit Grid.Row="1" Grid.Column="3" Grid.RowSpan="2" Margin="15,0,3,2" x:Name="TokenBoxWunschAnzeige" ValidateOnTextInput="True" ValidateOnEnterKeyPressed="True" TextWrapping="Wrap" IsReadOnly="True"
MinHeight="50" Width="150" PopupHeight="500" PopupWidth="750" PopupMinHeight="100" PopupMinWidth="100" IsPopupAutoWidth="False" >
<dxg:LookUpEdit.StyleSettings>
<dxg:TokenLookUpEditStyleSettings EnableTokenWrapping="True"/>
</dxg:LookUpEdit.StyleSettings>
</dxg:LookUpEdit>
<Label
Grid.Row="0"
Grid.Column="1"
Margin="15,2,2,0"
Content="Schule:"
FontWeight="Bold" />
<Label
x:Name="lblSchoolName"
Grid.Row="1"
Grid.RowSpan="2"
Grid.Column="1"
Margin="15,0,3,2"
Content="Max Mustermann" />
<Label Grid.Row="0" Grid.Column="4" Content="{markup:Translate Klient Ausschlusskriterien}" Margin="15,2,2,0" FontWeight="Bold"/>
<dxg:LookUpEdit Grid.Row="1" Grid.Column="4" Grid.RowSpan="2" Margin="15,0,2,3" x:Name="TokenBoxAusschlussAnzeige" ValidateOnTextInput="True" ValidateOnEnterKeyPressed="True" TextWrapping="Wrap" IsReadOnly="True"
MinHeight="50" Width="150" PopupHeight="500" PopupWidth="750" PopupMinHeight="100" PopupMinWidth="100" IsPopupAutoWidth="False" >
<dxg:LookUpEdit.StyleSettings>
<dxg:TokenLookUpEditStyleSettings EnableTokenWrapping="True"/>
</dxg:LookUpEdit.StyleSettings>
</dxg:LookUpEdit>
</Grid>
<GroupBox Header="" Grid.Row="1" Margin="3,0,3,3" Style="{DynamicResource ObjectEditGroupBox}">
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Vertretung ab" Margin="3"/>
<Label Grid.Row="1" Grid.Column="0" Content="Vertretung bis" Margin="3" />
<dxe:DateEdit x:Name="KVDatepickerVon" EditValue="{Binding Path=SubstitutionStart, UpdateSourceTrigger=PropertyChanged}" MaskType="DateTimeAdvancingCaret" AllowNullInput="False" Grid.Column="1" Grid.Row="0" Margin="3" Height="23" Width="125" />
<dxe:DateEdit x:Name="KVDatepickerBis" EditValue="{Binding Path=SubstitutionEnd, UpdateSourceTrigger=PropertyChanged}" MaskType="DateTimeAdvancingCaret" AllowNullInput="False" Grid.Column="1" Grid.Row="1" Margin="3" Height="23" Width="125" />
<Label Grid.Column="2" Grid.Row="0" Content="Uhrzeit" Margin="3" />
<dxe:TextEdit Grid.Column="3" Grid.Row="0" MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True"
MaskUseAsDisplayFormat="True" x:Name="startTime" Height="23" Width="60" Margin="3"/>
<Label Grid.Column="2" Grid.Row="1" Content="Uhrzeit" Margin="3" />
<dxe:TextEdit Grid.Column="3" Grid.Row="1" MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True"
MaskUseAsDisplayFormat="True" x:Name="endTime" Height="23" Width="60" Margin="3"/>
<Label
Grid.Row="0"
Grid.Column="2"
Margin="15,2,2,0"
Content="Betreuungszeiten:"
FontWeight="Bold" />
<Label
x:Name="lblBetreuungszeiten"
Grid.Row="1"
Grid.RowSpan="2"
Grid.Column="2"
Margin="15,0,3,2"
Content="Max Mustermann" />
<Label x:Name="lblZuletztVertreten" Grid.Row="0" Grid.Column="5" Margin="3" Content="Letzte Vertretung" />
<ListBox Grid.Row="0" Grid.Column="6" Width="200" Height="54" Grid.RowSpan="2" Margin="3" x:Name="ListBoxLetzteVertreter" LostFocus="LetzteVertreter_OnLostFocus" SelectionChanged="LetzteVertreter_OnSelectionChanged" />
</Grid>
</GroupBox>
<GroupBox Header="" Grid.Row="2" Grid.Column="0" Style="{StaticResource ObjectEditGroupBox}" Margin="3,3,3,3" >
<Grid >
<Grid.ColumnDefinitions>
<Label
Grid.Row="0"
Grid.Column="3"
Margin="15,2,3,0"
Content="{markup:Translate Klient Wunschkriterien}"
FontWeight="Bold" />
<dxg:LookUpEdit
x:Name="TokenBoxWunschAnzeige"
Grid.Row="1"
Grid.RowSpan="2"
Grid.Column="3"
Width="150"
MinHeight="50"
Margin="15,0,3,2"
IsPopupAutoWidth="False"
IsReadOnly="True"
PopupHeight="500"
PopupMinHeight="100"
PopupMinWidth="100"
PopupWidth="750"
TextWrapping="Wrap"
ValidateOnEnterKeyPressed="True"
ValidateOnTextInput="True">
<dxg:LookUpEdit.StyleSettings>
<dxg:TokenLookUpEditStyleSettings EnableTokenWrapping="True" />
</dxg:LookUpEdit.StyleSettings>
</dxg:LookUpEdit>
<Label
Grid.Row="0"
Grid.Column="4"
Margin="15,2,2,0"
Content="{markup:Translate Klient Ausschlusskriterien}"
FontWeight="Bold" />
<dxg:LookUpEdit
x:Name="TokenBoxAusschlussAnzeige"
Grid.Row="1"
Grid.RowSpan="2"
Grid.Column="4"
Width="150"
MinHeight="50"
Margin="15,0,2,3"
IsPopupAutoWidth="False"
IsReadOnly="True"
PopupHeight="500"
PopupMinHeight="100"
PopupMinWidth="100"
PopupWidth="750"
TextWrapping="Wrap"
ValidateOnEnterKeyPressed="True"
ValidateOnTextInput="True">
<dxg:LookUpEdit.StyleSettings>
<dxg:TokenLookUpEditStyleSettings EnableTokenWrapping="True" />
</dxg:LookUpEdit.StyleSettings>
</dxg:LookUpEdit>
</Grid>
<GroupBox
Grid.Row="1"
Margin="3,0,3,3"
Header=""
Style="{DynamicResource ObjectEditGroupBox}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<WrapPanel Orientation="Horizontal" Margin="0,3,0,3">
<CheckBox Content="{markup:Translate männlich}" Margin="3,0,3,0" Click="RBMaennlich_OnClick" x:Name="RBMaennlich" IsChecked="True" VerticalAlignment="Center"/>
<CheckBox Content="{markup:Translate weiblich}" Margin="3,0,3,0" Click="RBWeiblich_OnClick" x:Name="RBWeiblich" IsChecked="True" VerticalAlignment="Center"/>
<Label Content="PLZ:" Margin="10,0,3,0"/>
<dxe:TextEdit x:Name="PlzKlient" Margin="3,0,3,0" Height="23" Width="70" VerticalContentAlignment="Center" EditValueChanged="PlzKlient_OnTextChanged" MaskType="RegEx" Mask="\d{1,5}" ShowError="False" />
<Label Content="Ort:" Margin="3,0,3,0"/>
<TextBox x:Name="OrtKlient" Margin="3,0,3,0" Height="23" Width="200" VerticalContentAlignment="Center" TextChanged="OrtKlient_OnTextChanged" />
<CheckBox Content="{markup:Translate Verwende Abstandsmessung}" Margin="3,0,3,0" x:Name="chkEntfernungssuche" IsChecked="False" VerticalAlignment="Center" ToolTip="{markup:Translate Das Aktivieren der Option verwendet die Google Suche um den Abstand zwischen Adressen zu messen. Dieser Vorgang kann etwas mehr Zeit benötigen.}"/>
</WrapPanel>
<Button Grid.Row="1" Content="Suche starten" Width="90" Click="ButtonSuche_OnClick" Margin="3,3,3,3" HorizontalAlignment="Right" />
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label
Grid.Row="0"
Grid.Column="0"
Margin="3"
Content="Vertretung ab" />
<Label
Grid.Row="1"
Grid.Column="0"
Margin="3"
Content="Vertretung bis" />
<dxe:DateEdit
x:Name="KVDatepickerVon"
Grid.Row="0"
Grid.Column="1"
Width="125"
Height="23"
Margin="3"
AllowNullInput="False"
EditValue="{Binding Path=SubstitutionStart, UpdateSourceTrigger=PropertyChanged}"
MaskType="DateTimeAdvancingCaret" />
<dxe:DateEdit
x:Name="KVDatepickerBis"
Grid.Row="1"
Grid.Column="1"
Width="125"
Height="23"
Margin="3"
AllowNullInput="False"
EditValue="{Binding Path=SubstitutionEnd, UpdateSourceTrigger=PropertyChanged}"
MaskType="DateTimeAdvancingCaret" />
<Label
Grid.Row="0"
Grid.Column="2"
Margin="3"
Content="Uhrzeit" />
<dxe:TextEdit
x:Name="startTime"
Grid.Row="0"
Grid.Column="3"
Width="60"
Height="23"
Margin="3"
Mask="(0?\d|1\d|2[0-3]):[0-5]\d"
MaskShowPlaceHolders="True"
MaskType="RegEx"
MaskUseAsDisplayFormat="True"
ShowError="False" />
<Label
Grid.Row="1"
Grid.Column="2"
Margin="3"
Content="Uhrzeit" />
<dxe:TextEdit
x:Name="endTime"
Grid.Row="1"
Grid.Column="3"
Width="60"
Height="23"
Margin="3"
Mask="(0?\d|1\d|2[0-3]):[0-5]\d"
MaskShowPlaceHolders="True"
MaskType="RegEx"
MaskUseAsDisplayFormat="True"
ShowError="False" />
<Label
x:Name="lblZuletztVertreten"
Grid.Row="0"
Grid.Column="5"
Margin="3"
Content="Letzte Vertretung" />
<ListBox
x:Name="ListBoxLetzteVertreter"
Grid.Row="0"
Grid.RowSpan="2"
Grid.Column="6"
Width="200"
Height="54"
Margin="3"
LostFocus="LetzteVertreter_OnLostFocus"
SelectionChanged="LetzteVertreter_OnSelectionChanged" />
</Grid>
</GroupBox>
<dxg:GridControl x:Name="GridControlPossibleVertreter" Grid.Row="3" Grid.Column="0" Margin="3,3,3,3" Visibility="Visible" Height="200">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="Nachname" ReadOnly="True" Header="Nachname" SortOrder="Ascending" />
<dxg:GridColumn FieldName="Vorname" ReadOnly="True" Header="Vorname"/>
<dxg:GridColumn FieldName="Arbeitszeit" ReadOnly="True" Header="Betreuungszeiten"/>
<dxg:GridColumn FieldName="Postleitzahl" ReadOnly="True" Header="Postleitzahl" />
<dxg:GridColumn FieldName="Strasse" ReadOnly="True" Header="Strasse" />
<dxg:GridColumn FieldName="Stadt" ReadOnly="True" Header="Stadt" />
<dxg:GridColumn FieldName="Geschlecht" ReadOnly="True" Header="Geschlecht" />
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView AllowPerPixelScrolling="True" BestFitMode="AllRows" AllowBestFit="True" ShowTotalSummary="False" ShowGroupPanel="False" RowDoubleClick="TableView_OnRowDoubleClick" ShowGridMenu="TableView_OnShowGridMenu"/>
</dxg:GridControl.View>
</dxg:GridControl>
<StackPanel Grid.Row="4" Grid.Column="0" Margin="3" >
<WrapPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom" >
<Button Content="Übernehmen" Width="90" Click="ButtonBase_OnClick" Margin="3,3,3,3" />
<Button Content="Schließen" Width="90" Click="ButtonClose_OnClick" Margin="3,3,3,3"/>
</WrapPanel>
</StackPanel>
</Grid>
</Grid>
</GroupBox>
</GroupBox>
<GroupBox
Grid.Row="2"
Grid.Column="0"
Margin="3,3,3,3"
Header=""
Style="{StaticResource ObjectEditGroupBox}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<WrapPanel Margin="0,3,0,3" Orientation="Horizontal">
<CheckBox
x:Name="RBMaennlich"
Margin="3,0,3,0"
VerticalAlignment="Center"
Click="RBMaennlich_OnClick"
Content="{markup:Translate männlich}"
IsChecked="True" />
<CheckBox
x:Name="RBWeiblich"
Margin="3,0,3,0"
VerticalAlignment="Center"
Click="RBWeiblich_OnClick"
Content="{markup:Translate weiblich}"
IsChecked="True" />
<Label Margin="10,0,3,0" Content="PLZ:" />
<dxe:TextEdit
x:Name="PlzKlient"
Width="70"
Height="23"
Margin="3,0,3,0"
VerticalContentAlignment="Center"
EditValueChanged="PlzKlient_OnTextChanged"
Mask="\d{1,5}"
MaskType="RegEx"
ShowError="False" />
<Label Margin="3,0,3,0" Content="Ort:" />
<TextBox
x:Name="OrtKlient"
Width="200"
Height="23"
Margin="3,0,3,0"
VerticalContentAlignment="Center"
TextChanged="OrtKlient_OnTextChanged" />
<CheckBox
x:Name="chkEntfernungssuche"
Margin="3,0,3,0"
VerticalAlignment="Center"
Content="{markup:Translate Verwende Abstandsmessung}"
IsChecked="False"
ToolTip="{markup:Translate Das Aktivieren der Option verwendet die Google Suche um den Abstand zwischen Adressen zu messen. Dieser Vorgang kann etwas mehr Zeit benötigen.}" />
</WrapPanel>
<Button
Grid.Row="1"
Width="90"
Margin="3,3,3,3"
HorizontalAlignment="Right"
Click="ButtonSuche_OnClick"
Content="Suche starten" />
</Grid>
</GroupBox>
<dxg:GridControl
x:Name="GridControlPossibleVertreter"
Grid.Row="3"
Grid.Column="0"
Height="200"
Margin="3,3,3,3"
Visibility="Visible">
<dxg:GridControl.Columns>
<dxg:GridColumn
FieldName="Nachname"
Header="Nachname"
ReadOnly="True"
SortOrder="Ascending" />
<dxg:GridColumn
FieldName="Vorname"
Header="Vorname"
ReadOnly="True" />
<dxg:GridColumn
FieldName="Arbeitszeit"
Header="Betreuungszeiten"
ReadOnly="True" />
<dxg:GridColumn
FieldName="Postleitzahl"
Header="Postleitzahl"
ReadOnly="True" />
<dxg:GridColumn
FieldName="Strasse"
Header="Strasse"
ReadOnly="True" />
<dxg:GridColumn
FieldName="Stadt"
Header="Stadt"
ReadOnly="True" />
<dxg:GridColumn
FieldName="Geschlecht"
Header="Geschlecht"
ReadOnly="True" />
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView
AllowBestFit="True"
AllowPerPixelScrolling="True"
BestFitMode="AllRows"
RowDoubleClick="TableView_OnRowDoubleClick"
ShowGridMenu="TableView_OnShowGridMenu"
ShowGroupPanel="False"
ShowTotalSummary="False" />
</dxg:GridControl.View>
</dxg:GridControl>
<StackPanel
Grid.Row="4"
Grid.Column="0"
Margin="3">
<WrapPanel
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Orientation="Horizontal">
<Button
Width="90"
Margin="3,3,3,3"
Click="ButtonBase_OnClick"
Content="Übernehmen" />
<Button
Width="90"
Margin="3,3,3,3"
Click="ButtonClose_OnClick"
Content="Schließen" />
</WrapPanel>
</StackPanel>
</Grid>
</Grid>
</GroupBox>
</Window>

View File

@@ -0,0 +1,33 @@
..\svcutil.exe /noConfig /noLogo /edb /n:*,BeWo.ServiceProxy /out:..\ServiceProxy\GeneratedAiEnhancedService.cs /ct:System.Collections.Generic.List`1 /r:..\..\Shared\bin\Debug\BS.Shared.dll http://localhost:3777/Host/AiEnhancedService.svc?wsdl
@echo off
setlocal EnableDelayedExpansion
set "input=..\ServiceProxy\GeneratedAiEnhancedService.cs"
set "output=temp.txt"
set /a start=12
set /a end=162
set /a line=0
REM Zeilen zählen
set /a total=0
for /f "usebackq delims=" %%A in ("%input%") do (
set /a total+=1
)
REM Nur löschen, wenn genug Zeilen vorhanden
if %total% leq %end% (
echo Datei hat nur %total% Zeilen nichts wird gelöscht.
copy /y "%input%" "%input2%"
goto :eof
)
> "%output%" (
for /f "usebackq delims=" %%A in ("%input%") do (
set /a line+=1
if !line! lss %start% echo(%%A
if !line! gtr %end% echo(%%A
)
)
move /y "%output%" "%input%"

View File

@@ -0,0 +1,23 @@
@echo off
REM Diese Batch-Datei führt eine andere Batch-Datei aus und schreibt das Ergebnis in eine Log-Datei
REM Pfad zur anderen Batch-Datei
set "SCRIPT_PATH=ServiceReferences_AiEnhancedService.bat"
REM Pfad zur Log-Datei
set "LOG_FILE=ServiceReferences_AiEnhancedService_Log.log.txt"
REM Leere die Log-Datei vor dem Start
echo. > %LOG_FILE%
REM Führe die andere Batch-Datei aus und leite die Ausgabe in die Log-Datei um
call %SCRIPT_PATH% >> %LOG_FILE% 2>&1
REM Überprüfe, ob die Ausführung erfolgreich war
if %errorlevel% equ 0 (
echo Die Ausführung von %SCRIPT_PATH% war erfolgreich. >> %LOG_FILE%
) else (
echo Die Ausführung von %SCRIPT_PATH% ist fehlgeschlagen. >> %LOG_FILE%
)
echo Log wurde in %LOG_FILE% geschrieben.

View File

@@ -0,0 +1,33 @@
..\svcutil.exe /noConfig /noLogo /edb /n:*,BeWo.ServiceProxy /out:..\ServiceProxy\GeneratedOperationsEnhancedService.cs /ct:System.Collections.Generic.List`1 /r:..\..\Shared\bin\Debug\BS.Shared.dll http://localhost:3777/Host/OperationsEnhancedService.svc?wsdl
@echo off
setlocal EnableDelayedExpansion
set "input=..\ServiceProxy\GeneratedOperationsEnhancedService.cs"
set "output=temp.txt"
set /a start=12
set /a end=162
set /a line=0
REM Zeilen zählen
set /a total=0
for /f "usebackq delims=" %%A in ("%input%") do (
set /a total+=1
)
REM Nur löschen, wenn genug Zeilen vorhanden
if %total% leq %end% (
echo Datei hat nur %total% Zeilen nichts wird gelöscht.
copy /y "%input%" "%input2%"
goto :eof
)
> "%output%" (
for /f "usebackq delims=" %%A in ("%input%") do (
set /a line+=1
if !line! lss %start% echo(%%A
if !line! gtr %end% echo(%%A
)
)
move /y "%output%" "%input%"

View File

@@ -0,0 +1,23 @@
@echo off
REM Diese Batch-Datei führt eine andere Batch-Datei aus und schreibt das Ergebnis in eine Log-Datei
REM Pfad zur anderen Batch-Datei
set "SCRIPT_PATH=ServiceReferences_OperationsEnhancedService.bat"
REM Pfad zur Log-Datei
set "LOG_FILE=ServiceReferences_OperationsEnhancedService_Log.log.txt"
REM Leere die Log-Datei vor dem Start
echo. > %LOG_FILE%
REM Führe die andere Batch-Datei aus und leite die Ausgabe in die Log-Datei um
call %SCRIPT_PATH% >> %LOG_FILE% 2>&1
REM Überprüfe, ob die Ausführung erfolgreich war
if %errorlevel% equ 0 (
echo Die Ausführung von %SCRIPT_PATH% war erfolgreich. >> %LOG_FILE%
) else (
echo Die Ausführung von %SCRIPT_PATH% ist fehlgeschlagen. >> %LOG_FILE%
)
echo Log wurde in %LOG_FILE% geschrieben.

View File

@@ -0,0 +1,6 @@
<types>
<sharedType>
<name>BeWoFault</name>
<namespace>BeWo.ServiceProxy</namespace>
</sharedType>
</types>

View File

@@ -1935,12 +1935,12 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AiChatDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AiSettingsDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.CheckObjectDeletionResultDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ConfirmationReceiptSignatureDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ConfirmationReceiptSignatureDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DienstvertretungDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.DienstEintragDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DienstEintragDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.DienstvertretungDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ConfirmationReceiptSignatureDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ConfirmationReceiptSignatureDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.VorlagentabelleDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.VorlagentabelleDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DokumentvorlageDC))]
@@ -5843,12 +5843,12 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AiChatDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AiSettingsDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.CheckObjectDeletionResultDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ConfirmationReceiptSignatureDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ConfirmationReceiptSignatureDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DienstvertretungDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.DienstEintragDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DienstEintragDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.DienstvertretungDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ConfirmationReceiptSignatureDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ConfirmationReceiptSignatureDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.VorlagentabelleDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.VorlagentabelleDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DokumentvorlageDC))]
@@ -6113,7 +6113,7 @@ namespace BeWo.ServiceProxy
"loyeeAndCustomerResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/HasConfirmationReceiptSignatureByDateAndEmp" +
"loyeeAndCustomerBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
bool HasConfirmationReceiptSignatureByDateAndEmployeeAndCustomer(long customerOid, long employeeOid, System.DateTime start, System.DateTime end);
bool HasConfirmationReceiptSignatureByDateAndEmployeeAndCustomer(out System.Collections.Generic.List<BS.Shared.DataContracts.ConfirmationReceiptSignatureDC> confirmationReceiptSignatures, long customerOid, long employeeOid, System.DateTime start, System.DateTime end, long costBearer2SupportConceptOid);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/DeleteDienstvertretung2", ReplyAction="http://tempuri.org/IOperationsService/DeleteDienstvertretung2Response")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/DeleteDienstvertretung2BeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
@@ -7695,9 +7695,9 @@ namespace BeWo.ServiceProxy
return base.Channel.CheckObjectDeletionAllowed(objectoid, tableId);
}
public bool HasConfirmationReceiptSignatureByDateAndEmployeeAndCustomer(long customerOid, long employeeOid, System.DateTime start, System.DateTime end)
public bool HasConfirmationReceiptSignatureByDateAndEmployeeAndCustomer(out System.Collections.Generic.List<BS.Shared.DataContracts.ConfirmationReceiptSignatureDC> confirmationReceiptSignatures, long customerOid, long employeeOid, System.DateTime start, System.DateTime end, long costBearer2SupportConceptOid)
{
return base.Channel.HasConfirmationReceiptSignatureByDateAndEmployeeAndCustomer(customerOid, employeeOid, start, end);
return base.Channel.HasConfirmationReceiptSignatureByDateAndEmployeeAndCustomer(out confirmationReceiptSignatures, customerOid, employeeOid, start, end, costBearer2SupportConceptOid);
}
public bool DeleteDienstvertretung2(long empId, long wohnId, int zeile, System.DateTime date, BS.Shared.DataContracts.DienstvertretungDC dienstvertretung, System.Collections.Generic.List<BS.Shared.DataContracts.DienstEintragDC> alleDiensteintraege, System.Collections.Generic.List<BS.Shared.DataContracts.DienstvertretungDC> alleDienstvertretungen, int day, System.DateTime pflichtStart, System.DateTime pflichtEnde)

View File

@@ -0,0 +1,106 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.42000
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
namespace BeWo.ServiceProxy
{
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
[System.ServiceModel.ServiceContractAttribute(ConfigurationName="BeWo.ServiceProxy.IAiEnhancedService")]
public interface IAiEnhancedService
{
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAiEnhancedService/GetAiConfig", ReplyAction="http://tempuri.org/IAiEnhancedService/GetAiConfigResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAiEnhancedService/GetAiConfigBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BS.Shared.DataContracts.Feature.AI.AiConfigDC GetAiConfig();
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAiEnhancedService/UpdateAiConfig", ReplyAction="http://tempuri.org/IAiEnhancedService/UpdateAiConfigResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAiEnhancedService/UpdateAiConfigBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BS.Shared.DataContracts.Feature.AI.AiConfigDC UpdateAiConfig(BS.Shared.DataContracts.Feature.AI.AiConfigDC toUpdate);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAiEnhancedService/GetAiModels", ReplyAction="http://tempuri.org/IAiEnhancedService/GetAiModelsResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAiEnhancedService/GetAiModelsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
System.Collections.Generic.List<BS.Shared.DataContracts.Feature.AI.AiModelDC> GetAiModels();
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAiEnhancedService/GetAiConversations", ReplyAction="http://tempuri.org/IAiEnhancedService/GetAiConversationsResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAiEnhancedService/GetAiConversationsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
System.Collections.Generic.List<BS.Shared.DataContracts.Feature.AI.AiConversationDC> GetAiConversations(int uicontext);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAiEnhancedService/CreateAiConversation", ReplyAction="http://tempuri.org/IAiEnhancedService/CreateAiConversationResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAiEnhancedService/CreateAiConversationBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BS.Shared.DataContracts.Feature.AI.AiConversationDC CreateAiConversation(BS.Shared.DataContracts.Feature.AI.AiConversationDC conversation, long modell_oid);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAiEnhancedService/SendNewMessage", ReplyAction="http://tempuri.org/IAiEnhancedService/SendNewMessageResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAiEnhancedService/SendNewMessageBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
System.Collections.Generic.List<BS.Shared.DataContracts.AiConversationMessageDC> SendNewMessage(long conversation, string message);
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
public interface IAiEnhancedServiceChannel : BeWo.ServiceProxy.IAiEnhancedService, System.ServiceModel.IClientChannel
{
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
public partial class AiEnhancedServiceClient : System.ServiceModel.ClientBase<BeWo.ServiceProxy.IAiEnhancedService>, BeWo.ServiceProxy.IAiEnhancedService
{
public AiEnhancedServiceClient()
{
}
public AiEnhancedServiceClient(string endpointConfigurationName) :
base(endpointConfigurationName)
{
}
public AiEnhancedServiceClient(string endpointConfigurationName, string remoteAddress) :
base(endpointConfigurationName, remoteAddress)
{
}
public AiEnhancedServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
base(endpointConfigurationName, remoteAddress)
{
}
public AiEnhancedServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
base(binding, remoteAddress)
{
}
public BS.Shared.DataContracts.Feature.AI.AiConfigDC GetAiConfig()
{
return base.Channel.GetAiConfig();
}
public BS.Shared.DataContracts.Feature.AI.AiConfigDC UpdateAiConfig(BS.Shared.DataContracts.Feature.AI.AiConfigDC toUpdate)
{
return base.Channel.UpdateAiConfig(toUpdate);
}
public System.Collections.Generic.List<BS.Shared.DataContracts.Feature.AI.AiModelDC> GetAiModels()
{
return base.Channel.GetAiModels();
}
public System.Collections.Generic.List<BS.Shared.DataContracts.Feature.AI.AiConversationDC> GetAiConversations(int uicontext)
{
return base.Channel.GetAiConversations(uicontext);
}
public BS.Shared.DataContracts.Feature.AI.AiConversationDC CreateAiConversation(BS.Shared.DataContracts.Feature.AI.AiConversationDC conversation, long modell_oid)
{
return base.Channel.CreateAiConversation(conversation, modell_oid);
}
public System.Collections.Generic.List<BS.Shared.DataContracts.AiConversationMessageDC> SendNewMessage(long conversation, string message)
{
return base.Channel.SendNewMessage(conversation, message);
}
}
}

View File

@@ -0,0 +1,61 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.42000
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
namespace BeWo.ServiceProxy
{
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
[System.ServiceModel.ServiceContractAttribute(ConfigurationName="BeWo.ServiceProxy.IOperationsEnhancedService")]
public interface IOperationsEnhancedService
{
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsEnhancedService/HelloWorld", ReplyAction="http://tempuri.org/IOperationsEnhancedService/HelloWorldResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsEnhancedService/HelloWorldBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
void HelloWorld();
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
public interface IOperationsEnhancedServiceChannel : BeWo.ServiceProxy.IOperationsEnhancedService, System.ServiceModel.IClientChannel
{
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
public partial class OperationsEnhancedServiceClient : System.ServiceModel.ClientBase<BeWo.ServiceProxy.IOperationsEnhancedService>, BeWo.ServiceProxy.IOperationsEnhancedService
{
public OperationsEnhancedServiceClient()
{
}
public OperationsEnhancedServiceClient(string endpointConfigurationName) :
base(endpointConfigurationName)
{
}
public OperationsEnhancedServiceClient(string endpointConfigurationName, string remoteAddress) :
base(endpointConfigurationName, remoteAddress)
{
}
public OperationsEnhancedServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
base(endpointConfigurationName, remoteAddress)
{
}
public OperationsEnhancedServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
base(binding, remoteAddress)
{
}
public void HelloWorld()
{
base.Channel.HelloWorld();
}
}
}

View File

@@ -15,6 +15,7 @@ using BS.Shared;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using DevExpress.CodeParser;
using DevExpress.Export.Xl;
namespace BeWo.ServiceProxy
{
@@ -48,22 +49,24 @@ namespace BeWo.ServiceProxy
_ServerName += "/";
_EndpointAddresses = new Dictionary<Type, EndpointAddress>
{
{ typeof(IQueryService), new EndpointAddress(_ServerName + "QueryService.svc") },
{ typeof(IStreamingService), new EndpointAddress(_ServerName + "StreamingService.svc") },
{ typeof(IEmployeeService), new EndpointAddress(_ServerName + "EmployeeService.svc") },
{ typeof(ICustomerService), new EndpointAddress(_ServerName + "CustomerService.svc") },
{ typeof(IUserService), new EndpointAddress(_ServerName + "UserService.svc") },
{ typeof(IValueListService), new EndpointAddress(_ServerName + "ValueListService.svc") },
{ typeof(IDownloadService), new EndpointAddress(_ServerName + "DownloadService.svc") },
{ typeof(IResourceService), new EndpointAddress(_ServerName + "ResourceService.svc") },
{ typeof(IOperationsService), new EndpointAddress(_ServerName + "OperationsService.svc") },
{ typeof(IAnalysisService), new EndpointAddress(_ServerName + "AnalysisService.svc") },
{ typeof(IMailService), new EndpointAddress(_ServerName + "MailService.svc") },
{ typeof(IAccountingService), new EndpointAddress(_ServerName + "AccountingService.svc") },
{ typeof(IGkvAccountingService), new EndpointAddress(_ServerName + "GkvAccountingService.svc") },
{ typeof(IReportService), new EndpointAddress(_ServerName + "ReportService.svc") }
};
{
{ typeof(IQueryService), new EndpointAddress(_ServerName + "QueryService.svc") },
{ typeof(IStreamingService), new EndpointAddress(_ServerName + "StreamingService.svc") },
{ typeof(IEmployeeService), new EndpointAddress(_ServerName + "EmployeeService.svc") },
{ typeof(ICustomerService), new EndpointAddress(_ServerName + "CustomerService.svc") },
{ typeof(IUserService), new EndpointAddress(_ServerName + "UserService.svc") },
{ typeof(IValueListService), new EndpointAddress(_ServerName + "ValueListService.svc") },
{ typeof(IDownloadService), new EndpointAddress(_ServerName + "DownloadService.svc") },
{ typeof(IResourceService), new EndpointAddress(_ServerName + "ResourceService.svc") },
{ typeof(IOperationsService), new EndpointAddress(_ServerName + "OperationsService.svc") },
{ typeof(IOperationsEnhancedService), new EndpointAddress(_ServerName + "OperationsEnhancedService.svc") },
{ typeof(IAnalysisService), new EndpointAddress(_ServerName + "AnalysisService.svc") },
{ typeof(IMailService), new EndpointAddress(_ServerName + "MailService.svc") },
{ typeof(IAccountingService), new EndpointAddress(_ServerName + "AccountingService.svc") },
{ typeof(IGkvAccountingService), new EndpointAddress(_ServerName + "GkvAccountingService.svc") },
{ typeof(IReportService), new EndpointAddress(_ServerName + "ReportService.svc") },
{ typeof(IAiEnhancedService), new EndpointAddress(_ServerName + "AiEnhancedService.svc") }
};
}
@@ -72,6 +75,29 @@ namespace BeWo.ServiceProxy
_ProxyCache = new Dictionary<Type, object>();
}
#region AiEnhancedService
public static void DoAiEnhancedServiceSnyc(Action<IAiEnhancedService> pAction)
=> DoSync<AiEnhancedServiceClient, IAiEnhancedService>(pAction);
public static T DoAiEnhancedServiceSnyc<T>(Func<IAiEnhancedService, T> pFunc)
=> DoSync<AiEnhancedServiceClient, IAiEnhancedService, T>(pFunc);
public static void DoAiEnhancedServiceAsnyc(Action<IAiEnhancedService> pAction, Action pCallback = null, bool showWaitDialog = true, UserControl caller = null)
=> DoAsync<AiEnhancedServiceClient, IAiEnhancedService>(pAction, pCallback, showWaitDialog, caller?.Dispatcher);
public static void DoAiEnhancedServiceAsnyc<T>(Func<IAiEnhancedService, T> pFunc, Action<T> pCallback = null, bool showWaitDialog = true, UserControl caller = null)
=> DoAsync<AiEnhancedServiceClient, IAiEnhancedService, T>(pFunc, pCallback, showWaitDialog, caller?.Dispatcher);
#endregion
#region OperationsEnhancedService
public static void DoOperationsEnhancedServiceSnyc(Action<IOperationsEnhancedService> pAction)
=> DoSync<OperationsEnhancedServiceClient, IOperationsEnhancedService>(pAction);
public static T DoOperationsEnhancedServiceSnyc<T>(Func<IOperationsEnhancedService, T> pFunc)
=> DoSync<OperationsEnhancedServiceClient, IOperationsEnhancedService, T>(pFunc);
public static void DoOperationsEnhancedServiceAsnyc(Action<IOperationsEnhancedService> pAction, Action pCallback = null, bool showWaitDialog = true, UserControl caller = null)
=> DoAsync<OperationsEnhancedServiceClient, IOperationsEnhancedService>(pAction, pCallback, showWaitDialog, caller?.Dispatcher);
public static void DoOperationsEnhancedServiceAsnyc<T>(Func<IOperationsEnhancedService, T> pFunc, Action<T> pCallback = null, bool showWaitDialog = true, UserControl caller = null)
=> DoAsync<OperationsEnhancedServiceClient, IOperationsEnhancedService, T>(pFunc, pCallback, showWaitDialog, caller?.Dispatcher);
#endregion
public static void DoAccountingServiceAsync<T>(Func<IAccountingService, T> pFunc, Action<T> pCallBack, bool showWaitDialog)
{
DoAsync<AccountingServiceClient, IAccountingService, T>(pFunc, pCallBack, showWaitDialog);
@@ -104,17 +130,17 @@ namespace BeWo.ServiceProxy
public static void DoAnalysisServiceAsync<T>(Func<IAnalysisService, T> pFunc, Action<T> pCallBack)
{
DoAsync<AnalysisServiceClient, IAnalysisService, T>(pFunc, pCallBack, true);
}
public static void DoAnalysisServiceAsync<T>(Func<IAnalysisService, T> pFunc, Action<T> pCallBack, bool showWaitDialog)
{
DoAsync<AnalysisServiceClient, IAnalysisService, T>(pFunc, pCallBack, showWaitDialog);
}
public static void DoAccountingServiceSync(Action<IAccountingService> pAction)
{
pAction.Invoke(GetInstance<AccountingServiceClient, IAccountingService>());
}
}
public static void DoAnalysisServiceAsync<T>(Func<IAnalysisService, T> pFunc, Action<T> pCallBack, bool showWaitDialog)
{
DoAsync<AnalysisServiceClient, IAnalysisService, T>(pFunc, pCallBack, showWaitDialog);
}
public static void DoAccountingServiceSync(Action<IAccountingService> pAction)
{
pAction.Invoke(GetInstance<AccountingServiceClient, IAccountingService>());
}
//
public static void DoAnalysisServiceAsync(Action<IAnalysisService> pAction)
@@ -180,21 +206,21 @@ namespace BeWo.ServiceProxy
}
}
public static T DoDownloadServiceSync<T>(Func<IDownloadService, T> pFunc)
{
try
{
return pFunc.Invoke(GetInstance<DownloadServiceClient, IDownloadService>());
}
catch (Exception e)
{
ShowErrorMessage(e);
}
public static T DoDownloadServiceSync<T>(Func<IDownloadService, T> pFunc)
{
try
{
return pFunc.Invoke(GetInstance<DownloadServiceClient, IDownloadService>());
}
catch (Exception e)
{
ShowErrorMessage(e);
}
return default(T);
}
return default(T);
}
public static void DoEmployeeServiceAsync<T>(Func<IEmployeeService, T> pFunc, Action<T> pCallBack, bool showWaitDialog)
public static void DoEmployeeServiceAsync<T>(Func<IEmployeeService, T> pFunc, Action<T> pCallBack, bool showWaitDialog)
{
DoAsync<EmployeeServiceClient, IEmployeeService, T>(pFunc, pCallBack, showWaitDialog);
}
@@ -221,57 +247,57 @@ namespace BeWo.ServiceProxy
}
}
public static T DoEmployeeServiceSync<T>(Func<IEmployeeService, T> pFunc)
{
try
{
return pFunc.Invoke(GetInstance<EmployeeServiceClient, IEmployeeService>());
}
catch (Exception e)
{
ShowErrorMessage(e);
}
public static T DoEmployeeServiceSync<T>(Func<IEmployeeService, T> pFunc)
{
try
{
return pFunc.Invoke(GetInstance<EmployeeServiceClient, IEmployeeService>());
}
catch (Exception e)
{
ShowErrorMessage(e);
}
return default(T);
}
return default(T);
}
#region Wohnheim
public static void DoWohnheimServiceAsync<T>(Func<ICustomerService, T> pFunc, Action<T> pCallBack, bool showWaitDialog)
{
DoAsync<CustomerServiceClient, ICustomerService, T>(pFunc, pCallBack, showWaitDialog);
}
public static void DoWohnheimServiceAsync<T>(Func<ICustomerService, T> pFunc, Action<T> pCallBack)
{
DoAsync<CustomerServiceClient, ICustomerService, T>(pFunc, pCallBack, true);
}
public static void DoWohnheimServiceAsync(Action<ICustomerService> pAction)
{
DoAsync<CustomerServiceClient,ICustomerService>(pAction, true);
}
public static void DoWohnheimServiceSync(Action<ICustomerService> pAction)
{
try
{
pAction.Invoke(GetInstance<CustomerServiceClient, ICustomerService>());
}
catch (Exception e)
{
ShowErrorMessage(e);
}
}
public static T DoWohnheimServiceSync<T>(Func<ICustomerService, T> pFunc)
{
try
{
return pFunc.Invoke(GetInstance<CustomerServiceClient, ICustomerService>());
}
catch (Exception e)
{
ShowErrorMessage(e);
}
{
DoAsync<CustomerServiceClient, ICustomerService, T>(pFunc, pCallBack, showWaitDialog);
}
public static void DoWohnheimServiceAsync<T>(Func<ICustomerService, T> pFunc, Action<T> pCallBack)
{
DoAsync<CustomerServiceClient, ICustomerService, T>(pFunc, pCallBack, true);
}
public static void DoWohnheimServiceAsync(Action<ICustomerService> pAction)
{
DoAsync<CustomerServiceClient, ICustomerService>(pAction, true);
}
public static void DoWohnheimServiceSync(Action<ICustomerService> pAction)
{
try
{
pAction.Invoke(GetInstance<CustomerServiceClient, ICustomerService>());
}
catch (Exception e)
{
ShowErrorMessage(e);
}
}
public static T DoWohnheimServiceSync<T>(Func<ICustomerService, T> pFunc)
{
try
{
return pFunc.Invoke(GetInstance<CustomerServiceClient, ICustomerService>());
}
catch (Exception e)
{
ShowErrorMessage(e);
}
return default(T);
}
return default(T);
}
#endregion
#region GkvAccounting
@@ -285,14 +311,7 @@ namespace BeWo.ServiceProxy
}
public static void DoGkvAccountingServiceAsyncGUI<T>(Func<IGkvAccountingService, T> pFunc, Action<T> pCallBack, Dispatcher dispatcher)
{
Action<T> action = (t) => dispatcher.BeginInvoke(
DispatcherPriority.Normal,
(Action)delegate
{
pCallBack(t);
});
DoAsync<GkvAccountingServiceClient, IGkvAccountingService, T>(pFunc, action, true);
DoAsync<GkvAccountingServiceClient, IGkvAccountingService, T>(pFunc, pCallBack, true, dispatcher);
}
public static void DoGkvAccountingServiceAsync(Action<IGkvAccountingService> pAction)
@@ -349,7 +368,7 @@ namespace BeWo.ServiceProxy
return default(T);
}
public static void DoMultipleAccountingServicesAsync(List<Action<IAccountingService>> pActions, Action pAllDoneCallBack)
{
DoMulitpleAsync<AccountingServiceClient, IAccountingService>(pActions, pAllDoneCallBack, true);
@@ -497,11 +516,11 @@ namespace BeWo.ServiceProxy
DoAsync<ResourceServiceClient, IResourceService>(pAction, true);
}
public static void DoResourceServiceAsync(Action<IResourceService> pAction, Action pCallback)
{
DoAsync<ResourceServiceClient, IResourceService>(pAction, pCallback, true);
}
public static void DoResourceServiceAsync(Action<IResourceService> pAction, Action pCallback)
{
DoAsync<ResourceServiceClient, IResourceService>(pAction, pCallback, true);
}
public static void DoStreamingServiceAsync<T>(Func<IStreamingService, T> pFunc, Action<T> pCallBack, Action pErrorCallBack)
{
DoAsync<StreamingServiceClient, IStreamingService, T>(pFunc, pCallBack, pErrorCallBack, true);
@@ -517,20 +536,20 @@ namespace BeWo.ServiceProxy
DoAsync<UserServiceClient, IUserService, T>(pFunc, pCallBack, showWaitDialog);
}
public static T DoUserServiceSync<T>(Func<IUserService, T> pFunc)
{
return pFunc.Invoke(GetInstance<UserServiceClient, IUserService>());
}
public static T DoUserServiceSync<T>(Func<IUserService, T> pFunc)
{
return pFunc.Invoke(GetInstance<UserServiceClient, IUserService>());
}
public static void DoUserServiceAsync(Action<IUserService> pAction, bool showWaitDialog)
{
DoAsync<UserServiceClient, IUserService>(pAction, showWaitDialog);
}
public static void DoUserServiceAsync(Action<IUserService> pAction, Action pCallBack, bool showWaitDialog)
{
DoAsync<UserServiceClient, IUserService>(pAction, pCallBack, showWaitDialog);
}
public static void DoUserServiceAsync(Action<IUserService> pAction, Action pCallBack, bool showWaitDialog)
{
DoAsync<UserServiceClient, IUserService>(pAction, pCallBack, showWaitDialog);
}
public static void DoValueListServiceAsync<T>(Func<IValueListService, T> pFunc, Action<T> pCallBack)
{
@@ -566,12 +585,12 @@ namespace BeWo.ServiceProxy
DoAsync<ReportServiceClient, IReportService, T>(pFunc, pCallBack, true);
}
public static void DoReportServiceAsync<T>(Func<IReportService, T> pFunc, Action<T> pCallBack, bool showWaitDialog)
{
DoAsync<ReportServiceClient, IReportService, T>(pFunc, pCallBack, showWaitDialog);
}
public static void DoReportServiceAsync<T>(Func<IReportService, T> pFunc, Action<T> pCallBack, bool showWaitDialog)
{
DoAsync<ReportServiceClient, IReportService, T>(pFunc, pCallBack, showWaitDialog);
}
public static void DoReportServiceSync(Action<IReportService> pAction)
public static void DoReportServiceSync(Action<IReportService> pAction)
{
try
{
@@ -652,14 +671,14 @@ namespace BeWo.ServiceProxy
{
DoUserServiceAsync(s => s.GetAllUsersCompact().Cast<T>().ToList(), r => pCallBack(r), true);
}
else if (typeof (T) == typeof (ResourceDC))
else if (typeof(T) == typeof(ResourceDC))
{
DoResourceServiceAsync(s => s.GetAllResources().Cast<T>().ToList(), pCallBack, true);
}
else if (typeof (T) == typeof (TextModuleDC))
{
DoOperationsServiceAsync(s => s.GetAllTextModules().Cast<T>().ToList(), pCallBack);
}
else if (typeof(T) == typeof(TextModuleDC))
{
DoOperationsServiceAsync(s => s.GetAllTextModules().Cast<T>().ToList(), pCallBack);
}
else
{
throw new NotImplementedException();
@@ -675,6 +694,26 @@ namespace BeWo.ServiceProxy
DoAsync<TClient, TInterface, T>(pFunc, pCallback, null, showWaitDialog);
}
private static void DoAsync<TClient, TInterface, T>(Func<TInterface, T> pFunc, Action<T> pCallback, bool showWaitDialog, Dispatcher dispatcher)
where TClient : ClientBase<TInterface>, TInterface, new()
where TInterface : class
{
if(dispatcher is null)
{
dispatcher = BeWoApp.Current.Dispatcher;
}
Action<T> action = (t) => dispatcher.BeginInvoke(
DispatcherPriority.Normal,
(Action)delegate
{
pCallback(t);
});
DoAsync<TClient, TInterface, T>(pFunc, action, showWaitDialog);
}
private static void DoAsync<TClient, TInterface, T>(Func<TInterface, T> pFunc, Action<T> pCallback, Action pErrorCallback, bool showWaitDialog)
where TClient : ClientBase<TInterface>, TInterface, new()
where TInterface : class
@@ -746,6 +785,25 @@ namespace BeWo.ServiceProxy
DoAsync<TClient, TInterface>(pAction, null, showWaitDialog);
}
private static void DoAsync<TClient, TInterface>(Action<TInterface> pAction, Action pCallback, bool showWaitDialog, Dispatcher dispatcher)
where TClient : ClientBase<TInterface>, TInterface, new()
where TInterface : class
{
Action action = pCallback;
if (dispatcher != null)
{
action = () => dispatcher.BeginInvoke(
DispatcherPriority.Normal,
(Action)delegate
{
pCallback();
});
}
DoAsync<TClient, TInterface>(pAction, action, showWaitDialog);
}
// private static void DoAsync<TClient, TInterface>(Action<TInterface> pAction, Action pCallback, bool )
// void with callback
private static void DoAsync<TClient, TInterface>(Action<TInterface> pAction, Action pCallback, bool showWaitDialog)
@@ -855,6 +913,36 @@ namespace BeWo.ServiceProxy
}
}
private static void DoSync<TClient, TInterface>(Action<TInterface> pAction)
where TClient : ClientBase<TInterface>, TInterface, new()
where TInterface : class
{
try
{
pAction.Invoke(GetInstance<TClient, TInterface>());
}
catch (Exception e)
{
ShowErrorMessage(e);
}
}
private static T DoSync<TClient, TInterface, T>(Func<TInterface, T> pFunc)
where TClient : ClientBase<TInterface>, TInterface, new()
where TInterface : class
{
try
{
return pFunc.Invoke(GetInstance<TClient, TInterface>());
}
catch (Exception e)
{
ShowErrorMessage(e);
}
return default(T);
}
private static TInterface GetInstance<TClient, TInterface>()
where TClient : ClientBase<TInterface>, TInterface, new()
where TInterface : class
@@ -893,17 +981,17 @@ namespace BeWo.ServiceProxy
{
lClient = new TClient();
if(!_ProxyCache.ContainsKey(lClient.GetType()))
{
_ProxyCache.Add(typeof(TClient), lClient);
}
if (!_ProxyCache.ContainsKey(lClient.GetType()))
{
_ProxyCache.Add(typeof(TClient), lClient);
}
#if DEBUG
if (DebugConfig.CurrentConfig is DebugConfig current && current.EnableAutoRemoteDebugging)
{
if (lClient.Endpoint.Binding is BasicHttpBinding binding)
{
if(_ServerName?.StartsWith("https") ?? true)
if (_ServerName?.StartsWith("https") ?? true)
{
binding.Security.Mode = BasicHttpSecurityMode.Transport;
}
@@ -919,11 +1007,8 @@ namespace BeWo.ServiceProxy
lClient.Endpoint.Behaviors.Add(new MultitenancyEndpointBehavior());
lClient.Endpoint.Address = EndpointAddresses[typeof(TInterface)];
}
return lClient;
}
@@ -937,7 +1022,10 @@ namespace BeWo.ServiceProxy
Monitor.Enter(_Lock);
if ((++_RunningAsyncs) == 1 && BeWoApp.MainControl != null)
{
BeWoApp.MainControl.StartWaiting();
if (BeWoApp.MainControl.CurrentAnimatedBeWoWindow is null)
BeWoApp.MainControl.StartWaiting();
else
BeWoApp.MainControl.CurrentAnimatedBeWoWindow.StartWaiting();
}
Monitor.Exit(_Lock);
@@ -948,6 +1036,7 @@ namespace BeWo.ServiceProxy
Monitor.Enter(_Lock);
if ((--_RunningAsyncs) == 0 && BeWoApp.MainControl != null)
{
BeWoApp.MainControl.CurrentAnimatedBeWoWindow?.EndWaiting();
BeWoApp.MainControl.EndWaiting();
}

View File

@@ -0,0 +1,23 @@
@echo off
REM Diese Batch-Datei führt eine andere Batch-Datei aus und schreibt das Ergebnis in eine Log-Datei
REM Pfad zur anderen Batch-Datei
set "SCRIPT_PATH=ServiceReferences.bat"
REM Pfad zur Log-Datei
set "LOG_FILE=ServiceReferencesWithLog.log.txt"
REM Leere die Log-Datei vor dem Start
echo. > %LOG_FILE%
REM Führe die andere Batch-Datei aus und leite die Ausgabe in die Log-Datei um
call %SCRIPT_PATH% >> %LOG_FILE% 2>&1
REM Überprüfe, ob die Ausführung erfolgreich war
if %errorlevel% equ 0 (
echo Die Ausführung von %SCRIPT_PATH% war erfolgreich. >> %LOG_FILE%
) else (
echo Die Ausführung von %SCRIPT_PATH% ist fehlgeschlagen. >> %LOG_FILE%
)
echo Log wurde in %LOG_FILE% geschrieben.

View File

@@ -1,10 +1,107 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="TextBoxBorderBrush" Color="#FF86878F" />
<SolidColorBrush x:Key="ControlBackgroundBrush" Color="#FFFDC784" />
<SolidColorBrush x:Key="ControlSelectedBackgroundBrush" Color="#FFFFD86C" />
<SolidColorBrush x:Key="ControlMouseOverBackgroundBrush" Color="#FFDCA158" />
<SolidColorBrush x:Key="TabItemHotTextBrush" Color="#FFAB4A07" />
<!-- Region Brushes -->
<SolidColorBrush x:Key="TextModuleBrush" Color="#FFA9B8C2" />
<SolidColorBrush x:Key="ZusageMitVorbehaltBrush" Color="#FFB927D9" />
<SolidColorBrush x:Key="ZusageZugesagtBrush" Color="#FF48D44E" />
<SolidColorBrush x:Key="ZusageAbgesagtBrush" Color="#FFAB0030" />
<SolidColorBrush x:Key="GridPrintMenuLightBrush" Color="White" />
<SolidColorBrush x:Key="BSOrangeBrush" Color="#FFFF5A00" />
<SolidColorBrush x:Key="LightOrangeBrush" Color="#FFFB6F0E" />
<SolidColorBrush x:Key="GroupBookingBackgroundBrush" Color="#FFFDC784" />
<SolidColorBrush x:Key="GroupBookingSelectedBackgroundBrush" Color="#FFBE8A49" />
<SolidColorBrush x:Key="GroupBookingMouseOverBackgroundBrush" Color="#FFDCA158" />
<LinearGradientBrush x:Key="ApplicationBackground" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0.38" Color="#FFDADADB" />
<GradientStop Offset="0.725" Color="#FFA9B8C2" />
<GradientStop Offset="0.91" Color="#FF4E565A" />
</LinearGradientBrush>
<LinearGradientBrush x:Key="LoginBackground" StartPoint="0.5,0.051" EndPoint="0.5,0.699">
<GradientStop Color="#FF96A4AD" />
<GradientStop Offset="0.888" Color="#FF9FADB6" />
<GradientStop Offset="0.625" Color="#FFA9B8C2" />
<GradientStop Offset="0.504" Color="#FF87929B" />
<GradientStop Offset="0.33" Color="#FF8E9AA3" />
</LinearGradientBrush>
<SolidColorBrush x:Key="ControlBackground" Color="#FFFCFAF2" />
<SolidColorBrush x:Key="MainGroupBoxForegroundBrush" Color="#FFD7D7D7" />
<RadialGradientBrush x:Key="MainGroupBoxComboBackgroundBrush">
<GradientStop Offset="0" Color="#4CD7D7D7" />
<GradientStop Offset="0.995" Color="#00D7D7D7" />
</RadialGradientBrush>
<LinearGradientBrush x:Key="MainGroupBoxSelectedItemBrush" StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0" Color="#24000000" />
<GradientStop Offset="1" Color="#4C000000" />
</LinearGradientBrush>
<SolidColorBrush x:Key="GlyphBrush" Color="#FF0D82C0" />
<LinearGradientBrush x:Key="ButtonNormalBackground" StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0" Color="#F3F3F3" />
<GradientStop Offset="0.5" Color="#EBEBEB" />
<GradientStop Offset="0.5" Color="#DDDDDD" />
<GradientStop Offset="1" Color="#CDCDCD" />
</LinearGradientBrush>
<SolidColorBrush x:Key="ButtonNormalBorder" Color="#FF707070" />
<LinearGradientBrush x:Key="BorderBrush" MappingMode="Absolute" StartPoint="0,0" EndPoint="0,20">
<GradientStop Offset="0.05" Color="#ABADB3" />
<GradientStop Offset="0.07" Color="#E2E3EA" />
<GradientStop Offset="1" Color="#E3E9EF" />
</LinearGradientBrush>
<LinearGradientBrush x:Key="DevEx" StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0" Color="#FFFBF9F9" />
<GradientStop Offset="1" Color="#FFDFDFDF" />
</LinearGradientBrush>
<LinearGradientBrush x:Key="MouseOverBrush" StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0.0" Color="#FFF" />
<GradientStop Offset="1.0" Color="#AAA" />
</LinearGradientBrush>
<LinearGradientBrush x:Key="PressedBrush" StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0.0" Color="#BBB" />
<GradientStop Offset="0.1" Color="#EEE" />
<GradientStop Offset="0.9" Color="#EEE" />
<GradientStop Offset="1.0" Color="#FFF" />
</LinearGradientBrush>
<LinearGradientBrush x:Key="ToolbarBrushBlack" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#FF858585" />
<GradientStop Offset="0.99" Color="#FF2B2B2B" />
<GradientStop Offset="0.415" Color="#FF414141" />
<GradientStop Offset="0.535" Color="#FF000000" />
</LinearGradientBrush>
<SolidColorBrush x:Key="ToolbarTextBrush" Color="#FF000000" />
<LinearGradientBrush x:Key="ToolbarBrush" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0.095" Color="#FFF6D7AE" />
<GradientStop Offset="1" Color="#FFF7DE8C" />
<GradientStop Offset="0.29" Color="#FFF9B14C" />
<GradientStop Offset="0.546" Color="#FFFBC15C" />
</LinearGradientBrush>
<SolidColorBrush x:Key="NavigationHeaderBrushTest" Color="#FF474747" />
<LinearGradientBrush x:Key="NavigationContentBrushTest" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#FFBEAF00" />
<GradientStop Offset="1" Color="#FF8C7D00" />
</LinearGradientBrush>
<!-- Endregion -->
<!-- Module AI Farben -->
<SolidColorBrush x:Key="ModuleAiChatTabItem" Color="#FFFFFFBF" />
<SolidColorBrush x:Key="ModuleAiChatPrimaryColor" Color="#FFCECF7F" />
</ResourceDictionary>

View File

@@ -150,4 +150,168 @@
TargetType="{x:Type Button}">
<Setter Property="Height" Value="21" />
</Style>
<!-- Region Weiße Buttons im ModalPopup -->
<Style
x:Key="PopupToolbarButtonStyle"
BasedOn="{StaticResource HideDisabledButton}"
TargetType="{x:Type Button}">
<Setter Property="Foreground" Value="#FFFFFFFF" />
<Setter Property="FontWeight" Value="Medium" />
<Setter Property="FontSize" Value="16" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<ControlTemplate.Resources>
<Storyboard x:Key="Storyboard1">
<DoubleAnimationUsingKeyFrames
AccelerationRatio="1"
BeginTime="00:00:00"
Storyboard.TargetName="contentPresenter"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
Duration="00:00:00.2">
<SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="1.2" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames
AccelerationRatio="1"
BeginTime="00:00:00"
Storyboard.TargetName="contentPresenter"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
Duration="00:00:00.2">
<SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="1.2" />
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Key="Storyboard2">
<DoubleAnimationUsingKeyFrames
BeginTime="00:00:00"
DecelerationRatio="1"
Storyboard.TargetName="contentPresenter"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
Duration="00:00:00.2">
<SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="1" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames
BeginTime="00:00:00"
DecelerationRatio="1"
Storyboard.TargetName="contentPresenter"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
Duration="00:00:00.2">
<SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="1" />
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</ControlTemplate.Resources>
<ContentPresenter
x:Name="contentPresenter"
Width="Auto"
Margin="3,0,3,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
RenderTransformOrigin="0.5,0.5">
<ContentPresenter.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</ContentPresenter.RenderTransform>
</ContentPresenter>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Trigger.ExitActions>
<BeginStoryboard x:Name="Storyboard2_BeginStoryboard" Storyboard="{StaticResource Storyboard2}" />
</Trigger.ExitActions>
<Trigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource Storyboard1}" />
</Trigger.EnterActions>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- EndRegion -->
<!-- Region Weiße Buttons im MainNavigationView -->
<Style
x:Key="NavigationToolbarButtonStyle"
BasedOn="{StaticResource HideDisabledButton}"
TargetType="{x:Type Button}">
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<ControlTemplate.Resources>
<Storyboard x:Key="Storyboard1">
<DoubleAnimationUsingKeyFrames
AccelerationRatio="1"
BeginTime="00:00:00"
Storyboard.TargetName="contentPresenter"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
Duration="00:00:00.2">
<SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="1.2" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames
AccelerationRatio="1"
BeginTime="00:00:00"
Storyboard.TargetName="contentPresenter"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
Duration="00:00:00.2">
<SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="1.2" />
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Key="Storyboard2">
<DoubleAnimationUsingKeyFrames
BeginTime="00:00:00"
DecelerationRatio="1"
Storyboard.TargetName="contentPresenter"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
Duration="00:00:00.2">
<SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="1" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames
BeginTime="00:00:00"
DecelerationRatio="1"
Storyboard.TargetName="contentPresenter"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
Duration="00:00:00.2">
<SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="1" />
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</ControlTemplate.Resources>
<ContentPresenter
x:Name="contentPresenter"
Width="Auto"
Margin="3,0,3,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
RenderTransformOrigin="0.5,0.5">
<ContentPresenter.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</ContentPresenter.RenderTransform>
</ContentPresenter>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Trigger.ExitActions>
<BeginStoryboard x:Name="Storyboard2_BeginStoryboard" Storyboard="{StaticResource Storyboard2}" />
</Trigger.ExitActions>
<Trigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource Storyboard1}" />
</Trigger.EnterActions>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Foreground" Value="#FFFFFFFF" />
<Setter Property="FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="FontSize" Value="16" />
</Style>
<!-- EndRegion -->
</ResourceDictionary>

View File

@@ -1,4 +1,7 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="..\DataTemplates\ControlTemplates.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style x:Key="BaseGroupBox" TargetType="{x:Type GroupBox}">
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Padding" Value="3" />
@@ -49,4 +52,35 @@
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ModuleAiZeiterfassungStyle" TargetType="{x:Type GroupBox}">
<Style.Resources>
<SolidColorBrush x:Key="NavigationHeaderBrush" Color="#aaaaaa" />
<LinearGradientBrush x:Key="NavigationContentBrush" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#FFD7DADB" />
<GradientStop Offset="1" Color="#FF92A9B3" />
</LinearGradientBrush>
<!--<SolidColorBrush x:Key="NavigationHeaderBrush" Color="#FF5C0000" />
<LinearGradientBrush x:Key="NavigationContentBrush" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#ef4444" />
<GradientStop Offset="3" Color="#dc2626" />
</LinearGradientBrush>-->
</Style.Resources>
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate2}" />
</Style>
<!-- OLD -->
<Style x:Key="ModuleAiNavigationStyle" TargetType="{x:Type GroupBox}">
<Style.Resources>
<SolidColorBrush x:Key="NavigationHeaderBrush" Color="#FFC64605" />
<LinearGradientBrush x:Key="NavigationContentBrush" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#FFFFC48A" />
<GradientStop Offset="1" Color="#FFFF7830" />
</LinearGradientBrush>
</Style.Resources>
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate2}" />
</Style>
</ResourceDictionary>

View File

@@ -0,0 +1,38 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="WindowBase" TargetType="{x:Type Window}" />
<Style
x:Key="EmptyWindow"
BasedOn="{StaticResource WindowBase}"
TargetType="{x:Type Window}" />
<!-- Eine Ease-Out-Funktion für eine sanfte Bewegung -->
<QuadraticEase x:Key="EaseOut" EasingMode="EaseOut" />
<Storyboard x:Key="WindowLoadedAnimation">
<DoubleAnimation
Storyboard.TargetProperty="Opacity"
From="0"
To="1"
Duration="0:0:0.5" />
<DoubleAnimation
EasingFunction="{StaticResource EaseOut}"
Storyboard.TargetProperty="RenderTransform.(TranslateTransform.Y)"
From="50"
To="0"
Duration="0:0:0.5" />
</Storyboard>
<Storyboard x:Key="WindowClosingAnimation">
<DoubleAnimation
Storyboard.TargetProperty="Opacity"
From="1"
To="0"
Duration="0:0:0.5" />
<DoubleAnimation
EasingFunction="{StaticResource EaseOut}"
Storyboard.TargetProperty="RenderTransform.(TranslateTransform.Y)"
From="0"
To="50"
Duration="0:0:0.5" />
</Storyboard>
</ResourceDictionary>

View File

@@ -2,6 +2,11 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="..\Colors\Colors.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style x:Key="ComboBoxFocusVisual">
<Setter Property="Control.Template">
<Setter.Value>
@@ -89,4 +94,55 @@
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<ControlTemplate x:Key="NavigationGroupTemplate2" TargetType="{x:Type GroupBox}">
<Grid SnapsToDevicePixels="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Border
Grid.Row="0"
Grid.Column="0"
Background="{DynamicResource NavigationHeaderBrush}"
CornerRadius="1,1,1,1">
<Border
x:Name="Header"
Grid.Row="0"
Grid.Column="0"
Margin="8"
Padding="0"
Background="{x:Null}">
<ContentPresenter
Margin="0,0,0,0"
Content="{TemplateBinding Header}"
ContentSource="Header"
ContentStringFormat="{TemplateBinding HeaderStringFormat}"
ContentTemplate="{TemplateBinding HeaderTemplate}"
RecognizesAccessKey="True"
RenderTransformOrigin="0,0.5"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</Border>
<Border
Grid.Row="1"
Grid.Column="0"
Margin="0,2,0,0"
Padding="0,0,0,0"
Background="{DynamicResource NavigationContentBrush}"
CornerRadius="1,1,1,1">
<ContentPresenter
Content="{TemplateBinding Content}"
ContentStringFormat="{TemplateBinding ContentStringFormat}"
ContentTemplate="{TemplateBinding ContentTemplate}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</Grid>
</ControlTemplate>
</ResourceDictionary>

View File

@@ -0,0 +1,3 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
</ResourceDictionary>

View File

@@ -0,0 +1,187 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxwui="http://schemas.devexpress.com/winfx/2008/xaml/windowsui"
xmlns:templateselectors="clr-namespace:BeWo.View.TemplateSelectors"
xmlns:viewmodel="clr-namespace:BeWo.ViewModel">
<Style x:Key="MessageTextBoxStyle" TargetType="{x:Type TextBox}">
<Setter Property="Margin" Value="0" />
<Setter Property="Height" Value="auto" />
<Setter Property="Padding" Value="3" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="IsReadOnly" Value="True" />
<Setter Property="TextWrapping" Value="Wrap" />
<Setter Property="Text" Value="{Binding Message, Converter={StaticResource NewlineConverter}}" />
</Style>
<Style x:Key="TextBlockStyle" TargetType="{x:Type TextBlock}" />
<DataTemplate x:Key="ConversationHamburgerMenuItemTemplate" DataType="{x:Type viewmodel:AiConversationVM}">
<dxwui:HamburgerMenuNavigationButton Content="{Binding Displayname}" />
</DataTemplate>
<!-- Conversation Control -->
<DataTemplate x:Key="ConversationTemplate">
<Border
Width="auto"
Margin="0,0,0,0"
HorizontalAlignment="Stretch"
Background="#44000000"
BorderBrush="Black"
BorderThickness="1"
CornerRadius="10, 10, 10, 10">
<Grid Margin="8">
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<TextBlock
FontSize="12"
FontWeight="SemiBold"
Text="{Binding Displayname}"
TextTrimming="CharacterEllipsis" />
<TextBlock
Grid.Row="1"
FontSize="10"
FontWeight="Thin"
Style="{StaticResource TextBlockStyle}"
Text="{Binding Created, StringFormat=Erstellt: {0:dd.MM.yyyy HH:mm:ss}}" />
<TextBlock
Grid.Row="2"
FontSize="10"
FontWeight="Thin"
Style="{StaticResource TextBlockStyle}"
Text="{Binding Modell.ModelName, StringFormat=Modell: {0}}" />
</Grid>
</Border>
</DataTemplate>
<!-- Assistent Message Control -->
<DataTemplate x:Key="AssistentMessageTemplate">
<Grid Margin="0,0,30,0" HorizontalAlignment="Left">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border
Width="auto"
Margin="0,4,0,0"
Padding="4"
VerticalAlignment="Top"
Background="#09000000"
BorderBrush="Black"
BorderThickness="0"
CornerRadius="10, 10, 10, 10">
<Image
Width="24"
Height="24"
Source="..\..\Ressources\Icons\chatbot2.png" />
</Border>
<Border
Grid.Column="1"
Padding="8,4,8,4"
Background="#00000000"
BorderBrush="Black"
BorderThickness="0"
CornerRadius="0, 10, 10, 10">
<Grid Margin="4,0,0,4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<TextBlock
Margin="0"
Padding="0"
FontSize="12"
FontWeight="SemiBold"
Style="{StaticResource TextBlockStyle}"
Text="{Binding ModelName}" />
<TextBlock
Grid.Column="1"
Margin="8,0,0,0"
Padding="0"
VerticalAlignment="Bottom"
FontSize="10"
FontWeight="Medium"
Style="{StaticResource TextBlockStyle}"
Text="{Binding Created, StringFormat={}{0:dd.MM.yyyy HH:mm:ss}}" />
<TextBlock
Grid.Row="1"
Grid.ColumnSpan="2"
Margin="0,4,0,4"
Padding="0"
VerticalAlignment="Center"
FontSize="11"
FontWeight="Medium"
Foreground="#888888"
Style="{StaticResource TextBlockStyle}"
Text="{Binding DurationSec, StringFormat=Nachgedacht für {0} Sekunden}" />
<!--<TextBlock
Grid.Row="1"
Grid.ColumnSpan="2"
Margin="0,4,0,0"
Padding="0"
FontSize="11"
FontWeight="Medium"
Foreground="#888888"
Style="{StaticResource TextBlockStyle}"
Text="{Binding DurationSec, StringFormat=Nachgedacht für {0} Sekunden}" />-->
<TextBox
Grid.Row="2"
Grid.ColumnSpan="2"
Margin="0,4,0,0"
Padding="-3"
Style="{StaticResource MessageTextBoxStyle}" />
</Grid>
</Border>
</Grid>
</DataTemplate>
<!-- System Message Control -->
<DataTemplate x:Key="SystemMessageTemplate">
<Border
Width="auto"
Margin="30,0,30,0"
HorizontalAlignment="Center"
Background="#33000000"
BorderBrush="Black"
BorderThickness="0"
CornerRadius="0">
<Grid>
<TextBox Padding="8" Style="{StaticResource MessageTextBoxStyle}" />
</Grid>
</Border>
</DataTemplate>
<!-- User Message Control -->
<DataTemplate x:Key="UserMessageTemplate">
<Border
Width="auto"
Margin="30,0,0,0"
HorizontalAlignment="Right"
Background="#15000000"
BorderBrush="Black"
BorderThickness="0"
CornerRadius="15, 15, 15, 15">
<Grid>
<TextBox Padding="12,8,12,8" Style="{StaticResource MessageTextBoxStyle}" />
</Grid>
</Border>
</DataTemplate>
<templateselectors:AiConversationMessageTemplateSelector
x:Key="AiConversationMessageTemplateSelector"
AssistentMessageTemplate="{StaticResource AssistentMessageTemplate}"
SystemMessageTemplate="{StaticResource SystemMessageTemplate}"
UserMessageTemplate="{StaticResource UserMessageTemplate}" />
</ResourceDictionary>

View File

@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:templateselectors="clr-namespace:BeWo.View.TemplateSelectors"
xmlns:uc="clr-namespace:BeWo.View.Controls">
<ResourceDictionary.MergedDictionaries>
@@ -23,6 +24,9 @@
<ResourceDictionary Source="ControlStyles\TextBoxStyles.xaml" />
<ResourceDictionary Source="ControlStyles\TextEditStyles.xaml" />
<ResourceDictionary Source="ControlStyles\ToggleButtonStyles.xaml" />
<ResourceDictionary Source="ControlStyles\WindowStyles.xaml" />
<ResourceDictionary Source="Features\AIChatStyles.xaml" />
<!-- Benötigt TextBoxStyles + ToggleButtonStyles -->
<ResourceDictionary Source="ControlStyles\NullItemComboBoxStyles.xaml" />
@@ -40,4 +44,6 @@
<Style BasedOn="{StaticResource BaseRadioButton}" TargetType="RadioButton" />
<Style BasedOn="{StaticResource TextBoxBase}" TargetType="TextBox" />
<Style BasedOn="{StaticResource BaseTextEdit}" TargetType="dxe:TextEdit" />
<!-- Default Styles -->
</ResourceDictionary>

View File

@@ -14,100 +14,14 @@
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
mc:Ignorable="d">
<!-- Region Brushes -->
<SolidColorBrush x:Key="TextModuleBrush" Color="#FFA9B8C2" />
<SolidColorBrush x:Key="ZusageMitVorbehaltBrush" Color="#FFB927D9" />
<SolidColorBrush x:Key="ZusageZugesagtBrush" Color="#FF48D44E" />
<SolidColorBrush x:Key="ZusageAbgesagtBrush" Color="#FFAB0030" />
<SolidColorBrush x:Key="GridPrintMenuLightBrush" Color="White" />
<SolidColorBrush x:Key="BSOrangeBrush" Color="#FFFF5A00" />
<SolidColorBrush x:Key="LightOrangeBrush" Color="#FFFB6F0E" />
<SolidColorBrush x:Key="GroupBookingBackgroundBrush" Color="#FFFDC784" />
<SolidColorBrush x:Key="GroupBookingSelectedBackgroundBrush" Color="#FFBE8A49" />
<SolidColorBrush x:Key="GroupBookingMouseOverBackgroundBrush" Color="#FFDCA158" />
<LinearGradientBrush x:Key="ApplicationBackground" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0.38" Color="#FFDADADB" />
<GradientStop Offset="0.725" Color="#FFA9B8C2" />
<GradientStop Offset="0.91" Color="#FF4E565A" />
</LinearGradientBrush>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Colors\Colors.xaml" />
</ResourceDictionary.MergedDictionaries>
<conv:CustomerDCPrintURLConverter x:Key="CustomerDCPrintURLConverter" />
<conv:InvoiceBaseDCPrintURLConverter x:Key="InvoiceBaseDCPrintURLConverter" />
<LinearGradientBrush x:Key="LoginBackground" StartPoint="0.5,0.051" EndPoint="0.5,0.699">
<GradientStop Color="#FF96A4AD" />
<GradientStop Offset="0.888" Color="#FF9FADB6" />
<GradientStop Offset="0.625" Color="#FFA9B8C2" />
<GradientStop Offset="0.504" Color="#FF87929B" />
<GradientStop Offset="0.33" Color="#FF8E9AA3" />
</LinearGradientBrush>
<SolidColorBrush x:Key="ControlBackground" Color="#FFFCFAF2" />
<SolidColorBrush x:Key="MainGroupBoxForegroundBrush" Color="#FFD7D7D7" />
<RadialGradientBrush x:Key="MainGroupBoxComboBackgroundBrush">
<GradientStop Offset="0" Color="#4CD7D7D7" />
<GradientStop Offset="0.995" Color="#00D7D7D7" />
</RadialGradientBrush>
<LinearGradientBrush x:Key="MainGroupBoxSelectedItemBrush" StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0" Color="#24000000" />
<GradientStop Offset="1" Color="#4C000000" />
</LinearGradientBrush>
<SolidColorBrush x:Key="GlyphBrush" Color="#FF0D82C0" />
<LinearGradientBrush x:Key="ButtonNormalBackground" StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0" Color="#F3F3F3" />
<GradientStop Offset="0.5" Color="#EBEBEB" />
<GradientStop Offset="0.5" Color="#DDDDDD" />
<GradientStop Offset="1" Color="#CDCDCD" />
</LinearGradientBrush>
<SolidColorBrush x:Key="ButtonNormalBorder" Color="#FF707070" />
<LinearGradientBrush x:Key="BorderBrush" MappingMode="Absolute" StartPoint="0,0" EndPoint="0,20">
<GradientStop Offset="0.05" Color="#ABADB3" />
<GradientStop Offset="0.07" Color="#E2E3EA" />
<GradientStop Offset="1" Color="#E3E9EF" />
</LinearGradientBrush>
<SolidColorBrush x:Key="TextBoxBorderBrush" Color="#FF86878F" />
<LinearGradientBrush x:Key="DevEx" StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0" Color="#FFFBF9F9" />
<GradientStop Offset="1" Color="#FFDFDFDF" />
</LinearGradientBrush>
<LinearGradientBrush x:Key="MouseOverBrush" StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0.0" Color="#FFF" />
<GradientStop Offset="1.0" Color="#AAA" />
</LinearGradientBrush>
<LinearGradientBrush x:Key="PressedBrush" StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0.0" Color="#BBB" />
<GradientStop Offset="0.1" Color="#EEE" />
<GradientStop Offset="0.9" Color="#EEE" />
<GradientStop Offset="1.0" Color="#FFF" />
</LinearGradientBrush>
<LinearGradientBrush x:Key="ToolbarBrushBlack" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#FF858585" />
<GradientStop Offset="0.99" Color="#FF2B2B2B" />
<GradientStop Offset="0.415" Color="#FF414141" />
<GradientStop Offset="0.535" Color="#FF000000" />
</LinearGradientBrush>
<SolidColorBrush x:Key="ToolbarTextBrush" Color="#FF000000" />
<LinearGradientBrush x:Key="ToolbarBrush" StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0.095" Color="#FFF6D7AE" />
<GradientStop Offset="1" Color="#FFF7DE8C" />
<GradientStop Offset="0.29" Color="#FFF9B14C" />
<GradientStop Offset="0.546" Color="#FFFBC15C" />
</LinearGradientBrush>
<!-- Endregion -->
<!-- Region Controls -->
<Style TargetType="{x:Type TextBox}">

View File

@@ -1,13 +1,20 @@
<Window x:Class="BeWo.UploadDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="UploadDialog" Height="150" Width="300"
WindowStartupLocation="CenterOwner"
WindowStyle="None"
AllowsTransparency="True"
Background="Transparent" ResizeMode="NoResize" >
<Window
x:Class="BeWo.UploadDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="UploadDialog"
Width="300"
Height="150"
AllowsTransparency="True"
Background="Transparent"
ResizeMode="NoResize"
WindowStartupLocation="CenterOwner"
WindowStyle="None">
<Grid>
<GroupBox Style="{StaticResource MainContentGroupBoxWithoutMaximizeBtnStyle}" Header="Download" MouseLeftButtonDown="UIElement_OnMouseLeftButtonDown">
<GroupBox
Header="Download"
MouseLeftButtonDown="UIElement_OnMouseLeftButtonDown"
Style="{StaticResource MainContentGroupBoxWithoutMaximizeBtnStyle}">
<Grid Background="{DynamicResource ObjectEditBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
@@ -18,9 +25,29 @@
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Margin="3" Text="{Binding Question}" Grid.ColumnSpan="3" HorizontalAlignment="Center" VerticalAlignment="Center" TextWrapping="Wrap" TextAlignment="Center" Foreground="#FF202020"/>
<Button Margin="0,0,5,5" Grid.Row="1" Grid.Column="1" Content="Hochladen" Click="btn_Upload_Click" x:Name="Hochladebtn" />
<Button Margin="0,0,5,5" Grid.Row="1" Grid.Column="2" Content="Abbrechen" Command="Close" x:Name="Abbrechbtn" />
<TextBlock
Grid.ColumnSpan="3"
Margin="3"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Foreground="#FF202020"
Text="{Binding Question}"
TextAlignment="Center"
TextWrapping="Wrap" />
<Button
x:Name="Hochladebtn"
Grid.Row="1"
Grid.Column="1"
Margin="0,0,5,5"
Click="btn_Upload_Click"
Content="Hochladen" />
<Button
x:Name="Abbrechbtn"
Grid.Row="1"
Grid.Column="2"
Margin="0,0,5,5"
Command="Close"
Content="Abbrechen" />
</Grid>
</GroupBox>
</Grid>

View File

@@ -1,17 +1,22 @@
<view:BeWoView x:Class="BeWo.View.BargeldkassenView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:view="clr-namespace:BeWo.View"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:validation="clr-namespace:BeWo.Validation"
xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared"
xmlns:controls="clr-namespace:BeWo.View.Controls"
xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup"
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
mc:Ignorable="d" VerticalAlignment="Stretch" Focusable="True">
<view:BeWoView
x:Class="BeWo.View.BargeldkassenView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:BeWo.View.Controls"
xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:validation="clr-namespace:BeWo.Validation"
xmlns:view="clr-namespace:BeWo.View"
Width="Auto"
Height="Auto"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Focusable="True"
mc:Ignorable="d">
<view:BeWoView.Resources>
<Style x:Key="bargeldkassenListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
<Setter Property="Background" Value="#00FFFFFF" />
@@ -21,15 +26,20 @@
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Border x:Name="Bd" SnapsToDevicePixels="True" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
Content="{TemplateBinding Content}"
ContentStringFormat="{TemplateBinding ContentStringFormat}"
ContentTemplate="{TemplateBinding ContentTemplate}" />
<Border
x:Name="Bd"
Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
SnapsToDevicePixels="True">
<ContentPresenter
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}"
ContentStringFormat="{TemplateBinding ContentStringFormat}"
ContentTemplate="{TemplateBinding ContentTemplate}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
@@ -40,7 +50,7 @@
</Setter.Value>
</Setter>
</Style>
<Style x:Key="HyperlinkStyle" TargetType="{x:Type Hyperlink}">
<Setter Property="Foreground" Value="#FF2B508B" />
<!--<Style.Triggers>
@@ -53,18 +63,29 @@
<GroupBox Header="Bargeldkassen" Style="{StaticResource ObjectEditGroupBox}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal">
<Button Content="Neue Kasse hinzufügen" Margin="3" Click="ButtonOpenAddBargeldkasseClick" IsEnabled="{Binding Path=DarfBargeldTransaktionAnlegen, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}" />
<Button
Margin="3"
Click="ButtonOpenAddBargeldkasseClick"
Content="Neue Kasse hinzufügen"
IsEnabled="{Binding Path=DarfBargeldTransaktionAnlegen, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}" />
<controls:PopupNonTopmost x:Name="popup_newBargeldkasse">
<Border Background="White" Padding="3" BorderThickness="1" BorderBrush="Gray">
<GroupBox x:Name="groupbox_newBargeldkasse" Header="Neue Kasse hinzufügen" Style="{DynamicResource ObjectEditGroupBox}">
<Border
Padding="3"
Background="White"
BorderBrush="Gray"
BorderThickness="1">
<GroupBox
x:Name="groupbox_newBargeldkasse"
Header="Neue Kasse hinzufügen"
Style="{DynamicResource ObjectEditGroupBox}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@@ -76,25 +97,75 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label Grid.Column="0" Grid.Row="0" Content="Kassenname" VerticalAlignment="Center" />
<TextBox Grid.Column="1" Grid.Row="0" VerticalAlignment="Center" Height="23" Margin="3,0,3,3" Text="{validation:ValidationBinding Path=NewVM.Kassenname}" />
<Label Grid.Column="0" Grid.Row="1" Content="Auszahlungsintervall" VerticalAlignment="Center" />
<dxe:ComboBoxEdit Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" Height="23" HorizontalAlignment="Left" Width="150" IsTextEditable="False"
Margin="3,0,3,3" IsEnabled="{Binding Path=DarfBargeldtransaktionenBearbeiten, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
ItemsSource="{Binding Path=Values, Source={x:Static core:DisplayEnum.Auszahlungsintervall}}" EditValue="{validation:ValidationBinding Path=NewVM.Auszahlungsintervall}" />
<Label Grid.Column="0" Grid.Row="2" Content="Anfangsbestand" VerticalAlignment="Center" />
<dxe:TextEdit Grid.Column="1" Grid.Row="2" MaskType="Numeric" Mask="########0.00" MaskUseAsDisplayFormat="True" Height="23" Margin="3"
EditValue="{validation:ValidationBinding Path=NewVM.Anfangsbestand}"/>
<StackPanel Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Click="ButtonAddBargeldkasseClick" Content="Hinzufügen" Height="25"
FontWeight="Normal" Margin="3" VerticalAlignment="Center" HorizontalAlignment="Right" />
<Button HorizontalAlignment="Right" VerticalAlignment="Center" Height="25"
Margin="3" Content="Abbrechen" Click="ButtonCancelAddBargeldkasseClick" />
<Label
Grid.Row="0"
Grid.Column="0"
VerticalAlignment="Center"
Content="Kassenname" />
<TextBox
Grid.Row="0"
Grid.Column="1"
Height="23"
Margin="3,0,3,3"
VerticalAlignment="Center"
Text="{validation:ValidationBinding Path=NewVM.Kassenname}" />
<Label
Grid.Row="1"
Grid.Column="0"
VerticalAlignment="Center"
Content="Auszahlungsintervall" />
<dxe:ComboBoxEdit
Grid.Row="1"
Grid.Column="1"
Width="150"
Height="23"
Margin="3,0,3,3"
HorizontalAlignment="Left"
VerticalAlignment="Center"
EditValue="{validation:ValidationBinding Path=NewVM.Auszahlungsintervall}"
IsEnabled="{Binding Path=DarfBargeldtransaktionenBearbeiten, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
IsTextEditable="False"
ItemsSource="{Binding Path=Values, Source={x:Static core:DisplayEnum.Auszahlungsintervall}}" />
<Label
Grid.Row="2"
Grid.Column="0"
VerticalAlignment="Center"
Content="Anfangsbestand" />
<dxe:TextEdit
Grid.Row="2"
Grid.Column="1"
Height="23"
Margin="3"
EditValue="{validation:ValidationBinding Path=NewVM.Anfangsbestand}"
Mask="########0.00"
MaskType="Numeric"
MaskUseAsDisplayFormat="True" />
<StackPanel
Grid.Row="3"
Grid.Column="0"
Grid.ColumnSpan="2"
HorizontalAlignment="Right"
Orientation="Horizontal">
<Button
Height="25"
Margin="3"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Click="ButtonAddBargeldkasseClick"
Content="Hinzufügen"
FontWeight="Normal" />
<Button
Height="25"
Margin="3"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Click="ButtonCancelAddBargeldkasseClick"
Content="Abbrechen" />
</StackPanel>
</Grid>
</GroupBox>
@@ -102,8 +173,15 @@
</controls:PopupNonTopmost>
<!--<Button Content="Neue Zahlung hinzufügen" Margin="3" Click="ButtonOpenAddBargeldtransaktionClick" IsEnabled="{Binding Path=DarfBargeldTransaktionAnlegen, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}" />-->
<controls:PopupNonTopmost x:Name="popup_newBargeldtransaktion" Placement="MousePoint">
<Border Background="White" Padding="3" BorderThickness="1" BorderBrush="Gray">
<GroupBox x:Name="groupbox_newBargeldtransaktion" Header="Neue Zahlung zu einer Kasse hinzufügen" Style="{DynamicResource ObjectEditGroupBox}">
<Border
Padding="3"
Background="White"
BorderBrush="Gray"
BorderThickness="1">
<GroupBox
x:Name="groupbox_newBargeldtransaktion"
Header="Neue Zahlung zu einer Kasse hinzufügen"
Style="{DynamicResource ObjectEditGroupBox}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@@ -117,100 +195,239 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<!-- RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}} -->
<!-- RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}} -->
<!--<Label Grid.Column="0" Grid.Row="0" Content="Kasse" VerticalAlignment="Center" />
<dxe:ComboBoxEdit Grid.Column="1" Grid.Row="0" VerticalAlignment="Center" Height="23" Margin="3,0,3,3" ItemsSource="{Binding VMList}" Width="150" x:Name="NewTransaktionKassenCB"
<dxe:ComboBoxEdit Grid.Column="1" Grid.Row="0" VerticalAlignment="Center" Height="23" Margin="3,0,3,3" ItemsSource="{Binding VMList}" Width="150" x:Name="NewTransaktionKassenCB"
EditValue="{validation:ValidationBinding Path=SelectedBargeldkasse, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}" />-->
<Label Grid.Column="0" Grid.Row="0" Content="Datum" VerticalAlignment="Center" />
<dxe:DateEdit Grid.Column="1" Grid.Row="0" MaskType="DateTimeAdvancingCaret"
EditValue="{validation:ValidationBinding Path=NewBargeldtransaktion.Zahlungsdatum, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}" Height="23" Margin="3" x:Name="NewTransaktionDatumDateEdit" />
<Label
Grid.Row="0"
Grid.Column="0"
VerticalAlignment="Center"
Content="Datum" />
<dxe:DateEdit
x:Name="NewTransaktionDatumDateEdit"
Grid.Row="0"
Grid.Column="1"
Height="23"
Margin="3"
EditValue="{validation:ValidationBinding Path=NewBargeldtransaktion.Zahlungsdatum,
UpdateSourceTrigger=PropertyChanged,
RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
MaskType="DateTimeAdvancingCaret" />
<Label Grid.Column="0" Grid.Row="1" Content="Art" VerticalAlignment="Center" />
<dxe:ComboBoxEdit Grid.Column="1" Grid.Row="1" Height="23" IsTextEditable="False" Margin="3,0,3,3"
ItemsSource="{Binding Path=Values, Source={x:Static core:DisplayEnum.Zahlungstyp}}" x:Name="NewTransaktionZahlungstypComboBoxEdit"
EditValue="{validation:ValidationBinding Path=NewBargeldtransaktion.Zahlungstyp, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}" />
<Label
Grid.Row="1"
Grid.Column="0"
VerticalAlignment="Center"
Content="Art" />
<dxe:ComboBoxEdit
x:Name="NewTransaktionZahlungstypComboBoxEdit"
Grid.Row="1"
Grid.Column="1"
Height="23"
Margin="3,0,3,3"
EditValue="{validation:ValidationBinding Path=NewBargeldtransaktion.Zahlungstyp,
UpdateSourceTrigger=PropertyChanged,
RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
IsTextEditable="False"
ItemsSource="{Binding Path=Values, Source={x:Static core:DisplayEnum.Zahlungstyp}}" />
<Label Grid.Column="0" Grid.Row="2" Content="Betrag" VerticalAlignment="Center" />
<dxe:TextEdit Grid.Column="1" Grid.Row="2" MaskType="Numeric" Mask="########0.00" MaskUseAsDisplayFormat="True" Height="23" Margin="3" x:Name="NewTransaktionBetragTextEdit"
EditValue="{validation:ValidationBinding Path=NewBargeldtransaktion.Betrag, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}" />
<Label Grid.Column="0" Grid.Row="3" Content="{t:Translate Belegnummer}" VerticalAlignment="Center" />
<dxe:TextEdit Grid.Column="1" Grid.Row="3" Height="23" Margin="3" x:Name="NewTransaktionBelegnummerTextEdit"
EditValue="{validation:ValidationBinding Path=NewBargeldtransaktion.Belegnummer, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}" />
<Label
Grid.Row="2"
Grid.Column="0"
VerticalAlignment="Center"
Content="Betrag" />
<dxe:TextEdit
x:Name="NewTransaktionBetragTextEdit"
Grid.Row="2"
Grid.Column="1"
Height="23"
Margin="3"
EditValue="{validation:ValidationBinding Path=NewBargeldtransaktion.Betrag,
UpdateSourceTrigger=PropertyChanged,
RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
Mask="########0.00"
MaskType="Numeric"
MaskUseAsDisplayFormat="True" />
<Label
Grid.Row="3"
Grid.Column="0"
VerticalAlignment="Center"
Content="{t:Translate Belegnummer}" />
<dxe:TextEdit
x:Name="NewTransaktionBelegnummerTextEdit"
Grid.Row="3"
Grid.Column="1"
Height="23"
Margin="3"
EditValue="{validation:ValidationBinding Path=NewBargeldtransaktion.Belegnummer,
UpdateSourceTrigger=PropertyChanged,
RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}" />
<Label Grid.Column="0" Grid.Row="4" Content="Notiz" VerticalAlignment="Center" />
<TextBox Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" Height="60" Margin="3,0,3,3"
ScrollViewer.CanContentScroll="False" VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Hidden" TextWrapping="Wrap" AcceptsReturn="True"
AutoWordSelection="True" Language="de-DE" SpellCheck.IsEnabled="True"
x:Name="NewTransaktionNotizTextBox"
Text="{Binding Path=NewBargeldtransaktion.Notice, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"/>
<Label
Grid.Row="4"
Grid.Column="0"
VerticalAlignment="Center"
Content="Notiz" />
<TextBox
x:Name="NewTransaktionNotizTextBox"
Grid.Row="4"
Grid.Column="1"
Height="60"
Margin="3,0,3,3"
VerticalAlignment="Center"
AcceptsReturn="True"
AutoWordSelection="True"
HorizontalScrollBarVisibility="Hidden"
Language="de-DE"
ScrollViewer.CanContentScroll="False"
SpellCheck.IsEnabled="True"
Text="{Binding Path=NewBargeldtransaktion.Notice, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
TextWrapping="Wrap"
VerticalScrollBarVisibility="Auto" />
<StackPanel Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="5" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Click="ButtonAddBargeldtransaktionClick" Content="Hinzufügen" Height="25"
FontWeight="Normal" Margin="3" VerticalAlignment="Center" HorizontalAlignment="Right" />
<Button HorizontalAlignment="Right" VerticalAlignment="Center" Height="25"
Margin="3" Content="Abbrechen" Click="ButtonCancelAddBargeldtransaktionClick" />
<StackPanel
Grid.Row="5"
Grid.Column="0"
Grid.ColumnSpan="2"
HorizontalAlignment="Right"
Orientation="Horizontal">
<Button
Height="25"
Margin="3"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Click="ButtonAddBargeldtransaktionClick"
Content="Hinzufügen"
FontWeight="Normal" />
<Button
Height="25"
Margin="3"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Click="ButtonCancelAddBargeldtransaktionClick"
Content="Abbrechen" />
</StackPanel>
</Grid>
</GroupBox>
</Border>
</controls:PopupNonTopmost>
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Stretch">
<StackPanel
Grid.Row="0"
Grid.Column="1"
VerticalAlignment="Stretch"
Orientation="Horizontal">
<Label Content="Sortierung" />
<ComboBox Height="23" x:Name="SortComboBox" Margin="3" VerticalAlignment="Top" MinWidth="180" SelectionChanged="SortComboBox_SelectionChanged"/>
<ComboBox
x:Name="SortComboBox"
Height="23"
MinWidth="180"
Margin="3"
VerticalAlignment="Top"
SelectionChanged="SortComboBox_SelectionChanged" />
</StackPanel>
<TabControl Grid.Row="1" Grid.ColumnSpan="2" Margin="5" ItemsSource="{Binding VMList}" x:Name="tabcontrol_bargeldkassen" Visibility="{Binding VMList.Count, Converter={StaticResource CollectionCountToVisibilityConverter}}">
<TabControl
x:Name="tabcontrol_bargeldkassen"
Grid.Row="1"
Grid.ColumnSpan="2"
Margin="5"
ItemsSource="{Binding VMList}"
Visibility="{Binding VMList.Count, Converter={StaticResource CollectionCountToVisibilityConverter}}">
<TabControl.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Label Content="{Binding Kassenname}" />
<Button VerticalAlignment="Center" Height="20"
ToolTip="Bargeldkasse umbenennen"
Margin="3" Content="!" FontFamily="Wingdings"
IsEnabled="{Binding Path=DarfBargeldtransaktionenBearbeiten, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
Click="KassennamenChangeButtonClick">
<Button
Height="20"
Margin="3"
VerticalAlignment="Center"
Click="KassennamenChangeButtonClick"
Content="!"
FontFamily="Wingdings"
IsEnabled="{Binding Path=DarfBargeldtransaktionenBearbeiten, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
ToolTip="Bargeldkasse umbenennen">
<Button.Visibility>
<MultiBinding Converter="{StaticResource BoolVisibilityMultiConverter }">
<MultiBinding Converter="{StaticResource BoolVisibilityMultiConverter}">
<Binding Path="IsSelected" RelativeSource="{RelativeSource AncestorType={x:Type TabItem}}" />
</MultiBinding>
</Button.Visibility>
</Button>
<controls:PopupNonTopmost x:Name="popup_kassennamenEdit">
<Border Background="White" Padding="3" BorderThickness="1" BorderBrush="Gray">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Name"/>
<TextBox Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="3" MinWidth="200" Height="23" Margin="3" Text="{validation:ValidationBinding Path=Kassenname, UpdateSourceTrigger=PropertyChanged}" />
<Label Grid.Row="1" Grid.Column="0" Content="Anfangsbestand"/>
<dxe:TextEdit Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="3" MaskType="Numeric" Mask="########0.00" MaskUseAsDisplayFormat="True" Height="23" Margin="3"
EditValue="{validation:ValidationBinding Path=Anfangsbestand, UpdateSourceTrigger=PropertyChanged}"/>
<Button Grid.Row="2" Grid.Column="2" Content="Speichern" Margin="3" Click="KassennamenChangeSaveButtonClick" />
<Button Grid.Row="2" Grid.Column="3" Content="Abbrechen" Margin="3" Click="KassennamenChangeCancelButtonClick" />
</Grid>
<Border
Padding="3"
Background="White"
BorderBrush="Gray"
BorderThickness="1">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Label
Grid.Row="0"
Grid.Column="0"
Content="Name" />
<TextBox
Grid.Row="0"
Grid.Column="1"
Grid.ColumnSpan="3"
Height="23"
MinWidth="200"
Margin="3"
Text="{validation:ValidationBinding Path=Kassenname,
UpdateSourceTrigger=PropertyChanged}" />
<Label
Grid.Row="1"
Grid.Column="0"
Content="Anfangsbestand" />
<dxe:TextEdit
Grid.Row="1"
Grid.Column="1"
Grid.ColumnSpan="3"
Height="23"
Margin="3"
EditValue="{validation:ValidationBinding Path=Anfangsbestand,
UpdateSourceTrigger=PropertyChanged}"
Mask="########0.00"
MaskType="Numeric"
MaskUseAsDisplayFormat="True" />
<Button
Grid.Row="2"
Grid.Column="2"
Margin="3"
Click="KassennamenChangeSaveButtonClick"
Content="Speichern" />
<Button
Grid.Row="2"
Grid.Column="3"
Margin="3"
Click="KassennamenChangeCancelButtonClick"
Content="Abbrechen" />
</Grid>
</Border>
</controls:PopupNonTopmost>
<Button VerticalAlignment="Center" Height="20"
Click="BtnDeleteBargeldkasseClick"
Tag="{Binding}"
ToolTip="Bargeldkasse entfernen"
Style="{DynamicResource CloseButtonStyle}" Margin="3" >
<Button
Height="20"
Margin="3"
VerticalAlignment="Center"
Click="BtnDeleteBargeldkasseClick"
Style="{DynamicResource CloseButtonStyle}"
Tag="{Binding}"
ToolTip="Bargeldkasse entfernen">
<Button.Visibility>
<MultiBinding Converter="{StaticResource BoolVisibilityMultiConverter }">
<MultiBinding Converter="{StaticResource BoolVisibilityMultiConverter}">
<Binding Path="IsSelected" RelativeSource="{RelativeSource AncestorType={x:Type TabItem}}" />
<Binding Path="DarfBargeldTransaktionLoeschen" RelativeSource="{RelativeSource AncestorType={x:Type view:BargeldkassenView}}" />
<Binding Path="DarfBargeldTransaktionLoeschen" RelativeSource="{RelativeSource AncestorType={x:Type view:BargeldkassenView}}" />
</MultiBinding>
</Button.Visibility>
</Button>
@@ -232,17 +449,41 @@
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button Grid.Row="0" Grid.Column="0" Content="Neue Zahlung hinzufügen" Margin="3" Tag="{Binding}" Click="ButtonOpenAddBargeldtransaktionClick" IsEnabled="{Binding Path=DarfBargeldTransaktionAnlegen, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}" />
<Label Grid.Row="0" Grid.Column="1" Content="Anfangsbestand" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="3"/>
<dxe:TextEdit Grid.Row="0" Grid.Column="2" MaskType="Numeric" Mask="c" MaskUseAsDisplayFormat="True" Height="23" Margin="3" EditMode="InplaceInactive"
EditValue="{Binding Path=Anfangsbestand, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" HorizontalContentAlignment="Left" FontWeight="Bold" />
<Button
Grid.Row="0"
Grid.Column="0"
Margin="3"
Click="ButtonOpenAddBargeldtransaktionClick"
Content="Neue Zahlung hinzufügen"
IsEnabled="{Binding Path=DarfBargeldTransaktionAnlegen, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
Tag="{Binding}" />
<Label
Grid.Row="0"
Grid.Column="1"
Margin="3"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Content="Anfangsbestand" />
<dxe:TextEdit
Grid.Row="0"
Grid.Column="2"
Height="23"
Margin="3"
VerticalAlignment="Center"
HorizontalContentAlignment="Left"
EditMode="InplaceInactive"
EditValue="{Binding Path=Anfangsbestand, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
FontWeight="Bold"
Mask="c"
MaskType="Numeric"
MaskUseAsDisplayFormat="True" />
<!--<Label VerticalAlignment="Center">Auszahlungsintervall</Label>
<dxe:ComboBoxEdit VerticalAlignment="Center" Height="23" HorizontalAlignment="Left" Width="100" IsTextEditable="False" Margin="3,0,3,3"
@@ -252,84 +493,213 @@
EditValueChanged="AuszahlungsIntervallCBEditValueChanged"/>-->
<StackPanel Grid.Row="0" Grid.Column="7" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Left">
<Label Grid.Row="0" Grid.Column="3" Content="Startdatum" VerticalAlignment="Center"/>
<dxe:DateEdit Grid.Row="0" Grid.Column="4" x:Name="KassenBuchStartCB" MaskType="DateTimeAdvancingCaret" Height="23" Margin="3" EditValue="{Binding Path=PreselectedStartDate, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}, Mode=OneWay}" AllowNullInput="False" />
<StackPanel
Grid.Row="0"
Grid.Column="7"
Grid.ColumnSpan="2"
HorizontalAlignment="Left"
Orientation="Horizontal">
<Label
Grid.Row="0"
Grid.Column="3"
VerticalAlignment="Center"
Content="Startdatum" />
<dxe:DateEdit
x:Name="KassenBuchStartCB"
Grid.Row="0"
Grid.Column="4"
Height="23"
Margin="3"
AllowNullInput="False"
EditValue="{Binding Path=PreselectedStartDate, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}, Mode=OneWay}"
MaskType="DateTimeAdvancingCaret" />
<Label Grid.Row="0" Grid.Column="5" Content="Enddatum" VerticalAlignment="Center"/>
<dxe:DateEdit Grid.Row="0" Grid.Column="6" x:Name="KassenBuchEndCB" MaskType="DateTimeAdvancingCaret" Height="23" Margin="3" EditValue="{Binding Path=PreselectedEndDate, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}, Mode=OneWay}" AllowNullInput="False"/>
<Label
Grid.Row="0"
Grid.Column="5"
VerticalAlignment="Center"
Content="Enddatum" />
<dxe:DateEdit
x:Name="KassenBuchEndCB"
Grid.Row="0"
Grid.Column="6"
Height="23"
Margin="3"
AllowNullInput="False"
EditValue="{Binding Path=PreselectedEndDate, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}, Mode=OneWay}"
MaskType="DateTimeAdvancingCaret" />
<!--<uc:NullItemComboBox x:Name="KassenbuchMonatsCB" Margin="3" ItemsSource="{Binding Path=MonatsComboBoxSource, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
<!--<uc:NullItemComboBox x:Name="KassenbuchMonatsCB" Margin="3" ItemsSource="{Binding Path=MonatsComboBoxSource, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
SelectedItem="{Binding Path=PreselectedMonth, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}, Mode=OneWay}"/>
<uc:NullItemComboBox x:Name="KassenbuchJahresCB" Margin="3" ItemsSource="{Binding Path=JahresComboBoxSource, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
SelectedItem="{Binding Path=PreselectedYear, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}, Mode=OneWay}"/>-->
<TextBlock Grid.Row="0" Margin="3" FontSize="14" VerticalAlignment="Center" PreviewMouseLeftButtonDown="KlassenbuchLinkOnPreviewMouseLeftButtonDown" Tag="{Binding}" IsEnabled="{Binding Path=Bargeldtransaktionen.VMList.Count, Converter={StaticResource CollectionCountToBoolConverter}, UpdateSourceTrigger=PropertyChanged}">
<Hyperlink x:Name="LinkKassenbuchDrucken" TargetName="_NewWindow" Style="{StaticResource HyperlinkStyle}">
<Run Text="Kassenbuch drucken" />
</Hyperlink>
</TextBlock>
<TextBlock
Grid.Row="0"
Margin="3"
VerticalAlignment="Center"
FontSize="14"
IsEnabled="{Binding Path=Bargeldtransaktionen.VMList.Count, Converter={StaticResource CollectionCountToBoolConverter}, UpdateSourceTrigger=PropertyChanged}"
PreviewMouseLeftButtonDown="KlassenbuchLinkOnPreviewMouseLeftButtonDown"
Tag="{Binding}">
<Hyperlink
x:Name="LinkKassenbuchDrucken"
Style="{StaticResource HyperlinkStyle}"
TargetName="_NewWindow">
<Run Text="Kassenbuch drucken" />
</Hyperlink>
</TextBlock>
</StackPanel>
<GroupBox Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="10" x:Name="BlubbTest" Style="{StaticResource ObjectEditGroupBox}">
<GroupBox
x:Name="BlubbTest"
Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="10"
Style="{StaticResource ObjectEditGroupBox}">
<GroupBox.Header>
<StackPanel Orientation="Horizontal">
<TextBlock FontSize="16" Foreground="{StaticResource TabItemHotTextBrush}" FontFamily="Microsoft Sans Serif" Text="Ein- und Auszahlungen" Margin="3,5,3,3"/>
<Label Content="Saldo" VerticalAlignment="Center" Margin="3,3,3,3"/>
<dxe:TextEdit MaskType="Numeric" Mask="c" MaskUseAsDisplayFormat="True" Height="23" Margin="3,3,3,3" EditMode="InplaceInactive"
EditValue="{Binding Path=Kassenbestand, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" FontWeight="Bold" />
<Label Content="Stichtag" VerticalAlignment="Center" Margin="3,3,3,3"/>
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" Height="23" Width="100" Margin="3" EditValue="{Binding Path=Stichtag, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" AllowNullInput="True"/>
<TextBlock
Margin="3,5,3,3"
FontFamily="Microsoft Sans Serif"
FontSize="16"
Foreground="{StaticResource TabItemHotTextBrush}"
Text="Ein- und Auszahlungen" />
<Label
Margin="3,3,3,3"
VerticalAlignment="Center"
Content="Saldo" />
<dxe:TextEdit
Height="23"
Margin="3,3,3,3"
VerticalAlignment="Center"
EditMode="InplaceInactive"
EditValue="{Binding Path=Kassenbestand, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
FontWeight="Bold"
Mask="c"
MaskType="Numeric"
MaskUseAsDisplayFormat="True" />
<Label
Margin="3,3,3,3"
VerticalAlignment="Center"
Content="Stichtag" />
<dxe:DateEdit
Width="100"
Height="23"
Margin="3"
AllowNullInput="True"
EditValue="{Binding Path=Stichtag, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
MaskType="DateTimeAdvancingCaret" />
</StackPanel>
</GroupBox.Header>
<dxg:GridControl Name="grid_bargeldtransaktionen" Tag="{Binding}" MaxWidth="{Binding ElementName=BlubbTest, Path=ActualWidth}" ItemsSource="{Binding Path=Bargeldtransaktionen.VMList}" CustomColumnSort="GridBargeldtransaktionenOnCustomColumnSort">
<dxg:GridControl
Name="grid_bargeldtransaktionen"
MaxWidth="{Binding ElementName=BlubbTest, Path=ActualWidth}"
CustomColumnSort="GridBargeldtransaktionenOnCustomColumnSort"
ItemsSource="{Binding Path=Bargeldtransaktionen.VMList}"
Tag="{Binding}">
<dxg:GridControl.Columns>
<dxg:GridColumn Header="" FixedWidth="True" Width="24" ReadOnly="True" Visible="{Binding Path=DarfBargeldtransaktionenBearbeiten, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}">
<dxg:GridColumn
Width="24"
FixedWidth="True"
Header=""
ReadOnly="True"
Visible="{Binding Path=DarfBargeldtransaktionenBearbeiten, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}">
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<Button Content="r" Tag="{Binding}" Click="ButtonBargeldtransaktionDeleteClick" FontFamily="Webdings" Width="18" Height="18" VerticalAlignment="Center" IsEnabled="{Binding Path=DarfBargeldTransaktionLoeschen, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}" />
<Button
Width="18"
Height="18"
VerticalAlignment="Center"
Click="ButtonBargeldtransaktionDeleteClick"
Content="r"
FontFamily="Webdings"
IsEnabled="{Binding Path=DarfBargeldTransaktionLoeschen, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
Tag="{Binding}" />
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
<dxg:GridColumn Header="Datum" FixedWidth="True" SortOrder="Descending" FieldName="Zahlungsdatum" EditSettings="{dxe:DateSettings DisplayFormat=d}" AllowEditing="{Binding Path=BargeldtransaktionenBearbeitenAlsDefaultBooelan, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}" />
<dxg:GridColumn Header="Art" FixedWidth="True" FieldName="Zahlungstyp" AllowEditing="{Binding Path=BargeldtransaktionenBearbeitenAlsDefaultBooelan, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}">
<dxg:GridColumn
AllowEditing="{Binding Path=BargeldtransaktionenBearbeitenAlsDefaultBooelan, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
EditSettings="{dxe:DateSettings DisplayFormat=d}"
FieldName="Zahlungsdatum"
FixedWidth="True"
Header="Datum"
SortOrder="Descending" />
<dxg:GridColumn
AllowEditing="{Binding Path=BargeldtransaktionenBearbeitenAlsDefaultBooelan, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
FieldName="Zahlungstyp"
FixedWidth="True"
Header="Art">
<dxg:GridColumn.EditSettings>
<dxe:ComboBoxEditSettings ItemsSource="{Binding Path=Values, Source={x:Static core:DisplayEnum.Zahlungstyp}}" IsTextEditable="False" />
<dxe:ComboBoxEditSettings IsTextEditable="False" ItemsSource="{Binding Path=Values, Source={x:Static core:DisplayEnum.Zahlungstyp}}" />
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn Header="Betrag" FixedWidth="True" FieldName="Betrag" AllowEditing="{Binding Path=BargeldtransaktionenBearbeitenAlsDefaultBooelan, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}">
<dxg:GridColumn
AllowEditing="{Binding Path=BargeldtransaktionenBearbeitenAlsDefaultBooelan, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
FieldName="Betrag"
FixedWidth="True"
Header="Betrag">
<dxg:GridColumn.EditSettings>
<dxe:TextEditSettings MaskType="Numeric" Mask="c" MaskUseAsDisplayFormat="True" />
<dxe:TextEditSettings
Mask="c"
MaskType="Numeric"
MaskUseAsDisplayFormat="True" />
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn Header="{t:Translate Belegnummer}" FixedWidth="True" FieldName="Belegnummer" AllowEditing="{Binding Path=BargeldtransaktionenBearbeitenAlsDefaultBooelan, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}">
<dxg:GridColumn
AllowEditing="{Binding Path=BargeldtransaktionenBearbeitenAlsDefaultBooelan, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
FieldName="Belegnummer"
FixedWidth="True"
Header="{t:Translate Belegnummer}">
<dxg:GridColumn.EditSettings>
<dxe:TextEditSettings />
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn Header="Angelegt von" FixedWidth="True" FieldName="InsUser" AllowEditing="False">
</dxg:GridColumn>
<dxg:GridColumn Header="Notiz" FieldName="Notice" AllowEditing="{Binding Path=BargeldtransaktionenBearbeitenAlsDefaultBooelan, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"/>
<dxg:GridColumn FieldName="X" Header="Drucken" ReadOnly="True">
<dxg:GridColumn
AllowEditing="False"
FieldName="InsUser"
FixedWidth="True"
Header="Angelegt von" />
<dxg:GridColumn
AllowEditing="{Binding Path=BargeldtransaktionenBearbeitenAlsDefaultBooelan, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}"
FieldName="Notice"
Header="Notiz" />
<dxg:GridColumn
FieldName="X"
Header="Drucken"
ReadOnly="True">
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<TextBlock x:Name="textblock_link_pdfexport" VerticalAlignment="Center" Margin="3,0,0,0">
<Hyperlink x:Name="LinkZahlungsbelegDrucken" Click="LinkZahlungsbelegDruckenClick" TargetName="_NewWindow" Foreground="#FF2B508B">
<Run Text="Zahlungsbeleg drucken" />
</Hyperlink>
<TextBlock
x:Name="textblock_link_pdfexport"
Margin="3,0,0,0"
VerticalAlignment="Center">
<Hyperlink
x:Name="LinkZahlungsbelegDrucken"
Click="LinkZahlungsbelegDruckenClick"
Foreground="#FF2B508B"
TargetName="_NewWindow">
<Run Text="Zahlungsbeleg drucken" />
</Hyperlink>
</TextBlock>
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView NavigationStyle="Cell" Margin="2,2,2,2" AutoWidth="True" ShowGroupPanel="False" ShowGroupedColumns="False" ShowTotalSummary="False" />
<dxg:TableView
Margin="2,2,2,2"
AutoWidth="True"
NavigationStyle="Cell"
ShowGroupPanel="False"
ShowGroupedColumns="False"
ShowTotalSummary="False" />
</dxg:GridControl.View>
</dxg:GridControl>
</GroupBox>

View File

@@ -35,6 +35,7 @@ namespace BeWo.View
InitializeComponent();
rootGroupBox.Content = fe;
CommandBindings.Add(new CommandBinding(ApplicationCommands.Close, (s, e) => Close()));
}

View File

@@ -1,5 +1,6 @@
using BeWo.Core;
using BeWo.ServiceProxy;
using BeWo.View.Windows;
using BeWo.ViewModel;
using BeWo.ViewModel.ListViewModel;
using BS.Shared.DataContracts.GkvAbrechnung;

View File

@@ -6,7 +6,7 @@ using System.Windows.Interop;
namespace BeWo.View.Controls
{
public class PopupNonTopmost : Popup
public class PopupNonTopmost : System.Windows.Controls.Primitives.Popup
{
public static DependencyProperty TopmostProperty = Window.TopmostProperty.AddOwner(typeof (PopupNonTopmost), new FrameworkPropertyMetadata(false, OnTopmostChanged));

View File

@@ -1,115 +1,198 @@
<UserControl x:Class="BeWo.View.Controls.ServiceRecordPopUp"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:localViewModel="clr-namespace:BeWo.ViewModel">
<Grid>
<TextBlock Name="tb_nodata" Background="White" Padding="20" Text="Keine Eintragungen vorhanden"
Foreground="Black" FontSize="14" />
<ListBox ItemsSource="{Binding}" ScrollViewer.CanContentScroll="True" x:Name="serviceRecordGrid" Grid.Row="0"
Grid.Column="1" IsSynchronizedWithCurrentItem="True" TabIndex="1" AlternationCount="-1"
Background="{x:Null}" ItemTemplate="{DynamicResource serviceRecordListBoxItemTemplate}"
Style="{DynamicResource ServiceRecordListStyle}" HorizontalContentAlignment="Stretch"
ItemContainerStyle="{DynamicResource serviceRecordListBoxItemStyle}" >
<ListBox.Resources>
<ControlTemplate x:Key="ServiceRecordListBoxTemplate" TargetType="{x:Type ListBox}">
<Border x:Name="Bd" SnapsToDevicePixels="True" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}">
<ScrollViewer Focusable="False" Padding="{TemplateBinding Padding}"
HorizontalScrollBarVisibility="Disabled">
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</ScrollViewer>
<UserControl
x:Class="BeWo.View.Controls.ServiceRecordPopUp"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localViewModel="clr-namespace:BeWo.ViewModel">
<Grid>
<TextBlock
Name="tb_nodata"
Padding="20"
Background="White"
FontSize="14"
Foreground="Black"
Text="Keine Eintragungen vorhanden" />
<ListBox
x:Name="serviceRecordGrid"
Grid.Row="0"
Grid.Column="1"
HorizontalContentAlignment="Stretch"
AlternationCount="-1"
Background="{x:Null}"
IsSynchronizedWithCurrentItem="True"
ItemContainerStyle="{DynamicResource serviceRecordListBoxItemStyle}"
ItemTemplate="{DynamicResource serviceRecordListBoxItemTemplate}"
ItemsSource="{Binding}"
ScrollViewer.CanContentScroll="True"
Style="{DynamicResource ServiceRecordListStyle}"
TabIndex="1">
<ListBox.Resources>
<ControlTemplate x:Key="ServiceRecordListBoxTemplate" TargetType="{x:Type ListBox}">
<Border
x:Name="Bd"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
SnapsToDevicePixels="True">
<ScrollViewer
Padding="{TemplateBinding Padding}"
Focusable="False"
HorizontalScrollBarVisibility="Disabled">
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</ScrollViewer>
</Border>
</ControlTemplate>
<Style x:Key="ServiceRecordListStyle" TargetType="{x:Type ListBox}">
<Setter Property="Template" Value="{StaticResource ServiceRecordListBoxTemplate}" />
<Setter Property="Padding" Value="2,0,2,2" />
</Style>
<Style x:Key="serviceRecordListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
<Setter Property="Background" Value="#00FFFFFF" />
<Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}" />
<Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}" />
<Setter Property="Padding" Value="2,0,0,0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Border
x:Name="Bd"
Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
SnapsToDevicePixels="True">
<ContentPresenter
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}"
ContentStringFormat="{TemplateBinding ContentStringFormat}"
ContentTemplate="{TemplateBinding ContentTemplate}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<DataTemplate x:Key="serviceRecordListBoxItemTemplate" DataType="{x:Type localViewModel:ServiceRecordVM}">
<Grid
x:Name="template"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<Border
x:Name="ItemBorder"
Width="Auto"
Height="Auto"
Margin="0,0,0,3"
Padding="6"
Background="{Binding Path=BackgroundBrush}"
BorderBrush="#FF7E7E7E"
BorderThickness="1,1,1,1"
CornerRadius="4,4,4,4">
<Grid TextBlock.Foreground="{Binding Path=TextBlock.Foreground, RelativeSource={RelativeSource TemplatedParent}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="12" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="12" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="17" />
<RowDefinition Height="14" />
<RowDefinition Height="14" />
<RowDefinition Height="14" />
<RowDefinition Height="14" />
<RowDefinition Height="14" />
<RowDefinition Height="24" />
</Grid.RowDefinitions>
<TextBlock
Grid.Row="1"
Grid.Column="0"
Text="Minuten (gerundet):" />
<TextBlock
Grid.Row="2"
Grid.Column="0"
Text="Leistungskategorie:" />
<TextBlock
Grid.Row="3"
Grid.Column="0"
Text="Leistung:" />
<TextBlock
Grid.Row="4"
Grid.Column="0"
Text="Angelegt von:" />
<TextBlock
Grid.Row="5"
Grid.Column="0"
Text="Angelegt am:" />
<TextBlock
Grid.Row="0"
Grid.Column="0"
Grid.ColumnSpan="5"
FontSize="13"
FontWeight="Bold"
Foreground="#FF494949"
Text="{Binding Path=LongDateString}" />
<TextBlock
Grid.Row="1"
Grid.Column="2"
Background="{x:Null}"
FontWeight="Bold"
Foreground="#FF4E7BC4"
Text="{Binding Path=DurationAndRoundedDuration}" />
<TextBlock
Grid.Row="2"
Grid.Column="2"
Text="{Binding Path=Category}" />
<TextBlock
Grid.Row="3"
Grid.Column="2"
Text="{Binding Path=ServiceDescription}" />
<TextBlock
Grid.Row="4"
Grid.Column="2"
Text="{Binding Path=EmployeeName}" />
<TextBlock
Grid.Row="5"
Grid.Column="2"
Text="{Binding Path=InsertedOn}" />
<TextBox
Grid.Row="1"
Grid.RowSpan="6"
Grid.Column="4"
MaxHeight="200"
Margin="0,0,0,0"
HorizontalAlignment="Stretch"
AutoWordSelection="True"
Background="{x:Null}"
BorderBrush="{x:Null}"
BorderThickness="0"
Focusable="True"
HorizontalScrollBarVisibility="Hidden"
IsEnabled="True"
IsReadOnly="True"
SnapsToDevicePixels="True"
Tag="{Binding}"
Text="{Binding Path=Notice}"
TextWrapping="Wrap"
VerticalScrollBarVisibility="Auto" />
</Grid>
</Border>
</ControlTemplate>
<Style x:Key="ServiceRecordListStyle" TargetType="{x:Type ListBox}">
<Setter Property="Template" Value="{StaticResource ServiceRecordListBoxTemplate}" />
<Setter Property="Padding" Value="2,0,2,2" />
</Style>
<Style x:Key="serviceRecordListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
<Setter Property="Background" Value="#00FFFFFF" />
<Setter Property="HorizontalContentAlignment"
Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}" />
<Setter Property="VerticalContentAlignment"
Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}" />
<Setter Property="Padding" Value="2,0,0,0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Border x:Name="Bd" SnapsToDevicePixels="True" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
Content="{TemplateBinding Content}"
ContentStringFormat="{TemplateBinding ContentStringFormat}"
ContentTemplate="{TemplateBinding ContentTemplate}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground"
Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<DataTemplate x:Key="serviceRecordListBoxItemTemplate" DataType="{x:Type localViewModel:ServiceRecordVM}">
<Grid x:Name="template" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Border x:Name="ItemBorder" CornerRadius="4,4,4,4" Width="Auto" Height="Auto" Padding="6"
Margin="0,0,0,3" Background="{Binding Path=BackgroundBrush}" BorderThickness="1,1,1,1"
BorderBrush="#FF7E7E7E">
<Grid TextBlock.Foreground="{Binding Path=TextBlock.Foreground, RelativeSource={RelativeSource TemplatedParent}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="12" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="12" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="17" />
<RowDefinition Height="14" />
<RowDefinition Height="14" />
<RowDefinition Height="14" />
<RowDefinition Height="14" />
<RowDefinition Height="14" />
<RowDefinition Height="24" />
</Grid.RowDefinitions>
<TextBlock Grid.Column="0" Grid.Row="1" Text="Minuten (gerundet):" />
<TextBlock Grid.Column="0" Grid.Row="2" Text="Leistungskategorie:" />
<TextBlock Grid.Column="0" Grid.Row="3" Text="Leistung:" />
<TextBlock Grid.Column="0" Grid.Row="4" Text="Angelegt von:" />
<TextBlock Grid.Column="0" Grid.Row="5" Text="Angelegt am:" />
<TextBlock Grid.Column="0" Grid.Row="0" Text="{Binding Path=LongDateString}"
Grid.ColumnSpan="5" FontWeight="Bold" FontSize="13" Foreground="#FF494949" />
<TextBlock Grid.Column="2" Grid.Row="1" Text="{Binding Path=DurationAndRoundedDuration}"
FontWeight="Bold" Background="{x:Null}" Foreground="#FF4E7BC4" />
<TextBlock Grid.Column="2" Grid.Row="2" Text="{Binding Path=Category}" />
<TextBlock Grid.Column="2" Grid.Row="3" Text="{Binding Path=ServiceDescription}" />
<TextBlock Grid.Column="2" Grid.Row="4" Text="{Binding Path=EmployeeName}" />
<TextBlock Grid.Column="2" Grid.Row="5" Text="{Binding Path=InsertedOn}" />
<TextBox Grid.Column="4" Grid.Row="1" Grid.RowSpan="6" HorizontalAlignment="Stretch"
Text="{Binding Path=Notice}" HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Auto" Margin="0,0,0,0" BorderThickness="0"
BorderBrush="{x:Null}" Background="{x:Null}" SnapsToDevicePixels="True"
MaxHeight="200" TextWrapping="Wrap" AutoWordSelection="True" IsReadOnly="True"
Tag="{Binding}" IsEnabled="True" Focusable="True" />
</Grid>
</Border>
</Grid>
<DataTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" TargetName="ItemBorder"
Value="{Binding Path=MouseOverBackgroundBrush}" />
</Trigger>
</DataTemplate.Triggers>
</DataTemplate>
</ListBox.Resources>
</ListBox>
</Grid>
</Grid>
<DataTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="ItemBorder" Property="Background" Value="{Binding Path=MouseOverBackgroundBrush}" />
</Trigger>
</DataTemplate.Triggers>
</DataTemplate>
</ListBox.Resources>
</ListBox>
</Grid>
</UserControl>

View File

@@ -1,26 +1,39 @@
<UserControl x:Class="BeWo.View.Controls.TextViewer"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BeWo.View.Controls"
mc:Ignorable="d">
<UserControl
x:Class="BeWo.View.Controls.TextViewer"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BeWo.View.Controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="*" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Margin="3" Background="#eeeeee">
<TextBox x:Name="txt" IsReadOnly="True" Text="test" Foreground="Black" Background="#f1f1f1" BorderThickness="1">
</TextBox>
<ScrollViewer
Margin="3"
Background="#eeeeee"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto">
<TextBox
x:Name="txt"
Background="#f1f1f1"
BorderThickness="1"
Foreground="Black"
IsReadOnly="True"
Text="test" />
</ScrollViewer>
</Grid>
<Button Grid.Row="1" Content="Inhalt in Zwischenablage kopieren" Click="Button_Click" Margin="3"/>
<Button
Grid.Row="1"
Margin="3"
Click="Button_Click"
Content="Inhalt in Zwischenablage kopieren" />
</Grid>
</UserControl>

View File

@@ -0,0 +1,90 @@
<UserControl
x:Class="BeWo.View.Detail.AI.AiConfigView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:listviewmodel="clr-namespace:BeWo.ViewModel.ListViewModel"
xmlns:local="clr-namespace:BeWo.View.Detail.AI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:viewmodel="clr-namespace:BeWo.ViewModel"
d:DataContext="{d:DesignInstance Type=listviewmodel:AiConversationListVM}"
mc:Ignorable="d">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="..\..\..\Styles\ModernOrangeBlack.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style TargetType="{x:Type Slider}">
<Setter Property="Margin" Value="3" />
<Setter Property="Height" Value="30" />
<Setter Property="Minimum" Value="0" />
<Setter Property="Maximum" Value="1" />
<Setter Property="SmallChange" Value="0.01" />
<Setter Property="IsMoveToPointEnabled" Value="True" />
</Style>
</ResourceDictionary>
</UserControl.Resources>
<GroupBox Style="{StaticResource ObjectEditGroupBox}">
<GroupBox.Header>
KI Module Einstellungen
</GroupBox.Header>
<Grid Margin="16" HorizontalAlignment="Stretch">
<!--<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" SharedSizeGroup="ai1" />
<ColumnDefinition Width="100*" MaxWidth="600" />
<ColumnDefinition Width="*" SharedSizeGroup="ai1" />
</Grid.ColumnDefinitions>-->
<Grid Grid.Column="1" HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" MinWidth="100" />
<ColumnDefinition Width="200" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<Label>
Ausgewähltes Modell
</Label>
<ComboBox
Grid.Column="1"
ItemsSource="{Binding Models}"
SelectedItem="{Binding Config.SelectedModel}" />
<Label Grid.Row="1" VerticalAlignment="Center">
Temperatur
</Label>
<Slider
Grid.Row="1"
Grid.Column="1"
IsEnabled="False"
Value="{Binding Config.Temperature}" />
<Label Grid.Row="2" VerticalAlignment="Center">
top__p
</Label>
<Slider
Grid.Row="2"
Grid.Column="1"
IsEnabled="False"
Value="{Binding Config.Top_P}" />
<Label Grid.Row="3">
max__gen__len
</Label>
<dxe:TextEdit
Grid.Row="3"
Grid.Column="1"
EditValue="{Binding Config.Max_Gen_Len}"
IsEnabled="False"
Style="{StaticResource TextEditNumber}" />
</Grid>
</Grid>
</GroupBox>
</UserControl>

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace BeWo.View.Detail.AI
{
/// <summary>
/// Interaktionslogik für AiConfigView.xaml
/// </summary>
public partial class AiConfigView : UserControl
{
public AiConfigView()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,54 @@
<localView:BeWoView
x:Class="BeWo.View.Detail.AI.AiConversationChatModalPopup"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ai="clr-namespace:BeWo.View.Detail.AI"
xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxa="http://schemas.devexpress.com/winfx/2008/xaml/accordion"
xmlns:dxwui="http://schemas.devexpress.com/winfx/2008/xaml/windowsui"
xmlns:listviewmodel="clr-namespace:BeWo.ViewModel.ListViewModel"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:viewmodel="clr-namespace:BeWo.ViewModel"
Width="1200"
Height="800"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Focusable="True"
mc:Ignorable="d">
<localView:BeWoView.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="..\..\..\Styles\ModernOrangeBlack.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</localView:BeWoView.Resources>
<localView:BeWoView.DataContext>
<listviewmodel:AiConversationListVM />
</localView:BeWoView.DataContext>
<Grid>
<GroupBox Style="{StaticResource PopUpWindowStyle}">
<GroupBox.Header>
<StackPanel
Margin="0"
VerticalAlignment="Center"
Orientation="Horizontal">
<TextBlock
Margin="4,4,0,0"
Padding="0,0,0,0"
VerticalAlignment="Stretch"
Background="{x:Null}"
FontSize="20"
Foreground="#FFFFFFFF"
Text="Zeiterfassung KI Chat" />
</StackPanel>
</GroupBox.Header>
<ai:AiConversationChatView DataContext="{Binding}" />
</GroupBox>
</Grid>
</localView:BeWoView>

View File

@@ -0,0 +1,39 @@
using BeWo.ServiceProxy;
using BeWo.ViewModel.ListViewModel;
using BS.Shared.Extensions;
using DevExpress.Mvvm;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace BeWo.View.Detail.AI
{
/// <summary>
/// Interaktionslogik für AiConversationChatView.xaml
/// </summary>
public partial class AiConversationChatModalPopup : BeWoView
{
public AiConversationChatModalPopup()
{
InitializeComponent();
}
public AiConversationListVM ViewModel
{
get => DataContext as AiConversationListVM;
}
}
}

View File

@@ -0,0 +1,325 @@
<localView:BeWoView
x:Class="BeWo.View.Detail.AI.AiConversationChatView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ai="clr-namespace:BeWo.View.Detail.AI"
xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxa="http://schemas.devexpress.com/winfx/2008/xaml/accordion"
xmlns:dxwui="http://schemas.devexpress.com/winfx/2008/xaml/windowsui"
xmlns:listviewmodel="clr-namespace:BeWo.ViewModel.ListViewModel"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:viewmodel="clr-namespace:BeWo.ViewModel"
Width="Auto"
Height="Auto"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
d:DesignHeight="900"
d:DesignWidth="900"
Focusable="True"
Loaded="BeWoView_Loaded"
mc:Ignorable="d">
<localView:BeWoView.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="..\..\..\Styles\ModernOrangeBlack.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</localView:BeWoView.Resources>
<localView:BeWoView.DataContext>
<listviewmodel:AiConversationListVM />
</localView:BeWoView.DataContext>
<Grid>
<GroupBox Style="{StaticResource ModuleAiZeiterfassungStyle}">
<GroupBox.Header>
<StackPanel
Grid.Row="0"
Margin="0"
Orientation="Horizontal">
<!--<Label
Margin="0,0,0,0"
Padding="2"
Content="Suche"
FontSize="14"
Foreground="#FFFFFFFF" />
<TextBox
x:Name="textbox_search"
Width="300"
Height="20"
MinWidth="90"
Margin="4,0,0,0"
BorderThickness="0,0,0,0"
IsEnabled="False"
TabIndex="0"
Template="{DynamicResource SearchTextBoxTemplate}" />
<Button
x:Name="ReloadButton"
Width="36"
Height="24"
Margin="8,0,0,0"
Command="{Binding ReloadConversationsCommand, RelativeSource={RelativeSource AncestorType={x:Type localView:BeWoView}, Mode=FindAncestor}}"
ToolTip="Liste aktualisieren">
<Button.Template>
<ControlTemplate TargetType="{x:Type Button}">
<Grid>
<Image x:Name="imgDisabled" Source="..\..\Ressources\Icons\SymbolRefresh32Disabled.png" />
<Image
x:Name="imgEnabled"
Opacity="0"
Source="..\..\Ressources\Icons\SymbolRefresh32.png" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="imgEnabled" Property="Opacity" Value="1" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>-->
</StackPanel>
</GroupBox.Header>
<Grid Margin="0,0,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200" />
<ColumnDefinition Width="*" MinWidth="200" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!--<dxwui:HamburgerMenu
Background="Transparent"
ItemTemplate="{StaticResource ConversationHamburgerMenuItemTemplate}"
ItemsSource="{Binding VMList}">
<dxwui:HamburgerMenu.Content>
<dxwui:HamburgerMenuNavigationButton />
</dxwui:HamburgerMenu.Content>
</dxwui:HamburgerMenu>-->
<Grid Background="#33000000">
<ListView
x:Name="listbox_conversations"
Padding="4"
Background="Transparent"
BorderThickness="0"
ItemTemplate="{StaticResource ConversationTemplate}"
ItemsSource="{Binding VMList}"
ScrollViewer.CanContentScroll="False"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
SelectedItem="{Binding SelectedVM}">
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="Padding" Value="2" />
<Setter Property="BorderThickness" Value="0" />
</Style>
</ListView.ItemContainerStyle>
</ListView>
</Grid>
<Grid Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="1000000*" MaxWidth="1200" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<ListView
x:Name="listbox_messages"
Grid.Column="1"
Padding="3"
Background="Transparent"
BorderThickness="0"
ItemTemplateSelector="{StaticResource AiConversationMessageTemplateSelector}"
ItemsSource="{Binding SelectedVM.Messages.VMList, Converter={StaticResource TestDebugConverter}}"
ScrollViewer.CanContentScroll="False"
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="Padding" Value="4" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListViewItem}">
<ContentPresenter Margin="{TemplateBinding Padding}" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListView.ItemContainerStyle>
<ListView.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical" />
</ItemsPanelTemplate>
</ListView.ItemsPanel>
</ListView>
<Grid
Grid.Row="1"
Grid.Column="1"
Margin="4,4,4,4"
Visibility="{Binding SelectedVM, Converter={StaticResource ObjectVisibilityConverter}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<!--<TextBox
x:Name="txt_input_context"
Height="100"
MaxHeight="200"
Margin="5"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
AcceptsReturn="True"
Visibility="Collapsed"
Text="{Binding Context_Input}" />-->
<TextBox
x:Name="txt_input_message"
Grid.Column="1"
Height="auto"
MaxHeight="200"
Margin="4"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
AcceptsReturn="True"
Text="{Binding MessageInput}" />
<Button
Grid.Column="2"
Height="auto"
MinHeight="25"
MaxHeight="100"
Margin="4"
VerticalAlignment="Stretch"
Command="{Binding SendNewMessageCommand}"
Content="Senden" />
</Grid>
</Grid>
</Grid>
<Border
Grid.Row="2"
Height="35"
Margin="0,0,0,0"
VerticalAlignment="Stretch">
<Grid>
<Grid.Resources>
<Style BasedOn="{StaticResource PopupToolbarButtonStyle}" TargetType="Button" />
</Grid.Resources>
<Rectangle Fill="#FF000000">
<Rectangle.OpacityMask>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#33000000" />
<GradientStop Offset="1" Color="#99FFFFFF" />
</LinearGradientBrush>
</Rectangle.OpacityMask>
</Rectangle>
<StackPanel
Height="Auto"
Margin="5,5,5,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Orientation="Horizontal">
<Button
x:Name="btnNew"
Margin="0,0,0,0"
Command="{Binding RequestNewConversationCommand}"
Content="Neuer Chat" />
<Button
x:Name="btnSettings"
Margin="4,0,0,0"
Command="{Binding OpenAiSettingCommand, RelativeSource={RelativeSource AncestorType={x:Type localView:BeWoView}, Mode=FindAncestor}}"
Content="Einstellungen" />
<Button
x:Name="btnTest"
Margin="4,0,0,0"
Command="{Binding TestCommand}"
Content="Test Szenario"
Visibility="Collapsed" />
</StackPanel>
<StackPanel
Height="Auto"
Margin="5,5,5,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Orientation="Horizontal">
<Button
x:Name="btnClose"
Height="25"
Margin="0,0,0,0"
Command="ApplicationCommands.Close"
Content="Schließen"
FontWeight="Medium"
Style="{StaticResource NavigationToolbarButtonStyle}"
Visibility="Collapsed" />
</StackPanel>
</Grid>
</Border>
<Popup
x:Name="popup_newview"
Width="200"
Height="200"
StaysOpen="True">
<Grid Margin="5" Background="Orange">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<Label>Kontext</Label>
<ComboBox Grid.Column="1" />
</Grid>
</Popup>
<Popup
x:Name="popup_settings"
Width="auto"
Height="auto"
Placement="Center"
StaysOpen="False">
<Border
Padding="5"
Background="{DynamicResource NavigationContentBrush}"
BorderThickness="1"
CornerRadius="5">
<ai:AiConfigView />
</Border>
<!--<Grid Margin="5" Background="Orange">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<Label>Modell:</Label>
<ComboBox
Grid.Column="1"
ItemsSource="{Binding Models}"
SelectedItem="{Binding Config.SelectedModel, Mode=TwoWay}" />
</Grid>-->
</Popup>
</Grid>
</GroupBox>
</Grid>
</localView:BeWoView>

View File

@@ -0,0 +1,75 @@
using BeWo.ServiceProxy;
using BeWo.ViewModel.ListViewModel;
using BS.Shared.Extensions;
using DevExpress.Mvvm;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace BeWo.View.Detail.AI
{
/// <summary>
/// Interaktionslogik für AiConversationChatView.xaml
/// </summary>
public partial class AiConversationChatView : BeWoView
{
public AiConversationChatView()
{
InitializeComponent();
OpenAiSettingCommand = new DelegateCommand(OpenAiSetting);
((INotifyCollectionChanged)listbox_messages.Items).CollectionChanged += listbox_conversations_SelectionChanged;
popup_settings.Closed += (s, e) => ViewModel.UpdateConfig();
}
public AiConversationListVM ViewModel
{
get => DataContext as AiConversationListVM;
set => DataContext = value;
}
public DelegateCommand OpenAiSettingCommand { get; set; }
private void BeWoView_Loaded(object sender, RoutedEventArgs e)
{
if (BeWoApp.IsInDesignMode)
return;
ViewModel.ReloadConfigCommand.Execute(null);
ViewModel.ReloadConversationsCommand.Execute(null);
}
private void OpenAiSetting()
{
ServiceFacade.DoAiEnhancedServiceAsnyc(x => x.GetAiModels(), (x) =>
{
ViewModel.Models.MakeEqualTo(x);
popup_settings.IsOpen = true;
}, true, this);
}
private void listbox_conversations_SelectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
if (VisualTreeHelper.GetChildrenCount(listbox_messages) > 0)
{
Border border = (Border)VisualTreeHelper.GetChild(listbox_messages, 0);
ScrollViewer scrollViewer = (ScrollViewer)VisualTreeHelper.GetChild(border, 0);
scrollViewer.ScrollToBottom();
}
}
}
}

View File

@@ -1,23 +1,44 @@
<localView:BeWoView x:Class="BeWo.View.Detail.AbsenceReasonView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:localView="clr-namespace:BeWo.View"
xmlns:val="clr-namespace:BeWo.Validation" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:diagnostics="clr-namespace:System.Diagnostics;assembly=WindowsBase"
xmlns:s="clr-namespace:System;assembly=mscorlib"
xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared"
xmlns:xtraEditors="clr-namespace:DevExpress.XtraEditors;assembly=DevExpress.XtraEditors.v23.2"
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" Focusable="True">
<GroupBox Name="root" Header="Aktuell definierte Abwesenheitskategorien" Style="{StaticResource ObjectEditGroupBox}">
<localView:BeWoView
x:Class="BeWo.View.Detail.AbsenceReasonView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared"
xmlns:diagnostics="clr-namespace:System.Diagnostics;assembly=WindowsBase"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:s="clr-namespace:System;assembly=mscorlib"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:val="clr-namespace:BeWo.Validation"
xmlns:xtraEditors="clr-namespace:DevExpress.XtraEditors;assembly=DevExpress.XtraEditors.v23.2"
Width="Auto"
Height="Auto"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Focusable="True">
<GroupBox
Name="root"
Header="Aktuell definierte Abwesenheitskategorien"
Style="{StaticResource ObjectEditGroupBox}">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Grid.Resources>
<DataTemplate x:Key="DropDownItemTemplate">
<Border Height="20" MinWidth="20" Background="{Binding}" BorderThickness="1" CornerRadius="2" HorizontalAlignment="Stretch" BorderBrush="Black" />
<Border
Height="20"
MinWidth="20"
HorizontalAlignment="Stretch"
Background="{Binding}"
BorderBrush="Black"
BorderThickness="1"
CornerRadius="2" />
</DataTemplate>
<DataTemplate x:Key="SelectedItemTemplate">
<Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="{Binding}" BorderBrush="Black" BorderThickness="1" />
<Border
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="{Binding}"
BorderBrush="Black"
BorderThickness="1" />
</DataTemplate>
</Grid.Resources>
<Grid.ColumnDefinitions>
@@ -34,28 +55,72 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label Grid.Column="0" Grid.Row="0">Bezeichnung</Label>
<TextBox Grid.Column="1" Grid.Row="0" Margin="3" Height="23"
Text="{val:ValidationBinding Path=NewVM.Description, UpdateSourceTrigger=PropertyChanged}" Width="125" />
<Label Grid.Column="2" Grid.Row="0">max. abrechenbare Stunden (pro Woche)</Label>
<dxe:SpinEdit Name="spinedit_hours" AllowNullInput="True" IsFloatValue="False" MinValue="0" Grid.Column="3" Grid.Row="0"
Height="23" Width="50" EditValue="{Binding Path=NewVM.Hours, Converter={StaticResource Int2DecimalConverter}, UpdateSourceTrigger=PropertyChanged}" />
<Label Grid.Column="4" Grid.Row="0">Minuten</Label>
<dxe:SpinEdit Name="spinedit_minutes" AllowNullInput="True" IsFloatValue="False" Grid.Column="5" Grid.Row="0"
Height="23" Width="50" MinValue="0"
MaxValue="59"
EditValue="{Binding Path=NewVM.Minutes, Converter={StaticResource Int2DecimalConverter}, UpdateSourceTrigger=PropertyChanged}" />
<Button Name="button_addReason" Click="button_addReason_Click" Grid.Column="4" Grid.Row="1" Height="25"
Margin="3" IsDefault="True" Grid.ColumnSpan="2" HorizontalAlignment="Right">Hinzufügen</Button>
<Label Grid.Column="0" Grid.Row="1">
<Label Grid.Row="0" Grid.Column="0">Bezeichnung</Label>
<TextBox
Grid.Row="0"
Grid.Column="1"
Width="125"
Height="23"
Margin="3"
Text="{val:ValidationBinding Path=NewVM.Description,
UpdateSourceTrigger=PropertyChanged}" />
<Label Grid.Row="0" Grid.Column="2">max. abrechenbare Stunden (pro Woche)</Label>
<dxe:SpinEdit
Name="spinedit_hours"
Grid.Row="0"
Grid.Column="3"
Width="50"
Height="23"
AllowNullInput="True"
EditValue="{Binding Path=NewVM.Hours, Converter={StaticResource Int2DecimalConverter}, UpdateSourceTrigger=PropertyChanged}"
IsFloatValue="False"
MinValue="0" />
<Label Grid.Row="0" Grid.Column="4">Minuten</Label>
<dxe:SpinEdit
Name="spinedit_minutes"
Grid.Row="0"
Grid.Column="5"
Width="50"
Height="23"
AllowNullInput="True"
EditValue="{Binding Path=NewVM.Minutes, Converter={StaticResource Int2DecimalConverter}, UpdateSourceTrigger=PropertyChanged}"
IsFloatValue="False"
MaxValue="59"
MinValue="0" />
<Button
Name="button_addReason"
Grid.Row="1"
Grid.Column="4"
Grid.ColumnSpan="2"
Height="25"
Margin="3"
HorizontalAlignment="Right"
Click="button_addReason_Click"
IsDefault="True">
Hinzufügen
</Button>
<Label Grid.Row="1" Grid.Column="0">
Farbe im Belegungsplan
</Label>
<ComboBox HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" SelectedItem="{val:ValidationBinding Path=NewVM.Brush}" Name="combobox_brush" Grid.Column="1" Grid.Row="1" Height="23" Margin="3" ItemsSource="{Binding Path=AllBrushes, Mode=OneWay}" Width="125">
<ComboBox
Name="combobox_brush"
Grid.Row="1"
Grid.Column="1"
Width="125"
Height="23"
Margin="3"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
ItemsSource="{Binding Path=AllBrushes, Mode=OneWay}"
SelectedItem="{val:ValidationBinding Path=NewVM.Brush}">
<ComboBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="12" Rows="12" IsItemsHost="True" />
<UniformGrid
Columns="12"
IsItemsHost="True"
Rows="12" />
</ItemsPanelTemplate>
</ComboBox.ItemsPanel>
<ComboBox.ItemContainerStyle>
@@ -65,57 +130,124 @@
</Style>
</ComboBox.ItemContainerStyle>
</ComboBox>
<StackPanel Grid.Column="2" Grid.Row="1" Grid.ColumnSpan="2" Orientation="Horizontal">
<StackPanel
Grid.Row="1"
Grid.Column="2"
Grid.ColumnSpan="2"
Orientation="Horizontal">
<Label>Nur auswählbar für</Label>
<ComboBox x:Name="combo_visibilitytype"
Grid.Column="3" Grid.Row="1" VerticalAlignment="Center" Margin="3,1,3,3"
HorizontalAlignment="Stretch"
ItemsSource="{x:Static core:EnumTranslations.AbsenceReasonVisibility2Translations}"
SelectedValue="{Binding NewVM.Sichtbarkeit, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
SelectedValuePath="Key"
DisplayMemberPath="Value"
Height="23" Width="200"/>
<ComboBox
x:Name="combo_visibilitytype"
Grid.Row="1"
Grid.Column="3"
Width="200"
Height="23"
Margin="3,1,3,3"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
DisplayMemberPath="Value"
ItemsSource="{x:Static core:EnumTranslations.AbsenceReasonVisibility2Translations}"
SelectedValue="{Binding NewVM.Sichtbarkeit, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
SelectedValuePath="Key" />
</StackPanel>
<dxg:GridControl x:Name="datagrid_absencereasons" Margin="0,10,0,0" Grid.Column="0" Grid.Row="2"
Grid.ColumnSpan="7" DataSource="{Binding VMList}">
<dxg:GridControl
x:Name="datagrid_absencereasons"
Grid.Row="2"
Grid.Column="0"
Grid.ColumnSpan="7"
Margin="0,10,0,0"
DataSource="{Binding VMList}">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="IsDeleteable" Header="" FixedWidth="True" Width="24" ReadOnly="True">
<dxg:GridColumn
Width="24"
FieldName="IsDeleteable"
FixedWidth="True"
Header=""
ReadOnly="True">
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<Button Content="r"
Visibility="{Binding Path=EditValue, Converter={StaticResource BoolVisibilityConverter}}"
FontFamily="Webdings" Click="DeleteButton_Click" Width="18" Height="18"
VerticalAlignment="Center" />
<Button
Width="18"
Height="18"
VerticalAlignment="Center"
Click="DeleteButton_Click"
Content="r"
FontFamily="Webdings"
Visibility="{Binding Path=EditValue, Converter={StaticResource BoolVisibilityConverter}}" />
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
<dxg:GridColumn FieldName="Description" Header="Bezeichnung" Width="180" />
<dxg:GridColumn FieldName="Hours" Header="max. abrechenbare Stunden" Width="180" />
<dxg:GridColumn FieldName="Minutes" Header="Minuten" Width="180" />
<dxg:GridColumn x:Name="column_visibility" FieldName="Sichtbarkeit" Header="Nur auswählbar für" Width="150" />
<dxg:GridColumn x:Name="column_Color" FieldName="Brush" Header="Farbe" Width="70">
<dxg:GridColumn.DisplayTemplate>
<ControlTemplate>
<Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="{Binding Value, diagnostics:PresentationTraceSources.TraceLevel=High }" BorderBrush="Black" BorderThickness="1" />
</ControlTemplate>
</dxg:GridColumn.DisplayTemplate>
<dxg:GridColumn.EditTemplate>
<ControlTemplate>
<Button x:Name="PART_Editor" BorderThickness="0" Style="{x:Null}" Background="{Binding EditValue}" Foreground="{Binding EditValue}" Height="21" HorizontalAlignment="Stretch" Click="button_select_color_Click"></Button>
</ControlTemplate>
</dxg:GridColumn.EditTemplate>
</dxg:GridColumn>
<dxg:GridColumn
Width="180"
FieldName="Description"
Header="Bezeichnung" />
<dxg:GridColumn
Width="180"
FieldName="Hours"
Header="max. abrechenbare Stunden" />
<dxg:GridColumn
Width="180"
FieldName="Minutes"
Header="Minuten" />
<dxg:GridColumn
x:Name="column_visibility"
Width="150"
FieldName="Sichtbarkeit"
Header="Nur auswählbar für" />
<dxg:GridColumn
x:Name="column_Color"
Width="70"
FieldName="Brush"
Header="Farbe">
<dxg:GridColumn.DisplayTemplate>
<ControlTemplate>
<Border
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="{Binding Value, diagnostics:PresentationTraceSources.TraceLevel=High}"
BorderBrush="Black"
BorderThickness="1" />
</ControlTemplate>
</dxg:GridColumn.DisplayTemplate>
<dxg:GridColumn.EditTemplate>
<ControlTemplate>
<Button
x:Name="PART_Editor"
Height="21"
HorizontalAlignment="Stretch"
Background="{Binding EditValue}"
BorderThickness="0"
Click="button_select_color_Click"
Foreground="{Binding EditValue}"
Style="{x:Null}" />
</ControlTemplate>
</dxg:GridColumn.EditTemplate>
</dxg:GridColumn>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView AutoWidth="true" ShowGroupPanel="False" ShowGroupedColumns="false" ShowTotalSummary="False"
NavigationStyle="Cell" />
<dxg:TableView
AutoWidth="true"
NavigationStyle="Cell"
ShowGroupPanel="False"
ShowGroupedColumns="false"
ShowTotalSummary="False" />
</dxg:GridControl.View>
</dxg:GridControl>
<Popup x:Name="popup_color" StaysOpen="false" Placement="MousePoint">
<ListBox x:Name="listbox_colorpicker" BorderThickness="0" Loaded="colorEditor_Loaded" SelectionChanged="listbox_colorpicker_SelectionChanged">
<Popup
x:Name="popup_color"
Placement="MousePoint"
StaysOpen="false">
<ListBox
x:Name="listbox_colorpicker"
BorderThickness="0"
Loaded="colorEditor_Loaded"
SelectionChanged="listbox_colorpicker_SelectionChanged">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="12" Rows="12" IsItemsHost="True" />
<UniformGrid
Columns="12"
IsItemsHost="True"
Rows="12" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemContainerStyle>

View File

@@ -1,22 +1,47 @@
<localView:BeWoView x:Class="BeWo.View.Detail.Accounting.EquityInvoiceItemEditView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:localViewModel="clr-namespace:BeWo.ViewModel"
xmlns:localViewDetail="clr-namespace:BeWo.View.Detail.Accounting"
xmlns:val="clr-namespace:BeWo.Validation"
xmlns:proxy="clr-namespace:BeWo.ServiceProxy"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" Height="Auto" Width="Auto" HorizontalAlignment="Stretch" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:r="clr-namespace:BeWo.Security" VerticalAlignment="Stretch" Focusable="True" xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic">
<localView:BeWoView
x:Class="BeWo.View.Detail.Accounting.EquityInvoiceItemEditView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:localViewDetail="clr-namespace:BeWo.View.Detail.Accounting"
xmlns:localViewModel="clr-namespace:BeWo.ViewModel"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:proxy="clr-namespace:BeWo.ServiceProxy"
xmlns:r="clr-namespace:BeWo.Security"
xmlns:s="clr-namespace:System;assembly=mscorlib"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:val="clr-namespace:BeWo.Validation"
Width="Auto"
Height="Auto"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Focusable="True">
<GroupBox MinHeight="200" Width="800" Style="{StaticResource PopUpWindowStyle}">
<GroupBox
Width="800"
MinHeight="200"
Style="{StaticResource PopUpWindowStyle}">
<GroupBox.Header>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,0">
<Image Source="..\..\Ressources\Icons\CoinsDisabled.png" Height="28" />
<TextBox Text="Rechnung bearbeiten" Margin="10,4,0,0" Background="{x:Null}" Foreground="{DynamicResource MainGroupBoxForegroundBrush}" FontSize="20" BorderBrush="{x:Null}" VerticalAlignment="Stretch" BorderThickness="0,0,0,0" Padding="0,0,0,0" />
<StackPanel
Margin="0,0,0,0"
VerticalAlignment="Center"
Orientation="Horizontal">
<Image Height="28" Source="..\..\Ressources\Icons\CoinsDisabled.png" />
<TextBox
Margin="10,4,0,0"
Padding="0,0,0,0"
VerticalAlignment="Stretch"
Background="{x:Null}"
BorderBrush="{x:Null}"
BorderThickness="0,0,0,0"
FontSize="20"
Foreground="{DynamicResource MainGroupBoxForegroundBrush}"
Text="Rechnung bearbeiten" />
</StackPanel>
</GroupBox.Header>
@@ -28,10 +53,13 @@
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Rectangle Fill="{DynamicResource AccountingContentBrush}" VerticalAlignment="Top" Height="6" />
<Rectangle
Height="6"
VerticalAlignment="Top"
Fill="{DynamicResource AccountingContentBrush}" />
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
<Grid Grid.IsSharedSizeScope="True" Margin="10,10,0,10">
<Grid Margin="10,10,0,10" Grid.IsSharedSizeScope="True">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@@ -44,7 +72,11 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<GroupBox Margin="3 6 3 6" Style="{StaticResource ObjectEditGroupBox}" Grid.ColumnSpan="2" Header="Rechnungsdetails">
<GroupBox
Grid.ColumnSpan="2"
Margin="3,6,3,6"
Header="Rechnungsdetails"
Style="{StaticResource ObjectEditGroupBox}">
<Grid>
@@ -68,34 +100,111 @@
</Grid.RowDefinitions>
<Label Content="Rechnungsnummer" />
<TextBox Margin="3" Height="23" Grid.Column="1" Text="{Binding Path=InvoiceNumber}" />
<TextBox
Grid.Column="1"
Height="23"
Margin="3"
Text="{Binding Path=InvoiceNumber}" />
<Label Content="{markup:Translate Ersteller Vorname}" Grid.Row="0" Grid.Column="2" />
<TextBox Margin="3" Grid.Row="0" Grid.Column="3" Text="{Binding CreatorFirstName}" Height="23" />
<Label
Grid.Row="0"
Grid.Column="2"
Content="{markup:Translate Ersteller Vorname}" />
<TextBox
Grid.Row="0"
Grid.Column="3"
Height="23"
Margin="3"
Text="{Binding CreatorFirstName}" />
<Label Content="{markup:Translate Ersteller Nachname}" Grid.Row="0" Grid.Column="4" />
<TextBox Margin="3" Height="23" Grid.Row="0" Grid.Column="5" Text="{Binding CreatorLastName}" />
<Label
Grid.Row="0"
Grid.Column="4"
Content="{markup:Translate Ersteller Nachname}" />
<TextBox
Grid.Row="0"
Grid.Column="5"
Height="23"
Margin="3"
Text="{Binding CreatorLastName}" />
<Label Content="Rechnungsdatum" Grid.Row="1" Grid.Column="0" />
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" BorderThickness="1" Margin="3" Height="23" Grid.Row="1" Grid.Column="1" EditValue="{val:ValidationBinding Path=InvoiceDate, Mode=TwoWay}" />
<Label
Grid.Row="1"
Grid.Column="0"
Content="Rechnungsdatum" />
<dxe:DateEdit
Grid.Row="1"
Grid.Column="1"
Height="23"
Margin="3"
BorderThickness="1"
EditValue="{val:ValidationBinding Path=InvoiceDate,
Mode=TwoWay}"
MaskType="DateTimeAdvancingCaret" />
<Label Content="Abrechnungszeitraum von" Grid.Row="1" Grid.Column="2" />
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" BorderThickness="1" Height="23" Margin="3" Grid.Row="1" Grid.Column="3" EditValue="{val:ValidationBinding Path=AccountingPeriodStart}" />
<Label
Grid.Row="1"
Grid.Column="2"
Content="Abrechnungszeitraum von" />
<dxe:DateEdit
Grid.Row="1"
Grid.Column="3"
Height="23"
Margin="3"
BorderThickness="1"
EditValue="{val:ValidationBinding Path=AccountingPeriodStart}"
MaskType="DateTimeAdvancingCaret" />
<Label Content="Abrechnungszeitraum bis" Grid.Row="1" Grid.Column="4" />
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" BorderThickness="1" Height="23" Margin="3" Grid.Row="1" Grid.Column="5" EditValue="{val:ValidationBinding Path=AccountingPeriodEnd}" />
<Label
Grid.Row="1"
Grid.Column="4"
Content="Abrechnungszeitraum bis" />
<dxe:DateEdit
Grid.Row="1"
Grid.Column="5"
Height="23"
Margin="3"
BorderThickness="1"
EditValue="{val:ValidationBinding Path=AccountingPeriodEnd}"
MaskType="DateTimeAdvancingCaret" />
<Label Grid.Column="0" Grid.Row="2" Content="anz Mahnungen" />
<dxe:SpinEdit MinValue="0" IsFloatValue="False" AllowNullInput="True" EditValue="{Binding Path=DunningLetterCount, Converter={StaticResource Int2DecimalConverter}}" Height="23" Margin="3" Grid.Row="2" Grid.Column="1" />
<Label
Grid.Row="2"
Grid.Column="0"
Content="anz Mahnungen" />
<dxe:SpinEdit
Grid.Row="2"
Grid.Column="1"
Height="23"
Margin="3"
AllowNullInput="True"
EditValue="{Binding Path=DunningLetterCount, Converter={StaticResource Int2DecimalConverter}}"
IsFloatValue="False"
MinValue="0" />
<Label Content="Bemerkung" Grid.Row="2" Grid.Column="2" />
<TextBox Grid.Row="2" Grid.Column="3" Grid.ColumnSpan="3" Margin="3" AcceptsReturn="True" TextWrapping="Wrap" Height="23" Text="{Binding Notice}" />
<Label
Grid.Row="2"
Grid.Column="2"
Content="Bemerkung" />
<TextBox
Grid.Row="2"
Grid.Column="3"
Grid.ColumnSpan="3"
Height="23"
Margin="3"
AcceptsReturn="True"
Text="{Binding Notice}"
TextWrapping="Wrap" />
</Grid>
</GroupBox>
<GroupBox Margin="3 6 6 3" Grid.Row="1" Style="{StaticResource ObjectEditGroupBox}" Header="{markup:Translate EmpfängerSingular}">
<GroupBox
Grid.Row="1"
Margin="3,6,6,3"
Header="{markup:Translate EmpfängerSingular}"
Style="{StaticResource ObjectEditGroupBox}">
<Grid>
@@ -113,28 +222,78 @@
</Grid.RowDefinitions>
<Label Content="Vorname" />
<TextBox Margin="3" Grid.Row="0" Grid.Column="1" Text="{val:ValidationBinding Path=RecipientPersonFirstName}" Height="23" />
<TextBox
Grid.Row="0"
Grid.Column="1"
Height="23"
Margin="3"
Text="{val:ValidationBinding Path=RecipientPersonFirstName}" />
<Label Content="Nachname" Grid.Row="0" Grid.Column="2" />
<TextBox Margin="3" Grid.Row="0" Grid.Column="3" Text="{val:ValidationBinding Path=RecipientPersonLastName}" Height="23" />
<Label
Grid.Row="0"
Grid.Column="2"
Content="Nachname" />
<TextBox
Grid.Row="0"
Grid.Column="3"
Height="23"
Margin="3"
Text="{val:ValidationBinding Path=RecipientPersonLastName}" />
<Label Content="Aktenzeichen" Grid.Row="1" Grid.Column="0" />
<TextBox Margin="3" Height="23" Grid.Row="1" Grid.Column="1" Text="{Binding CustomerReferenceNumber}" />
<Label
Grid.Row="1"
Grid.Column="0"
Content="Aktenzeichen" />
<TextBox
Grid.Row="1"
Grid.Column="1"
Height="23"
Margin="3"
Text="{Binding CustomerReferenceNumber}" />
<Label Content="Strasse" Grid.Row="1" Grid.Column="2" />
<TextBox Margin="3" Grid.Row="1" Grid.Column="3" Text="{val:ValidationBinding Path=RecipientStreet}" Height="23" />
<Label
Grid.Row="1"
Grid.Column="2"
Content="Strasse" />
<TextBox
Grid.Row="1"
Grid.Column="3"
Height="23"
Margin="3"
Text="{val:ValidationBinding Path=RecipientStreet}" />
<Label Content="Postleitzahl" Grid.Row="2" Grid.Column="0" />
<TextBox Margin="3,3,3,0" Grid.Row="2" Grid.Column="1" Text="{val:ValidationBinding Path=RecipientPostCode}" Height="23" />
<Label
Grid.Row="2"
Grid.Column="0"
Content="Postleitzahl" />
<TextBox
Grid.Row="2"
Grid.Column="1"
Height="23"
Margin="3,3,3,0"
Text="{val:ValidationBinding Path=RecipientPostCode}" />
<Label Content="Ort" Grid.Row="2" Grid.Column="2" />
<TextBox Margin="3" Grid.Row="2" Grid.Column="3" Text="{val:ValidationBinding Path=RecipientTown}" Height="23" />
<Label
Grid.Row="2"
Grid.Column="2"
Content="Ort" />
<TextBox
Grid.Row="2"
Grid.Column="3"
Height="23"
Margin="3"
Text="{val:ValidationBinding Path=RecipientTown}" />
</Grid>
</GroupBox>
<GroupBox Margin="6 6 3 3" Style="{StaticResource ObjectEditGroupBox}" Grid.Row="1" Grid.Column="2" Header="{markup:Translate Absender}">
<GroupBox
Grid.Row="1"
Grid.Column="2"
Margin="6,6,3,3"
Header="{markup:Translate Absender}"
Style="{StaticResource ObjectEditGroupBox}">
<Grid>
<Grid.ColumnDefinitions>
@@ -151,61 +310,163 @@
</Grid.RowDefinitions>
<Label Content="Vorname" />
<TextBox Margin="3" Grid.Row="0" Grid.Column="1" Text="{Binding SenderFirstName}" Height="23" />
<TextBox
Grid.Row="0"
Grid.Column="1"
Height="23"
Margin="3"
Text="{Binding SenderFirstName}" />
<Label Content="Nachname" Grid.Row="0" Grid.Column="2" />
<TextBox Margin="3" Grid.Row="0" Grid.Column="3" Text="{Binding SenderLastName}" Height="23" />
<Label
Grid.Row="0"
Grid.Column="2"
Content="Nachname" />
<TextBox
Grid.Row="0"
Grid.Column="3"
Height="23"
Margin="3"
Text="{Binding SenderLastName}" />
<Label Content="Organisation" Grid.Row="1" />
<TextBox Margin="3" Grid.Row="1" Grid.Column="1" Text="{Binding SenderOrganisation}" Height="23" />
<Label Grid.Row="1" Content="Organisation" />
<TextBox
Grid.Row="1"
Grid.Column="1"
Height="23"
Margin="3"
Text="{Binding SenderOrganisation}" />
<Label Content="Abteilung" Grid.Row="1" Grid.Column="2" />
<TextBox Margin="3" Grid.Row="1" Grid.Column="3" Text="{Binding SenderDivision}" Height="23" />
<Label
Grid.Row="1"
Grid.Column="2"
Content="Abteilung" />
<TextBox
Grid.Row="1"
Grid.Column="3"
Height="23"
Margin="3"
Text="{Binding SenderDivision}" />
<Label Content="Fax" Grid.Row="2" Grid.Column="0" />
<TextBox Margin="3" Grid.Row="2" Grid.Column="1" Text="{Binding SenderFax}" Height="23" />
<Label
Grid.Row="2"
Grid.Column="0"
Content="Fax" />
<TextBox
Grid.Row="2"
Grid.Column="1"
Height="23"
Margin="3"
Text="{Binding SenderFax}" />
<Label Content="Telefon" Grid.Row="2" Grid.Column="2" />
<TextBox Margin="3" Grid.Row="2" Grid.Column="3" Text="{Binding SenderPhone}" Height="23" />
<Label
Grid.Row="2"
Grid.Column="2"
Content="Telefon" />
<TextBox
Grid.Row="2"
Grid.Column="3"
Height="23"
Margin="3"
Text="{Binding SenderPhone}" />
</Grid>
</GroupBox>
<GroupBox Margin="3 6 3 3" Style="{StaticResource ObjectEditGroupBox}" Grid.ColumnSpan="2" Grid.Row="2" Header="Rechnungsposten">
<GroupBox
Grid.Row="2"
Grid.ColumnSpan="2"
Margin="3,6,3,3"
Header="Rechnungsposten"
Style="{StaticResource ObjectEditGroupBox}">
<dxg:GridControl MaxHeight="200" SnapsToDevicePixels="True" Margin="3" x:Name="datagrid_invoiceItems" DataSource="{Binding InvoiceItems.VMList}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<dxg:GridControl
x:Name="datagrid_invoiceItems"
MaxHeight="200"
Margin="3"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
DataSource="{Binding InvoiceItems.VMList}"
SnapsToDevicePixels="True">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="Notice" Header="" FixedWidth="True" Width="24" ReadOnly="True">
<dxg:GridColumn
Width="24"
FieldName="Notice"
FixedWidth="True"
Header=""
ReadOnly="True">
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<Button Content="r" FontFamily="Webdings" Click="DeleteButton_Click" Width="18" Height="18" VerticalAlignment="Center" />
<Button
Width="18"
Height="18"
VerticalAlignment="Center"
Click="DeleteButton_Click"
Content="r"
FontFamily="Webdings" />
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
<dxg:GridColumn x:Name="colItemPeriodStart" FieldName="ItemPeriodStart" Header="Von" EditSettings="{dxe:DateSettings DisplayFormat=d}" Width="80" />
<dxg:GridColumn x:Name="colItemPeriodEnd" FieldName="ItemPeriodEnd" Header="Bis" EditSettings="{dxe:DateSettings DisplayFormat=d}" Width="80" />
<dxg:GridColumn FieldName="ItemDescription" Header="Posten" Width="150" />
<dxg:GridColumn x:Name="colAmountPerUnit" FieldName="AmountPerUnit" Header="Satz" Width="80">
<dxg:GridColumn
x:Name="colItemPeriodStart"
Width="80"
EditSettings="{dxe:DateSettings DisplayFormat=d}"
FieldName="ItemPeriodStart"
Header="Von" />
<dxg:GridColumn
x:Name="colItemPeriodEnd"
Width="80"
EditSettings="{dxe:DateSettings DisplayFormat=d}"
FieldName="ItemPeriodEnd"
Header="Bis" />
<dxg:GridColumn
Width="150"
FieldName="ItemDescription"
Header="Posten" />
<dxg:GridColumn
x:Name="colAmountPerUnit"
Width="80"
FieldName="AmountPerUnit"
Header="Satz">
<dxg:GridColumn.EditSettings>
<dxe:TextEditSettings DisplayFormat="c" Mask="c" MaskType="Numeric"></dxe:TextEditSettings>
<dxe:TextEditSettings
DisplayFormat="c"
Mask="c"
MaskType="Numeric" />
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn x:Name="colUnitCount" FieldName="UnitCount" Header="Anzahl" Width="80" />
<dxg:GridColumn x:Name="colAmountTotal" FieldName="AmountTotal" Header="Betrag">
<dxg:GridColumn
x:Name="colUnitCount"
Width="80"
FieldName="UnitCount"
Header="Anzahl" />
<dxg:GridColumn
x:Name="colAmountTotal"
FieldName="AmountTotal"
Header="Betrag">
<dxg:GridColumn.CellStyle>
<Style TargetType="dxg:LightweightCellEditor">
<Setter Property="TextBlock.FontWeight" Value="Bold" />
</Style>
</dxg:GridColumn.CellStyle>
<dxg:GridColumn.EditSettings>
<dxe:TextEditSettings DisplayFormat="c" Mask="c" MaskType="Numeric"></dxe:TextEditSettings>
<dxe:TextEditSettings
DisplayFormat="c"
Mask="c"
MaskType="Numeric" />
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView NewItemRowPosition="Top" Loaded="gridView_Loaded" x:Name="gridView" NavigationStyle="Cell" ShowGroupPanel="False" SnapsToDevicePixels="True" Margin="3" />
<dxg:TableView
x:Name="gridView"
Margin="3"
Loaded="gridView_Loaded"
NavigationStyle="Cell"
NewItemRowPosition="Top"
ShowGroupPanel="False"
SnapsToDevicePixels="True" />
</dxg:GridControl.View>
</dxg:GridControl>
@@ -214,9 +475,26 @@
</Grid>
</ScrollViewer>
<StackPanel Grid.ColumnSpan="2" Grid.Row="2" Orientation="Horizontal" VerticalAlignment="Center" Height="Auto" Margin="5 0 5 5" HorizontalAlignment="Right">
<Button x:Name="btnSave" Content="Speichern und schließen" Margin="5" Command="ApplicationCommands.Save" Height="25" />
<Button x:Name="btnClose" Content="Abbrechen" Margin="5" Command="ApplicationCommands.Close" Height="25" />
<StackPanel
Grid.Row="2"
Grid.ColumnSpan="2"
Height="Auto"
Margin="5,0,5,5"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Orientation="Horizontal">
<Button
x:Name="btnSave"
Height="25"
Margin="5"
Command="ApplicationCommands.Save"
Content="Speichern und schließen" />
<Button
x:Name="btnClose"
Height="25"
Margin="5"
Command="ApplicationCommands.Close"
Content="Abbrechen" />
</StackPanel>
</Grid>

View File

@@ -13,6 +13,7 @@ using System.Windows.Threading;
using BeWo.Core;
using BeWo.ServiceProxy;
using BeWo.View.Controls;
using BeWo.View.Windows;
using BeWo.ViewModel;
using BeWo.ViewModel.ListViewModel;

View File

@@ -1,9 +1,12 @@
<Window x:Class="BeWo.View.Detail.CustomerHistoryDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:detail="clr-namespace:BeWo.View.Detail"
Title="CustomerHistoryDialog" Height="300" Width="300">
<Window
x:Class="BeWo.View.Detail.CustomerHistoryDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:detail="clr-namespace:BeWo.View.Detail"
Title="CustomerHistoryDialog"
Width="300"
Height="300">
<Grid>
<detail:CustomerHistoryView x:Name="CustomerHistoryView"></detail:CustomerHistoryView>
<detail:CustomerHistoryView x:Name="CustomerHistoryView" />
</Grid>
</Window>

View File

@@ -783,7 +783,7 @@
FontSize="22"
Foreground="#FFFFFFFF"
Text="{Binding CustomerAlias}"
TextDecorations="" />
TextDecorations="None" />
<TextBox
Margin="0,0,0,0"
Padding="0,0,0,0"
@@ -3920,6 +3920,10 @@
StaysOpen="False">
<localSearchView:OrganisationSearchView x:Name="personOrganisationsearchview" />
</Popup>
<Border x:Name="popup_content" Margin="0,10,0,-10" Height="1" Width="1"/>
<Border
x:Name="popup_content"
Width="1"
Height="1"
Margin="0,10,0,-10" />
</Grid>
</localView:BeWoView>

View File

@@ -1,12 +1,15 @@
<Window x:Class="BeWo.View.Detail.DebugMessageLogView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BeWo.View.Detail"
WindowStartupLocation="Manual"
Title="Debug Log" mc:Ignorable="d"
Height="900" Width="1000">
<Window
x:Class="BeWo.View.Detail.DebugMessageLogView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BeWo.View.Detail"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="Debug Log"
Width="1000"
Height="900"
WindowStartupLocation="Manual"
mc:Ignorable="d">
<Grid>
<Grid.RowDefinitions>
@@ -16,11 +19,20 @@
<StackPanel Grid.Row="0">
<Button Click="ButtonBase_OnClick">Leeren</Button>
</StackPanel>
<ListView x:Name="DebugListView" ItemsSource="{Binding DebugMessageList}" Background="GhostWhite" Grid.Row="1">
<ListView
x:Name="DebugListView"
Grid.Row="1"
Background="GhostWhite"
ItemsSource="{Binding DebugMessageList}">
<ListView.ItemTemplate>
<DataTemplate DataType="local:DebugWindowMessage">
<Grid>
<TextBlock FontSize="16" FontWeight="Bold" FontFamily="Consolas" Text="{Binding MessageText}" Foreground="{Binding TextColor}"></TextBlock>
<TextBlock
FontFamily="Consolas"
FontSize="16"
FontWeight="Bold"
Foreground="{Binding TextColor}"
Text="{Binding MessageText}" />
</Grid>
</DataTemplate>
</ListView.ItemTemplate>

View File

@@ -1,18 +1,30 @@
<localView:BeWoView x:Class="BeWo.View.Detail.GroupOfPeopleView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:localSearchView="clr-namespace:BeWo.View.Search"
xmlns:val="clr-namespace:BeWo.Validation"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
Height="Auto"
Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True">
<localView:BeWoView
x:Class="BeWo.View.Detail.GroupOfPeopleView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localSearchView="clr-namespace:BeWo.View.Search"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:val="clr-namespace:BeWo.Validation"
Width="Auto"
Height="Auto"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Focusable="True">
<Grid>
<GroupBox Style="{StaticResource PopUpWindowStyle}">
<GroupBox.Header>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0">
<Image Source="..\..\Ressources\Icons\UserGroupBusinessDisabled.png" RenderTransformOrigin="0.5,0.5" Width="Auto" Height="28" Margin="0,0,0,0">
<StackPanel
Margin="0"
VerticalAlignment="Center"
Orientation="Horizontal">
<Image
Width="Auto"
Height="28"
Margin="0,0,0,0"
RenderTransformOrigin="0.5,0.5"
Source="..\..\Ressources\Icons\UserGroupBusinessDisabled.png">
<Image.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
@@ -22,7 +34,14 @@
</TransformGroup>
</Image.RenderTransform>
</Image>
<TextBlock Text="Gruppe bearbeiten" Margin="10,4,0,0" Background="{x:Null}" Foreground="#FFFFFFFF" FontSize="20" VerticalAlignment="Stretch" Padding="0,0,0,0" />
<TextBlock
Margin="10,4,0,0"
Padding="0,0,0,0"
VerticalAlignment="Stretch"
Background="{x:Null}"
FontSize="20"
Foreground="#FFFFFFFF"
Text="Gruppe bearbeiten" />
</StackPanel>
</GroupBox.Header>
<Grid Margin="0,0,0,0" Background="{DynamicResource ObjectEditBackgroundBrush}">
@@ -31,8 +50,11 @@
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Rectangle Fill="{DynamicResource TeamContentBrush}" Height="6" />
<Grid Grid.Row="1" Name="grid_root" Margin="10,10,10,0">
<Rectangle Height="6" Fill="{DynamicResource TeamContentBrush}" />
<Grid
Name="grid_root"
Grid.Row="1"
Margin="10,10,10,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
@@ -41,8 +63,11 @@
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<GroupBox Width="180" Header="Alle Gruppen" Style="{StaticResource ObjectEditGroupBox}">
<Grid >
<GroupBox
Width="180"
Header="Alle Gruppen"
Style="{StaticResource ObjectEditGroupBox}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
@@ -51,41 +76,106 @@
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal">
<Button x:Name="btnAddGroup" HorizontalAlignment="Right" Click="btnAddGroup_Click" Height="21" Margin="0,0,0,3" ToolTip="Neue Gruppe hinzufügen">
<Button
x:Name="btnAddGroup"
Height="21"
Margin="0,0,0,3"
HorizontalAlignment="Right"
Click="btnAddGroup_Click"
ToolTip="Neue Gruppe hinzufügen">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid Width="18" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,-2,0,0">
<Line X1="4" X2="12" Y1="8" Y2="8" Fill="{x:Null}" Stroke="#FFFFFFFF" StrokeStartLineCap="Round" StrokeEndLineCap="Round" StrokeThickness="2" HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="16" />
<Line X1="8" X2="8" Y1="4" Y2="12" Fill="{x:Null}" Stroke="#FFFFFFFF" StrokeStartLineCap="Round" StrokeEndLineCap="Round" StrokeThickness="2" HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="16" />
<Grid
Width="18"
Margin="0,-2,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<Line
Width="16"
Height="16"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Fill="{x:Null}"
Stroke="#FFFFFFFF"
StrokeEndLineCap="Round"
StrokeStartLineCap="Round"
StrokeThickness="2"
X1="4"
X2="12"
Y1="8"
Y2="8" />
<Line
Width="16"
Height="16"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Fill="{x:Null}"
Stroke="#FFFFFFFF"
StrokeEndLineCap="Round"
StrokeStartLineCap="Round"
StrokeThickness="2"
X1="8"
X2="8"
Y1="4"
Y2="12" />
</Grid>
<TextBlock Grid.Column="1" Text="Neue Gruppe"></TextBlock>
<TextBlock Grid.Column="1" Text="Neue Gruppe" />
</Grid>
</Button>
</StackPanel>
<ListBox Grid.Row="1" ItemsSource="{Binding VMList}" SelectedItem="{Binding EditVM}">
<ListBox
Grid.Row="1"
ItemsSource="{Binding VMList}"
SelectedItem="{Binding EditVM}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Button Style="{StaticResource {x:Type Button}}" HorizontalAlignment="Center" VerticalAlignment="Center" Height="18" Padding="0" Width="{Binding RelativeSource={RelativeSource Self}, Path=ActualHeight}" Margin="3 0 0 0" Click="button_removegroup_Click" Tag="{Binding}" ToolTip="Entfernen">
<Button
Width="{Binding RelativeSource={RelativeSource Self}, Path=ActualHeight}"
Height="18"
Margin="3,0,0,0"
Padding="0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Click="button_removegroup_Click"
Style="{StaticResource {x:Type Button}}"
Tag="{Binding}"
ToolTip="Entfernen">
<Canvas HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Path Stroke="White" StrokeThickness="1.5" Data="M -3,-3 L 3, 3" StrokeStartLineCap="Round" StrokeEndLineCap="Round" />
<Path Stroke="White" StrokeThickness="1.5" Data="M 3,-3 L -3, 3" StrokeStartLineCap="Round" StrokeEndLineCap="Round" />
<Path
Data="M -3,-3 L 3, 3"
Stroke="White"
StrokeEndLineCap="Round"
StrokeStartLineCap="Round"
StrokeThickness="1.5" />
<Path
Data="M 3,-3 L -3, 3"
Stroke="White"
StrokeEndLineCap="Round"
StrokeStartLineCap="Round"
StrokeThickness="1.5" />
</Canvas>
</Button>
<Label Margin="3 0 0 3" Padding="0" Content="{Binding Path=Name}" />
<Label
Margin="3,0,0,3"
Padding="0"
Content="{Binding Path=Name}" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</GroupBox>
<Grid Margin="10,0,0,0" Grid.Column="1" DataContext="{Binding EditVM}" >
<Grid
Grid.Column="1"
Margin="10,0,0,0"
DataContext="{Binding EditVM}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="250" />
@@ -100,11 +190,22 @@
<RowDefinition Height="0" />
</Grid.RowDefinitions>
<Label IsEnabled="{Binding Converter={StaticResource ObjectBoolConverter}}" >Name der Gruppe</Label>
<Label IsEnabled="{Binding Converter={StaticResource ObjectBoolConverter}}">Name der Gruppe</Label>
<TextBox Grid.Column="1" Height="23" Margin="3,0,3,0" Text="{val:ValidationBinding Path=Name, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding Converter={StaticResource ObjectBoolConverter}}" />
<TextBox
Grid.Column="1"
Height="23"
Margin="3,0,3,0"
IsEnabled="{Binding Converter={StaticResource ObjectBoolConverter}}"
Text="{val:ValidationBinding Path=Name,
UpdateSourceTrigger=PropertyChanged}" />
<GroupBox Grid.Row="3" Grid.ColumnSpan="4" Header="Mitglieder hinzufügen" Margin="3,15,0,0" Style="{DynamicResource ObjectEditGroupBox}" >
<GroupBox
Grid.Row="3"
Grid.ColumnSpan="4"
Margin="3,15,0,0"
Header="Mitglieder hinzufügen"
Style="{DynamicResource ObjectEditGroupBox}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="220" />
@@ -116,32 +217,97 @@
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label VerticalAlignment="Bottom" IsEnabled="{Binding Converter={StaticResource ObjectBoolConverter}}" Content="{markup:Translate Zugeordnete Hilfepläne}" />
<Label
VerticalAlignment="Bottom"
Content="{markup:Translate Zugeordnete Hilfepläne}"
IsEnabled="{Binding Converter={StaticResource ObjectBoolConverter}}" />
<ListBox Name="listbox_teamMember" Grid.Row="1" ItemsSource="{Binding Path=SupportConceptList}" IsEnabled="{Binding Converter={StaticResource ObjectBoolConverter}}" >
<ListBox
Name="listbox_teamMember"
Grid.Row="1"
IsEnabled="{Binding Converter={StaticResource ObjectBoolConverter}}"
ItemsSource="{Binding Path=SupportConceptList}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Button Style="{StaticResource {x:Type Button}}" HorizontalAlignment="Center" VerticalAlignment="Center" Height="18" Padding="0" Width="{Binding RelativeSource={RelativeSource Self}, Path=ActualHeight}" Margin="3 0 0 0" Click="button_remove_Click" Tag="{Binding}" ToolTip="Entfernen">
<Button
Width="{Binding RelativeSource={RelativeSource Self}, Path=ActualHeight}"
Height="18"
Margin="3,0,0,0"
Padding="0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Click="button_remove_Click"
Style="{StaticResource {x:Type Button}}"
Tag="{Binding}"
ToolTip="Entfernen">
<Canvas HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Path Stroke="White" StrokeThickness="1.5" Data="M -3,-3 L 3, 3" StrokeStartLineCap="Round" StrokeEndLineCap="Round" />
<Path Stroke="White" StrokeThickness="1.5" Data="M 3,-3 L -3, 3" StrokeStartLineCap="Round" StrokeEndLineCap="Round" />
<Path
Data="M -3,-3 L 3, 3"
Stroke="White"
StrokeEndLineCap="Round"
StrokeStartLineCap="Round"
StrokeThickness="1.5" />
<Path
Data="M 3,-3 L -3, 3"
Stroke="White"
StrokeEndLineCap="Round"
StrokeStartLineCap="Round"
StrokeThickness="1.5" />
</Canvas>
</Button>
<Label Margin="3 0 0 3" Padding="0" Content="{Binding Path=LastName}" />
<Label Margin="0" Padding="0" Content=", " />
<Label Margin="0" Padding="0" Content="{Binding Path=FirstName}" />
<Label Margin="0" Padding="0" Content=", " />
<Label Margin="0" Padding="0" Content="{Binding Path=FirstCostBearerDetailString}" />
<Label
Margin="3,0,0,3"
Padding="0"
Content="{Binding Path=LastName}" />
<Label
Margin="0"
Padding="0"
Content=", " />
<Label
Margin="0"
Padding="0"
Content="{Binding Path=FirstName}" />
<Label
Margin="0"
Padding="0"
Content=", " />
<Label
Margin="0"
Padding="0"
Content="{Binding Path=FirstCostBearerDetailString}" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Button Name="button_add" Grid.Row="2" Content="&lt;" FontWeight="Bold" Width="25" Grid.Column="1" VerticalAlignment="Center" Height="25" MinWidth="30" Margin="3" ToolTip="Neues Gruppenmitglied hinzufügen" Click="button_add_Click" IsEnabled="{Binding Converter={StaticResource ObjectBoolConverter}}" />
<Button
Name="button_add"
Grid.Row="2"
Grid.Column="1"
Width="25"
Height="25"
MinWidth="30"
Margin="3"
VerticalAlignment="Center"
Click="button_add_Click"
Content="&lt;"
FontWeight="Bold"
IsEnabled="{Binding Converter={StaticResource ObjectBoolConverter}}"
ToolTip="Neues Gruppenmitglied hinzufügen" />
<Label VerticalAlignment="Bottom" Grid.Column="2" IsEnabled="{Binding Converter={StaticResource ObjectBoolConverter}}" Content="{markup:Translate Verfügbare Hilfepläne}"/>
<localSearchView:SupportConceptSearchView x:Name="SupportConceptSearchView" IsMultiSelect="True" Grid.Column="2" Grid.Row="1" SearchMode="ActiveCostbearer2SupportConcepts" ShowFilterPanel="True"/>
<Label
Grid.Column="2"
VerticalAlignment="Bottom"
Content="{markup:Translate Verfügbare Hilfepläne}"
IsEnabled="{Binding Converter={StaticResource ObjectBoolConverter}}" />
<localSearchView:SupportConceptSearchView
x:Name="SupportConceptSearchView"
Grid.Row="1"
Grid.Column="2"
IsMultiSelect="True"
SearchMode="ActiveCostbearer2SupportConcepts"
ShowFilterPanel="True" />
</Grid>
</GroupBox>
@@ -149,18 +315,41 @@
</Grid>
</Grid>
<Border Grid.Row="2" Grid.ColumnSpan="3" Height="40" Margin="0,10,0,0" VerticalAlignment="Stretch" Background="#FF000000">
<Border
Grid.Row="2"
Grid.ColumnSpan="3"
Height="40"
Margin="0,10,0,0"
VerticalAlignment="Stretch"
Background="#FF000000">
<Border.OpacityMask>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#19000000" Offset="0" />
<GradientStop Color="#33FFFFFF" Offset="1" />
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#19000000" />
<GradientStop Offset="1" Color="#33FFFFFF" />
</LinearGradientBrush>
</Border.OpacityMask>
</Border>
<StackPanel Grid.ColumnSpan="3" Grid.Row="2" Orientation="Horizontal" VerticalAlignment="Center" Height="Auto" Margin="5,10,0,0" HorizontalAlignment="Right">
<Button x:Name="btnSave" Content="Speichern und schließen" Margin="0,0,2,0" Command="ApplicationCommands.Save" Height="25" />
<Button x:Name="btnClose" Content="Schließen" Margin="0,0,3,0" Command="ApplicationCommands.Close" Height="25" />
<StackPanel
Grid.Row="2"
Grid.ColumnSpan="3"
Height="Auto"
Margin="5,10,0,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Orientation="Horizontal">
<Button
x:Name="btnSave"
Height="25"
Margin="0,0,2,0"
Command="ApplicationCommands.Save"
Content="Speichern und schließen" />
<Button
x:Name="btnClose"
Height="25"
Margin="0,0,3,0"
Command="ApplicationCommands.Close"
Content="Schließen" />
</StackPanel>
</Grid>
</GroupBox>

View File

@@ -1,15 +1,21 @@
<Window x:Class="BeWo.View.Detail.MailMergeWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:detail="clr-namespace:BeWo.View.Detail"
xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:controls="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
WindowStyle="None"
AllowsTransparency="True"
Background="Transparent"
Title="MailMergeWindow" Height="530" Width="750" ResizeMode="NoResize" WindowStartupLocation="CenterOwner" x:Name="SerienbriefFenster">
<Window
x:Class="BeWo.View.Detail.MailMergeWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:detail="clr-namespace:BeWo.View.Detail"
x:Name="SerienbriefFenster"
Title="MailMergeWindow"
Width="750"
Height="530"
AllowsTransparency="True"
Background="Transparent"
ResizeMode="NoResize"
WindowStartupLocation="CenterOwner"
WindowStyle="None">
<Window.Resources>
<!-- Region HilfeplanTemplate -->
<!-- Region HilfeplanTemplate -->
<Style x:Key="SupportConceptMailMergeDetailStyle" TargetType="{x:Type ListBoxItem}">
<Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, AncestorType={x:Type ItemsControl}, Mode=FindAncestor}}" />
<Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, AncestorType={x:Type ItemsControl}, Mode=FindAncestor}}" />
@@ -18,16 +24,28 @@
<Setter.Value>
<ControlTemplate>
<Grid x:Name="PART_DeinGridIstNichtMeinGridIstMeinUngrid">
<Border x:Name="ItemBorder" CornerRadius="5" MinHeight="30" Background="#FF000000">
<Border
x:Name="ItemBorder"
MinHeight="30"
Background="#FF000000"
CornerRadius="5">
<Border.OpacityMask>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#19000000" Offset="0" />
<GradientStop Color="#26000000" Offset="1" />
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#19000000" />
<GradientStop Offset="1" Color="#26000000" />
</LinearGradientBrush>
</Border.OpacityMask>
</Border>
<Border x:Name="ItemContent" CornerRadius="5" MinHeight="30">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5,3,5,3" OpacityMask="{x:Null}" SnapsToDevicePixels="True">
<Border
x:Name="ItemContent"
MinHeight="30"
CornerRadius="5">
<Grid
Margin="5,3,5,3"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
OpacityMask="{x:Null}"
SnapsToDevicePixels="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" MinWidth="250" />
@@ -38,20 +56,56 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<CheckBox x:Name="cb1" Grid.RowSpan="2" Margin="3" Tag="{Binding}" Checked="CheckBoxChecked" Unchecked="CheckBoxUnChecked" VerticalAlignment="Center" HorizontalAlignment="Center" Height="21" Width="21">
<CheckBox
x:Name="cb1"
Grid.RowSpan="2"
Width="21"
Height="21"
Margin="3"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Checked="CheckBoxChecked"
Tag="{Binding}"
Unchecked="CheckBoxUnChecked">
<CheckBox.IsChecked>
<MultiBinding Converter="{StaticResource CollectionContainsTag2BoolConverter}">
<Binding ElementName="cb1" Path="Tag"/>
<Binding Path="DataContext.SelectedForPrinting" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Window} }"/>
<Binding ElementName="cb1" Path="Tag" />
<Binding Path="DataContext.SelectedForPrinting" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Window}}" />
</MultiBinding>
</CheckBox.IsChecked>
</CheckBox>
<TextBlock x:Name="txtDetail1" Grid.Column="1" Grid.Row="0" Text="{Binding Path=DetailDescription}" FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" />
<TextBlock x:Name="txtDetail2" Grid.Column="1" Grid.Row="1" Text="{Binding Path=AddressString}" FontSize="12" Foreground="#FFA0A0A0" FontFamily="Microsoft Sans Serif" />
<ListBox x:Name="listBoxDetail3" Grid.Row="0" Grid.Column="2" Grid.RowSpan="2" ItemsSource="{Binding Path=CostBearerDetailStrings}" FontSize="12" Foreground="{Binding ForegroundBrush}" FontFamily="Microsoft Sans Serif" Background="Transparent" BorderThickness="0" IsHitTestVisible="False" Margin="6,0,0,0">
<TextBlock
x:Name="txtDetail1"
Grid.Row="0"
Grid.Column="1"
FontFamily="Microsoft Sans Serif"
FontSize="14"
Foreground="#FFD2D2D2"
Text="{Binding Path=DetailDescription}" />
<TextBlock
x:Name="txtDetail2"
Grid.Row="1"
Grid.Column="1"
FontFamily="Microsoft Sans Serif"
FontSize="12"
Foreground="#FFA0A0A0"
Text="{Binding Path=AddressString}" />
<ListBox
x:Name="listBoxDetail3"
Grid.Row="0"
Grid.RowSpan="2"
Grid.Column="2"
Margin="6,0,0,0"
Background="Transparent"
BorderThickness="0"
FontFamily="Microsoft Sans Serif"
FontSize="12"
Foreground="{Binding ForegroundBrush}"
IsHitTestVisible="False"
ItemsSource="{Binding Path=CostBearerDetailStrings}">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type ListBox}, Mode=FindAncestor}}"/>
<TextBlock Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType={x:Type ListBox}, Mode=FindAncestor}}" Text="{Binding}" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
@@ -60,26 +114,26 @@
</Grid>
<ControlTemplate.Triggers>
<DataTrigger Binding="{Binding Path=IsArchived}" Value="True">
<Setter Property="Foreground" TargetName="txtDetail1" Value="#FF808080" />
<Setter Property="Foreground" TargetName="txtDetail2" Value="#FF808080" />
<Setter Property="Foreground" TargetName="listBoxDetail3" Value="#FF808080" />
<Setter TargetName="txtDetail1" Property="Foreground" Value="#FF808080" />
<Setter TargetName="txtDetail2" Property="Foreground" Value="#FF808080" />
<Setter TargetName="listBoxDetail3" Property="Foreground" Value="#FF808080" />
</DataTrigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="OpacityMask" TargetName="ItemBorder">
<Setter TargetName="ItemBorder" Property="OpacityMask">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#33000000" Offset="0" />
<GradientStop Color="#66000000" Offset="1" />
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#33000000" />
<GradientStop Offset="1" Color="#66000000" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="ListBoxItem.IsSelected" Value="True">
<Setter Property="OpacityMask" TargetName="ItemBorder">
<Setter TargetName="ItemBorder" Property="OpacityMask">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#99000000" Offset="0" />
<GradientStop Color="#CC000000" Offset="1" />
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#99000000" />
<GradientStop Offset="1" Color="#CC000000" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
@@ -89,11 +143,11 @@
<Condition Property="ListBoxItem.IsSelected" Value="True" />
<Condition Property="Selector.IsSelectionActive" Value="False" />
</MultiTrigger.Conditions>
<Setter Property="OpacityMask" TargetName="ItemBorder">
<Setter TargetName="ItemBorder" Property="OpacityMask">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#99000000" Offset="0" />
<GradientStop Color="#B2000000" Offset="1" />
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#99000000" />
<GradientStop Offset="1" Color="#B2000000" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
@@ -103,10 +157,10 @@
</Setter.Value>
</Setter>
</Style>
<!-- EndRegion HilfeplanTemplate -->
<!-- EndRegion HilfeplanTemplate -->
<!-- Region KlientenTemplate -->
<!-- Region KlientenTemplate -->
<Style x:Key="CustomerDetailStyle" TargetType="{x:Type ListBoxItem}">
<Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, AncestorType={x:Type ItemsControl}, Mode=FindAncestor}}" />
<Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, AncestorType={x:Type ItemsControl}, Mode=FindAncestor}}" />
@@ -115,16 +169,28 @@
<Setter.Value>
<ControlTemplate>
<Grid>
<Border x:Name="ItemBorder" CornerRadius="5" MinHeight="30" Background="#FF000000">
<Border
x:Name="ItemBorder"
MinHeight="30"
Background="#FF000000"
CornerRadius="5">
<Border.OpacityMask>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#19000000" Offset="0" />
<GradientStop Color="#26000000" Offset="1" />
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#19000000" />
<GradientStop Offset="1" Color="#26000000" />
</LinearGradientBrush>
</Border.OpacityMask>
</Border>
<Border x:Name="ItemContent" CornerRadius="5" MinHeight="30">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5,3,5,3" OpacityMask="{x:Null}" SnapsToDevicePixels="True">
<Border
x:Name="ItemContent"
MinHeight="30"
CornerRadius="5">
<Grid
Margin="5,3,5,3"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
OpacityMask="{x:Null}"
SnapsToDevicePixels="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" SharedSizeGroup="CustomerDetailColumn" />
@@ -135,50 +201,98 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<CheckBox x:Name="cb2" Grid.RowSpan="2" Margin="3" Tag="{Binding}" Checked="CheckBoxChecked" Unchecked="CheckBoxUnChecked" VerticalAlignment="Center" HorizontalAlignment="Center" Height="21" Width="21">
<CheckBox
x:Name="cb2"
Grid.RowSpan="2"
Width="21"
Height="21"
Margin="3"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Checked="CheckBoxChecked"
Tag="{Binding}"
Unchecked="CheckBoxUnChecked">
<CheckBox.IsChecked>
<MultiBinding Converter="{StaticResource CollectionContainsTag2BoolConverter}">
<Binding ElementName="cb2" Path="Tag"/>
<Binding Path="DataContext.SelectedForPrinting" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Window} }"/>
<Binding ElementName="cb2" Path="Tag" />
<Binding Path="DataContext.SelectedForPrinting" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Window}}" />
</MultiBinding>
</CheckBox.IsChecked>
</CheckBox>
<StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal">
<TextBlock x:Name="txtDetail1" Text="{Binding Path=SimpleDescription}" FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" />
<TextBlock x:Name="txtDetail2" Text="{Binding Path=DateOfBirthString}" Margin="6,0,0,0" FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" />
<StackPanel
Grid.Row="0"
Grid.Column="1"
Orientation="Horizontal">
<TextBlock
x:Name="txtDetail1"
FontFamily="Microsoft Sans Serif"
FontSize="14"
Foreground="#FFD2D2D2"
Text="{Binding Path=SimpleDescription}" />
<TextBlock
x:Name="txtDetail2"
Margin="6,0,0,0"
FontFamily="Microsoft Sans Serif"
FontSize="14"
Foreground="#FFD2D2D2"
Text="{Binding Path=DateOfBirthString}" />
</StackPanel>
<StackPanel Grid.Column="1" Grid.Row="1" Orientation="Horizontal">
<TextBlock x:Name="txtDetail3" Text="{Binding Path=AddressString}" FontSize="12" Foreground="#FFA0A0A0" FontFamily="Microsoft Sans Serif" />
<StackPanel
Grid.Row="1"
Grid.Column="1"
Orientation="Horizontal">
<TextBlock
x:Name="txtDetail3"
FontFamily="Microsoft Sans Serif"
FontSize="12"
Foreground="#FFA0A0A0"
Text="{Binding Path=AddressString}" />
</StackPanel>
<TextBlock Grid.Row="0" Grid.Column="2" x:Name="txtDetail4" Text="{Binding Path=CurrentEmployeeRole}" Margin="16,0,0,0" FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" />
<TextBlock Grid.Column="2" Grid.Row="1" x:Name="txtDetail5" Text="{Binding Path=MainAttendant}" Margin="16,0,0,0" FontSize="14" Foreground="#FFA0A0A0" FontFamily="Microsoft Sans Serif" />
<TextBlock
x:Name="txtDetail4"
Grid.Row="0"
Grid.Column="2"
Margin="16,0,0,0"
FontFamily="Microsoft Sans Serif"
FontSize="14"
Foreground="#FFD2D2D2"
Text="{Binding Path=CurrentEmployeeRole}" />
<TextBlock
x:Name="txtDetail5"
Grid.Row="1"
Grid.Column="2"
Margin="16,0,0,0"
FontFamily="Microsoft Sans Serif"
FontSize="14"
Foreground="#FFA0A0A0"
Text="{Binding Path=MainAttendant}" />
</Grid>
</Border>
</Grid>
<ControlTemplate.Triggers>
<DataTrigger Binding="{Binding Path=IsArchived}" Value="True">
<Setter Property="Foreground" TargetName="txtDetail1" Value="#FF808080" />
<Setter Property="Foreground" TargetName="txtDetail2" Value="#FF808080" />
<Setter Property="Foreground" TargetName="txtDetail3" Value="#FF808080" />
<Setter Property="Foreground" TargetName="txtDetail4" Value="#FF808080" />
<Setter Property="Foreground" TargetName="txtDetail5" Value="#FF808080" />
<Setter TargetName="txtDetail1" Property="Foreground" Value="#FF808080" />
<Setter TargetName="txtDetail2" Property="Foreground" Value="#FF808080" />
<Setter TargetName="txtDetail3" Property="Foreground" Value="#FF808080" />
<Setter TargetName="txtDetail4" Property="Foreground" Value="#FF808080" />
<Setter TargetName="txtDetail5" Property="Foreground" Value="#FF808080" />
</DataTrigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="OpacityMask" TargetName="ItemBorder">
<Setter TargetName="ItemBorder" Property="OpacityMask">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#33000000" Offset="0" />
<GradientStop Color="#66000000" Offset="1" />
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#33000000" />
<GradientStop Offset="1" Color="#66000000" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="ListBoxItem.IsSelected" Value="True">
<Setter Property="OpacityMask" TargetName="ItemBorder">
<Setter TargetName="ItemBorder" Property="OpacityMask">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#99000000" Offset="0" />
<GradientStop Color="#CC000000" Offset="1" />
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#99000000" />
<GradientStop Offset="1" Color="#CC000000" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
@@ -188,11 +302,11 @@
<Condition Property="ListBoxItem.IsSelected" Value="True" />
<Condition Property="Selector.IsSelectionActive" Value="False" />
</MultiTrigger.Conditions>
<Setter Property="OpacityMask" TargetName="ItemBorder">
<Setter TargetName="ItemBorder" Property="OpacityMask">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#99000000" Offset="0" />
<GradientStop Color="#B2000000" Offset="1" />
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#99000000" />
<GradientStop Offset="1" Color="#B2000000" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
@@ -202,10 +316,10 @@
</Setter.Value>
</Setter>
</Style>
<!-- EndRegion KlientenTemplate -->
<!-- EndRegion KlientenTemplate -->
<!-- Region PersonenTemplate -->
<!-- Region PersonenTemplate -->
<Style x:Key="PersonDetailStyle" TargetType="{x:Type ListBoxItem}">
<Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, AncestorType={x:Type ItemsControl}, Mode=FindAncestor}}" />
<Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, AncestorType={x:Type ItemsControl}, Mode=FindAncestor}}" />
@@ -214,92 +328,165 @@
<Setter.Value>
<ControlTemplate>
<Grid>
<Border x:Name="ItemBorder" CornerRadius="5" MinHeight="30" Background="#FF000000">
<Border
x:Name="ItemBorder"
MinHeight="30"
Background="#FF000000"
CornerRadius="5">
<Border.OpacityMask>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#19000000" Offset="0" />
<GradientStop Color="#26000000" Offset="1" />
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#19000000" />
<GradientStop Offset="1" Color="#26000000" />
</LinearGradientBrush>
</Border.OpacityMask>
</Border>
<Border x:Name="ItemContent" CornerRadius="5" MinHeight="30">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5,3,5,3" OpacityMask="{x:Null}" SnapsToDevicePixels="True" >
<Border
x:Name="ItemContent"
MinHeight="30"
CornerRadius="5">
<Grid
Margin="5,3,5,3"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
OpacityMask="{x:Null}"
SnapsToDevicePixels="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="personDetailColumn1"/>
<ColumnDefinition Width="Auto" SharedSizeGroup="personDetailColumn2"/>
<ColumnDefinition Width="Auto" SharedSizeGroup="personDetailColumn3"/>
<ColumnDefinition Width="Auto" SharedSizeGroup="personDetailColumn1" />
<ColumnDefinition Width="Auto" SharedSizeGroup="personDetailColumn2" />
<ColumnDefinition Width="Auto" SharedSizeGroup="personDetailColumn3" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<CheckBox x:Name="cb3" Grid.RowSpan="2" Margin="3" Tag="{Binding}" Checked="CheckBoxChecked" Unchecked="CheckBoxUnChecked" VerticalAlignment="Center" HorizontalAlignment="Center" Height="21" Width="21">
<CheckBox
x:Name="cb3"
Grid.RowSpan="2"
Width="21"
Height="21"
Margin="3"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Checked="CheckBoxChecked"
Tag="{Binding}"
Unchecked="CheckBoxUnChecked">
<CheckBox.IsChecked>
<MultiBinding Converter="{StaticResource CollectionContainsTag2BoolConverter}">
<Binding ElementName="cb3" Path="Tag"/>
<Binding Path="DataContext.SelectedForPrinting" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Window} }"/>
<Binding ElementName="cb3" Path="Tag" />
<Binding Path="DataContext.SelectedForPrinting" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Window}}" />
</MultiBinding>
</CheckBox.IsChecked>
</CheckBox>
<TextBlock x:Name="txtDetail1" Grid.Row="0" Grid.Column="1" Text="{Binding Path=DetailDescription}" FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" />
<TextBlock x:Name="txtDetail2" Grid.Column="1" Grid.Row="1" Text="{Binding Path=AddressString}" FontSize="12" Foreground="#FFA0A0A0" FontFamily="Microsoft Sans Serif" />
<TextBlock x:Name="txtDetail3" Grid.Row="0" Grid.Column="2" Text="{Binding Path=Function}" FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" Margin="10,0,10,0"/>
<TextBlock Visibility="Collapsed" x:Name="txtDetail4" Grid.Column="3" Grid.Row="0" Grid.RowSpan="2" Text="{Binding Path=ContactSummaryInfo}" FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" />
<StackPanel Orientation="Vertical" Grid.Column="3" Grid.Row="0" Grid.RowSpan="2">
<TextBlock FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif">
<TextBlock
x:Name="txtDetail1"
Grid.Row="0"
Grid.Column="1"
FontFamily="Microsoft Sans Serif"
FontSize="14"
Foreground="#FFD2D2D2"
Text="{Binding Path=DetailDescription}" />
<TextBlock
x:Name="txtDetail2"
Grid.Row="1"
Grid.Column="1"
FontFamily="Microsoft Sans Serif"
FontSize="12"
Foreground="#FFA0A0A0"
Text="{Binding Path=AddressString}" />
<TextBlock
x:Name="txtDetail3"
Grid.Row="0"
Grid.Column="2"
Margin="10,0,10,0"
FontFamily="Microsoft Sans Serif"
FontSize="14"
Foreground="#FFD2D2D2"
Text="{Binding Path=Function}" />
<TextBlock
x:Name="txtDetail4"
Grid.Row="0"
Grid.RowSpan="2"
Grid.Column="3"
FontFamily="Microsoft Sans Serif"
FontSize="14"
Foreground="#FFD2D2D2"
Text="{Binding Path=ContactSummaryInfo}"
Visibility="Collapsed" />
<StackPanel
Grid.Row="0"
Grid.RowSpan="2"
Grid.Column="3"
Orientation="Vertical">
<TextBlock
FontFamily="Microsoft Sans Serif"
FontSize="14"
Foreground="#FFD2D2D2">
<TextBlock.Visibility>
<Binding Path="Communication1">
<Binding.Converter>
<conv:ObjectVisibilityConverter/>
<conv:ObjectVisibilityConverter />
</Binding.Converter>
</Binding>
</TextBlock.Visibility>
<TextBlock.Text>
<MultiBinding StringFormat="{}Tel.: {0}">
<Binding Path="Communication1"/>
<Binding Path="Communication1" />
</MultiBinding>
</TextBlock.Text>
</TextBlock>
<TextBlock FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif">
<TextBlock
FontFamily="Microsoft Sans Serif"
FontSize="14"
Foreground="#FFD2D2D2">
<TextBlock.Visibility>
<Binding Path="Communication2">
<Binding.Converter>
<conv:ObjectVisibilityConverter/>
<conv:ObjectVisibilityConverter />
</Binding.Converter>
</Binding>
</TextBlock.Visibility>
<TextBlock.Text>
<MultiBinding StringFormat="{}Mobil: {0}">
<Binding Path="Communication2"/>
<Binding Path="Communication2" />
</MultiBinding>
</TextBlock.Text>
</TextBlock>
<TextBlock Text="EMail: " FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif">
<TextBlock
FontFamily="Microsoft Sans Serif"
FontSize="14"
Foreground="#FFD2D2D2"
Text="EMail: ">
<TextBlock.Visibility>
<Binding Path="Communication3">
<Binding.Converter>
<conv:ObjectVisibilityConverter/>
<conv:ObjectVisibilityConverter />
</Binding.Converter>
</Binding>
</TextBlock.Visibility>
<TextBlock FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif">
<TextBlock
FontFamily="Microsoft Sans Serif"
FontSize="14"
Foreground="#FFD2D2D2">
<TextBlock.Text>
<Binding Path="Communication3"/>
<Binding Path="Communication3" />
</TextBlock.Text>
</TextBlock>
</TextBlock>
</TextBlock>
<TextBlock FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif">
<TextBlock
FontFamily="Microsoft Sans Serif"
FontSize="14"
Foreground="#FFD2D2D2">
<TextBlock.Visibility>
<Binding Path="Communication4">
<Binding.Converter>
<conv:ObjectVisibilityConverter/>
<conv:ObjectVisibilityConverter />
</Binding.Converter>
</Binding>
</TextBlock.Visibility>
<TextBlock.Text>
<MultiBinding StringFormat="{}Fax: {0}">
<Binding Path="Communication4"/>
<Binding Path="Communication4" />
</MultiBinding>
</TextBlock.Text>
</TextBlock>
@@ -309,28 +496,28 @@
</Grid>
<ControlTemplate.Triggers>
<DataTrigger Binding="{Binding Path=IsArchived}" Value="True">
<Setter Property="Foreground" TargetName="txtDetail1" Value="#FF808080" />
<Setter Property="Foreground" TargetName="txtDetail2" Value="#FF808080" />
<Setter Property="Foreground" TargetName="txtDetail3" Value="#FF808080" />
<Setter Property="Foreground" TargetName="txtDetail4" Value="#FF808080" />
<Setter TargetName="txtDetail1" Property="Foreground" Value="#FF808080" />
<Setter TargetName="txtDetail2" Property="Foreground" Value="#FF808080" />
<Setter TargetName="txtDetail3" Property="Foreground" Value="#FF808080" />
<Setter TargetName="txtDetail4" Property="Foreground" Value="#FF808080" />
</DataTrigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="OpacityMask" TargetName="ItemBorder">
<Setter TargetName="ItemBorder" Property="OpacityMask">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#33000000" Offset="0" />
<GradientStop Color="#66000000" Offset="1" />
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#33000000" />
<GradientStop Offset="1" Color="#66000000" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="ListBoxItem.IsSelected" Value="True">
<Setter Property="OpacityMask" TargetName="ItemBorder">
<Setter TargetName="ItemBorder" Property="OpacityMask">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#99000000" Offset="0" />
<GradientStop Color="#CC000000" Offset="1" />
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#99000000" />
<GradientStop Offset="1" Color="#CC000000" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
@@ -340,11 +527,11 @@
<Condition Property="ListBoxItem.IsSelected" Value="True" />
<Condition Property="Selector.IsSelectionActive" Value="False" />
</MultiTrigger.Conditions>
<Setter Property="OpacityMask" TargetName="ItemBorder">
<Setter TargetName="ItemBorder" Property="OpacityMask">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#99000000" Offset="0" />
<GradientStop Color="#B2000000" Offset="1" />
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#99000000" />
<GradientStop Offset="1" Color="#B2000000" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
@@ -354,10 +541,10 @@
</Setter.Value>
</Setter>
</Style>
<!-- EndRegion PersonenTemplate -->
<!-- EndRegion PersonenTemplate -->
<!-- Region OrganisationenTemplate -->
<!-- Region OrganisationenTemplate -->
<Style x:Key="OrganisationDetailStyle" TargetType="{x:Type ListBoxItem}">
<Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, AncestorType={x:Type ItemsControl}, Mode=FindAncestor}}" />
<Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, AncestorType={x:Type ItemsControl}, Mode=FindAncestor}}" />
@@ -366,16 +553,28 @@
<Setter.Value>
<ControlTemplate>
<Grid>
<Border x:Name="ItemBorder" CornerRadius="5" MinHeight="30" Background="#FF000000">
<Border
x:Name="ItemBorder"
MinHeight="30"
Background="#FF000000"
CornerRadius="5">
<Border.OpacityMask>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#19000000" Offset="0" />
<GradientStop Color="#26000000" Offset="1" />
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#19000000" />
<GradientStop Offset="1" Color="#26000000" />
</LinearGradientBrush>
</Border.OpacityMask>
</Border>
<Border x:Name="ItemContent" CornerRadius="5" MinHeight="30">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5,3,5,3" OpacityMask="{x:Null}" SnapsToDevicePixels="True">
<Border
x:Name="ItemContent"
MinHeight="30"
CornerRadius="5">
<Grid
Margin="5,3,5,3"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
OpacityMask="{x:Null}"
SnapsToDevicePixels="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
@@ -384,40 +583,64 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<CheckBox x:Name="cb4" Checked="CheckBoxChecked" Unchecked="CheckBoxUnChecked" Grid.RowSpan="2" Margin="3" Tag="{Binding}" VerticalAlignment="Center" HorizontalAlignment="Center" Height="21" Width="21">
<CheckBox
x:Name="cb4"
Grid.RowSpan="2"
Width="21"
Height="21"
Margin="3"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Checked="CheckBoxChecked"
Tag="{Binding}"
Unchecked="CheckBoxUnChecked">
<CheckBox.IsChecked>
<MultiBinding Converter="{StaticResource CollectionContainsTag2BoolConverter}">
<Binding ElementName="cb4" Path="Tag"/>
<Binding Path="DataContext.SelectedForPrinting" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Window} }"/>
<Binding ElementName="cb4" Path="Tag" />
<Binding Path="DataContext.SelectedForPrinting" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Window}}" />
</MultiBinding>
</CheckBox.IsChecked>
</CheckBox>
<TextBlock x:Name="txtDetail1" Grid.Row="0" Grid.Column="1" Text="{Binding Path=DetailDescription}" FontSize="14" Foreground="#FFFFFFFF" FontFamily="Microsoft Sans Serif" />
<TextBlock x:Name="txtDetail2" Grid.Column="1" Grid.Row="1" Text="{Binding Path=AddressString}" FontSize="12" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" />
<TextBlock
x:Name="txtDetail1"
Grid.Row="0"
Grid.Column="1"
FontFamily="Microsoft Sans Serif"
FontSize="14"
Foreground="#FFFFFFFF"
Text="{Binding Path=DetailDescription}" />
<TextBlock
x:Name="txtDetail2"
Grid.Row="1"
Grid.Column="1"
FontFamily="Microsoft Sans Serif"
FontSize="12"
Foreground="#FFD2D2D2"
Text="{Binding Path=AddressString}" />
</Grid>
</Border>
</Grid>
<ControlTemplate.Triggers>
<DataTrigger Binding="{Binding Path=IsArchived}" Value="True">
<Setter Property="Foreground" TargetName="txtDetail1" Value="#FF808080" />
<Setter Property="Foreground" TargetName="txtDetail2" Value="#FF808080" />
<Setter TargetName="txtDetail1" Property="Foreground" Value="#FF808080" />
<Setter TargetName="txtDetail2" Property="Foreground" Value="#FF808080" />
</DataTrigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="OpacityMask" TargetName="ItemBorder">
<Setter TargetName="ItemBorder" Property="OpacityMask">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#33000000" Offset="0" />
<GradientStop Color="#66000000" Offset="1" />
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#33000000" />
<GradientStop Offset="1" Color="#66000000" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="ListBoxItem.IsSelected" Value="True">
<Setter Property="OpacityMask" TargetName="ItemBorder">
<Setter TargetName="ItemBorder" Property="OpacityMask">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#99000000" Offset="0" />
<GradientStop Color="#CC000000" Offset="1" />
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#99000000" />
<GradientStop Offset="1" Color="#CC000000" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
@@ -427,11 +650,11 @@
<Condition Property="ListBoxItem.IsSelected" Value="True" />
<Condition Property="Selector.IsSelectionActive" Value="False" />
</MultiTrigger.Conditions>
<Setter Property="OpacityMask" TargetName="ItemBorder">
<Setter TargetName="ItemBorder" Property="OpacityMask">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#99000000" Offset="0" />
<GradientStop Color="#B2000000" Offset="1" />
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#99000000" />
<GradientStop Offset="1" Color="#B2000000" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
@@ -441,16 +664,17 @@
</Setter.Value>
</Setter>
</Style>
<!-- EndRegion OrganisationenTemplate -->
<!-- EndRegion OrganisationenTemplate -->
<detail:ListBoxItemStyleSelector x:Key="StyleSelector"
SupportConceptStyle="{StaticResource SupportConceptMailMergeDetailStyle}"
PersonStyle="{StaticResource PersonDetailStyle}"
CustomerStyle="{StaticResource CustomerDetailStyle}"
OrganisationStyle="{StaticResource OrganisationDetailStyle}" />
<detail:ListBoxItemStyleSelector
x:Key="StyleSelector"
CustomerStyle="{StaticResource CustomerDetailStyle}"
OrganisationStyle="{StaticResource OrganisationDetailStyle}"
PersonStyle="{StaticResource PersonDetailStyle}"
SupportConceptStyle="{StaticResource SupportConceptMailMergeDetailStyle}" />
</Window.Resources>
<GroupBox Style="{DynamicResource MainContentGroupBoxWithoutMaximizeBtnStyle}" Header="Serienbrief drucken...">
<GroupBox Header="Serienbrief drucken..." Style="{DynamicResource MainContentGroupBoxWithoutMaximizeBtnStyle}">
<Grid Margin="0,3,0,0" Background="{DynamicResource ObjectEditBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@@ -464,29 +688,107 @@
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
<Grid
Grid.Row="0"
Grid.Column="0"
Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Margin="3" Content="Vorlage" />
<controls:NullItemComboBox x:Name="VorlagenComboBox" Grid.Row="0" Grid.Column="1" Margin="3" DisplayMemberPath="FileName" ItemsSource="{Binding Path=WordTemplates, UpdateSourceTrigger=PropertyChanged}" SelectedIndex="0"/>
<Label
Grid.Row="0"
Grid.Column="0"
Margin="3"
Content="Vorlage" />
<controls:NullItemComboBox
x:Name="VorlagenComboBox"
Grid.Row="0"
Grid.Column="1"
Margin="3"
DisplayMemberPath="FileName"
ItemsSource="{Binding Path=WordTemplates, UpdateSourceTrigger=PropertyChanged}"
SelectedIndex="0" />
</Grid>
<StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="0" Margin="3" Grid.ColumnSpan="2">
<Label Content="Suche" FontSize="14" Margin="0,-5,0,0" />
<TextBox Foreground="Black" Height="20" x:Name="TextboxSearch" MinWidth="90" Margin="3,-5,0,0" Width="300" TabIndex="0" Template="{DynamicResource SearchTextBoxTemplate}" BorderThickness="0,0,0,0" />
<TextBlock Margin="3,0,0,0" Foreground="Black" Text="{Binding Path=Items.Count, Converter={StaticResource StringFormatConverter}, ConverterParameter=Suchergebnisse: \{0\}, ElementName=ObjectListBox}" FontFamily="Microsoft Sans Serif" FontSize="14" />
<StackPanel
Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="2"
Margin="3"
Orientation="Horizontal">
<Label
Margin="0,-5,0,0"
Content="Suche"
FontSize="14" />
<TextBox
x:Name="TextboxSearch"
Width="300"
Height="20"
MinWidth="90"
Margin="3,-5,0,0"
BorderThickness="0,0,0,0"
Foreground="Black"
TabIndex="0"
Template="{DynamicResource SearchTextBoxTemplate}" />
<TextBlock
Margin="3,0,0,0"
FontFamily="Microsoft Sans Serif"
FontSize="14"
Foreground="Black"
Text="{Binding Path=Items.Count, Converter={StaticResource StringFormatConverter}, ConverterParameter=Suchergebnisse: \{0\}, ElementName=ObjectListBox}" />
</StackPanel>
<StackPanel Orientation="Horizontal" x:Name="SortPanel" Margin="3" Grid.Row="2" Grid.Column="0">
<TextBlock Foreground="Black" HorizontalAlignment="Left" Text="Sortiert nach" FontFamily="Microsoft Sans Serif" FontSize="12" Margin="6,2,0,0" />
<controls:NullItemComboBox x:Name="SortCombo" HorizontalAlignment="Left" FontFamily="Microsoft Sans Serif" FontSize="12" Margin="10,0,0,0" MinWidth="100" DisplayMemberPath="DisplayName" SelectionChanged="SortCombo_SelectionChanged" Style="{DynamicResource SortComboBox}" />
<ToggleButton Style="{DynamicResource SortDirectionToggleButtonStyle}" x:Name="SortDirectionToggleButton" Click="SortDirectionToggleButton_Click" />
<StackPanel
x:Name="SortPanel"
Grid.Row="2"
Grid.Column="0"
Margin="3"
Orientation="Horizontal">
<TextBlock
Margin="6,2,0,0"
HorizontalAlignment="Left"
FontFamily="Microsoft Sans Serif"
FontSize="12"
Foreground="Black"
Text="Sortiert nach" />
<controls:NullItemComboBox
x:Name="SortCombo"
MinWidth="100"
Margin="10,0,0,0"
HorizontalAlignment="Left"
DisplayMemberPath="DisplayName"
FontFamily="Microsoft Sans Serif"
FontSize="12"
SelectionChanged="SortCombo_SelectionChanged"
Style="{DynamicResource SortComboBox}" />
<ToggleButton
x:Name="SortDirectionToggleButton"
Click="SortDirectionToggleButton_Click"
Style="{DynamicResource SortDirectionToggleButtonStyle}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Right">
<CheckBox x:Name="ChkShowArchived" Margin="3" VerticalAlignment="Center" Unchecked="ChkShowArchived_OnUnchecked" />
<CheckBox x:Name="ChkShowOnlyMyObjects" Click="ChkShowOnlyMyObjects_OnClick" Margin="3" VerticalAlignment="Center" Unchecked="ChkShowArchived_OnUnchecked" />
<StackPanel
Grid.Row="2"
Grid.Column="1"
HorizontalAlignment="Right"
Orientation="Horizontal">
<CheckBox
x:Name="ChkShowArchived"
Margin="3"
VerticalAlignment="Center"
Unchecked="ChkShowArchived_OnUnchecked" />
<CheckBox
x:Name="ChkShowOnlyMyObjects"
Margin="3"
VerticalAlignment="Center"
Click="ChkShowOnlyMyObjects_OnClick"
Unchecked="ChkShowArchived_OnUnchecked" />
</StackPanel>
<ListBox x:Name="ObjectListBox" Grid.Row="3" Grid.Column="0" Margin="3" Grid.ColumnSpan="2" ItemContainerStyleSelector="{StaticResource StyleSelector}">
<ListBox
x:Name="ObjectListBox"
Grid.Row="3"
Grid.Column="0"
Grid.ColumnSpan="2"
Margin="3"
ItemContainerStyleSelector="{StaticResource StyleSelector}">
<ListBox.ItemsSource>
<MultiBinding Converter="{StaticResource FilterDCConverter}">
<Binding />
@@ -494,19 +796,47 @@
<Binding ElementName="ChkShowArchived" Path="IsChecked" />
<Binding Path="CustomFilter">
<Binding.RelativeSource>
<RelativeSource Mode="FindAncestor" AncestorType="{x:Type detail:MailMergeWindow}" />
<RelativeSource AncestorType="{x:Type detail:MailMergeWindow}" Mode="FindAncestor" />
</Binding.RelativeSource>
</Binding>
</MultiBinding>
</ListBox.ItemsSource>
</ListBox>
<CheckBox x:Name="AlleWaehlenCheckBox" Content="Alle auswählen" Grid.Row="4" Grid.Column="0" Margin="3" Checked="AlleWaehlenCheckBox_OnChecked" Unchecked="AlleWehlenCheckBox_OnUnchecked" />
<StackPanel Orientation="Horizontal" Grid.Row="5" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center">
<Button Margin="3" Click="PreviewBtnClick" Content="Vorschau" IsEnabled="{Binding SelectedForPrinting.Count, Converter={StaticResource CollectionCountToBoolConverter}}" />
<Button Margin="3" Content="Drucken" Click="PrintBtnClick" IsEnabled="{Binding SelectedForPrinting.Count, Converter={StaticResource CollectionCountToBoolConverter}}" />
<CheckBox
x:Name="AlleWaehlenCheckBox"
Grid.Row="4"
Grid.Column="0"
Margin="3"
Checked="AlleWaehlenCheckBox_OnChecked"
Content="Alle auswählen"
Unchecked="AlleWehlenCheckBox_OnUnchecked" />
<StackPanel
Grid.Row="5"
Grid.Column="0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Orientation="Horizontal">
<Button
Margin="3"
Click="PreviewBtnClick"
Content="Vorschau"
IsEnabled="{Binding SelectedForPrinting.Count, Converter={StaticResource CollectionCountToBoolConverter}}" />
<Button
Margin="3"
Click="PrintBtnClick"
Content="Drucken"
IsEnabled="{Binding SelectedForPrinting.Count, Converter={StaticResource CollectionCountToBoolConverter}}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Grid.Row="5" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center">
<Button Margin="3" Content="Abbrechen" Command="Close" />
<StackPanel
Grid.Row="5"
Grid.Column="1"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Orientation="Horizontal">
<Button
Margin="3"
Command="Close"
Content="Abbrechen" />
</StackPanel>
</Grid>
</GroupBox>

View File

@@ -1,12 +1,15 @@
<Window x:Class="BeWo.View.Detail.ModalViewWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
WindowStartupLocation="CenterOwner"
WindowStyle="None"
AllowsTransparency="True"
Background="Transparent"
ResizeMode="CanResizeWithGrip">
<Grid x:Name="rootGrid">
</Grid>
<Window
x:Class="BeWo.View.Detail.ModalViewWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="Auto"
Height="Auto"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
AllowsTransparency="True"
Background="Transparent"
ResizeMode="CanResizeWithGrip"
WindowStartupLocation="CenterOwner"
WindowStyle="None">
<Grid x:Name="rootGrid" />
</Window>

View File

@@ -37,6 +37,7 @@ using DevExpress.Xpf.Editors;
using System.Windows.Navigation;
using System.Windows.Documents;
using System.Collections.ObjectModel;
using BeWo.View.Windows;
namespace BeWo.View.Detail
{

View File

@@ -1,250 +1,545 @@
<localView:BeWoView x:Class="BeWo.View.Detail.UserView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup" xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:localView="clr-namespace:BeWo.View" xmlns:localSearchView="clr-namespace:BeWo.View.Search" xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls" Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True">
<Grid>
<uc:ShadowChrome>
<GroupBox Style="{StaticResource MainContentGroupBoxStyle}">
<GroupBox.Header>
<StackPanel Orientation="Horizontal" VerticalAlignment="Bottom">
<Image Source="..\..\Ressources\Icons\UserBusinessMaleDisabled.png" RenderTransformOrigin="0.5,0.5" Stretch="Uniform" Width="32">
<Image.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="5" />
</TransformGroup>
</Image.RenderTransform>
</Image>
<TextBox Text="{Binding Path=Employee, Mode=OneWay}" Margin="10,0,0,0" Background="{x:Null}" Foreground="#FFFFFFFF" FontSize="22" BorderBrush="{x:Null}" VerticalAlignment="Bottom" Padding="0,0,0,0" />
</StackPanel>
</GroupBox.Header>
<Grid Margin="0,3,0,0" Background="{DynamicResource ObjectEditBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Rectangle Fill="{DynamicResource UserContentBrush}" Height="6" />
<TabControl x:Name="root" Grid.Row="1" Style="{StaticResource ObjectEditTabControl}" BorderThickness="0,0,0,0" Padding="4,4,4,4">
<TabItem Header="Details" IsSelected="True">
<localView:BeWoView
x:Class="BeWo.View.Detail.UserView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localSearchView="clr-namespace:BeWo.View.Search"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
Width="Auto"
Height="Auto"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Focusable="True">
<Grid>
<uc:ShadowChrome>
<GroupBox Style="{StaticResource MainContentGroupBoxStyle}">
<GroupBox.Header>
<StackPanel VerticalAlignment="Bottom" Orientation="Horizontal">
<Image
Width="32"
RenderTransformOrigin="0.5,0.5"
Source="..\..\Ressources\Icons\UserBusinessMaleDisabled.png"
Stretch="Uniform">
<Image.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="5" />
</TransformGroup>
</Image.RenderTransform>
</Image>
<TextBox
Margin="10,0,0,0"
Padding="0,0,0,0"
VerticalAlignment="Bottom"
Background="{x:Null}"
BorderBrush="{x:Null}"
FontSize="22"
Foreground="#FFFFFFFF"
Text="{Binding Path=Employee, Mode=OneWay}" />
</StackPanel>
</GroupBox.Header>
<Grid Margin="0,3,0,0" Background="{DynamicResource ObjectEditBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Rectangle Height="6" Fill="{DynamicResource UserContentBrush}" />
<TabControl
x:Name="root"
Grid.Row="1"
Padding="4,4,4,4"
BorderThickness="0,0,0,0"
Style="{StaticResource ObjectEditTabControl}">
<TabItem Header="Details" IsSelected="True">
<Grid Name="grid_root" Grid.IsSharedSizeScope="True" Width="Auto">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="450" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid
Name="grid_root"
Width="Auto"
Grid.IsSharedSizeScope="True">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="450" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label Content="{t:Translate MitarbeiterSingular}" Grid.Row="0" />
<uc:PopUpEdit IsReadOnly="True" Grid.Row="0" Grid.Column="1"
DeleteButtonVisibility="Visible" Name="popupedit_employee"
PopUpClick="popupedit_employee_PopUpClick" DeleteClick="popupedit_employee_DeleteClick"
Text="{Binding Path=EmployeeString, Mode=OneWay}" Height="23" Margin="3" Cursor="Arrow"
HorizontalAlignment="Stretch" Width="Auto"
PreviewMouseDoubleClick="Popupedit_employee_OnPreviewMouseDoubleClick"/>
<Label Grid.Row="0" Content="{t:Translate MitarbeiterSingular}" />
<uc:PopUpEdit
Name="popupedit_employee"
Grid.Row="0"
Grid.Column="1"
Width="Auto"
Height="23"
Margin="3"
HorizontalAlignment="Stretch"
Cursor="Arrow"
DeleteButtonVisibility="Visible"
DeleteClick="popupedit_employee_DeleteClick"
IsReadOnly="True"
PopUpClick="popupedit_employee_PopUpClick"
PreviewMouseDoubleClick="Popupedit_employee_OnPreviewMouseDoubleClick"
Text="{Binding Path=EmployeeString, Mode=OneWay}" />
<Label x:Name="label_LicenseTypes" Content="{t:Translate Lizenztyp}" Grid.Row="1" />
<ComboBox x:Name="comboBox_LicenseTypes" Grid.Row="1" Grid.Column="1" Margin="3" Width="200" Height="23" HorizontalAlignment="Left" ItemsSource="{Binding Path=AllLicenseTypes}" SelectedValue="{Binding Path=LicenseType, Mode=TwoWay}" />
<Label
x:Name="label_LicenseTypes"
Grid.Row="1"
Content="{t:Translate Lizenztyp}" />
<ComboBox
x:Name="comboBox_LicenseTypes"
Grid.Row="1"
Grid.Column="1"
Width="200"
Height="23"
Margin="3"
HorizontalAlignment="Left"
ItemsSource="{Binding Path=AllLicenseTypes}"
SelectedValue="{Binding Path=LicenseType, Mode=TwoWay}" />
</Grid>
<GroupBox Grid.Row="1" Header="Zugangsdaten" Padding="5" Width="Auto" Style="{DynamicResource ObjectEditGroupBox}" Margin="0,15,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<GroupBox
Grid.Row="1"
Width="Auto"
Margin="0,15,0,0"
Padding="5"
Header="Zugangsdaten"
Style="{DynamicResource ObjectEditGroupBox}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Label Content="Login Name" />
<TextBox VerticalAlignment="Top" Grid.Column="1" Height="23" Margin="3" Text="{Binding Path=LoginName, UpdateSourceTrigger=PropertyChanged}" />
</Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Label Content="Login Name" />
<TextBox
Grid.Column="1"
Height="23"
Margin="3"
VerticalAlignment="Top"
Text="{Binding Path=LoginName, UpdateSourceTrigger=PropertyChanged}" />
</Grid>
<Grid Name="grid_passworNewUser" Grid.Column="1" Visibility="{Binding Path=IsNew, Converter={StaticResource BoolVisibilityConverter}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label Content="Passwort" />
<PasswordBox Name="passwordbox_password" Grid.Column="1" Height="23" Margin="3" />
<Label Grid.Row="1" Content="Passwort wiederholen" />
<PasswordBox Name="passwordbox_passwordRepeat" Grid.Column="1" Grid.Row="1" Height="23" Margin="3" />
</Grid>
<Grid
Name="grid_passworNewUser"
Grid.Column="1"
Visibility="{Binding Path=IsNew, Converter={StaticResource BoolVisibilityConverter}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label Content="Passwort" />
<PasswordBox
Name="passwordbox_password"
Grid.Column="1"
Height="23"
Margin="3" />
<Label Grid.Row="1" Content="Passwort wiederholen" />
<PasswordBox
Name="passwordbox_passwordRepeat"
Grid.Row="1"
Grid.Column="1"
Height="23"
Margin="3" />
</Grid>
<Grid Grid.Column="1" Name="grid_passwordExistingUser" Visibility="Collapsed">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Label Content="Passwort" IsEnabled="False" />
<PasswordBox Grid.Column="1" Height="23" Margin="3" IsEnabled="False" Password="xxxxxxxxxx" />
<Button Name="button_changePassword" Grid.Column="2" Height="23" HorizontalAlignment="Right" Margin="3" Content="Passwort ändern" Click="button_changePassword_Click" />
</Grid>
<Grid
Name="grid_passwordExistingUser"
Grid.Column="1"
Visibility="Collapsed">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Label Content="Passwort" IsEnabled="False" />
<PasswordBox
Grid.Column="1"
Height="23"
Margin="3"
IsEnabled="False"
Password="xxxxxxxxxx" />
<Button
Name="button_changePassword"
Grid.Column="2"
Height="23"
Margin="3"
HorizontalAlignment="Right"
Click="button_changePassword_Click"
Content="Passwort ändern" />
</Grid>
</Grid>
</GroupBox>
</Grid>
</GroupBox>
<GroupBox Grid.Row="2" Grid.ColumnSpan="2" Header="{markup:Translate Benutzergruppen}" Padding="5" Style="{DynamicResource ObjectEditGroupBox}" Margin="0,15,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label HorizontalAlignment="Center" Content="gewählte Gruppen" />
<Label HorizontalAlignment="Center" Grid.Column="3" Content="mögliche Gruppen" />
<ListBox Name="listbox_groups" Grid.RowSpan="2" Grid.Row="1" ItemsSource="{Binding Path=UserGroups}" IsSynchronizedWithCurrentItem="True" MinHeight="100">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid HorizontalAlignment="Stretch" Margin="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label VerticalAlignment="Center" Margin="3 0" Padding="0" IsHitTestVisible="False" Content="{Binding Path=Name}" />
<ToggleButton Grid.Column="1" HorizontalAlignment="Right" Width="14" Height="14" Background="White" Template="{StaticResource ExpanderToggleButton}" IsChecked="{Binding Path=Tag, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Grid}}, Mode=OneWayToSource}" VerticalAlignment="Center" Visibility="{Binding Path=Description, Converter={StaticResource ObjectVisibilityConverter} }" />
<TextBox HorizontalAlignment="Left" Visibility="{Binding Path=Tag, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Grid}}, Converter={StaticResource BoolVisibilityConverter}}" Grid.Row="1" Grid.ColumnSpan="2" IsHitTestVisible="False" IsReadOnly="True" Cursor="Arrow" TextWrapping="WrapWithOverflow" Margin="10 3" Text="{Binding Path=Description}" BorderThickness="0" Background="Transparent" FontSize="10" />
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.ItemContainerStyle>
<Style>
<Setter Property="Control.HorizontalContentAlignment" Value="Stretch" />
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
<Button Name="button_addGroup" Grid.Column="1" VerticalAlignment="Bottom" Content="&lt;" FontWeight="Bold" Width="25" Grid.Row="1" Margin="3" Click="button_addGroup_Click" IsEnabled="{Binding Path=SelectedIndex, ElementName=listbox_possibleGroups, Converter={StaticResource IndexBoolConverter}}" Height="25" />
<Button Name="button_removeGroup" Grid.Column="1" Grid.Row="2" VerticalAlignment="Top" Content="&gt;" FontWeight="Bold" Width="25" Margin="3" Click="button_removeGroup_Click" IsEnabled="{Binding Path=SelectedIndex, ElementName=listbox_groups, Converter={StaticResource IndexBoolConverter}}" Height="25" />
<ListBox Name="listbox_possibleGroups" Grid.Row="1" Grid.Column="2" Grid.RowSpan="2" ItemsSource="{Binding Path=PossibleGroups}" IsSynchronizedWithCurrentItem="True" MinHeight="100">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid HorizontalAlignment="Stretch" Margin="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label VerticalAlignment="Center" Margin="3 0" Padding="0" IsHitTestVisible="False" Content="{Binding Path=Name}" />
<ToggleButton Grid.Column="1" HorizontalAlignment="Right" Width="14" Height="14" Background="White" Template="{StaticResource ExpanderToggleButton}" IsChecked="{Binding Path=Tag, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Grid}}, Mode=OneWayToSource}" VerticalAlignment="Center" Visibility="{Binding Path=Description, Converter={StaticResource ObjectVisibilityConverter} }" />
<TextBox HorizontalAlignment="Left" Visibility="{Binding Path=Tag, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Grid}}, Converter={StaticResource BoolVisibilityConverter}}" Grid.Row="1" Grid.ColumnSpan="2" IsHitTestVisible="False" IsReadOnly="True" Cursor="Arrow" TextWrapping="WrapWithOverflow" Margin="10 3" Text="{Binding Path=Description}" BorderThickness="0" Background="Transparent" FontSize="10" />
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.ItemContainerStyle>
<Style>
<Setter Property="Control.HorizontalContentAlignment" Value="Stretch" />
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
</Grid>
</GroupBox>
<GroupBox
Grid.Row="2"
Grid.ColumnSpan="2"
Margin="0,15,0,0"
Padding="5"
Header="{markup:Translate Benutzergruppen}"
Style="{DynamicResource ObjectEditGroupBox}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label HorizontalAlignment="Center" Content="gewählte Gruppen" />
<Label
Grid.Column="3"
HorizontalAlignment="Center"
Content="mögliche Gruppen" />
<ListBox
Name="listbox_groups"
Grid.Row="1"
Grid.RowSpan="2"
MinHeight="100"
IsSynchronizedWithCurrentItem="True"
ItemsSource="{Binding Path=UserGroups}">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Margin="3" HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label
Margin="3,0"
Padding="0"
VerticalAlignment="Center"
Content="{Binding Path=Name}"
IsHitTestVisible="False" />
<ToggleButton
Grid.Column="1"
Width="14"
Height="14"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Background="White"
IsChecked="{Binding Path=Tag, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Grid}}, Mode=OneWayToSource}"
Template="{StaticResource ExpanderToggleButton}"
Visibility="{Binding Path=Description, Converter={StaticResource ObjectVisibilityConverter}}" />
<TextBox
Grid.Row="1"
Grid.ColumnSpan="2"
Margin="10,3"
HorizontalAlignment="Left"
Background="Transparent"
BorderThickness="0"
Cursor="Arrow"
FontSize="10"
IsHitTestVisible="False"
IsReadOnly="True"
Text="{Binding Path=Description}"
TextWrapping="WrapWithOverflow"
Visibility="{Binding Path=Tag, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Grid}}, Converter={StaticResource BoolVisibilityConverter}}" />
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.ItemContainerStyle>
<Style>
<Setter Property="Control.HorizontalContentAlignment" Value="Stretch" />
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
<Button
Name="button_addGroup"
Grid.Row="1"
Grid.Column="1"
Width="25"
Height="25"
Margin="3"
VerticalAlignment="Bottom"
Click="button_addGroup_Click"
Content="&lt;"
FontWeight="Bold"
IsEnabled="{Binding Path=SelectedIndex, ElementName=listbox_possibleGroups, Converter={StaticResource IndexBoolConverter}}" />
<Button
Name="button_removeGroup"
Grid.Row="2"
Grid.Column="1"
Width="25"
Height="25"
Margin="3"
VerticalAlignment="Top"
Click="button_removeGroup_Click"
Content="&gt;"
FontWeight="Bold"
IsEnabled="{Binding Path=SelectedIndex, ElementName=listbox_groups, Converter={StaticResource IndexBoolConverter}}" />
<ListBox
Name="listbox_possibleGroups"
Grid.Row="1"
Grid.RowSpan="2"
Grid.Column="2"
MinHeight="100"
IsSynchronizedWithCurrentItem="True"
ItemsSource="{Binding Path=PossibleGroups}">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Margin="3" HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label
Margin="3,0"
Padding="0"
VerticalAlignment="Center"
Content="{Binding Path=Name}"
IsHitTestVisible="False" />
<ToggleButton
Grid.Column="1"
Width="14"
Height="14"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Background="White"
IsChecked="{Binding Path=Tag, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Grid}}, Mode=OneWayToSource}"
Template="{StaticResource ExpanderToggleButton}"
Visibility="{Binding Path=Description, Converter={StaticResource ObjectVisibilityConverter}}" />
<TextBox
Grid.Row="1"
Grid.ColumnSpan="2"
Margin="10,3"
HorizontalAlignment="Left"
Background="Transparent"
BorderThickness="0"
Cursor="Arrow"
FontSize="10"
IsHitTestVisible="False"
IsReadOnly="True"
Text="{Binding Path=Description}"
TextWrapping="WrapWithOverflow"
Visibility="{Binding Path=Tag, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Grid}}, Converter={StaticResource BoolVisibilityConverter}}" />
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.ItemContainerStyle>
<Style>
<Setter Property="Control.HorizontalContentAlignment" Value="Stretch" />
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
</Grid>
</GroupBox>
<Popup FocusManager.IsFocusScope="True" Grid.Row="3" Margin="10" Grid.ColumnSpan="2" Name="popup_employee" StaysOpen="False" Placement="MousePoint" Width="370" Height="250" Closed="popup_Closed" Opened="popup_Opened">
<localSearchView:EmployeeSearchView ItemSelected="EmployeeSearchView_EmployeeSelected" x:Name="employeeSearchView" />
</Popup>
<Popup
Name="popup_employee"
Grid.Row="3"
Grid.ColumnSpan="2"
Width="370"
Height="250"
Margin="10"
Closed="popup_Closed"
FocusManager.IsFocusScope="True"
Opened="popup_Opened"
Placement="MousePoint"
StaysOpen="False">
<localSearchView:EmployeeSearchView x:Name="employeeSearchView" ItemSelected="EmployeeSearchView_EmployeeSelected" />
</Popup>
<Popup FocusManager.IsFocusScope="True" Grid.Row="3" Margin="10" Grid.ColumnSpan="2" Name="popup_changePassword" StaysOpen="False" Placement="MousePoint" Closed="popup_Closed" Opened="popup_Opened">
<Border Background="{StaticResource ObjectEditBackgroundBrush}" BorderBrush="Black" BorderThickness="1">
<Grid Name="grid_passworEditExistingUser" Grid.Column="1" Margin="20 3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Popup
Name="popup_changePassword"
Grid.Row="3"
Grid.ColumnSpan="2"
Margin="10"
Closed="popup_Closed"
FocusManager.IsFocusScope="True"
Opened="popup_Opened"
Placement="MousePoint"
StaysOpen="False">
<Border
Background="{StaticResource ObjectEditBackgroundBrush}"
BorderBrush="Black"
BorderThickness="1">
<Grid
Name="grid_passworEditExistingUser"
Grid.Column="1"
Margin="20,3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock Name="textblock_editFailures" Grid.ColumnSpan="2" Foreground="Red" FontSize="12" TextWrapping="Wrap" Margin="3 3 3 10" />
<TextBlock
Name="textblock_editFailures"
Grid.ColumnSpan="2"
Margin="3,3,3,10"
FontSize="12"
Foreground="Red"
TextWrapping="Wrap" />
<Label Name="lblOldPassword" Content="Altes Passwort" Grid.Row="1" />
<PasswordBox Name="passwordbox_editOldPassword" Grid.Column="1" Grid.Row="1" Height="23" Margin="3" MinWidth="180" />
<Label
Name="lblOldPassword"
Grid.Row="1"
Content="Altes Passwort" />
<PasswordBox
Name="passwordbox_editOldPassword"
Grid.Row="1"
Grid.Column="1"
Height="23"
MinWidth="180"
Margin="3" />
<Label Content="Neues Passwort" Grid.Row="2" Margin="0 10 0 0" />
<PasswordBox Name="passwordbox_editPassword" Grid.Column="1" Grid.Row="2" Height="23" Margin="3 10 3 3" PasswordChanged="Passwordbox_editPassword_OnPasswordChanged"/>
<Label Grid.Row="3" Content="Passwort wiederholen" />
<PasswordBox Name="passwordbox_editPasswordRepeat" Grid.Column="1" Grid.Row="3" Height="23" Margin="3" />
<!-- Hier Anzeige Für passwortStärke -->
<Label Name="passwordbox_StaerkeAnzeige" Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Left" Visibility="Hidden"/>
<Grid Grid.IsSharedSizeScope="True" Grid.ColumnSpan="2" Grid.Row="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="but" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" SharedSizeGroup="but" />
</Grid.ColumnDefinitions>
<Button Name="button_saveEditPassword" Margin="3 20 3 10" Height="23" HorizontalAlignment="Stretch" Click="button_saveEditPassword_Click" Content="Änderung speichern" Padding="3 0" />
<Button Name="button_cancelEditPassword" Margin="3 20 3 10" Height="23" Grid.Column="2" HorizontalAlignment="Stretch" Click="button_cancelEditPassword_Click" Content="Abbrechen" Padding="3 0" />
</Grid>
</Grid>
</Border>
</Popup>
<Label
Grid.Row="2"
Margin="0,10,0,0"
Content="Neues Passwort" />
<PasswordBox
Name="passwordbox_editPassword"
Grid.Row="2"
Grid.Column="1"
Height="23"
Margin="3,10,3,3"
PasswordChanged="Passwordbox_editPassword_OnPasswordChanged" />
<Label Grid.Row="3" Content="Passwort wiederholen" />
<PasswordBox
Name="passwordbox_editPasswordRepeat"
Grid.Row="3"
Grid.Column="1"
Height="23"
Margin="3" />
</Grid>
</TabItem>
<TabItem Header="Dokumente" Name="tabitem_documents" Selector.Selected="tabitem_documents_Selected" />
<!-- Hier Anzeige Für passwortStärke -->
<Label
Name="passwordbox_StaerkeAnzeige"
Grid.Row="4"
Grid.Column="0"
Grid.ColumnSpan="2"
HorizontalAlignment="Left"
Visibility="Hidden" />
</TabControl>
<Border Grid.Row="2" Grid.ColumnSpan="3" Height="40" Margin="0,10,0,0" VerticalAlignment="Stretch" Background="#FF000000">
<Border.OpacityMask>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#19000000" Offset="0" />
<GradientStop Color="#33FFFFFF" Offset="1" />
</LinearGradientBrush>
</Border.OpacityMask>
<Grid
Grid.Row="5"
Grid.ColumnSpan="2"
Grid.IsSharedSizeScope="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="but" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" SharedSizeGroup="but" />
</Grid.ColumnDefinitions>
<Button
Name="button_saveEditPassword"
Height="23"
Margin="3,20,3,10"
Padding="3,0"
HorizontalAlignment="Stretch"
Click="button_saveEditPassword_Click"
Content="Änderung speichern" />
<Button
Name="button_cancelEditPassword"
Grid.Column="2"
Height="23"
Margin="3,20,3,10"
Padding="3,0"
HorizontalAlignment="Stretch"
Click="button_cancelEditPassword_Click"
Content="Abbrechen" />
</Grid>
</Grid>
</Border>
</Popup>
</Border>
<StackPanel Grid.ColumnSpan="3" Grid.Row="2" Orientation="Horizontal" VerticalAlignment="Center" Height="Auto" Margin="5,10,0,0" HorizontalAlignment="Right">
<Button x:Name="btnSave" Content="Speichern" Margin="0,0,2,0" Command="ApplicationCommands.Save" Height="25" />
<Button x:Name="btnClose" Content="Schließen" Margin="0,0,3,0" Command="ApplicationCommands.Close" Height="25" />
</StackPanel>
</Grid>
</GroupBox>
</uc:ShadowChrome>
</Grid>
</Grid>
</TabItem>
<TabItem
Name="tabitem_documents"
Header="Dokumente"
Selector.Selected="tabitem_documents_Selected" />
</TabControl>
<Border
Grid.Row="2"
Grid.ColumnSpan="3"
Height="40"
Margin="0,10,0,0"
VerticalAlignment="Stretch"
Background="#FF000000">
<Border.OpacityMask>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#19000000" />
<GradientStop Offset="1" Color="#33FFFFFF" />
</LinearGradientBrush>
</Border.OpacityMask>
</Border>
<StackPanel
Grid.Row="2"
Grid.ColumnSpan="3"
Height="Auto"
Margin="5,10,0,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Orientation="Horizontal">
<Button
x:Name="btnSave"
Height="25"
Margin="0,0,2,0"
Command="ApplicationCommands.Save"
Content="Speichern" />
<Button
x:Name="btnClose"
Height="25"
Margin="0,0,3,0"
Command="ApplicationCommands.Close"
Content="Schließen" />
</StackPanel>
</Grid>
</GroupBox>
</uc:ShadowChrome>
</Grid>
</localView:BeWoView>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -52,6 +52,8 @@ using VerticalAlignment = System.Windows.VerticalAlignment;
using DependencyObject = System.Windows.DependencyObject;
using BeWo.AI.View;
using BeWo.AI;
using BeWo.View.Detail.AI;
using BeWo.View.Windows;
namespace BeWo.View.Detail.Zeiterfassung
{
@@ -5053,7 +5055,6 @@ namespace BeWo.View.Detail.Zeiterfassung
private void OpenAiChat(object sender, MouseButtonEventArgs e)
{
var node = ViewModel.SelectedCustomerNode;
long c2sOid = 0;
@@ -5088,7 +5089,53 @@ namespace BeWo.View.Detail.Zeiterfassung
ComboBoxTreeViewControl.TreeViewSourceList = ViewModel.PrototypeVM.GoalTree;
}
}
private void Ai_Button_Click(object sender, RoutedEventArgs e)
{
var records = GetVisibleRecordVMs();
var context = ViewModel.GetVisibleInformationReferences(records);
var window = BeWoWindowBuilder.AiWindowBuilder.GetAiConversationWindow(UIContext.ServiceRecord, context);
window?.ShowDialog();
}
private void Ai_Button2_Click(object sender, RoutedEventArgs e)
{
var records = GetVisibleRecordVMs();
var context = ViewModel.GetVisibleInformationReferences(records);
var control = BeWoWindowBuilder.AiWindowBuilder.GetAiConversationControl(UIContext.ServiceRecord, context);
if(control is object)
MainControl.ShowControlAsModalPopup(control);
}
private IEnumerable<ServiceRecordVM> GetVisibleRecordVMs()
{
var list = new List<ServiceRecordVM>();
var items = srListBox.ItemsSource as IList<ServiceRecordVM>;
if (items != null)
{
for (int i = 0; i < items.Count; i++)
{
var vm = srListBox.Items[i] as ServiceRecordVM;
//if (srListBox.IsRowVisible(i))
//{
// var vm = datagrid_invoices.GetRow(i) as InvoiceBaseVM;
if (vm != null)
{
list.Add(vm);
}
//}
}
}
return list;
}
}
//public class RowBackgroundHelper
//{

View File

@@ -1,4 +1,5 @@
using BeWo.ServiceProxy;
using BeWo.View.Windows;
using BeWo.ViewModel;
using BS.Shared;
using BS.Shared.DataContracts;

View File

@@ -1732,9 +1732,9 @@ namespace BeWo.View
{
_AllSchedulerTasks = cb;
BuildRecurringAppointments(_AllSchedulerTasks.Where(w => w.RecurrenceInfo != null).ToList(), _CurrentDate, _CurrentDate.AddDays(3 * Datebuffer));
//BuildRecurringAppointments(_AllSchedulerTasks.Where(w => w.RecurrenceInfo != null).ToList(), _CurrentDate, _CurrentDate.AddDays(3 * Datebuffer));
if(pIsShowingTasks)
if (pIsShowingTasks)
{
var list = _AllSchedulerTasks.Where(i => i.IsTask && !i.CompletedDate.HasValue).OrderBy(i => i.DueDate).OrderBy(o => o.StartDate ?? DateTime.MinValue).ToList();
listboxTasks.ItemsSource = list;
@@ -1746,14 +1746,17 @@ namespace BeWo.View
}
else
{
listboxTasks.ItemsSource = _AllSchedulerTasks.Where(i => !i.IsTask &&
i.StartDate.HasValue && i.StartDate.Value.InBetween(_CurrentDate, _CurrentDate.AddDays(14), true) &&
i.EndDate.HasValue && i.EndDate.Value.InBetween(_CurrentDate, _CurrentDate.AddDays(14), true) &&
i.Type != (int)AppointmentType.DeletedOccurrence).OrderBy(o => o.StartDate ?? DateTime.MinValue).ToList();
}
listboxTasks.ItemsSource = _AllSchedulerTasks.Where(i => !i.IsTask).ToList();
// Filtern der Termine nach Zeitraum wird für April 2025 Release auf Server verlagert
//else
//{
// listboxTasks.ItemsSource = _AllSchedulerTasks.Where(i => !i.IsTask &&
// i.StartDate.HasValue && i.StartDate.Value.InBetween(_CurrentDate, _CurrentDate.AddDays(14), true) &&
// i.EndDate.HasValue && i.EndDate.Value.InBetween(_CurrentDate, _CurrentDate.AddDays(14), true) &&
// i.Type != (int)AppointmentType.DeletedOccurrence).OrderBy(o => o.StartDate ?? DateTime.MinValue).ToList();
//}
});
}, false);
}
@@ -1765,10 +1768,22 @@ namespace BeWo.View
}
else
{
listboxTasks.ItemsSource = _AllSchedulerTasks.Where(i => !i.IsTask &&
i.StartDate.HasValue && i.StartDate.Value.InBetween(_CurrentDate, _CurrentDate.AddDays(14), true) &&
i.EndDate.HasValue && i.EndDate.Value.InBetween(_CurrentDate, _CurrentDate.AddDays(14), true) &&
i.Type != (int)AppointmentType.DeletedOccurrence).OrderBy(o => o.StartDate ?? DateTime.MinValue).ToList();
ServiceFacade.DoResourceServiceAsync(s => s.LoadTasksAndAppointmentsForEmployee(BeWoApp.LoggedOnEmployeeOid.Value, _CurrentDate, Datebuffer, _SelectedEmployeeForAppointments?.EmployeeOid), l =>
{
this.Dispatch(delegate
{
_AllSchedulerTasks = l;
//BuildRecurringAppointments(_AllSchedulerTasks.Where(w => w.RecurrenceInfo != null).ToList(), _CurrentDate, _CurrentDate.AddDays(3 * Datebuffer));
listboxTasks.ItemsSource = _AllSchedulerTasks.Where(i => !i.IsTask).ToList();
});
});
//listboxTasks.ItemsSource = _AllSchedulerTasks.Where(i => !i.IsTask &&
// i.StartDate.HasValue && i.StartDate.Value.InBetween(_CurrentDate, _CurrentDate.AddDays(14), true) &&
// i.EndDate.HasValue && i.EndDate.Value.InBetween(_CurrentDate, _CurrentDate.AddDays(14), true) &&
// i.Type != (int)AppointmentType.DeletedOccurrence).OrderBy(o => o.StartDate ?? DateTime.MinValue).ToList();
foreach (var app in listboxTasks.ItemsSource)
{

View File

@@ -0,0 +1,313 @@
<localView:BeWoView
x:Class="BeWo.View.Master.AiConversationView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxa="http://schemas.devexpress.com/winfx/2008/xaml/accordion"
xmlns:listviewmodel="clr-namespace:BeWo.ViewModel.ListViewModel"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:viewmodel="clr-namespace:BeWo.ViewModel"
Width="Auto"
Height="Auto"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
d:DataContext="{d:DesignInstance Type=listviewmodel:AiConversationListVM}"
d:DesignHeight="600"
d:DesignWidth="600"
Focusable="True"
Loaded="BeWoView_Loaded"
mc:Ignorable="d">
<localView:BeWoView.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="..\..\Styles\ModernOrangeBlack.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</localView:BeWoView.Resources>
<localView:BeWoView.DataContext>
<listviewmodel:AiConversationListVM />
</localView:BeWoView.DataContext>
<Grid>
<uc:ShadowChrome>
<GroupBox Style="{StaticResource MainContentGroupBoxStyle}">
<GroupBox.Header>
<StackPanel
Margin="0,11,0,0"
VerticalAlignment="Bottom"
Orientation="Horizontal">
<Image
Width="32"
RenderTransformOrigin="0.5,0.5"
Source="..\..\Ressources\Icons\chatbot.png">
<Image.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="-2" />
</TransformGroup>
</Image.RenderTransform>
</Image>
<TextBox
Margin="10,0,0,0"
Padding="0,0,0,0"
VerticalAlignment="Stretch"
Background="{x:Null}"
BorderBrush="{x:Null}"
BorderThickness="0,0,0,0"
FontSize="22"
Foreground="{DynamicResource MainGroupBoxForegroundBrush}"
Text="Ai Konversationen" />
</StackPanel>
</GroupBox.Header>
<GroupBox Style="{StaticResource ModuleAiNavigationStyle}">
<GroupBox.Header>
<StackPanel
Grid.Row="0"
Margin="3"
Orientation="Horizontal">
<Label
Margin="0,-4,0,0"
Content="Suche"
FontSize="14"
Foreground="#FFFFFFFF" />
<TextBox
x:Name="textbox_search"
Width="300"
Height="20"
MinWidth="90"
Margin="3,-5,0,0"
BorderThickness="0,0,0,0"
TabIndex="0"
Template="{DynamicResource SearchTextBoxTemplate}" />
<Button
x:Name="ReloadButton"
Width="36"
Height="24"
Margin="5,-5,0,0"
Click="ReloadButton_OnClick"
ToolTip="Liste aktualisieren">
<Button.Template>
<ControlTemplate TargetType="{x:Type Button}">
<Grid>
<Image x:Name="imgDisabled" Source="..\..\Ressources\Icons\SymbolRefresh32Disabled.png" />
<Image
x:Name="imgEnabled"
Opacity="0"
Source="..\..\Ressources\Icons\SymbolRefresh32.png" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="imgEnabled" Property="Opacity" Value="1" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>
</StackPanel>
</GroupBox.Header>
<Grid Margin="0,0,0,0">
<Grid.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0" Color="#FFFFC48A" />
<GradientStop Offset="1" Color="#FFFF7830" />
</LinearGradientBrush>
</Grid.Background>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" MinWidth="50" />
<ColumnDefinition Width="3*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid>
<ListView
x:Name="listbox_conversations"
Background="Transparent"
ItemsSource="{Binding VMList}"
SelectedItem="{Binding SelectedVM}">
<ListView.ItemTemplate>
<DataTemplate x:Name="conversation_datatemplate" DataType="viewmodel:AiConversationVM">
<TextBlock Text="{Binding Json}" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<TextBox
x:Name="txt_input_context"
Height="100"
MaxHeight="200"
Margin="5"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
AcceptsReturn="True"
Text="{Binding Context_Input}" />
<TextBox
x:Name="txt_input_message"
Grid.Column="1"
Height="100"
MaxHeight="200"
Margin="5"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
AcceptsReturn="True"
Text="{Binding MessageInput}" />
<Button
Grid.Column="2"
Margin="5"
VerticalAlignment="Stretch"
Command="{Binding SendNewMessageCommand}"
Content="Senden" />
</Grid>
<ListView
x:Name="listbox_messages"
Grid.Row="1"
Background="Transparent"
ItemsSource="{Binding SelectedVM.Messages.VMList, Converter={StaticResource TestDebugConverter}}">
<ListView.ItemTemplate>
<DataTemplate x:Name="messages_datatemplate" DataType="viewmodel:AiConversationMessageVM">
<TextBlock Text="{Binding Json}" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</Grid>
<Border
Grid.Row="2"
Height="40"
Margin="0,0,0,0"
VerticalAlignment="Stretch">
<Grid>
<Rectangle Fill="#FF000000">
<Rectangle.OpacityMask>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#19000000" />
<GradientStop Offset="1" Color="#33FFFFFF" />
</LinearGradientBrush>
</Rectangle.OpacityMask>
</Rectangle>
<StackPanel
Height="Auto"
Margin="5,5,5,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Orientation="Horizontal">
<Button
x:Name="btnNew"
Height="25"
Margin="0,0,0,0"
Command="{Binding RequestNewConversationCommand}"
Content="Neuer Chat"
FontWeight="Medium"
Style="{StaticResource NavigationToolbarButtonStyle}"
Visibility="Visible" />
<Button
x:Name="btnSettings"
Height="25"
Margin="5,0,0,0"
Command="{Binding OpenAiSettingCommand, RelativeSource={RelativeSource AncestorType={x:Type localView:BeWoView}, Mode=FindAncestor}}"
Content="Einstellungen"
FontWeight="Medium"
Style="{StaticResource NavigationToolbarButtonStyle}"
Visibility="Visible" />
<Button
x:Name="btnTest"
Height="25"
Margin="0,0,0,0"
Command="{Binding TestCommand}"
Content="Test Szenario"
FontWeight="Medium"
Style="{StaticResource NavigationToolbarButtonStyle}"
Visibility="Visible" />
</StackPanel>
<StackPanel
Height="Auto"
Margin="5,5,5,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Orientation="Horizontal">
<Button
x:Name="btnClose"
Height="25"
Margin="0,0,0,0"
Command="ApplicationCommands.Close"
Content="Schließen"
FontWeight="Medium"
Style="{StaticResource NavigationToolbarButtonStyle}"
Visibility="Visible" />
</StackPanel>
</Grid>
</Border>
</Grid>
</GroupBox>
</GroupBox>
</uc:ShadowChrome>
<Popup
x:Name="popup_newview"
Width="200"
Height="200"
StaysOpen="True">
<Grid Margin="5" Background="Orange">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<Label>Kontext</Label>
<ComboBox Grid.Column="1" />
</Grid>
</Popup>
<Popup
x:Name="popup_settings"
Width="auto"
Height="auto"
Placement="Center"
StaysOpen="False">
<Grid Margin="5" Background="Orange">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<Label>Modell:</Label>
<ComboBox
Grid.Column="1"
ItemsSource="{Binding Models}"
SelectedItem="{Binding SelectedModel, Mode=TwoWay}" />
</Grid>
</Popup>
</Grid>
</localView:BeWoView>

View File

@@ -0,0 +1,63 @@
using BeWo.ServiceProxy;
using BeWo.ViewModel.ListViewModel;
using BS.Shared.DataContracts;
using BS.Shared.Extensions;
using DevExpress.Mvvm;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace BeWo.View.Master
{
/// <summary>
/// Interaktionslogik für AiConversationView.xaml
/// </summary>
public partial class AiConversationView : BeWoView
{
public AiConversationView()
{
InitializeComponent();
//OpenAiSettingCommand = new DelegateCommand(OpenAiSetting);
}
public AiConversationListVM ViewModel
{
get => DataContext as AiConversationListVM;
set => DataContext = value;
}
public DelegateCommand OpenAiSettingCommand { get; set; }
private void BeWoView_Loaded(object sender, RoutedEventArgs e)
{
}
private void ReloadButton_OnClick(object sender, RoutedEventArgs e)
{
//ServiceFacade.DoOperationsEnhancedServiceAsnyc(x => x.GetAiModels(), (x) => { ViewModel.Models.MakeEqualTo(x); }, true, this);
}
public void OpenAiSetting()
{
//ServiceFacade.DoOperationsEnhancedServiceAsnyc(x => x.GetAiModels(), (x) =>
//{
// ViewModel.Models.MakeEqualTo(x);
// popup_settings.IsOpen = true;
//}, true, this);
}
}
}

View File

@@ -1,53 +1,93 @@
<Window x:Class="BeWo.View.MessageDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converter="clr-namespace:BeWo.Converter"
Title="BeWoPlaner" Height="400" Width="500" WindowStartupLocation="CenterScreen" WindowStyle="None" ResizeMode="NoResize" >
<Window.Resources>
<converter:BoolVisibilityConverter x:Key="BoolVisibilityConverter" />
</Window.Resources>
<Grid Background="{x:Null}" Margin="0,0,0,0">
<Border BorderThickness="1" Padding="5,5,5,5" BorderBrush="Black" Background="{DynamicResource LoginBackgroundColor}">
<Grid Opacity="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="80" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Image Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Top" Source="..\Ressources\Icons\bewoplaner_logo_small.png" Height="45" Margin="7,7,0,0"/>
<Grid Grid.Row="1" Margin="0,10,0,0" x:Name="rootGrid">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<TextBox Background="Transparent"
BorderThickness="0" IsReadOnly="True"
x:Name="txtMessage" TextWrapping="Wrap" Margin="3" FontSize="14"></TextBox>
<Window
x:Class="BeWo.View.MessageDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converter="clr-namespace:BeWo.Converter"
Title="BeWoPlaner"
Width="500"
Height="400"
ResizeMode="NoResize"
WindowStartupLocation="CenterScreen"
WindowStyle="None">
<Window.Resources>
<converter:BoolVisibilityConverter x:Key="BoolVisibilityConverter" />
</Window.Resources>
<Grid Margin="0,0,0,0" Background="{x:Null}">
<Border
Padding="5,5,5,5"
Background="{DynamicResource LoginBackgroundColor}"
BorderBrush="Black"
BorderThickness="1">
<Grid Opacity="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="80" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Image
Grid.Row="0"
Height="45"
Margin="7,7,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Source="..\Ressources\Icons\bewoplaner_logo_small.png" />
<Grid
x:Name="rootGrid"
Grid.Row="1"
Margin="0,10,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBox
x:Name="txtMessage"
Margin="3"
Background="Transparent"
BorderThickness="0"
FontSize="14"
IsReadOnly="True"
TextWrapping="Wrap" />
<Grid Grid.Row="1" HorizontalAlignment="Center" Visibility="{Binding Path=IsInConfirmationWithPasswordMode, Converter={StaticResource BoolVisibilityConverter}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" Content="Passwort:" />
<PasswordBox Grid.Row="0" Grid.Column="1" Height="24" x:Name="PasswordBox" VerticalContentAlignment="Center" Width="185" VerticalAlignment="Center" HorizontalAlignment="Stretch"></PasswordBox>
</Grid>
<!--<Grid >
<Grid
Grid.Row="1"
HorizontalAlignment="Center"
Visibility="{Binding Path=IsInConfirmationWithPasswordMode, Converter={StaticResource BoolVisibilityConverter}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label
Grid.Row="0"
Grid.Column="0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Content="Passwort:" />
<PasswordBox
x:Name="PasswordBox"
Grid.Row="0"
Grid.Column="1"
Width="185"
Height="24"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
VerticalContentAlignment="Center" />
</Grid>
<!--<Grid >
<Grid.RowDefinitions>
<RowDefinition Height="*" ></RowDefinition>
<RowDefinition Height="Auto" ></RowDefinition>
@@ -65,15 +105,45 @@
</Hyperlink>
</TextBlock>
</Grid>-->
<!--<Button Grid.Row="2" Grid.Column ="2" Width="100" Margin="3" IsCancel="True" IsEnabled="False" HorizontalAlignment="Right">Abbrechen</Button>-->
</Grid>
</Grid>
</Border>
<Line Grid.ColumnSpan="4" Stroke="#FFADADAD" X1="14" Y1="70" X2="486" Y2="70" StrokeThickness="1"></Line>
<Line x:Name="linkLine" Stroke="#FFADADAD" X1="14" Y1="320" X2="486" Y2="320" StrokeThickness="1" Margin="0,30,0,-30"></Line>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<Button x:Name="OkayButton" Width="120" Margin="3,3,15,10" VerticalAlignment="Bottom" Click="OkayButton_OnClick">OK</Button>
<Button x:Name="CountButton" Width="120" Margin="3,3,15,10" IsDefault="True" VerticalAlignment="Bottom" Click="ButtonBase_OnClick">Schließen</Button>
</StackPanel>
<!--<Button Grid.Row="2" Grid.Column ="2" Width="100" Margin="3" IsCancel="True" IsEnabled="False" HorizontalAlignment="Right">Abbrechen</Button>-->
</Grid>
</Grid>
</Border>
<Line
Grid.ColumnSpan="4"
Stroke="#FFADADAD"
StrokeThickness="1"
X1="14"
X2="486"
Y1="70"
Y2="70" />
<Line
x:Name="linkLine"
Margin="0,30,0,-30"
Stroke="#FFADADAD"
StrokeThickness="1"
X1="14"
X2="486"
Y1="320"
Y2="320" />
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
<Button
x:Name="OkayButton"
Width="120"
Margin="3,3,15,10"
VerticalAlignment="Bottom"
Click="OkayButton_OnClick">
OK
</Button>
<Button
x:Name="CountButton"
Width="120"
Margin="3,3,15,10"
VerticalAlignment="Bottom"
Click="ButtonBase_OnClick"
IsDefault="True">
Schließen
</Button>
</StackPanel>
</Grid>
</Window>

View File

@@ -1,14 +1,31 @@
<Window x:Class="BeWo.View.MiniChatView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Chat View" Height="102" Width="338" WindowStyle="None"
AllowsTransparency="True"
Background="Transparent"
ResizeMode="NoResize">
<Window
x:Class="BeWo.View.MiniChatView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Chat View"
Width="338"
Height="102"
AllowsTransparency="True"
Background="Transparent"
ResizeMode="NoResize"
WindowStyle="None">
<Grid>
<GroupBox Header="Name" x:Name="rootGroupBox" Style="{DynamicResource MainContentGroupBoxWithoutMaximizeBtnStyle}" MouseLeftButtonDown="RootGroupBox_OnMouseLeftButtonDown">
<GroupBox
x:Name="rootGroupBox"
Header="Name"
MouseLeftButtonDown="RootGroupBox_OnMouseLeftButtonDown"
Style="{DynamicResource MainContentGroupBoxWithoutMaximizeBtnStyle}">
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
<TextBox x:Name="Minichat" HorizontalAlignment="Left" Height="51" Margin="5,2,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="320" IsEnabled="False" GotFocus="Minichat_OnGotFocus"/>
<TextBox
x:Name="Minichat"
Width="320"
Height="51"
Margin="5,2,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
GotFocus="Minichat_OnGotFocus"
IsEnabled="False"
TextWrapping="Wrap" />
</Grid>
</GroupBox>

View File

@@ -1,12 +1,14 @@
<localView:BeWoView x:Class="BeWo.View.Navigation.CustomerNavigationView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:localNavView="clr-namespace:BeWo.View.Navigation"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
Loaded="OnLoaded">
<Grid>
<Grid.Resources>
<localView:BeWoView
x:Class="BeWo.View.Navigation.CustomerNavigationView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localNavView="clr-namespace:BeWo.View.Navigation"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
x:Name="root_view"
Loaded="OnLoaded">
<Grid>
<Grid.Resources>
<Style x:Key="CustomerDetailStyle" TargetType="{x:Type ListBoxItem}">
<Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, AncestorType={x:Type ItemsControl}, Mode=FindAncestor}}" />
<Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, AncestorType={x:Type ItemsControl}, Mode=FindAncestor}}" />
@@ -15,92 +17,216 @@
<Setter.Value>
<ControlTemplate>
<Grid>
<Border x:Name="ItemBorder" CornerRadius="5" MinHeight="30" Background="#FF000000">
<Border.OpacityMask>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#19000000" Offset="0" />
<GradientStop Color="#26000000" Offset="1" />
</LinearGradientBrush>
</Border.OpacityMask>
<Border
x:Name="ItemBorder"
MinHeight="30"
Background="#FF000000"
CornerRadius="5">
<Border.OpacityMask>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#19000000" />
<GradientStop Offset="1" Color="#26000000" />
</LinearGradientBrush>
</Border.OpacityMask>
</Border>
<Border x:Name="ItemContent" CornerRadius="5" MinHeight="30">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5,3,5,3" OpacityMask="{x:Null}" SnapsToDevicePixels="True">
<Border
x:Name="ItemContent"
MinHeight="30"
CornerRadius="5">
<Grid
Margin="5,3,5,3"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
OpacityMask="{x:Null}"
SnapsToDevicePixels="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" SharedSizeGroup="CustomerDetailColumn" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" SharedSizeGroup="CustomerDetailColumn" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Image Grid.RowSpan="2" Source="..\..\Ressources\Icons\UserHomeMaleDisabled.png" Margin="0,0,5,0" Height="30" VerticalAlignment="Center" HorizontalAlignment="Stretch" Width="Auto" RenderTransformOrigin="0.5,0.5" Grid.Row="0" />
<StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal">
<TextBlock x:Name="txtDetail1" Text="{Binding Path=SimpleDescription}" FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" />
<TextBlock x:Name="txtDetail2" Text="{Binding Path=DateOfBirthString}" Margin="6,0,0,0" FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" />
<TextBlock x:Name="txtDetailTeams" Text="{Binding Path=Teams}" Margin="0,0,6,0" FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" />
<Image
Grid.Row="0"
Grid.RowSpan="2"
Width="Auto"
Height="30"
Margin="0,0,5,0"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
RenderTransformOrigin="0.5,0.5"
Source="..\..\Ressources\Icons\UserHomeMaleDisabled.png" />
<StackPanel
Grid.Row="0"
Grid.Column="1"
Orientation="Horizontal">
<TextBlock
x:Name="txtDetail1"
FontFamily="Microsoft Sans Serif"
FontSize="14"
Foreground="#FFD2D2D2"
Text="{Binding Path=SimpleDescription}" />
<TextBlock
x:Name="txtDetail2"
Margin="6,0,0,0"
FontFamily="Microsoft Sans Serif"
FontSize="14"
Foreground="#FFD2D2D2"
Text="{Binding Path=DateOfBirthString}" />
<TextBlock
x:Name="txtDetailTeams"
Margin="0,0,6,0"
FontFamily="Microsoft Sans Serif"
FontSize="14"
Foreground="#FFD2D2D2"
Text="{Binding Path=Teams}" />
</StackPanel>
<StackPanel Grid.Column="1" Grid.Row="1" Orientation="Horizontal">
<TextBlock x:Name="txtDetail3" Text="{Binding Path=AddressString}" FontSize="12" Foreground="#FFA0A0A0" FontFamily="Microsoft Sans Serif" />
</StackPanel>
<TextBlock Grid.Row="0" Grid.Column="2" x:Name="txtDetail4" Text="{Binding Path=CurrentEmployeeRole}" Margin="16,0,0,0" FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" />
<TextBlock Grid.Column="2" Grid.Row="1" x:Name="txtDetail5" Text="{Binding Path=MainAttendant}" Margin="16,0,0,0" FontSize="14" Foreground="#FFA0A0A0" FontFamily="Microsoft Sans Serif" />
<!--Image x:Name="imgArchiv" Grid.Row="0" Grid.Column="2" Visibility="Collapsed" Grid.RowSpan="2" Source="..\Ressources\Icons\Archiv.png" Margin="0,0,5,0" Height="30" VerticalAlignment="Center" HorizontalAlignment="Stretch" Width="Auto" RenderTransformOrigin="0.5,0.5" /-->
<TextBlock VerticalAlignment="Center" Grid.Column="4" Grid.Row="0" Grid.RowSpan="2" Margin="0,0,3,0" Visibility="{Binding Path=IsDeleted, Converter={StaticResource AnonymizationRight2VisibilityConverter}, ConverterParameter=Customer}">
<Hyperlink TargetName="_NewWindow" Foreground="#FFF97E7B" Click="Hyperlink_Anonymize_Click" Tag="{Binding}">Anonymisieren</Hyperlink>
<StackPanel
Grid.Row="1"
Grid.Column="1"
Orientation="Horizontal">
<TextBlock
x:Name="txtDetail3"
FontFamily="Microsoft Sans Serif"
FontSize="12"
Foreground="#FFA0A0A0"
Text="{Binding Path=AddressString}" />
</StackPanel>
<TextBlock
x:Name="txtDetail4"
Grid.Row="0"
Grid.Column="2"
Margin="16,0,0,0"
FontFamily="Microsoft Sans Serif"
FontSize="14"
Foreground="#FFD2D2D2"
Text="{Binding Path=CurrentEmployeeRole}" />
<TextBlock
x:Name="txtDetail5"
Grid.Row="1"
Grid.Column="2"
Margin="16,0,0,0"
FontFamily="Microsoft Sans Serif"
FontSize="14"
Foreground="#FFA0A0A0"
Text="{Binding Path=MainAttendant}" />
<!-- Image x:Name="imgArchiv" Grid.Row="0" Grid.Column="2" Visibility="Collapsed" Grid.RowSpan="2" Source="..\Ressources\Icons\Archiv.png" Margin="0,0,5,0" Height="30" VerticalAlignment="Center" HorizontalAlignment="Stretch" Width="Auto" RenderTransformOrigin="0.5,0.5" / -->
<TextBlock
Grid.Row="0"
Grid.RowSpan="2"
Grid.Column="4"
Margin="0,0,3,0"
VerticalAlignment="Center"
Visibility="{Binding Path=IsDeleted, Converter={StaticResource AnonymizationRight2VisibilityConverter}, ConverterParameter=Customer}">
<Hyperlink
Click="Hyperlink_Anonymize_Click"
Foreground="#FFF97E7B"
Tag="{Binding}"
TargetName="_NewWindow">
Anonymisieren
</Hyperlink>
</TextBlock>
<TextBlock VerticalAlignment="Center" Grid.Column="5" Grid.Row="0" Grid.RowSpan="2" Margin="0,0,3,0" Visibility="{Binding Path=IsDeleted, Converter={StaticResource DeleteForGoodRight2VisibilityConverter}, ConverterParameter=Customer}">
<Hyperlink TargetName="_NewWindow" Foreground="#FFF97E7B" Click="Hyperlink_Delete_For_Good_Click" Tag="{Binding}">Endgültig löschen</Hyperlink>
<TextBlock
Grid.Row="0"
Grid.RowSpan="2"
Grid.Column="5"
Margin="0,0,3,0"
VerticalAlignment="Center"
Visibility="{Binding Path=IsDeleted, Converter={StaticResource DeleteForGoodRight2VisibilityConverter}, ConverterParameter=Customer}">
<Hyperlink
Click="Hyperlink_Delete_For_Good_Click"
Foreground="#FFF97E7B"
Tag="{Binding}"
TargetName="_NewWindow">
Endgültig löschen
</Hyperlink>
</TextBlock>
<TextBlock VerticalAlignment="Center" Grid.Column="3" Grid.Row="0" Grid.RowSpan="2" Margin="0,0,3,0" Visibility="{Binding Path=IsDeleted, Converter={StaticResource ReactivationRight2VisibilityConverter}, ConverterParameter=Customer}">
<Hyperlink TargetName="_NewWindow" Foreground="#FFFFFFFF" Click="Hyperlink_Reaktivieren_Click" Tag="{Binding}">Reaktivieren</Hyperlink>
</TextBlock>
<TextBlock VerticalAlignment="Center" Grid.Column="3" Grid.Row="0" Grid.RowSpan="2" Margin="0,0,3,0" Visibility="{Binding Path=IsArchived, Converter={StaticResource ArchiveRight2VisibilityConverter}, ConverterParameter=Customer}">
<Hyperlink TargetName="_NewWindow" Foreground="#FFFFFFFF" Click="Hyperlink_AusArchivHolen_Click" Tag="{Binding}">Aus Archiv holen</Hyperlink>
</TextBlock>
<TextBlock VerticalAlignment="Center" Grid.Column="6" Grid.Row="0" Grid.RowSpan="2">
<Hyperlink TargetName="_NewWindow" Foreground="#FFFFFFFF" NavigateUri="{Binding Converter={StaticResource CustomerDCPrintURLConverter}}" RequestNavigate="Hyperlink_OnRequestNavigate" Tag="{Binding}">Drucken</Hyperlink>
<TextBlock
Grid.Row="0"
Grid.RowSpan="2"
Grid.Column="3"
Margin="0,0,3,0"
VerticalAlignment="Center"
Visibility="{Binding Path=IsDeleted, Converter={StaticResource ReactivationRight2VisibilityConverter}, ConverterParameter=Customer}">
<Hyperlink
Click="Hyperlink_Reaktivieren_Click"
Foreground="#FFFFFFFF"
Tag="{Binding}"
TargetName="_NewWindow">
Reaktivieren
</Hyperlink>
</TextBlock>
<TextBlock
Grid.Row="0"
Grid.RowSpan="2"
Grid.Column="3"
Margin="0,0,3,0"
VerticalAlignment="Center"
Visibility="{Binding Path=IsArchived, Converter={StaticResource ArchiveRight2VisibilityConverter}, ConverterParameter=Customer}">
<Hyperlink
Click="Hyperlink_AusArchivHolen_Click"
Foreground="#FFFFFFFF"
Tag="{Binding}"
TargetName="_NewWindow">
Aus Archiv holen
</Hyperlink>
</TextBlock>
<TextBlock
Grid.Row="0"
Grid.RowSpan="2"
Grid.Column="6"
VerticalAlignment="Center">
<Hyperlink
Foreground="#FFFFFFFF"
NavigateUri="{Binding Converter={StaticResource CustomerDCPrintURLConverter}}"
RequestNavigate="Hyperlink_OnRequestNavigate"
Tag="{Binding}"
TargetName="_NewWindow">
Drucken
</Hyperlink>
</TextBlock>
</Grid>
</Border>
</Grid>
<ControlTemplate.Triggers>
<DataTrigger Binding="{Binding Path=IsArchived}" Value="True">
<Setter Property="Foreground" TargetName="txtDetail1" Value="#FF808080" />
<Setter Property="Foreground" TargetName="txtDetail2" Value="#FF808080" />
<Setter Property="Foreground" TargetName="txtDetail3" Value="#FF808080" />
<Setter Property="Foreground" TargetName="txtDetail4" Value="#FF808080" />
<Setter Property="Foreground" TargetName="txtDetail5" Value="#FF808080" />
<Setter TargetName="txtDetail1" Property="Foreground" Value="#FF808080" />
<Setter TargetName="txtDetail2" Property="Foreground" Value="#FF808080" />
<Setter TargetName="txtDetail3" Property="Foreground" Value="#FF808080" />
<Setter TargetName="txtDetail4" Property="Foreground" Value="#FF808080" />
<Setter TargetName="txtDetail5" Property="Foreground" Value="#FF808080" />
</DataTrigger>
<DataTrigger Binding="{Binding Path=IsDeleted}" Value="True">
<Setter Property="Foreground" TargetName="txtDetail1" Value="#FFF97E7B" />
<Setter Property="Foreground" TargetName="txtDetail2" Value="#FFF97E7B" />
<Setter Property="Foreground" TargetName="txtDetail3" Value="#FFF97E7B" />
<Setter Property="Foreground" TargetName="txtDetail4" Value="#FFF97E7B" />
<Setter Property="Foreground" TargetName="txtDetail5" Value="#FFF97E7B" />
</DataTrigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="OpacityMask" TargetName="ItemBorder">
<DataTrigger Binding="{Binding Path=IsDeleted}" Value="True">
<Setter TargetName="txtDetail1" Property="Foreground" Value="#FFF97E7B" />
<Setter TargetName="txtDetail2" Property="Foreground" Value="#FFF97E7B" />
<Setter TargetName="txtDetail3" Property="Foreground" Value="#FFF97E7B" />
<Setter TargetName="txtDetail4" Property="Foreground" Value="#FFF97E7B" />
<Setter TargetName="txtDetail5" Property="Foreground" Value="#FFF97E7B" />
</DataTrigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="ItemBorder" Property="OpacityMask">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#33000000" Offset="0" />
<GradientStop Color="#66000000" Offset="1" />
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#33000000" />
<GradientStop Offset="1" Color="#66000000" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="ListBoxItem.IsSelected" Value="True">
<Setter Property="OpacityMask" TargetName="ItemBorder">
<Setter TargetName="ItemBorder" Property="OpacityMask">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#99000000" Offset="0" />
<GradientStop Color="#CC000000" Offset="1" />
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#99000000" />
<GradientStop Offset="1" Color="#CC000000" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
@@ -110,11 +236,11 @@
<Condition Property="ListBoxItem.IsSelected" Value="True" />
<Condition Property="Selector.IsSelectionActive" Value="False" />
</MultiTrigger.Conditions>
<Setter Property="OpacityMask" TargetName="ItemBorder">
<Setter TargetName="ItemBorder" Property="OpacityMask">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#99000000" Offset="0" />
<GradientStop Color="#B2000000" Offset="1" />
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#99000000" />
<GradientStop Offset="1" Color="#B2000000" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
@@ -124,60 +250,92 @@
</Setter.Value>
</Setter>
</Style>
<DataTemplate x:Key="CustomerDetailInfoTemplate">
<StackPanel>
<TextBlock Margin="5" FontSize="14" Foreground="#FFD2D2D2" TextWrapping="Wrap" FontFamily="Microsoft Sans Serif" Text="{Binding CurrentSupportConcept}" />
<ListView ItemsSource="{Binding SupportConceptInfos}" Margin="10 5 5 5" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" Background="{x:Null}" BorderBrush="{x:Null}">
<ListView.ItemContainerStyle>
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="Focusable" Value="false" />
</Style>
</ListView.ItemContainerStyle>
<ListView.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent" />
</ListView.Resources>
<ListView.ItemTemplate>
<DataTemplate>
<Grid>
<Border Margin="0 0 0 3" x:Name="ItemBorder" CornerRadius="5" MinHeight="30" Background="#FF000000">
<Border.OpacityMask>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#19000000" Offset="0" />
<GradientStop Color="#26000000" Offset="1" />
</LinearGradientBrush>
</Border.OpacityMask>
</Border>
<StackPanel Margin="5">
<TextBlock Text="{Binding CostBearer, Converter={StaticResource StringFormatConverter}, ConverterParameter={markup:Translate Kostenträger: \{0\}}}" FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" />
<TextBlock FontSize="12" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" Margin="5 5 0 0" Text="{Binding ApprovedHours, Converter={StaticResource StringFormatConverter}, ConverterParameter=Genehmigte FLS: \{0:0.##\}}" />
<TextBlock FontSize="12" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" Margin="5 2 0 0" Text="{Binding RecordedHours, Converter={StaticResource StringFormatConverter}, ConverterParameter=Geleistete FLS: \{0:0.##\}}" />
</StackPanel>
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackPanel>
</DataTemplate>
</Grid.Resources>
<localNavView:MainNavigationView OpenMailMergeWindow="MainNavigationView_OnOpenMailMergeWindow"
x:Name="mainNavigationView"
MainGroupHeader="{markup:Translate Klienten}"
CreateNewObject="mainNavigationView_CreateNewObject"
OpenObject="mainNavigationView_OpenObject"
DeleteObject="mainNavigationView_DeleteObject"
ArchiveObject="mainNavigationView_ArchiveObject"
OpenAiChat="MainNavigationView_OpenAiChat"
ExcelExport="mainNavigationView_ExcelExport"
Print="mainNavigationView_Print"
DeleteDemands="DeleteAll, CustomerView_Delete"
CreateDemands="CreateAll, CustomerView_Create"
ShowDetailsPanel="True"
DetailPanelItemTemplate="{StaticResource CustomerDetailInfoTemplate}"
ContentGroupStyle="{StaticResource CustomerNavigationStyle}"
MainListItemStyle="{StaticResource CustomerDetailStyle}"
HistoryListItemStyle="{StaticResource SearchSimpleStyle}"
OnReloadData="MainNavigationView_OnReloadData"/>
<DataTemplate x:Key="CustomerDetailInfoTemplate">
<StackPanel>
<TextBlock
Margin="5"
FontFamily="Microsoft Sans Serif"
FontSize="14"
Foreground="#FFD2D2D2"
Text="{Binding CurrentSupportConcept}"
TextWrapping="Wrap" />
<ListView
Margin="10,5,5,5"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch"
Background="{x:Null}"
BorderBrush="{x:Null}"
ItemsSource="{Binding SupportConceptInfos}">
<ListView.ItemContainerStyle>
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="Focusable" Value="false" />
</Style>
</ListView.ItemContainerStyle>
<ListView.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent" />
</ListView.Resources>
<ListView.ItemTemplate>
<DataTemplate>
<Grid>
<Border
x:Name="ItemBorder"
MinHeight="30"
Margin="0,0,0,3"
Background="#FF000000"
CornerRadius="5">
<Border.OpacityMask>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#19000000" />
<GradientStop Offset="1" Color="#26000000" />
</LinearGradientBrush>
</Border.OpacityMask>
</Border>
<StackPanel Margin="5">
<TextBlock
FontFamily="Microsoft Sans Serif"
FontSize="14"
Foreground="#FFD2D2D2"
Text="{Binding CostBearer, Converter={StaticResource StringFormatConverter}, ConverterParameter={markup:Translate Kostenträger: \{0\}}}" />
<TextBlock
Margin="5,5,0,0"
FontFamily="Microsoft Sans Serif"
FontSize="12"
Foreground="#FFD2D2D2"
Text="{Binding ApprovedHours, Converter={StaticResource StringFormatConverter}, ConverterParameter=Genehmigte FLS: \{0:0.##\}}" />
<TextBlock
Margin="5,2,0,0"
FontFamily="Microsoft Sans Serif"
FontSize="12"
Foreground="#FFD2D2D2"
Text="{Binding RecordedHours, Converter={StaticResource StringFormatConverter}, ConverterParameter=Geleistete FLS: \{0:0.##\}}" />
</StackPanel>
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackPanel>
</DataTemplate>
</Grid.Resources>
<localNavView:MainNavigationView
x:Name="mainNavigationView"
ArchiveObject="mainNavigationView_ArchiveObject"
ContentGroupStyle="{StaticResource CustomerNavigationStyle}"
CreateDemands="CreateAll, CustomerView_Create"
CreateNewObject="mainNavigationView_CreateNewObject"
DeleteDemands="DeleteAll, CustomerView_Delete"
DeleteObject="mainNavigationView_DeleteObject"
DetailPanelItemTemplate="{StaticResource CustomerDetailInfoTemplate}"
ExcelExport="mainNavigationView_ExcelExport"
HistoryListItemStyle="{StaticResource SearchSimpleStyle}"
MainGroupHeader="{markup:Translate Klienten}"
MainListItemStyle="{StaticResource CustomerDetailStyle}"
OnReloadData="MainNavigationView_OnReloadData"
OpenAiChat="MainNavigationView_OpenAiChat"
OpenMailMergeWindow="MainNavigationView_OnOpenMailMergeWindow"
OpenObject="mainNavigationView_OpenObject"
Print="mainNavigationView_Print"
ShowDetailsPanel="True" />
</Grid>
</Grid>
</localView:BeWoView>

View File

@@ -25,482 +25,535 @@ using BS.Shared.Translation;
using Microsoft.Win32;
using BeWo.AI;
using BeWo.View.Document;
using DevExpress.Mvvm;
using BeWo.View.Detail.AI;
using System;
using BeWo.View.Windows;
using System.Collections;
using System.Windows.Input;
namespace BeWo.View.Navigation
{
/// <summary>
/// Interaktionslogik für CustomerNavigationView.xaml
/// </summary>
public partial class CustomerNavigationView
{
//private readonly CheckBox chkShowOnlyMyCustomers;
//private readonly CheckBox chkShowOnlyTeamCustomers;
private readonly ComboBox supportConceptFilterComboBox;
/// <summary>
/// Interaktionslogik für CustomerNavigationView.xaml
/// </summary>
public partial class CustomerNavigationView
{
//private readonly CheckBox chkShowOnlyMyCustomers;
//private readonly CheckBox chkShowOnlyTeamCustomers;
private readonly ComboBox supportConceptFilterComboBox;
private IEnumerable<IFilterableDC> objectList;
private IEnumerable<IFilterableDC> recentList;
private IEnumerable<IFilterableDC> objectList;
private IEnumerable<IFilterableDC> recentList;
public CustomerNavigationView()
{
InitializeComponent();
public CustomerNavigationView()
{
InitializeComponent();
mainNavigationView.Sorter = new CustomerSorter();
mainNavigationView.ArchiveButtonVisible = BeWoApp.LoggedOnUser.HasRight(UserRightType.Customer_AllowArchiving);
mainNavigationView.ShowArchivedObjectsVisible = true;
mainNavigationView.OpenAiWindowCommand = new DelegateCommand(OpenAiWindow, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleView));
mainNavigationView.OpenAiPopupCommand = new DelegateCommand(OpenAiPopup, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleView2));
mainNavigationView.Sorter = new CustomerSorter();
mainNavigationView.ArchiveButtonVisible = BeWoApp.LoggedOnUser.HasRight(UserRightType.Customer_AllowArchiving);
mainNavigationView.ShowArchivedObjectsVisible = true;
supportConceptFilterComboBox = new ComboBox();
//supportConceptFilterComboBox.HorizontalAlignment = "Left";
//supportConceptFilterComboBox.FontFamily = "Microsoft Sans Serif";
supportConceptFilterComboBox = new ComboBox();
//supportConceptFilterComboBox.HorizontalAlignment = "Left";
//supportConceptFilterComboBox.FontFamily = "Microsoft Sans Serif";
//supportConceptFilterComboBox.Foreground = new SolidColorBrush(Color.FromRgb(210, 210, 210));
supportConceptFilterComboBox.FontSize = 12;
supportConceptFilterComboBox.Margin = new Thickness(10, 0, 0, 0);
supportConceptFilterComboBox.MinWidth = 100;
//supportConceptFilterComboBox.DisplayMemberPath = "DisplayName";
//supportConceptFilterComboBox.SelectionChanged = "sortCombo_SelectionChanged";
supportConceptFilterComboBox.Style = FindResource("SortComboBox") as Style;
//supportConceptFilterComboBox.Foreground = new SolidColorBrush(Color.FromRgb(210, 210, 210));
supportConceptFilterComboBox.FontSize = 12;
supportConceptFilterComboBox.Margin = new Thickness(10, 0, 0, 0);
supportConceptFilterComboBox.MinWidth = 100;
//supportConceptFilterComboBox.DisplayMemberPath = "DisplayName";
//supportConceptFilterComboBox.SelectionChanged = "sortCombo_SelectionChanged";
supportConceptFilterComboBox.Style = FindResource("SortComboBox") as Style;
if (BeWoApp.AppSettings.ShowAIInternal)
{
mainNavigationView.btnOpenAi.Visibility = Visibility.Visible;
}
if (BeWoApp.AppSettings.ShowAIInternal)
{
mainNavigationView.btnOpenAi.Visibility = Visibility.Visible;
}
if (BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View) || BeWoApp.LoggedOnUser.HasRight(UserRightType.ViewAll))
{
supportConceptFilterComboBox.Items.Add(new CustomerFilterItem(CustomerFilterEnum.All));
}
if(BeWoApp.LoggedOnUser.HasRight(UserRightType.Customer_ViewMyTeams))
{
supportConceptFilterComboBox.Items.Add(new CustomerFilterItem(CustomerFilterEnum.TeamCustomer));
}
supportConceptFilterComboBox.Items.Add(new CustomerFilterItem(CustomerFilterEnum.MyCustomer));
if (BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View) || BeWoApp.LoggedOnUser.HasRight(UserRightType.ViewAll))
{
supportConceptFilterComboBox.Items.Add(new CustomerFilterItem(CustomerFilterEnum.All));
}
CustomerFilterItem selectedItem = null;
if (BeWoApp.LoggedOnUser.HasRight(UserRightType.Customer_ViewMyTeams))
{
supportConceptFilterComboBox.Items.Add(new CustomerFilterItem(CustomerFilterEnum.TeamCustomer));
}
supportConceptFilterComboBox.Items.Add(new CustomerFilterItem(CustomerFilterEnum.MyCustomer));
switch(BeWoApp.AppSettings.CustomerFilterSupportConcepts)
{
case CustomerFilterEnum.All:
if(BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View) || BeWoApp.LoggedOnUser.HasRight(UserRightType.ViewAll))
{
selectedItem = new CustomerFilterItem(CustomerFilterEnum.All);
}
break;
case CustomerFilterEnum.TeamCustomer:
if(BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View) ||
BeWoApp.LoggedOnUser.HasRight(UserRightType.ViewAll) ||
BeWoApp.LoggedOnUser.HasRight(UserRightType.Customer_ViewMyTeams))
{
selectedItem = new CustomerFilterItem(CustomerFilterEnum.TeamCustomer);
}
break;
}
if(selectedItem == null)
{
selectedItem = new CustomerFilterItem(CustomerFilterEnum.MyCustomer);
}
supportConceptFilterComboBox.SelectedItem = selectedItem;
supportConceptFilterComboBox.SelectionChanged += SupportConceptFilterComboBoxOnSelectionChanged;
CustomerFilterItem selectedItem = null;
//chkShowOnlyMyCustomers = new CheckBox
// {
// FontSize = 12,
// Margin = new Thickness(10, 0, 0, 0),
// Content = Translator.Translate("Meine Klienten"),
// VerticalAlignment = VerticalAlignment.Center
// };
//chkShowOnlyTeamCustomers = new CheckBox
//{
// FontSize = 12,
// Margin = new Thickness(10, 0, 0, 0),
// Content = Translator.Translate("Klienten meines Teams"),
// VerticalAlignment = VerticalAlignment.Center
//};
switch (BeWoApp.AppSettings.CustomerFilterSupportConcepts)
{
case CustomerFilterEnum.All:
if (BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View) || BeWoApp.LoggedOnUser.HasRight(UserRightType.ViewAll))
{
selectedItem = new CustomerFilterItem(CustomerFilterEnum.All);
}
//var b = FindResource("MainGroupBoxForegroundBrush") as Brush;
//if (b != null)
//{
// chkShowOnlyMyCustomers.Foreground = b;
// chkShowOnlyTeamCustomers.Foreground = b;
//}
break;
case CustomerFilterEnum.TeamCustomer:
if (BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View) ||
BeWoApp.LoggedOnUser.HasRight(UserRightType.ViewAll) ||
BeWoApp.LoggedOnUser.HasRight(UserRightType.Customer_ViewMyTeams))
{
selectedItem = new CustomerFilterItem(CustomerFilterEnum.TeamCustomer);
}
//if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View) &&
// !BeWoApp.LoggedOnUser.HasRight(UserRightType.ViewAll))
//{
// chkShowOnlyMyCustomers.IsChecked = true;
// chkShowOnlyMyCustomers.IsEnabled = false;
//}
//else
//{
// chkShowOnlyMyCustomers.IsChecked = BeWoApp.AppSettings.ShowOnlyMyClients;
//}
break;
}
//if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View) &&
// !BeWoApp.LoggedOnUser.HasRight(UserRightType.ViewAll))
//{
// chkShowOnlyTeamCustomers.IsChecked = true;
// chkShowOnlyTeamCustomers.IsEnabled = false;
//}
//else
//{
// chkShowOnlyTeamCustomers.IsChecked = BeWoApp.AppSettings.ShowOnlyTeamClients;
//}
if (selectedItem == null)
{
selectedItem = new CustomerFilterItem(CustomerFilterEnum.MyCustomer);
}
//chkShowOnlyMyCustomers.Click += chkShowOnlyMyCustomers_Click;
//chkShowOnlyTeamCustomers.Click += chkShowOnlyMyCustomers_Click;
supportConceptFilterComboBox.SelectedItem = selectedItem;
supportConceptFilterComboBox.SelectionChanged += SupportConceptFilterComboBoxOnSelectionChanged;
//mainNavigationView.AddControlToSortPanel(chkShowOnlyMyCustomers);
//mainNavigationView.AddControlToSortPanel(chkShowOnlyTeamCustomers);
var lbl = new TextBlock
{
Text = "Filter:",
FontSize = 12,
Margin = new Thickness(8, 2, -3, 0)
};
//chkShowOnlyMyCustomers = new CheckBox
// {
// FontSize = 12,
// Margin = new Thickness(10, 0, 0, 0),
// Content = Translator.Translate("Meine Klienten"),
// VerticalAlignment = VerticalAlignment.Center
// };
//chkShowOnlyTeamCustomers = new CheckBox
//{
// FontSize = 12,
// Margin = new Thickness(10, 0, 0, 0),
// Content = Translator.Translate("Klienten meines Teams"),
// VerticalAlignment = VerticalAlignment.Center
//};
mainNavigationView.sortPanel.Children.Insert(3, lbl);
mainNavigationView.sortPanel.Children.Insert(4, supportConceptFilterComboBox);
UpdateCustomFilter();
}
//var b = FindResource("MainGroupBoxForegroundBrush") as Brush;
//if (b != null)
//{
// chkShowOnlyMyCustomers.Foreground = b;
// chkShowOnlyTeamCustomers.Foreground = b;
//}
private void SupportConceptFilterComboBoxOnSelectionChanged(object o, SelectionChangedEventArgs selectionChangedEventArgs)
{
BeWoApp.AppSettings.CustomerFilterSupportConcepts = ((CustomerFilterItem) supportConceptFilterComboBox.SelectedItem)?.CustomerFilter ?? CustomerFilterEnum.MyCustomer;
//if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View) &&
// !BeWoApp.LoggedOnUser.HasRight(UserRightType.ViewAll))
//{
// chkShowOnlyMyCustomers.IsChecked = true;
// chkShowOnlyMyCustomers.IsEnabled = false;
//}
//else
//{
// chkShowOnlyMyCustomers.IsChecked = BeWoApp.AppSettings.ShowOnlyMyClients;
//}
BeWoApp.SaveAppSettings();
//if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View) &&
// !BeWoApp.LoggedOnUser.HasRight(UserRightType.ViewAll))
//{
// chkShowOnlyTeamCustomers.IsChecked = true;
// chkShowOnlyTeamCustomers.IsEnabled = false;
//}
//else
//{
// chkShowOnlyTeamCustomers.IsChecked = BeWoApp.AppSettings.ShowOnlyTeamClients;
//}
UpdateCustomFilter();
}
//chkShowOnlyMyCustomers.Click += chkShowOnlyMyCustomers_Click;
//chkShowOnlyTeamCustomers.Click += chkShowOnlyMyCustomers_Click;
private CustomFilter CreateNewCustomFilter()
{
var filter = new CustomerNavigationFilter {CustomerFilter = ((CustomerFilterItem) supportConceptFilterComboBox.SelectedItem)?.CustomerFilter ?? CustomerFilterEnum.MyCustomer};
//mainNavigationView.AddControlToSortPanel(chkShowOnlyMyCustomers);
//mainNavigationView.AddControlToSortPanel(chkShowOnlyTeamCustomers);
var lbl = new TextBlock
{
Text = "Filter:",
FontSize = 12,
Margin = new Thickness(8, 2, -3, 0)
};
return filter;
}
mainNavigationView.sortPanel.Children.Insert(3, lbl);
mainNavigationView.sortPanel.Children.Insert(4, supportConceptFilterComboBox);
private void OnLoaded(object sender, RoutedEventArgs e)
{
ServiceFacade.DoCustomerServiceAsync(s => s.ConvertToNewSubstitutionType(), n => this.Dispatch(delegate
{
ReloadData(false);
}));
}
UpdateCustomFilter();
}
private void UpdateCustomFilter()
{
mainNavigationView.CustomFilter = CreateNewCustomFilter();
}
public Dictionary<TableID, long[]> GetVisibleInformationReferences()
{
var visible = mainNavigationView.objectListBox.ItemsSource;
private void ChkShowOnlyMyCustomers_Click(object sender, RoutedEventArgs e)
{
//if (chkShowOnlyMyCustomers.IsChecked != null)
// BeWoApp.AppSettings.ShowOnlyMyClients = chkShowOnlyMyCustomers.IsChecked.Value;
//if (chkShowOnlyTeamCustomers.IsChecked != null)
// BeWoApp.AppSettings.ShowOnlyTeamClients = chkShowOnlyTeamCustomers.IsChecked.Value;
BeWoApp.SaveAppSettings();
return GetVisibleInformationReferences(visible);
}
UpdateCustomFilter();
}
private Dictionary<TableID, long[]> GetVisibleInformationReferences(IEnumerable visible_customers)
{
var oids = new List<long>();
foreach (var c in visible_customers)
{
var customer = c as CompactCustomerDC;
oids.Add(customer.CustomerOid);
}
private bool mainNavigationView_ArchiveObject(IFilterableDC obj)
{
var cdc = obj as CompactCustomerDC;
if (cdc != null)
{
if (MessageBox.Show(Translator.Translate("Wollen Sie den Klient '{0}' wirklich archivieren?", cdc.FirstName + " " + cdc.LastName), "Archivieren", MessageBoxButton.YesNo, MessageBoxImage.Exclamation) == MessageBoxResult.Yes)
{
ServiceFacade.DoCustomerServiceAsync(
s =>
{
s.ArchiveCustomer(cdc.CustomerOid, cdc.CustomerVersion);
return cdc;
},
cb => cb.CustomerVersion++);
var dict = new Dictionary<TableID, long[]>() {
{ TableID.Customer, oids.ToArray()}
};
Cache.GetInstance().ClearSupportConceptTree();
return true;
}
}
return dict;
}
return false;
}
private void OpenAiWindow()
{
var context = GetVisibleInformationReferences();
private void mainNavigationView_CreateNewObject()
{
VMFactory.CreateCustomerVMAsync(cb => this.Dispatch(() => MainControl.NavigateTo(new CustomerView(cb) {ParentView = this})));
}
var window = BeWoWindowBuilder.AiWindowBuilder.GetAiConversationWindow(UIContext.Customer, context);
private bool mainNavigationView_DeleteObject(IFilterableDC obj)
{
var cdc = obj as CompactCustomerDC;
if (cdc != null)
{
if (MessageBox.Show(Translator.Translate("Wollen Sie den Klient '{0}' wirklich löschen?", cdc.FirstName + " " + cdc.LastName), "Löschen", MessageBoxButton.YesNo, MessageBoxImage.Exclamation) == MessageBoxResult.Yes)
{
window?.ShowDialog();
}
CustomerInfoDC details = ServiceFacade.DoOperationsServiceSync(s => s.GetCustomerInfosForCustomerOid(cdc.CustomerOid));
bool delete = true;
if (details != null)
{
if (!string.IsNullOrEmpty(details.CurrentSupportConcept) && details.CurrentSupportConcept.ToLower() != Translator.Translate("Kein aktueller Hilfeplan").ToLower())
{
if (MessageBox.Show(Translator.Translate("Für Klient '{0}' wurde bereits ein Hilfeplan angelegt. Der Hilfeplan wird dadurch auch gelöscht!\n Möchten Sie wirklich fortfahren und den Klient löschen?", cdc.FirstName + " " + cdc.LastName), "Löschen", MessageBoxButton.YesNo, MessageBoxImage.Exclamation) == MessageBoxResult.No)
{
delete = false;
}
}
}
if (delete)
{
ServiceFacade.DoCustomerServiceAsync(
s =>
{
s.DeactivateCustomer(cdc.CustomerOid, cdc.CustomerVersion);
return cdc;
}, cb => cb.CustomerVersion++);
private void OpenAiPopup()
{
var context = GetVisibleInformationReferences();
Cache.GetInstance().ClearSupportConceptTree();
return true;
}
}
}
var control = BeWoWindowBuilder.AiWindowBuilder.GetAiConversationControl(UIContext.Customer, context);
return false;
}
if (control is object)
MainControl.ShowControlAsModalPopup(control);
}
private void mainNavigationView_ExcelExport(object sender, EventArgs<IEnumerable<IFilterableDC>> e)
{
private void SupportConceptFilterComboBoxOnSelectionChanged(object o, SelectionChangedEventArgs selectionChangedEventArgs)
{
BeWoApp.AppSettings.CustomerFilterSupportConcepts = ((CustomerFilterItem)supportConceptFilterComboBox.SelectedItem)?.CustomerFilter ?? CustomerFilterEnum.MyCustomer;
BeWoApp.SaveAppSettings();
UpdateCustomFilter();
}
private CustomFilter CreateNewCustomFilter()
{
var filter = new CustomerNavigationFilter { CustomerFilter = ((CustomerFilterItem)supportConceptFilterComboBox.SelectedItem)?.CustomerFilter ?? CustomerFilterEnum.MyCustomer };
return filter;
}
private void OnLoaded(object sender, RoutedEventArgs e)
{
ServiceFacade.DoCustomerServiceAsync(s => s.ConvertToNewSubstitutionType(), n => this.Dispatch(delegate
{
ReloadData(false);
}));
CommandManager.InvalidateRequerySuggested();
}
private void UpdateCustomFilter()
{
mainNavigationView.CustomFilter = CreateNewCustomFilter();
}
private void ChkShowOnlyMyCustomers_Click(object sender, RoutedEventArgs e)
{
//if (chkShowOnlyMyCustomers.IsChecked != null)
// BeWoApp.AppSettings.ShowOnlyMyClients = chkShowOnlyMyCustomers.IsChecked.Value;
//if (chkShowOnlyTeamCustomers.IsChecked != null)
// BeWoApp.AppSettings.ShowOnlyTeamClients = chkShowOnlyTeamCustomers.IsChecked.Value;
BeWoApp.SaveAppSettings();
UpdateCustomFilter();
}
private bool mainNavigationView_ArchiveObject(IFilterableDC obj)
{
var cdc = obj as CompactCustomerDC;
if (cdc != null)
{
if (MessageBox.Show(Translator.Translate("Wollen Sie den Klient '{0}' wirklich archivieren?", cdc.FirstName + " " + cdc.LastName), "Archivieren", MessageBoxButton.YesNo, MessageBoxImage.Exclamation) == MessageBoxResult.Yes)
{
ServiceFacade.DoCustomerServiceAsync(
s =>
{
s.ArchiveCustomer(cdc.CustomerOid, cdc.CustomerVersion);
return cdc;
},
cb => cb.CustomerVersion++);
Cache.GetInstance().ClearSupportConceptTree();
return true;
}
}
return false;
}
private void mainNavigationView_CreateNewObject()
{
VMFactory.CreateCustomerVMAsync(cb => this.Dispatch(() => MainControl.NavigateTo(new CustomerView(cb) { ParentView = this })));
}
private bool mainNavigationView_DeleteObject(IFilterableDC obj)
{
var cdc = obj as CompactCustomerDC;
if (cdc != null)
{
if (MessageBox.Show(Translator.Translate("Wollen Sie den Klient '{0}' wirklich löschen?", cdc.FirstName + " " + cdc.LastName), "Löschen", MessageBoxButton.YesNo, MessageBoxImage.Exclamation) == MessageBoxResult.Yes)
{
CustomerInfoDC details = ServiceFacade.DoOperationsServiceSync(s => s.GetCustomerInfosForCustomerOid(cdc.CustomerOid));
bool delete = true;
if (details != null)
{
if (!string.IsNullOrEmpty(details.CurrentSupportConcept) && details.CurrentSupportConcept.ToLower() != Translator.Translate("Kein aktueller Hilfeplan").ToLower())
{
if (MessageBox.Show(Translator.Translate("Für Klient '{0}' wurde bereits ein Hilfeplan angelegt. Der Hilfeplan wird dadurch auch gelöscht!\n Möchten Sie wirklich fortfahren und den Klient löschen?", cdc.FirstName + " " + cdc.LastName), "Löschen", MessageBoxButton.YesNo, MessageBoxImage.Exclamation) == MessageBoxResult.No)
{
delete = false;
}
}
}
if (delete)
{
ServiceFacade.DoCustomerServiceAsync(
s =>
{
s.DeactivateCustomer(cdc.CustomerOid, cdc.CustomerVersion);
return cdc;
}, cb => cb.CustomerVersion++);
Cache.GetInstance().ClearSupportConceptTree();
return true;
}
}
}
return false;
}
private void mainNavigationView_ExcelExport(object sender, EventArgs<IEnumerable<IFilterableDC>> e)
{
var path = BeWoApp.GetAndCreateUserAppDataPath() + Translator.Translate("\\Klienten.xls");
var sf = new SaveFileDialog { FileName = Path.GetFileName(path), Filter = "Microsoft Excel 97-2003-Arbeitsblatt|*.xls|Alle Dateien|*.*" };
if (sf.ShowDialog() != true)
return;
var sf = new SaveFileDialog { FileName = Path.GetFileName(path), Filter = "Microsoft Excel 97-2003-Arbeitsblatt|*.xls|Alle Dateien|*.*" };
if (sf.ShowDialog() != true)
return;
ServiceFacade.DoDownloadServiceSync(s => BeWoUtils.WriteExcelFile(s.PrepareExcelFileCustomerExport(mainNavigationView.DownloadLinkEngine.ExcelFileId, e.Data.Cast<CompactCustomerDC>().Select(c => c.CustomerOid).ToList()), sf.FileName));
}
ServiceFacade.DoDownloadServiceSync(s => BeWoUtils.WriteExcelFile(s.PrepareExcelFileCustomerExport(mainNavigationView.DownloadLinkEngine.ExcelFileId, e.Data.Cast<CompactCustomerDC>().Select(c => c.CustomerOid).ToList()), sf.FileName));
}
private void mainNavigationView_OpenObject(IFilterableDC obj)
{
var cdc = obj as CompactCustomerDC;
if (cdc != null)
{
VMFactory.CreateCustomerVMAsync(cdc.CustomerOid, cb => this.Dispatch(() => MainControl.NavigateTo(new CustomerView(cb) {ParentView = this})));
}
}
public override void ChildViewClosed()
{
recentList = null;
objectList = null;
}
private void MainNavigationView_OnReloadData()
{
ReloadData(true);
}
private void ReloadData(bool refresh)
private void mainNavigationView_OpenObject(IFilterableDC obj)
{
if (refresh || recentList == null)
{
ServiceFacade.DoCustomerServiceAsync(
var cdc = obj as CompactCustomerDC;
if (cdc != null)
{
VMFactory.CreateCustomerVMAsync(cdc.CustomerOid, cb => this.Dispatch(() => MainControl.NavigateTo(new CustomerView(cb) { ParentView = this })));
}
}
public override void ChildViewClosed()
{
recentList = null;
objectList = null;
}
private void MainNavigationView_OnReloadData()
{
ReloadData(true);
}
private void ReloadData(bool refresh)
{
if (refresh || recentList == null)
{
ServiceFacade.DoCustomerServiceAsync(
s => s.GetAllCustomersCompact(BeWoApp.LoggedOnUser.Employee.EmployeeOid),
r => this.Dispatch(delegate
{
objectList = r;
mainNavigationView.ShowSearchResult(objectList);
}));
r => this.Dispatch(delegate
{
objectList = r;
ServiceFacade.DoCustomerServiceAsync(s => s.GetLastOpenedCustomers(),
r =>
this.Dispatch(delegate
{
if(BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View) || BeWoApp.LoggedOnUser.HasRight(UserRightType.ViewAll))
{
recentList = r;
}
else if(BeWoApp.LoggedOnUser.HasRight(UserRightType.Customer_ViewMyCustomers))
{
recentList = r.Where(w => BeWoApp.LoggedOnEmployee.RelatedCustomers.Select(s3 => s3.Customer.CustomerOid).Contains(w.CustomerOid));
}
else
{
recentList = new List<IFilterableDC>();
}
mainNavigationView.ShowSearchResult(objectList);
}));
mainNavigationView.ShowHistory(recentList);
ServiceFacade.DoCustomerServiceAsync(s => s.GetLastOpenedCustomers(),
r =>
this.Dispatch(delegate
{
if (BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View) || BeWoApp.LoggedOnUser.HasRight(UserRightType.ViewAll))
{
recentList = r;
}
else if (BeWoApp.LoggedOnUser.HasRight(UserRightType.Customer_ViewMyCustomers))
{
recentList = r.Where(w => BeWoApp.LoggedOnEmployee.RelatedCustomers.Select(s3 => s3.Customer.CustomerOid).Contains(w.CustomerOid));
}
else
{
recentList = new List<IFilterableDC>();
}
mainNavigationView.ShowHistory(recentList);
#if DEBUG
if(DebugConfig.CurrentConfig is object && DebugConfig.CurrentConfig.DebugConfigMode == DebugConfigMode.FeatureCustomerWohnhilfe)
{
mainNavigationView_OpenObject(recentList.FirstOrDefault() ?? objectList.FirstOrDefault());
}
if (DebugConfig.CurrentConfig is object && DebugConfig.CurrentConfig.DebugConfigMode == DebugConfigMode.FeatureCustomerWohnhilfe)
{
mainNavigationView_OpenObject(recentList.FirstOrDefault() ?? objectList.FirstOrDefault());
}
#endif
})
);
}
else
{
mainNavigationView.ShowSearchResult(objectList);
mainNavigationView.ShowHistory(recentList);
}
}
})
);
}
else
{
mainNavigationView.ShowSearchResult(objectList);
mainNavigationView.ShowHistory(recentList);
}
}
private void Hyperlink_OnRequestNavigate(object sender, RequestNavigateEventArgs e)
{
//var alleVorlagen = ServiceFacade.DoOperationsServiceSync(s => s.Getvor());
private void Hyperlink_OnRequestNavigate(object sender, RequestNavigateEventArgs e)
{
//var alleVorlagen = ServiceFacade.DoOperationsServiceSync(s => s.Getvor());
var alleVorlagen = ServiceFacade.DoOperationsServiceSync(s => s.GetDokumentvorlagenForType(TableID.Customer));
if (alleVorlagen.Count > 0)
{
var c = (CompactCustomerDC)((Hyperlink)sender).Tag;
var alleVorlagen = ServiceFacade.DoOperationsServiceSync(s => s.GetDokumentvorlagenForType(TableID.Customer));
if (alleVorlagen.Count > 0)
{
var c = (CompactCustomerDC)((Hyperlink)sender).Tag;
DokumentViewHelper.OpenTemplateSelectionDialog(alleVorlagen, TableID.Customer, c.CustomerOid);
}
else
{
BeWoUtils.NavigateToReportUri(((Hyperlink)sender).NavigateUri.ToString(), "Druckvorschau");
}
//var folderDCs = VMFactory.CreateFolderList(TableID.Vorlagentabelle, (long)vm.DocTreeItemOid);
DokumentViewHelper.OpenTemplateSelectionDialog(alleVorlagen, TableID.Customer, c.CustomerOid);
}
else
{
BeWoUtils.NavigateToReportUri(((Hyperlink)sender).NavigateUri.ToString(), "Druckvorschau");
}
//var folderDCs = VMFactory.CreateFolderList(TableID.Vorlagentabelle, (long)vm.DocTreeItemOid);
}
}
private void MainNavigationView_OnOpenMailMergeWindow(List<IFilterableDC> allCustomers, IFilterableDC selectedCustomer)
{
var mmw = new MailMergeWindow(this, typeof(CustomerDC), objectList.ToList(), selectedCustomer) { Sorter = new CustomerSorter() };
mmw.Show();
}
private void Hyperlink_Reaktivieren_Click(object sender, RoutedEventArgs e)
{
var customer = (CompactCustomerDC) ((Hyperlink)sender).Tag;
if (MessageBox.Show(Translator.Translate("Wollen Sie den Klient '{0}' wirklich reaktivieren?", customer.FirstName + " " + customer.LastName), "Reaktivieren", MessageBoxButton.YesNo, MessageBoxImage.Exclamation) == MessageBoxResult.No)
{
return;
}
private void MainNavigationView_OnOpenMailMergeWindow(List<IFilterableDC> allCustomers, IFilterableDC selectedCustomer)
{
var mmw = new MailMergeWindow(this, typeof(CustomerDC), objectList.ToList(), selectedCustomer) { Sorter = new CustomerSorter() };
ServiceFacade.DoCustomerServiceAsync(s =>
{
mmw.Show();
}
private void Hyperlink_Reaktivieren_Click(object sender, RoutedEventArgs e)
{
var customer = (CompactCustomerDC)((Hyperlink)sender).Tag;
if (MessageBox.Show(Translator.Translate("Wollen Sie den Klient '{0}' wirklich reaktivieren?", customer.FirstName + " " + customer.LastName), "Reaktivieren", MessageBoxButton.YesNo, MessageBoxImage.Exclamation) == MessageBoxResult.No)
{
return;
}
ServiceFacade.DoCustomerServiceAsync(s =>
{
s.ReactivateCustomer(customer.CustomerOid, customer.CustomerVersion);
return customer;
}, cb => cb.CustomerVersion++);
return customer;
}, cb => cb.CustomerVersion++);
Cache.GetInstance().ClearSupportConceptTree();
customer.ActivationType = ActivationTypeId.Active;
customer.ActivationType = ActivationTypeId.Active;
var context = mainNavigationView.objectListBox.DataContext;
mainNavigationView.objectListBox.DataContext = null;
mainNavigationView.objectListBox.DataContext = context;
}
private void Hyperlink_AusArchivHolen_Click(object sender, RoutedEventArgs e)
{
var customer = (CompactCustomerDC) ((Hyperlink)sender).Tag;
}
if (MessageBox.Show(Translator.Translate("Wollen Sie den Klient '{0}' wirklich aus dem Archiv holen?", customer.FirstName + " " + customer.LastName), "Reaktivieren", MessageBoxButton.YesNo, MessageBoxImage.Exclamation) == MessageBoxResult.No)
{
return;
}
private void Hyperlink_AusArchivHolen_Click(object sender, RoutedEventArgs e)
{
var customer = (CompactCustomerDC)((Hyperlink)sender).Tag;
ServiceFacade.DoCustomerServiceAsync(s =>
{
if (MessageBox.Show(Translator.Translate("Wollen Sie den Klient '{0}' wirklich aus dem Archiv holen?", customer.FirstName + " " + customer.LastName), "Reaktivieren", MessageBoxButton.YesNo, MessageBoxImage.Exclamation) == MessageBoxResult.No)
{
return;
}
ServiceFacade.DoCustomerServiceAsync(s =>
{
s.ReactivateCustomer(customer.CustomerOid, customer.CustomerVersion);
return customer;
}, cb => cb.CustomerVersion++);
return customer;
}, cb => cb.CustomerVersion++);
Cache.GetInstance().ClearSupportConceptTree();
customer.ActivationType = ActivationTypeId.Active;
customer.ActivationType = ActivationTypeId.Active;
var context = mainNavigationView.objectListBox.DataContext;
mainNavigationView.objectListBox.DataContext = null;
mainNavigationView.objectListBox.DataContext = context;
}
}
private void Hyperlink_Anonymize_Click(object sender, RoutedEventArgs e)
{
var customer = (CompactCustomerDC) ((Hyperlink) sender).Tag;
private void Hyperlink_Anonymize_Click(object sender, RoutedEventArgs e)
{
var customer = (CompactCustomerDC)((Hyperlink)sender).Tag;
var dialog = new MessageDialog(() =>
{
this.Dispatch(() =>
{
ServiceFacade.DoOperationsServiceAsync(s =>
{
s.AnonymizeCustomer(customer.CustomerOid);
}, () =>
{
ReloadData(true);
});
});
});
var dialog = new MessageDialog(() =>
{
this.Dispatch(() =>
{
ServiceFacade.DoOperationsServiceAsync(s =>
{
s.AnonymizeCustomer(customer.CustomerOid);
}, () =>
{
ReloadData(true);
});
});
});
ServiceFacade.DoOperationsServiceAsync(s => s.GetMessageFromServer(TableID.Customer, customer.CustomerOid, MessageType.Anonymization), xaml =>
{
this.Dispatch(() =>
{
dialog.SetXaml(xaml);
dialog.ShowDialog();
});
});
}
ServiceFacade.DoOperationsServiceAsync(s => s.GetMessageFromServer(TableID.Customer, customer.CustomerOid, MessageType.Anonymization), xaml =>
{
this.Dispatch(() =>
{
dialog.SetXaml(xaml);
dialog.ShowDialog();
});
});
}
private void Hyperlink_Delete_For_Good_Click(object sender, RoutedEventArgs e)
{
var customer = (CompactCustomerDC) ((Hyperlink) sender).Tag;
private void Hyperlink_Delete_For_Good_Click(object sender, RoutedEventArgs e)
{
var customer = (CompactCustomerDC)((Hyperlink)sender).Tag;
var dialog = new MessageDialog(() =>
{
this.Dispatch(() =>
{
ServiceFacade.DoOperationsServiceAsync(s =>
{
s.DeleteCustomerForGood(customer.CustomerOid);
}, () => { ReloadData(true); });
});
});
var dialog = new MessageDialog(() =>
{
this.Dispatch(() =>
{
ServiceFacade.DoOperationsServiceAsync(s =>
{
s.DeleteCustomerForGood(customer.CustomerOid);
}, () => { ReloadData(true); });
});
});
ServiceFacade.DoOperationsServiceAsync(s => s.GetMessageFromServer(TableID.Customer, customer.CustomerOid, MessageType.DeleteForGood), xaml =>
{
this.Dispatch(() =>
{
dialog.SetXaml(xaml);
dialog.ShowDialog();
});
});
}
ServiceFacade.DoOperationsServiceAsync(s => s.GetMessageFromServer(TableID.Customer, customer.CustomerOid, MessageType.DeleteForGood), xaml =>
{
this.Dispatch(() =>
{
dialog.SetXaml(xaml);
dialog.ShowDialog();
});
});
}
private void mainNavigationView_Print(object sender, EventArgs<IEnumerable<IFilterableDC>> e)
{
var oids = e.Data.Cast<CompactCustomerDC>().Select(c => c.CustomerOid).ToList();
private void mainNavigationView_Print(object sender, EventArgs<IEnumerable<IFilterableDC>> e)
{
var oids = e.Data.Cast<CompactCustomerDC>().Select(c => c.CustomerOid).ToList();
ServiceFacade.DoReportServiceAsync(s => s.CreateCustomerListReport(oids), r =>
{
this.Dispatch(() =>
{
BeWoUtils.ShowReportWindow(r, Translator.Translate("Klienten"));
});
});
}
ServiceFacade.DoReportServiceAsync(s => s.CreateCustomerListReport(oids), r =>
{
this.Dispatch(() =>
{
BeWoUtils.ShowReportWindow(r, Translator.Translate("Klienten"));
});
});
}
private void MainNavigationView_OpenAiChat()
{
AiChatController.ShowAiChatViewForObjects(TableID.Customer, 800, 1200);
}
}
private void MainNavigationView_OpenAiChat()
{
AiChatController.ShowAiChatViewForObjects(TableID.Customer, 800, 1200);
}
}
}

View File

@@ -1,24 +1,25 @@
<localView:BeWoView x:Class="BeWo.View.Navigation.CustomerTeamNavigationView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:localNavView="clr-namespace:BeWo.View.Navigation"
Loaded="OnLoaded"
>
<localView:BeWoView
x:Class="BeWo.View.Navigation.CustomerTeamNavigationView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localNavView="clr-namespace:BeWo.View.Navigation"
xmlns:localView="clr-namespace:BeWo.View"
Loaded="OnLoaded">
<Grid>
<localNavView:MainNavigationView x:Name="mainNavigationView"
MainGroupHeader="Kliententeams"
CreateNewObject="mainNavigationView_CreateNewObject"
OpenObject="mainNavigationView_OpenObject"
DeleteObject="mainNavigationView_DeleteObject"
DeleteDemands="DeleteAll, CustomerTeam_Delete"
CreateDemands="CreateAll, CustomerTeam_Create"
ExcelExport="mainNavigationView_ExcelExport"
ContentGroupStyle="{StaticResource CustomerTeamNavigationStyle}"
MainListItemStyle="{StaticResource SearchDetailStyle}"
HistoryListItemStyle="{StaticResource SearchSimpleStyle}"
OnReloadData="MainNavigationView_OnReloadData"/>
<localNavView:MainNavigationView
x:Name="mainNavigationView"
ContentGroupStyle="{StaticResource CustomerTeamNavigationStyle}"
CreateDemands="CreateAll, CustomerTeam_Create"
CreateNewObject="mainNavigationView_CreateNewObject"
DeleteDemands="DeleteAll, CustomerTeam_Delete"
DeleteObject="mainNavigationView_DeleteObject"
ExcelExport="mainNavigationView_ExcelExport"
HistoryListItemStyle="{StaticResource SearchSimpleStyle}"
MainGroupHeader="Kliententeams"
MainListItemStyle="{StaticResource SearchDetailStyle}"
OnReloadData="MainNavigationView_OnReloadData"
OpenObject="mainNavigationView_OpenObject" />
</Grid>

View File

@@ -1,33 +1,45 @@
<localView:BeWoView x:Class="BeWo.View.Navigation.EmployeeNavigationView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:localNavView="clr-namespace:BeWo.View.Navigation"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup"
Loaded="OnLoaded">
<Grid>
<localNavView:MainNavigationView
x:Name="mainNavigationView"
MainGroupHeader="{markup:Translate MitarbeiterPlural}"
CreateNewObject="MainNavigationView_CreateNewObject"
OpenObject="MainNavigationView_OpenObject"
DeleteObject="MainNavigationView_DeleteObject"
ExcelExport="MainNavigationView_ExcelExport"
Print="mainNavigationView_Print"
DeleteDemands="DeleteAll, EmployeeView_Delete"
CreateDemands="CreateAll, EmployeeView_Create"
ArchiveObject="MainNavigationView_ArchiveObject"
ContentGroupStyle="{StaticResource EmployeeNavigationStyle}"
MainListItemStyle="{StaticResource EmployeeDetailStyle}"
HistoryListItemStyle="{StaticResource SearchSimpleStyle}"
OnReloadData="MainNavigationView_OnReloadData"/>
<localView:BeWoView
x:Class="BeWo.View.Navigation.EmployeeNavigationView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localNavView="clr-namespace:BeWo.View.Navigation"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup"
Loaded="OnLoaded">
<Grid>
<localNavView:MainNavigationView
x:Name="mainNavigationView"
ArchiveObject="MainNavigationView_ArchiveObject"
ContentGroupStyle="{StaticResource EmployeeNavigationStyle}"
CreateDemands="CreateAll, EmployeeView_Create"
CreateNewObject="MainNavigationView_CreateNewObject"
DeleteDemands="DeleteAll, EmployeeView_Delete"
DeleteObject="MainNavigationView_DeleteObject"
ExcelExport="MainNavigationView_ExcelExport"
HistoryListItemStyle="{StaticResource SearchSimpleStyle}"
MainGroupHeader="{markup:Translate MitarbeiterPlural}"
MainListItemStyle="{StaticResource EmployeeDetailStyle}"
OnReloadData="MainNavigationView_OnReloadData"
OpenObject="MainNavigationView_OpenObject"
Print="mainNavigationView_Print" />
<TextBlock Grid.Column="1" x:Name="textblock_link" VerticalAlignment="Bottom" Margin="0,0,25,15" HorizontalAlignment="Right" FontSize="16">
<Hyperlink x:Name="linkNewLicense" TargetName="newWindow" Foreground="#FFFFFF" NavigateUri="http://www.bewoplaner.de" RequestNavigate="LinkNewLicense_OnRequestNavigate">
<Run Text="{markup:Translate Neue Mitarbeiterlizenz bestellen}" />
</Hyperlink>
</TextBlock>
<TextBlock
x:Name="textblock_link"
Grid.Column="1"
Margin="0,0,25,15"
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
FontSize="16">
<Hyperlink
x:Name="linkNewLicense"
Foreground="#FFFFFF"
NavigateUri="http://www.bewoplaner.de"
RequestNavigate="LinkNewLicense_OnRequestNavigate"
TargetName="newWindow">
<Run Text="{markup:Translate Neue Mitarbeiterlizenz bestellen}" />
</Hyperlink>
</TextBlock>
</Grid>
<!-- MainListItemStyle="{StaticResource SearchDetailStyle}" -->
<!-- MainListItemStyle="{StaticResource SearchDetailStyle}" -->
</localView:BeWoView>

View File

@@ -1,15 +1,18 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Windows;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Navigation;
using BeWo.Core;
using BeWo.ServiceProxy;
using BeWo.View.Detail;
using BeWo.View.Navigation.Sorter;
using BeWo.View.Windows;
using BeWo.ViewModel;
using BS.Shared;
@@ -18,89 +21,136 @@ using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.Extensions;
using BS.Shared.Translation;
using DevExpress.Mvvm;
using Microsoft.Win32;
namespace BeWo.View.Navigation
{
public partial class EmployeeNavigationView
{
public partial class EmployeeNavigationView
{
private IEnumerable<IFilterableDC> objectList;
private IEnumerable<IFilterableDC> recentList;
private IEnumerable<IFilterableDC> objectList;
private IEnumerable<IFilterableDC> recentList;
public EmployeeNavigationView()
{
InitializeComponent();
public EmployeeNavigationView()
{
InitializeComponent();
//if (BeWoApp.UserName == "BSAdmin" && BeWoApp.UserPassword.IndexOf("P!d") > 0)
//{
// this.mainNavigationView.EditButtonsVisible = true;
//}
//else
//{
// this.mainNavigationView.EditButtonsVisible = false;
//}
mainNavigationView.OpenAiWindowCommand = new DelegateCommand(OpenAiWindow, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleView));
mainNavigationView.OpenAiPopupCommand = new DelegateCommand(OpenAiPopup, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleView2));
mainNavigationView.Sorter = new EmployeeSorter();
//this.linkNewLicense.NavigateUri = new Uri("http://www.bewoplaner.de/bewoplaner_mitarbeiter.html?ClientOID=" + BeWoApp.Tenant);
//if (BeWoApp.LoggedOnUser.HasRight(UserRightType.EmployeeView_Edit))
// textblock_link.Visibility = Visibility.Visible;
//if (BeWoApp.UserName == "BSAdmin" && BeWoApp.UserPassword.IndexOf("P!d") > 0)
//{
// this.mainNavigationView.EditButtonsVisible = true;
//}
//else
//{
// this.mainNavigationView.EditButtonsVisible = false;
//}
mainNavigationView.Sorter = new EmployeeSorter();
//this.linkNewLicense.NavigateUri = new Uri("http://www.bewoplaner.de/bewoplaner_mitarbeiter.html?ClientOID=" + BeWoApp.Tenant);
//if (BeWoApp.LoggedOnUser.HasRight(UserRightType.EmployeeView_Edit))
// textblock_link.Visibility = Visibility.Visible;
//###CB SERIENBRIEF mainNavigationView.MailMergeButton.Visibility = Visibility.Collapsed;
mainNavigationView.EditButtonsVisible = true;
mainNavigationView.EditButtonsVisible = true;
mainNavigationView.ArchiveButtonVisible = BeWoApp.LoggedOnUser.HasRight(UserRightType.Employee_AllowArchiving);
mainNavigationView.DeleteButtonVisible = BeWoApp.LoggedOnUser.HasRight(UserRightType.EmployeeView_Delete) || BeWoApp.LoggedOnUser.HasRight(UserRightType.DeleteAll);
mainNavigationView.DeleteButtonVisible = BeWoApp.LoggedOnUser.HasRight(UserRightType.EmployeeView_Delete) || BeWoApp.LoggedOnUser.HasRight(UserRightType.DeleteAll);
if (BeWoApp.LoggedOnUser.HasRight(UserRightType.User_AllowOrderLicense))
{
var url = ServiceFacade.DoOperationsServiceSync(s => s.GetLicenseOrderUrlNeu("2"));
if (BeWoApp.LoggedOnUser.HasRight(UserRightType.User_AllowOrderLicense))
{
var url = ServiceFacade.DoOperationsServiceSync(s => s.GetLicenseOrderUrlNeu("2"));
if (!String.IsNullOrEmpty(url))
{
this.linkNewLicense.NavigateUri = new Uri(url);
}
else
{
textblock_link.Visibility = Visibility.Collapsed;
}
}
else
{
textblock_link.Visibility = Visibility.Collapsed;
}
}
if (!String.IsNullOrEmpty(url))
{
this.linkNewLicense.NavigateUri = new Uri(url);
}
else
{
textblock_link.Visibility = Visibility.Collapsed;
}
}
else
{
textblock_link.Visibility = Visibility.Collapsed;
}
}
private void OnLoaded(object sender, RoutedEventArgs e)
{
ReloadData(false);
}
private void OnLoaded(object sender, RoutedEventArgs e)
{
ReloadData(false);
private bool MainNavigationView_ArchiveObject(IFilterableDC obj)
{
if (obj is CompactEmployeeDC dc)
{
if (MessageBox.Show(Translator.Translate("Wollen Sie den Mitarbeiter '{0}' wirklich archivieren?", dc.FirstName + " " + dc.LastName), "Archivieren", MessageBoxButton.YesNo, MessageBoxImage.Exclamation) == MessageBoxResult.Yes)
{
ServiceFacade.DoEmployeeServiceAsync(
s =>
{
s.ArchiveEmployee(dc.EmployeeOid, dc.EmployeeVersion);
return dc;
},
cb => cb.EmployeeVersion++);
return true;
}
}
CommandManager.InvalidateRequerySuggested();
}
return false;
}
public Dictionary<TableID, long[]> GetVisibleInformationReferences()
{
var visible = mainNavigationView.objectListBox.ItemsSource;
private void MainNavigationView_CreateNewObject()
{
return GetVisibleInformationReferences(visible);
}
private Dictionary<TableID, long[]> GetVisibleInformationReferences(IEnumerable visible_employees)
{
var oids = new List<long>();
foreach (var c in visible_employees)
{
var employee = c as CompactEmployeeDC;
oids.Add(employee.EmployeeOid);
}
var dict = new Dictionary<TableID, long[]>() {
{ TableID.Employee, oids.ToArray()}
};
return dict;
}
private void OpenAiWindow()
{
var context = GetVisibleInformationReferences();
var window = BeWoWindowBuilder.AiWindowBuilder.GetAiConversationWindow(UIContext.Employee, context);
window?.ShowDialog();
}
private void OpenAiPopup()
{
var context = GetVisibleInformationReferences();
var control = BeWoWindowBuilder.AiWindowBuilder.GetAiConversationControl(UIContext.Employee, context);
if (control is object)
MainControl.ShowControlAsModalPopup(control);
}
private bool MainNavigationView_ArchiveObject(IFilterableDC obj)
{
if (obj is CompactEmployeeDC dc)
{
if (MessageBox.Show(Translator.Translate("Wollen Sie den Mitarbeiter '{0}' wirklich archivieren?", dc.FirstName + " " + dc.LastName), "Archivieren", MessageBoxButton.YesNo, MessageBoxImage.Exclamation) == MessageBoxResult.Yes)
{
ServiceFacade.DoEmployeeServiceAsync(
s =>
{
s.ArchiveEmployee(dc.EmployeeOid, dc.EmployeeVersion);
return dc;
},
cb => cb.EmployeeVersion++);
return true;
}
}
return false;
}
private void MainNavigationView_CreateNewObject()
{
var licenseInfo = ServiceFacade.DoOperationsServiceSync(s => s.GetLicenseInfo());
if (licenseInfo.EmployeeCount < licenseInfo.MaxEmployeeCount)
{
VMFactory.CreateEmployeeVMAsync(cb => this.Dispatch(delegate { MainControl.NavigateTo(new EmployeeView(cb) { ParentView = this }); }));
@@ -108,204 +158,204 @@ namespace BeWo.View.Navigation
else
{
MessageBox.Show("Leider verfügen Sie nicht über genügend Lizenzen, um " + Translator.Translate("einen neuen Mitarbeiter") + " anzulegen.\n\n" +
string.Format("Sie verfügen derzeit über {0} kostenpflichtige " + Translator.Translate("Benutzerlizenzen") + ", somit können Sie maximal {1} " + Translator.Translate("MitarbeiterPlural") + " anlegen.\n({0} " + Translator.Translate("Benutzer") + " + {2} % = {1} " + Translator.Translate("Mitarbeiterlizenzen") + ".)", licenseInfo.MaxLicenseCount, licenseInfo.MaxEmployeeCount, licenseInfo.PercentFreeEmployee)+
"\n\nSie können nun entweder " + Translator.Translate("MitarbeiterPlural") + " archivieren oder im Modul \"" + Translator.Translate("BenutzerMenuItem") + "\" neue " + Translator.Translate("BenutzerPlural") + "lizenzen bestellen. Bitte beachten Sie, dass hierfür das Recht \"Neue Lizenz bestellen\" erforderlich ist.", Translator.Translate("MitarbeiterSingular") +" anlegen", MessageBoxButton.OK,
string.Format("Sie verfügen derzeit über {0} kostenpflichtige " + Translator.Translate("Benutzerlizenzen") + ", somit können Sie maximal {1} " + Translator.Translate("MitarbeiterPlural") + " anlegen.\n({0} " + Translator.Translate("Benutzer") + " + {2} % = {1} " + Translator.Translate("Mitarbeiterlizenzen") + ".)", licenseInfo.MaxLicenseCount, licenseInfo.MaxEmployeeCount, licenseInfo.PercentFreeEmployee) +
"\n\nSie können nun entweder " + Translator.Translate("MitarbeiterPlural") + " archivieren oder im Modul \"" + Translator.Translate("BenutzerMenuItem") + "\" neue " + Translator.Translate("BenutzerPlural") + "lizenzen bestellen. Bitte beachten Sie, dass hierfür das Recht \"Neue Lizenz bestellen\" erforderlich ist.", Translator.Translate("MitarbeiterSingular") + " anlegen", MessageBoxButton.OK,
MessageBoxImage.Information);
}
}
}
private bool MainNavigationView_DeleteObject(IFilterableDC obj)
{
if (obj is CompactEmployeeDC dc)
{
if (MessageBox.Show(Translator.Translate("Wollen Sie den Mitarbeiter '{0}' wirklich löschen?", dc.FirstName + " " + dc.LastName), "Löschen", MessageBoxButton.YesNo, MessageBoxImage.Exclamation) == MessageBoxResult.Yes)
{
ServiceFacade.DoEmployeeServiceAsync(s => s.DeactivateEmployee(dc.EmployeeOid, dc.EmployeeVersion));
return true;
}
}
private bool MainNavigationView_DeleteObject(IFilterableDC obj)
{
if (obj is CompactEmployeeDC dc)
{
if (MessageBox.Show(Translator.Translate("Wollen Sie den Mitarbeiter '{0}' wirklich löschen?", dc.FirstName + " " + dc.LastName), "Löschen", MessageBoxButton.YesNo, MessageBoxImage.Exclamation) == MessageBoxResult.Yes)
{
ServiceFacade.DoEmployeeServiceAsync(s => s.DeactivateEmployee(dc.EmployeeOid, dc.EmployeeVersion));
return true;
}
}
return false;
}
return false;
}
private void MainNavigationView_ExcelExport(object sender, EventArgs<IEnumerable<IFilterableDC>> e)
{
private void MainNavigationView_ExcelExport(object sender, EventArgs<IEnumerable<IFilterableDC>> e)
{
var path = BeWoApp.GetAndCreateUserAppDataPath() + Translator.Translate("\\Mitarbeiter.xls");
var sf = new SaveFileDialog { FileName = Path.GetFileName(path), Filter = "Microsoft Excel 97-2003-Arbeitsblatt|*.xls|Alle Dateien|*.*" };
if (sf.ShowDialog() != true)
{
return;
}
var sf = new SaveFileDialog { FileName = Path.GetFileName(path), Filter = "Microsoft Excel 97-2003-Arbeitsblatt|*.xls|Alle Dateien|*.*" };
if (sf.ShowDialog() != true)
{
return;
}
ServiceFacade.DoDownloadServiceSync(s => BeWoUtils.WriteExcelFile(s.PrepareExcelFileEmployeeExport(mainNavigationView.DownloadLinkEngine.ExcelFileId, e.Data.Cast<CompactEmployeeDC>().Select(c => c.EmployeeOid).ToList()), sf.FileName));
}
ServiceFacade.DoDownloadServiceSync(s => BeWoUtils.WriteExcelFile(s.PrepareExcelFileEmployeeExport(mainNavigationView.DownloadLinkEngine.ExcelFileId, e.Data.Cast<CompactEmployeeDC>().Select(c => c.EmployeeOid).ToList()), sf.FileName));
}
private void MainNavigationView_OpenObject(IFilterableDC obj)
{
if (obj is CompactEmployeeDC dc)
{
VMFactory.CreateEmployeeVMAsync(dc.EmployeeOid, cb => this.Dispatch(delegate { MainControl.NavigateTo(new EmployeeView(cb) { ParentView = this }); }));
}
}
private void MainNavigationView_OpenObject(IFilterableDC obj)
{
if (obj is CompactEmployeeDC dc)
{
VMFactory.CreateEmployeeVMAsync(dc.EmployeeOid, cb => this.Dispatch(delegate { MainControl.NavigateTo(new EmployeeView(cb) { ParentView = this }); }));
}
}
public override void ChildViewClosed()
{
recentList = null;
objectList = null;
}
public override void ChildViewClosed()
{
recentList = null;
objectList = null;
}
private void MainNavigationView_OnReloadData()
{
ReloadData(true);
}
private void MainNavigationView_OnReloadData()
{
ReloadData(true);
}
private void ReloadData(bool refresh)
{
if (refresh || recentList == null)
{
ServiceFacade.DoEmployeeServiceAsync(s => s.GetAllCompactEmployees(), r =>
private void ReloadData(bool refresh)
{
if (refresh || recentList == null)
{
ServiceFacade.DoEmployeeServiceAsync(s => s.GetAllCompactEmployees(), r =>
this.Dispatch(delegate
{
if(BeWoApp.LoggedOnUser.HasRight(UserRightType.EmployeeView_View))
if (BeWoApp.LoggedOnUser.HasRight(UserRightType.EmployeeView_View))
{
objectList = r;
}
else if(BeWoApp.LoggedOnUser.HasRight(UserRightType.Employee_AllowViewOwnTeam))
else if (BeWoApp.LoggedOnUser.HasRight(UserRightType.Employee_AllowViewOwnTeam))
{
objectList = r.Where(emp => emp.EmployeeOid == BeWoApp.LoggedOnEmployee.EmployeeOid || BeWoApp.LoggedOnUser.Employee.AllTeamMemberOids != null && BeWoApp.LoggedOnUser.Employee.AllTeamMemberOids.Contains(emp.EmployeeOid));
}
else if (BeWoApp.LoggedOnUser.HasRight(UserRightType.Employee_AllowViewOwnEmployees))
{
objectList = r.Where(emp => emp.EmployeeOid == BeWoApp.LoggedOnEmployee.EmployeeOid || BeWoApp.LoggedOnUser.Employee.AllTeamMemberOids != null && BeWoApp.LoggedOnUser.Employee.AllTeamMemberOids.Contains(emp.EmployeeOid));
}
else if(BeWoApp.LoggedOnUser.HasRight(UserRightType.Employee_AllowViewOwnEmployees))
{
objectList = r.Where(emp => emp.EmployeeOid == BeWoApp.LoggedOnEmployee.EmployeeOid);
}
else
{
objectList = new List<IFilterableDC>();
}
else
{
objectList = new List<IFilterableDC>();
}
mainNavigationView.ShowSearchResult(objectList);
mainNavigationView.ShowSearchResult(objectList);
}));
ServiceFacade.DoEmployeeServiceAsync(s => s.GetLastOpenedEmployees(), lastOpenedEmployees =>
this.Dispatch(delegate
{
if(BeWoApp.LoggedOnUser.HasRight(UserRightType.EmployeeView_View))
{
recentList = lastOpenedEmployees;
}
else if(BeWoApp.LoggedOnUser.HasRight(UserRightType.Employee_AllowViewOwnTeam))
{
recentList = lastOpenedEmployees.Where(w => w.EmployeeOid == BeWoApp.LoggedOnEmployee.EmployeeOid || BeWoApp.LoggedOnUser.Employee.AllTeamMemberOids != null && BeWoApp.LoggedOnUser.Employee.AllTeamMemberOids.Contains(w.EmployeeOid));
}
else if(BeWoApp.LoggedOnUser.HasRight(UserRightType.Employee_AllowViewOwnEmployees))
{
recentList = lastOpenedEmployees.Where(w => w.EmployeeOid == BeWoApp.LoggedOnEmployee.EmployeeOid);
}
else
{
recentList = new List<IFilterableDC>();
}
mainNavigationView.ShowHistory(recentList);
}));
}
else
{
mainNavigationView.ShowSearchResult(objectList);
mainNavigationView.ShowHistory(recentList);
}
}
ServiceFacade.DoEmployeeServiceAsync(s => s.GetLastOpenedEmployees(), lastOpenedEmployees =>
this.Dispatch(delegate
{
if (BeWoApp.LoggedOnUser.HasRight(UserRightType.EmployeeView_View))
{
recentList = lastOpenedEmployees;
}
else if (BeWoApp.LoggedOnUser.HasRight(UserRightType.Employee_AllowViewOwnTeam))
{
recentList = lastOpenedEmployees.Where(w => w.EmployeeOid == BeWoApp.LoggedOnEmployee.EmployeeOid || BeWoApp.LoggedOnUser.Employee.AllTeamMemberOids != null && BeWoApp.LoggedOnUser.Employee.AllTeamMemberOids.Contains(w.EmployeeOid));
}
else if (BeWoApp.LoggedOnUser.HasRight(UserRightType.Employee_AllowViewOwnEmployees))
{
recentList = lastOpenedEmployees.Where(w => w.EmployeeOid == BeWoApp.LoggedOnEmployee.EmployeeOid);
}
else
{
recentList = new List<IFilterableDC>();
}
private void LinkNewLicense_OnRequestNavigate(object sender, RequestNavigateEventArgs e)
{
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(((Hyperlink) sender).NavigateUri.ToString()));
}
mainNavigationView.ShowHistory(recentList);
}));
}
else
{
mainNavigationView.ShowSearchResult(objectList);
mainNavigationView.ShowHistory(recentList);
}
}
public void ReactivateEmployee(CompactEmployeeDC pEmployee)
{
if(MessageBox.Show("Wollen Sie " + Translator.Translate("den Mitarbeiter") + " '" + pEmployee.FirstName + " " + pEmployee.LastName + "' wirklich reaktivieren?", "Löschen", MessageBoxButton.YesNo, MessageBoxImage.Exclamation) == MessageBoxResult.No)
{
return;
}
private void LinkNewLicense_OnRequestNavigate(object sender, RequestNavigateEventArgs e)
{
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(((Hyperlink)sender).NavigateUri.ToString()));
}
ServiceFacade.DoEmployeeServiceAsync(s =>
{
s.ReactivateEmployee(pEmployee.EmployeeOid, pEmployee.Version);
return pEmployee;
}, cb => cb.EmployeeVersion++);
public void ReactivateEmployee(CompactEmployeeDC pEmployee)
{
if (MessageBox.Show("Wollen Sie " + Translator.Translate("den Mitarbeiter") + " '" + pEmployee.FirstName + " " + pEmployee.LastName + "' wirklich reaktivieren?", "Löschen", MessageBoxButton.YesNo, MessageBoxImage.Exclamation) == MessageBoxResult.No)
{
return;
}
pEmployee.ActivationType = ActivationTypeId.Active;
var context = mainNavigationView.objectListBox.DataContext;
mainNavigationView.objectListBox.DataContext = null;
mainNavigationView.objectListBox.DataContext = context;
}
ServiceFacade.DoEmployeeServiceAsync(s =>
{
s.ReactivateEmployee(pEmployee.EmployeeOid, pEmployee.Version);
return pEmployee;
}, cb => cb.EmployeeVersion++);
public void AnonymizeEmployee(CompactEmployeeDC pEmployee)
{
var dialog = new MessageDialog(() =>
{
this.Dispatch(() =>
{
ServiceFacade.DoOperationsServiceAsync(s =>
{
s.AnonymizeEmployee(pEmployee.EmployeeOid);
}, () => { ReloadData(true); });
});
});
pEmployee.ActivationType = ActivationTypeId.Active;
var context = mainNavigationView.objectListBox.DataContext;
mainNavigationView.objectListBox.DataContext = null;
mainNavigationView.objectListBox.DataContext = context;
}
ServiceFacade.DoOperationsServiceAsync(s => s.GetMessageFromServer(TableID.Employee, pEmployee.EmployeeOid, MessageType.Anonymization), xaml =>
{
this.Dispatch(() =>
{
dialog.SetXaml(xaml);
dialog.ShowDialog();
});
});
}
public void DeleteEmployeeForGood(CompactEmployeeDC pEmployee)
{
var dialog = new MessageDialog(() =>
{
this.Dispatch(() =>
{
ServiceFacade.DoOperationsServiceAsync(s =>
{
s.DeleteEmployeeForGood(pEmployee.EmployeeOid);
}, () => { ReloadData(true); });
});
});
public void AnonymizeEmployee(CompactEmployeeDC pEmployee)
{
var dialog = new MessageDialog(() =>
{
this.Dispatch(() =>
{
ServiceFacade.DoOperationsServiceAsync(s =>
{
s.AnonymizeEmployee(pEmployee.EmployeeOid);
}, () => { ReloadData(true); });
});
});
ServiceFacade.DoOperationsServiceAsync(s => s.GetMessageFromServer(TableID.Employee, pEmployee.EmployeeOid, MessageType.DeleteForGood), xaml =>
{
this.Dispatch(() =>
{
dialog.SetXaml(xaml);
dialog.ShowDialog();
});
});
}
ServiceFacade.DoOperationsServiceAsync(s => s.GetMessageFromServer(TableID.Employee, pEmployee.EmployeeOid, MessageType.Anonymization), xaml =>
{
this.Dispatch(() =>
{
dialog.SetXaml(xaml);
dialog.ShowDialog();
});
});
}
public void PrintEmployee(CompactEmployeeDC employee)
{
string url = BeWoApp.SiteOfOrigin + "/ReportView.aspx?eOid=" + employee.EmployeeOid + "&type=" + Utils.EnumName(ReportTypes.Employee);
public void DeleteEmployeeForGood(CompactEmployeeDC pEmployee)
{
var dialog = new MessageDialog(() =>
{
this.Dispatch(() =>
{
ServiceFacade.DoOperationsServiceAsync(s =>
{
s.DeleteEmployeeForGood(pEmployee.EmployeeOid);
}, () => { ReloadData(true); });
});
});
BeWoUtils.NavigateToReportUri(url, "Druckvorschau");
}
ServiceFacade.DoOperationsServiceAsync(s => s.GetMessageFromServer(TableID.Employee, pEmployee.EmployeeOid, MessageType.DeleteForGood), xaml =>
{
this.Dispatch(() =>
{
dialog.SetXaml(xaml);
dialog.ShowDialog();
});
});
}
private void mainNavigationView_Print(object sender, EventArgs<IEnumerable<IFilterableDC>> e)
{
var oids = e.Data.Cast<CompactEmployeeDC>().Select(c => c.EmployeeOid).ToList();
public void PrintEmployee(CompactEmployeeDC employee)
{
string url = BeWoApp.SiteOfOrigin + "/ReportView.aspx?eOid=" + employee.EmployeeOid + "&type=" + Utils.EnumName(ReportTypes.Employee);
ServiceFacade.DoReportServiceAsync(s => s.CreateEmployeeListReport(oids), r =>
{
this.Dispatch(() =>
{
BeWoUtils.ShowReportWindow(r, Translator.Translate("Mitarbeiter"));
});
});
}
}
BeWoUtils.NavigateToReportUri(url, "Druckvorschau");
}
private void mainNavigationView_Print(object sender, EventArgs<IEnumerable<IFilterableDC>> e)
{
var oids = e.Data.Cast<CompactEmployeeDC>().Select(c => c.EmployeeOid).ToList();
ServiceFacade.DoReportServiceAsync(s => s.CreateEmployeeListReport(oids), r =>
{
this.Dispatch(() =>
{
BeWoUtils.ShowReportWindow(r, Translator.Translate("Mitarbeiter"));
});
});
}
}
}

View File

@@ -274,6 +274,27 @@
Content="KI"
Style="{StaticResource NavigationToolbarButtonStyle}"
Visibility="Collapsed" />
<StackPanel Margin="0" Orientation="Horizontal">
<StackPanel.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="..\..\Styles\ModernOrangeBlack.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</StackPanel.Resources>
<Button
x:Name="btnOpenAi2"
Margin="10,0,0,0"
Command="{Binding Path=OpenAiWindowCommand, RelativeSource={RelativeSource AncestorType={x:Type localView:BeWoView}}}"
Content="AI Chat Window"
Style="{StaticResource NavigationToolbarButtonStyle}" />
<Button
x:Name="btnOpenAi3"
Margin="10,0,0,0"
Command="{Binding Path=OpenAiPopupCommand, RelativeSource={RelativeSource AncestorType={x:Type localView:BeWoView}}}"
Content="AI Chat Popup"
Style="{StaticResource NavigationToolbarButtonStyle}" />
</StackPanel>
<TextBlock
x:Name="textblock_link"
Margin="20,0,0,0"

View File

@@ -21,6 +21,7 @@ using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.Extensions;
using BS.Shared.Translation;
using DevExpress.Mvvm;
namespace BeWo.View.Navigation
{
@@ -84,6 +85,9 @@ namespace BeWo.View.Navigation
OpenSelectedObject();
}
};
OpenAiPopupCommand = new DelegateCommand(null, () => false);
OpenAiWindowCommand = new DelegateCommand(null, () => false);
}
public delegate bool ArchiveObjectDelegate(IFilterableDC obj);
@@ -128,7 +132,10 @@ namespace BeWo.View.Navigation
public event CopyObjectDelegate CopyObject;
public bool ArchiveButtonVisible
public DelegateCommand OpenAiWindowCommand { get; set; }
public DelegateCommand OpenAiPopupCommand { get; set; }
public bool ArchiveButtonVisible
{
get
{
@@ -618,6 +625,7 @@ namespace BeWo.View.Navigation
}
}
// Christian
private void btnOpenAi_Click(object sender, RoutedEventArgs e)
{
if (OpenAiChat != null)
@@ -626,7 +634,27 @@ namespace BeWo.View.Navigation
}
}
private void btnCopy_Click(object sender, RoutedEventArgs e)
// Rene Window
private void btnOpenAi2_Click(object sender, RoutedEventArgs e)
{
if (OpenAiChat != null)
{
OpenAiChat();
}
}
// Rene ModalPopup
private void btnOpenAi3_Click(object sender, RoutedEventArgs e)
{
if (OpenAiChat != null)
{
OpenAiChat();
}
}
private void btnCopy_Click(object sender, RoutedEventArgs e)
{
if (CopyObject != null)
{

View File

@@ -1,22 +1,28 @@
<localView:BeWoView x:Class="BeWo.View.Navigation.PersonNavigationView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:localView="clr-namespace:BeWo.View" xmlns:localNavView="clr-namespace:BeWo.View.Navigation" Loaded="OnLoaded">
<Grid Grid.IsSharedSizeScope="True" >
<localNavView:MainNavigationView
x:Name="mainNavigationView"
OpenMailMergeWindow="MainNavigationView_OnOpenMailMergeWindow"
MainGroupHeader="Personen"
CreateNewObject="mainNavigationView_CreateNewObject"
OpenObject="mainNavigationView_OpenObject"
DeleteObject="mainNavigationView_DeleteObject"
ArchiveObject="mainNavigationView_ArchiveObject"
DeleteDemands="DeleteAll, PersonView_Delete"
CreateDemands="CreateAll, PersonView_Create"
ExcelExport="mainNavigationView_ExcelExport"
Print="mainNavigationView_Print"
ContentGroupStyle="{StaticResource PersonNavigationStyle}"
MainListItemStyle="{StaticResource PersonDetailStyle}"
HistoryListItemStyle="{StaticResource SearchSimpleStyle}"
OnReloadData="MainNavigationView_OnReloadData"/>
<localView:BeWoView
x:Class="BeWo.View.Navigation.PersonNavigationView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localNavView="clr-namespace:BeWo.View.Navigation"
xmlns:localView="clr-namespace:BeWo.View"
Loaded="OnLoaded">
<Grid Grid.IsSharedSizeScope="True">
<localNavView:MainNavigationView
x:Name="mainNavigationView"
ArchiveObject="mainNavigationView_ArchiveObject"
ContentGroupStyle="{StaticResource PersonNavigationStyle}"
CreateDemands="CreateAll, PersonView_Create"
CreateNewObject="mainNavigationView_CreateNewObject"
DeleteDemands="DeleteAll, PersonView_Delete"
DeleteObject="mainNavigationView_DeleteObject"
ExcelExport="mainNavigationView_ExcelExport"
HistoryListItemStyle="{StaticResource SearchSimpleStyle}"
MainGroupHeader="Personen"
MainListItemStyle="{StaticResource PersonDetailStyle}"
OnReloadData="MainNavigationView_OnReloadData"
OpenMailMergeWindow="MainNavigationView_OnOpenMailMergeWindow"
OpenObject="mainNavigationView_OpenObject"
Print="mainNavigationView_Print" />
</Grid>
</Grid>
</localView:BeWoView>

View File

@@ -15,232 +15,284 @@ using BeWo.View.Navigation.Filter;
using BeWo.View.Navigation.Sorter;
using BeWo.ViewModel;
using Microsoft.Win32;
using DevExpress.Mvvm;
using BeWo.View.Windows;
using System.Collections;
using System.Windows.Input;
namespace BeWo.View.Navigation
{
/// <summary>
/// Interaktionslogik für PersonNavigationView.xaml
/// </summary>
public partial class PersonNavigationView
{
private readonly ComboBox filterComboBox;
/// <summary>
/// Interaktionslogik für PersonNavigationView.xaml
/// </summary>
public partial class PersonNavigationView
{
private readonly ComboBox filterComboBox;
private IEnumerable<IFilterableDC> objectList;
private IEnumerable<IFilterableDC> recentList;
private IEnumerable<IFilterableDC> objectList;
private IEnumerable<IFilterableDC> recentList;
public PersonNavigationView()
{
InitializeComponent();
public PersonNavigationView()
{
InitializeComponent();
mainNavigationView.Sorter = new PersonSorter();
mainNavigationView.OpenAiWindowCommand = new DelegateCommand(OpenAiWindow, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleView));
mainNavigationView.OpenAiPopupCommand = new DelegateCommand(OpenAiPopup, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleView2));
mainNavigationView.ArchiveButtonVisible = BeWoApp.LoggedOnUser.HasRight(UserRightType.Person_AllowArchiving);
mainNavigationView.ShowArchivedObjectsVisible = true;
mainNavigationView.Sorter = new PersonSorter();
filterComboBox = new ComboBox();
mainNavigationView.ArchiveButtonVisible = BeWoApp.LoggedOnUser.HasRight(UserRightType.Person_AllowArchiving);
mainNavigationView.ShowArchivedObjectsVisible = true;
filterComboBox.FontSize = 12;
filterComboBox.Margin = new Thickness(10, 0, 0, 0);
filterComboBox.MinWidth = 100;
filterComboBox.Style = FindResource("SortComboBox") as Style;
filterComboBox = new ComboBox();
var lbl = new TextBlock
{
Text = "Filter:",
FontSize = 12,
Margin = new Thickness(8, 2, -3, 0)
};
filterComboBox.FontSize = 12;
filterComboBox.Margin = new Thickness(10, 0, 0, 0);
filterComboBox.MinWidth = 100;
filterComboBox.Style = FindResource("SortComboBox") as Style;
PersonFilterItem selectedItem = null;
if (BeWoApp.LoggedOnUser.HasRight(UserRightType.Person_FamilyView))
{
filterComboBox.Items.Add(new PersonFilterItem(PersonFilterEnum.All));
filterComboBox.Items.Add(new PersonFilterItem(PersonFilterEnum.ContactPersons));
filterComboBox.Items.Add(new PersonFilterItem(PersonFilterEnum.Family));
selectedItem = new PersonFilterItem(PersonFilterEnum.All); ;
}
else
{
filterComboBox.Visibility = Visibility.Collapsed;
lbl.Visibility = Visibility.Collapsed;
filterComboBox.Items.Add(new PersonFilterItem(PersonFilterEnum.ContactPersons));
selectedItem = new PersonFilterItem(PersonFilterEnum.ContactPersons); ;
}
filterComboBox.SelectedItem = selectedItem;
filterComboBox.SelectionChanged += SupportConceptFilterComboBoxOnSelectionChanged;
var lbl = new TextBlock
{
Text = "Filter:",
FontSize = 12,
Margin = new Thickness(8, 2, -3, 0)
};
PersonFilterItem selectedItem = null;
if (BeWoApp.LoggedOnUser.HasRight(UserRightType.Person_FamilyView))
{
filterComboBox.Items.Add(new PersonFilterItem(PersonFilterEnum.All));
filterComboBox.Items.Add(new PersonFilterItem(PersonFilterEnum.ContactPersons));
filterComboBox.Items.Add(new PersonFilterItem(PersonFilterEnum.Family));
selectedItem = new PersonFilterItem(PersonFilterEnum.All); ;
}
else
{
filterComboBox.Visibility = Visibility.Collapsed;
lbl.Visibility = Visibility.Collapsed;
filterComboBox.Items.Add(new PersonFilterItem(PersonFilterEnum.ContactPersons));
selectedItem = new PersonFilterItem(PersonFilterEnum.ContactPersons); ;
}
mainNavigationView.sortPanel.Children.Insert(3, lbl);
mainNavigationView.sortPanel.Children.Insert(4, filterComboBox);
UpdateCustomFilter();
}
filterComboBox.SelectedItem = selectedItem;
filterComboBox.SelectionChanged += SupportConceptFilterComboBoxOnSelectionChanged;
private void SupportConceptFilterComboBoxOnSelectionChanged(object o, SelectionChangedEventArgs selectionChangedEventArgs)
{
//BeWoApp.AppSettings.CustomerFilterSupportConcepts = ((PersonFilterItem)filterComboBox.SelectedItem)?.CustomerFilter ?? CustomerFilterEnum.MyCustomer;
//BeWoApp.SaveAppSettings();
UpdateCustomFilter();
}
mainNavigationView.sortPanel.Children.Insert(3, lbl);
mainNavigationView.sortPanel.Children.Insert(4, filterComboBox);
private void UpdateCustomFilter()
{
mainNavigationView.CustomFilter = CreateNewPersonFilter();
}
UpdateCustomFilter();
}
private PersonNavigationFilter CreateNewPersonFilter()
{
var filter = new PersonNavigationFilter { PersonFilter = ((PersonFilterItem)filterComboBox.SelectedItem)?.Filter ?? PersonFilterEnum.ContactPersons };
public Dictionary<TableID, long[]> GetVisibleInformationReferences()
{
var visible = mainNavigationView.objectListBox.ItemsSource;
return filter;
}
return GetVisibleInformationReferences(visible);
}
private void OnLoaded(object sender, RoutedEventArgs e)
{
ReloadData(false);
}
private Dictionary<TableID, long[]> GetVisibleInformationReferences(IEnumerable visible_persons)
{
var oids = new List<long>();
foreach (var p in visible_persons)
{
var person = p as CompactPersonDC;
oids.Add(person.PersonOid);
}
private bool mainNavigationView_ArchiveObject(IFilterableDC obj)
{
var dc = obj as CompactPersonDC;
if (dc != null)
{
if (
MessageBox.Show(
"Wollen Sie die Person '" + dc.FirstName + " " + dc.LastName + "' wirklich archivieren?",
"Archivieren", MessageBoxButton.YesNo, MessageBoxImage.Exclamation) == MessageBoxResult.Yes)
{
ServiceFacade.DoCustomerServiceAsync(
s =>
{
s.ArchivePerson(dc.PersonOid, dc.PersonVersion);
return dc;
},
cb => cb.PersonVersion++);
var dict = new Dictionary<TableID, long[]>() {
{
TableID.Person, oids.ToArray()}
};
return true;
}
}
return dict;
}
return false;
}
private void OpenAiWindow()
{
var context = GetVisibleInformationReferences();
private void mainNavigationView_CreateNewObject()
{
VMFactory.CreatePersonVMAsync(cb => this.Dispatch(() => MainControl.NavigateTo(new PersonView(cb) {ParentView = this})));
}
var window = BeWoWindowBuilder.AiWindowBuilder.GetAiConversationWindow(UIContext.Person, context);
private bool mainNavigationView_DeleteObject(IFilterableDC obj)
{
var dc = obj as CompactPersonDC;
if (dc != null)
{
if (
MessageBox.Show(
"Wollen Sie die Person '" + dc.FirstName + " " + dc.LastName + "' wirklich löschen?", "Löschen",
MessageBoxButton.YesNo, MessageBoxImage.Exclamation) == MessageBoxResult.Yes)
{
ServiceFacade.DoCustomerServiceAsync(s => s.DeactivatePerson(dc.PersonOid, dc.PersonVersion));
return true;
}
}
window?.ShowDialog();
}
return false;
}
private void OpenAiPopup()
{
var context = GetVisibleInformationReferences();
private void mainNavigationView_ExcelExport(object sender, EventArgs<IEnumerable<IFilterableDC>> e)
{
var control = BeWoWindowBuilder.AiWindowBuilder.GetAiConversationControl(UIContext.Person, context);
if (control is object)
MainControl.ShowControlAsModalPopup(control);
}
private void SupportConceptFilterComboBoxOnSelectionChanged(object o, SelectionChangedEventArgs selectionChangedEventArgs)
{
//BeWoApp.AppSettings.CustomerFilterSupportConcepts = ((PersonFilterItem)filterComboBox.SelectedItem)?.CustomerFilter ?? CustomerFilterEnum.MyCustomer;
//BeWoApp.SaveAppSettings();
UpdateCustomFilter();
}
private void UpdateCustomFilter()
{
mainNavigationView.CustomFilter = CreateNewPersonFilter();
}
private PersonNavigationFilter CreateNewPersonFilter()
{
var filter = new PersonNavigationFilter { PersonFilter = ((PersonFilterItem)filterComboBox.SelectedItem)?.Filter ?? PersonFilterEnum.ContactPersons };
return filter;
}
private void OnLoaded(object sender, RoutedEventArgs e)
{
ReloadData(false);
CommandManager.InvalidateRequerySuggested();
}
private bool mainNavigationView_ArchiveObject(IFilterableDC obj)
{
var dc = obj as CompactPersonDC;
if (dc != null)
{
if (
MessageBox.Show(
"Wollen Sie die Person '" + dc.FirstName + " " + dc.LastName + "' wirklich archivieren?",
"Archivieren", MessageBoxButton.YesNo, MessageBoxImage.Exclamation) == MessageBoxResult.Yes)
{
ServiceFacade.DoCustomerServiceAsync(
s =>
{
s.ArchivePerson(dc.PersonOid, dc.PersonVersion);
return dc;
},
cb => cb.PersonVersion++);
return true;
}
}
return false;
}
private void mainNavigationView_CreateNewObject()
{
VMFactory.CreatePersonVMAsync(cb => this.Dispatch(() => MainControl.NavigateTo(new PersonView(cb) { ParentView = this })));
}
private bool mainNavigationView_DeleteObject(IFilterableDC obj)
{
var dc = obj as CompactPersonDC;
if (dc != null)
{
if (
MessageBox.Show(
"Wollen Sie die Person '" + dc.FirstName + " " + dc.LastName + "' wirklich löschen?", "Löschen",
MessageBoxButton.YesNo, MessageBoxImage.Exclamation) == MessageBoxResult.Yes)
{
ServiceFacade.DoCustomerServiceAsync(s => s.DeactivatePerson(dc.PersonOid, dc.PersonVersion));
return true;
}
}
return false;
}
private void mainNavigationView_ExcelExport(object sender, EventArgs<IEnumerable<IFilterableDC>> e)
{
// string path = BeWoApp.LoginControl.GetAndCreateTempDataPath() + "\\Personen.xls";
var path = BeWoApp.GetAndCreateUserAppDataPath() + "\\Personen.xls";
var sf = new SaveFileDialog
{
FileName = Path.GetFileName(path),
Filter = "Microsoft Excel 97-2003-Arbeitsblatt|*.xls|Alle Dateien|*.*"
};
if (sf.ShowDialog() != true)
return;
var sf = new SaveFileDialog
{
FileName = Path.GetFileName(path),
Filter = "Microsoft Excel 97-2003-Arbeitsblatt|*.xls|Alle Dateien|*.*"
};
if (sf.ShowDialog() != true)
return;
ServiceFacade.DoDownloadServiceSync(
s =>
BeWoUtils.WriteExcelFile(
s.PrepareExcelFilePersonExport(mainNavigationView.DownloadLinkEngine.ExcelFileId,
e.Data.Cast<CompactPersonDC>().Select(c => c.PersonOid).ToList()),
sf.FileName));
}
private void mainNavigationView_Print(object sender, EventArgs<IEnumerable<IFilterableDC>> e)
{
var oids = e.Data.Cast<CompactPersonDC>().Select(c => c.PersonOid).ToList();
ServiceFacade.DoDownloadServiceSync(
s =>
BeWoUtils.WriteExcelFile(
s.PrepareExcelFilePersonExport(mainNavigationView.DownloadLinkEngine.ExcelFileId,
e.Data.Cast<CompactPersonDC>().Select(c => c.PersonOid).ToList()),
sf.FileName));
}
private void mainNavigationView_Print(object sender, EventArgs<IEnumerable<IFilterableDC>> e)
{
var oids = e.Data.Cast<CompactPersonDC>().Select(c => c.PersonOid).ToList();
ServiceFacade.DoReportServiceAsync(s => s.CreatePersonListReport(oids), r =>
{
this.Dispatch(() =>
{
BeWoUtils.ShowReportWindow(r, "Personen");
});
});
}
private void mainNavigationView_OpenObject(IFilterableDC obj)
{
var dc = obj as CompactPersonDC;
if (dc != null)
{
VMFactory.CreatePersonVMAsync(dc.PersonOid, cb => this.Dispatch(() => MainControl.NavigateTo(new PersonView(cb) {ParentView = this})));
}
}
ServiceFacade.DoReportServiceAsync(s => s.CreatePersonListReport(oids), r =>
{
this.Dispatch(() =>
{
BeWoUtils.ShowReportWindow(r, "Personen");
});
});
}
private void mainNavigationView_OpenObject(IFilterableDC obj)
{
var dc = obj as CompactPersonDC;
if (dc != null)
{
VMFactory.CreatePersonVMAsync(dc.PersonOid, cb => this.Dispatch(() => MainControl.NavigateTo(new PersonView(cb) { ParentView = this })));
}
}
public override void ChildViewClosed()
{
recentList = null;
objectList = null;
}
public override void ChildViewClosed()
{
recentList = null;
objectList = null;
}
private void MainNavigationView_OnReloadData()
{
ReloadData(true);
}
private void MainNavigationView_OnReloadData()
{
ReloadData(true);
}
private void ReloadData(bool refresh)
{
if (refresh || recentList == null)
{
ServiceFacade.DoCustomerServiceAsync(
s => s.GetAllPersonsByTypeCompact(PersonType.Others), r => this.Dispatch(delegate
{
objectList = r;
mainNavigationView.ShowSearchResult(objectList);
}));
ServiceFacade.DoCustomerServiceAsync(s => s.GetLastOpenedPersons(), r => this.Dispatch(delegate
{
recentList = r;
mainNavigationView.ShowHistory(recentList);
}));
}
else
{
mainNavigationView.ShowSearchResult(objectList);
mainNavigationView.ShowHistory(recentList);
}
}
private void ReloadData(bool refresh)
{
if (refresh || recentList == null)
{
ServiceFacade.DoCustomerServiceAsync(
s => s.GetAllPersonsByTypeCompact(PersonType.Others), r => this.Dispatch(delegate
{
objectList = r;
mainNavigationView.ShowSearchResult(objectList);
}));
ServiceFacade.DoCustomerServiceAsync(s => s.GetLastOpenedPersons(), r => this.Dispatch(delegate
{
recentList = r;
mainNavigationView.ShowHistory(recentList);
}));
}
else
{
mainNavigationView.ShowSearchResult(objectList);
mainNavigationView.ShowHistory(recentList);
}
}
private void MainNavigationView_OnOpenMailMergeWindow(List<IFilterableDC> allPersons, IFilterableDC selectedPerson)
{
var mmw = new MailMergeWindow(this, typeof(PersonDC), objectList.ToList(), selectedPerson)
{
Sorter = new PersonSorter()
};
mmw.Show();
}
private void MainNavigationView_OnOpenMailMergeWindow(List<IFilterableDC> allPersons, IFilterableDC selectedPerson)
{
var mmw = new MailMergeWindow(this, typeof(PersonDC), objectList.ToList(), selectedPerson)
{
Sorter = new PersonSorter()
};
mmw.Show();
}
public void ReactivatePerson(CompactPersonDC person)
{
public void ReactivatePerson(CompactPersonDC person)
{
if (MessageBox.Show("Wollen Sie die Person '" + person.FirstName + " " + person.LastName + "' wirklich reaktivieren?", "Löschen", MessageBoxButton.YesNo, MessageBoxImage.Exclamation) == MessageBoxResult.No)
{
return;
@@ -256,29 +308,29 @@ namespace BeWo.View.Navigation
var context = mainNavigationView.objectListBox.DataContext;
mainNavigationView.objectListBox.DataContext = null;
mainNavigationView.objectListBox.DataContext = context;
}
}
public void DeleteForGood(CompactPersonDC person)
{
var dialog = new MessageDialog(() =>
{
this.Dispatch(() =>
{
ServiceFacade.DoOperationsServiceAsync(s =>
{
s.DeletePersonForGood(person.PersonOid);
}, () => { ReloadData(true); });
});
});
public void DeleteForGood(CompactPersonDC person)
{
var dialog = new MessageDialog(() =>
{
this.Dispatch(() =>
{
ServiceFacade.DoOperationsServiceAsync(s =>
{
s.DeletePersonForGood(person.PersonOid);
}, () => { ReloadData(true); });
});
});
ServiceFacade.DoOperationsServiceAsync(s => s.GetMessageFromServer(TableID.Person, person.PersonOid, MessageType.DeleteForGood), xaml =>
{
this.Dispatch(() =>
{
dialog.SetXaml(xaml);
dialog.ShowDialog();
});
});
}
}
ServiceFacade.DoOperationsServiceAsync(s => s.GetMessageFromServer(TableID.Person, person.PersonOid, MessageType.DeleteForGood), xaml =>
{
this.Dispatch(() =>
{
dialog.SetXaml(xaml);
dialog.ShowDialog();
});
});
}
}
}

View File

@@ -22,6 +22,7 @@ using BeWo.Core.Service;
using BeWo.MultiLanguage;
using BS.Shared.Translation;
using Microsoft.Win32;
using BeWo.View.Windows;
namespace BeWo.View.Navigation
{

View File

@@ -1,44 +1,115 @@
<Window x:Class="BeWo.View.PasswortAenderungsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="PasswortAenderungsView" Height="230" Width="340" WindowStartupLocation="CenterScreen" WindowStyle="None"
AllowsTransparency="True"
Background="Transparent"
ResizeMode="NoResize">
<Window
x:Class="BeWo.View.PasswortAenderungsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="PasswortAenderungsView"
Width="340"
Height="230"
AllowsTransparency="True"
Background="Transparent"
ResizeMode="NoResize"
WindowStartupLocation="CenterScreen"
WindowStyle="None">
<Grid>
<GroupBox Header="Passwort ändern" x:Name="rootGroupBox" Style="{DynamicResource MainContentGroupBoxWithoutMaximizeBtnStyle}" MouseLeftButtonDown="RootGroupBox_OnMouseLeftButtonDown">
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock x:Name="textblock_editFailures" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Height="30" Foreground="Red" FontSize="12" TextWrapping="Wrap" Margin="3" VerticalAlignment="Center" HorizontalAlignment="Center" />
<Label Grid.Row="1" Grid.Column="0" Content="Altes Passwort" Margin="3" />
<PasswordBox x:Name="AltesPwBox" Grid.Row="1" Grid.Column="1" Margin="3" VerticalContentAlignment="Center" PasswordChanged="AltesPWgeaendert" />
<GroupBox
x:Name="rootGroupBox"
Header="Passwort ändern"
MouseLeftButtonDown="RootGroupBox_OnMouseLeftButtonDown"
Style="{DynamicResource MainContentGroupBoxWithoutMaximizeBtnStyle}">
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock
x:Name="textblock_editFailures"
Grid.Row="0"
Grid.Column="0"
Grid.ColumnSpan="2"
Height="30"
Margin="3"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="12"
Foreground="Red"
TextWrapping="Wrap" />
<Label
Grid.Row="1"
Grid.Column="0"
Margin="3"
Content="Altes Passwort" />
<PasswordBox
x:Name="AltesPwBox"
Grid.Row="1"
Grid.Column="1"
Margin="3"
VerticalContentAlignment="Center"
PasswordChanged="AltesPWgeaendert" />
<Label Grid.Row="2" Grid.Column="0" Content="Neues Passwort" Margin="3" />
<PasswordBox x:Name="NeuesPwBox" Grid.Row="2" Grid.Column="1" Margin="3" VerticalContentAlignment="Center" PasswordChanged="NeuesPwBox_OnPasswordChanged" />
<Label Grid.Row="3" Grid.Column="0" Content="Passwort bestätigen" Margin="3" />
<PasswordBox x:Name="NeuesPwBox2" Grid.Row="3" Grid.Column="1" Margin="3" VerticalContentAlignment="Center" />
<Label Content="Passwort zu kurz" Grid.Row="4" Grid.ColumnSpan="2" Foreground="Red" x:Name="passwortprüfer" Visibility="Hidden" />
<StackPanel Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,10,0,0">
<Button Margin="3" Content="OK" Width="100" Click="AendernClick" IsDefault="True" />
<Button Margin="3" x:Name="AbbrechenButton" Content="Abbrechen" Width="100" Command="Close" />
</StackPanel>
</Grid>
</GroupBox>
</Grid>
<Label
Grid.Row="2"
Grid.Column="0"
Margin="3"
Content="Neues Passwort" />
<PasswordBox
x:Name="NeuesPwBox"
Grid.Row="2"
Grid.Column="1"
Margin="3"
VerticalContentAlignment="Center"
PasswordChanged="NeuesPwBox_OnPasswordChanged" />
<Label
Grid.Row="3"
Grid.Column="0"
Margin="3"
Content="Passwort bestätigen" />
<PasswordBox
x:Name="NeuesPwBox2"
Grid.Row="3"
Grid.Column="1"
Margin="3"
VerticalContentAlignment="Center" />
<Label
x:Name="passwortprüfer"
Grid.Row="4"
Grid.ColumnSpan="2"
Content="Passwort zu kurz"
Foreground="Red"
Visibility="Hidden" />
<StackPanel
Grid.Row="5"
Grid.Column="0"
Grid.ColumnSpan="2"
Margin="0,10,0,0"
HorizontalAlignment="Right"
Orientation="Horizontal">
<Button
Width="100"
Margin="3"
Click="AendernClick"
Content="OK"
IsDefault="True" />
<Button
x:Name="AbbrechenButton"
Width="100"
Margin="3"
Command="Close"
Content="Abbrechen" />
</StackPanel>
</Grid>
</GroupBox>
</Grid>
</Window>

View File

@@ -1,98 +1,227 @@
<localView:BeWoView x:Class="BeWo.View.Report.Auslastung.AuslastungReportView2"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:localSearchView="clr-namespace:BeWo.View.Search"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" Focusable="True" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:dxp="http://schemas.devexpress.com/winfx/2008/xaml/printing"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:dxpbars="http://schemas.devexpress.com/winfx/2008/xaml/printing/bars"
mc:Ignorable="d">
<localView:BeWoView
x:Class="BeWo.View.Report.Auslastung.AuslastungReportView2"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:dxp="http://schemas.devexpress.com/winfx/2008/xaml/printing"
xmlns:dxpbars="http://schemas.devexpress.com/winfx/2008/xaml/printing/bars"
xmlns:localSearchView="clr-namespace:BeWo.View.Search"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
Width="Auto"
Height="Auto"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Focusable="True"
mc:Ignorable="d">
<GroupBox Style="{StaticResource ObjectEditGroupBox}" Header="{markup:Translate Mitarbeiterauslastung}" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="120" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<GroupBox Header="{markup:Translate Mitarbeiterauslastung}" Style="{StaticResource ObjectEditGroupBox}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="120" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<RadioButton x:Name="radioEmployeeReport" Grid.Column="0" Grid.ColumnSpan="2" Content="{markup:Translate Nach Mitarbeiter auswerten}" GroupName="radioReportType" IsChecked="True" Margin="4,3,0,3" Checked="RadioButton_Checked" Height="22" />
<RadioButton x:Name="radioTeamReport" Grid.Column="2" Grid.Row="0" Grid.ColumnSpan="3" GroupName="radioReportType" Content="Nach Team auswerten" Margin="-10,3,0,3" Checked="RadioButton_Checked" />
<RadioButton
x:Name="radioEmployeeReport"
Grid.Column="0"
Grid.ColumnSpan="2"
Height="22"
Margin="4,3,0,3"
Checked="RadioButton_Checked"
Content="{markup:Translate Nach Mitarbeiter auswerten}"
GroupName="radioReportType"
IsChecked="True" />
<RadioButton
x:Name="radioTeamReport"
Grid.Row="0"
Grid.Column="2"
Grid.ColumnSpan="3"
Margin="-10,3,0,3"
Checked="RadioButton_Checked"
Content="Nach Team auswerten"
GroupName="radioReportType" />
<CheckBox Margin="3" Name="checkbox_all" Grid.Row="1" Grid.Column="0" IsChecked="False" Content="{markup:Translate Alle Mitarbeiter}" Checked="CheckBox_Checked" Unchecked="CheckBox_Checked" VerticalAlignment="Center"/>
<CheckBox
Name="checkbox_all"
Grid.Row="1"
Grid.Column="0"
Margin="3"
VerticalAlignment="Center"
Checked="CheckBox_Checked"
Content="{markup:Translate Alle Mitarbeiter}"
IsChecked="False"
Unchecked="CheckBox_Checked" />
<uc:PopUpEdit Grid.Row="1" IsReadOnly="True" Grid.Column="1" Grid.ColumnSpan="3"
x:Name="popupedit_employee" DeleteButtonVisibility="Collapsed"
Margin="3" Height="22" VerticalAlignment="Top" PopUpClick="popupedit_employee_PopUpClick" Cursor="Arrow" />
<uc:PopUpEdit
x:Name="popupedit_employee"
Grid.Row="1"
Grid.Column="1"
Grid.ColumnSpan="3"
Height="22"
Margin="3"
VerticalAlignment="Top"
Cursor="Arrow"
DeleteButtonVisibility="Collapsed"
IsReadOnly="True"
PopUpClick="popupedit_employee_PopUpClick" />
<CheckBox Grid.Column="0" Grid.Row="1" Margin="3" x:Name="checkbox_all_teams" IsChecked="True" Content="Alle Teams" Checked="CheckBoxAllTeams_Checked" Unchecked="CheckBoxAllTeams_Checked" VerticalAlignment="Center" Visibility="Collapsed" />
<uc:PopUpEdit Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="3" IsReadOnly="True" Visibility="Collapsed"
x:Name="popupedit_team" DeleteButtonVisibility="Collapsed" PopUpClick="popupedit_team_PopUpClick" HorizontalAlignment="Stretch"
HorizontalContentAlignment="Left" Height="22" Margin="3" Cursor="Arrow" />
<CheckBox
x:Name="checkbox_all_teams"
Grid.Row="1"
Grid.Column="0"
Margin="3"
VerticalAlignment="Center"
Checked="CheckBoxAllTeams_Checked"
Content="Alle Teams"
IsChecked="True"
Unchecked="CheckBoxAllTeams_Checked"
Visibility="Collapsed" />
<uc:PopUpEdit
x:Name="popupedit_team"
Grid.Row="1"
Grid.Column="1"
Grid.ColumnSpan="3"
Height="22"
Margin="3"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Left"
Cursor="Arrow"
DeleteButtonVisibility="Collapsed"
IsReadOnly="True"
PopUpClick="popupedit_team_PopUpClick"
Visibility="Collapsed" />
<!--<uc:PopUpEdit Grid.Row="1" IsReadOnly="True" MinWidth="50" Grid.Column="1" Grid.ColumnSpan="3"
<!--<uc:PopUpEdit Grid.Row="1" IsReadOnly="True" MinWidth="50" Grid.Column="1" Grid.ColumnSpan="3"
x:Name="popupedit_team" DeleteButtonVisibility="Collapsed"
Visibility="{Binding Path=IsChecked, Converter={StaticResource BoolVisibilityHiddenConverter}, ConverterParameter=false, ElementName=checkbox_allTeams}"
Margin="3" VerticalAlignment="Top" PopUpClick="popupedit_team_PopUpClick" Cursor="Arrow" />-->
<Label Margin="0 2" Content="Monat" Grid.Row="2" Grid.Column="0" />
<ComboBox Height="23" x:Name="combobox_month" Grid.Row="2" Grid.Column="1" Margin="3" VerticalAlignment="Top" Width="90" />
<Label
Grid.Row="2"
Grid.Column="0"
Margin="0,2"
Content="Monat" />
<ComboBox
x:Name="combobox_month"
Grid.Row="2"
Grid.Column="1"
Width="90"
Height="23"
Margin="3"
VerticalAlignment="Top" />
<TextBlock Margin="0 7,3,0" Text=" Jahr" Grid.Row="2" Grid.Column="2" Foreground="Black"/>
<ComboBox Height="23" x:Name="combobox_year" Grid.Row="2" Grid.Column="3" VerticalAlignment="Top" Margin="3" Width="60" />
<TextBlock
Grid.Row="2"
Grid.Column="2"
Margin="0,7,3,0"
Foreground="Black"
Text=" Jahr" />
<ComboBox
x:Name="combobox_year"
Grid.Row="2"
Grid.Column="3"
Width="60"
Height="23"
Margin="3"
VerticalAlignment="Top" />
<Button Name="button_generate" Grid.Row="3" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Top" FontWeight="Bold" Content="Erstellen" Click="button_generate_Click" Height="23" Margin="3" />
<CheckBox Margin="3" Name="checkbox_openInNewWindow" Grid.Row="3" Grid.ColumnSpan="5" Grid.Column="1"
IsChecked="False" Content="{markup:Translate In einem neuen Fenster öffnen}" VerticalAlignment="Center" Checked="checkbox_openInNewWindow_Checked" Unchecked="checkbox_openInNewWindow_Checked"/>
<dxp:DocumentPreviewControl x:Name="docPrevControl" Grid.Row="6" Grid.ColumnSpan="5" Grid.Column="0" Visibility="Collapsed" CommandBarStyle="Bars">
<dxp:DocumentPreviewControl.CommandProvider>
<dxp:DocumentCommandProvider>
<dxp:DocumentCommandProvider.Actions>
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.ExportCsv}"/>
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.ExportMht}"/>
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.ExportTxt}"/>
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Open}"/>
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.DocumentMap}"/>
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Watermark}"/>
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Scale}"/>
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.PrintDirect}"/>
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.PageSetup}"/>
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Save}"/>
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Send}"/>
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Parameters}"/>
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Thumbnails}"/>
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.EditingFields}"/>
</dxp:DocumentCommandProvider.Actions>
</dxp:DocumentCommandProvider>
</dxp:DocumentPreviewControl.CommandProvider>
</dxp:DocumentPreviewControl>
<Popup Margin="10" Name="popup_employee" StaysOpen="False" Placement="MousePoint" Width="400" Grid.Row="5"
Grid.Column="0" Height="400" Closed="popup_Closed" Opened="popup_Opened">
<localSearchView:EmployeeSearchView ItemSelected="EmployeeSearchView_EmployeeSelected" x:Name="employeesearchview" />
</Popup>
<Popup Margin="10" Name="popup_team" StaysOpen="False" Placement="MousePoint" Width="400" Grid.Row="7" Grid.ColumnSpan="5"
Grid.Column="0" Height="400" Closed="popup_Closed" Opened="popup_Opened">
<localSearchView:TeamSearchView ItemSelected="TeamSearchView_TeamSelected" x:Name="teamsearchview" />
</Popup>
</Grid>
</GroupBox>
<Button
Name="button_generate"
Grid.Row="3"
Grid.Column="0"
Height="23"
Margin="3"
HorizontalAlignment="Stretch"
VerticalAlignment="Top"
Click="button_generate_Click"
Content="Erstellen"
FontWeight="Bold" />
<CheckBox
Name="checkbox_openInNewWindow"
Grid.Row="3"
Grid.Column="1"
Grid.ColumnSpan="5"
Margin="3"
VerticalAlignment="Center"
Checked="checkbox_openInNewWindow_Checked"
Content="{markup:Translate In einem neuen Fenster öffnen}"
IsChecked="False"
Unchecked="checkbox_openInNewWindow_Checked" />
<dxp:DocumentPreviewControl
x:Name="docPrevControl"
Grid.Row="6"
Grid.Column="0"
Grid.ColumnSpan="5"
CommandBarStyle="Bars"
Visibility="Collapsed">
<dxp:DocumentPreviewControl.CommandProvider>
<dxp:DocumentCommandProvider>
<dxp:DocumentCommandProvider.Actions>
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.ExportCsv}" />
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.ExportMht}" />
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.ExportTxt}" />
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Open}" />
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.DocumentMap}" />
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Watermark}" />
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Scale}" />
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.PrintDirect}" />
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.PageSetup}" />
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Save}" />
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Send}" />
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Parameters}" />
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Thumbnails}" />
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.EditingFields}" />
</dxp:DocumentCommandProvider.Actions>
</dxp:DocumentCommandProvider>
</dxp:DocumentPreviewControl.CommandProvider>
</dxp:DocumentPreviewControl>
<Popup
Name="popup_employee"
Grid.Row="5"
Grid.Column="0"
Width="400"
Height="400"
Margin="10"
Closed="popup_Closed"
Opened="popup_Opened"
Placement="MousePoint"
StaysOpen="False">
<localSearchView:EmployeeSearchView x:Name="employeesearchview" ItemSelected="EmployeeSearchView_EmployeeSelected" />
</Popup>
<Popup
Name="popup_team"
Grid.Row="7"
Grid.Column="0"
Grid.ColumnSpan="5"
Width="400"
Height="400"
Margin="10"
Closed="popup_Closed"
Opened="popup_Opened"
Placement="MousePoint"
StaysOpen="False">
<localSearchView:TeamSearchView x:Name="teamsearchview" ItemSelected="TeamSearchView_TeamSelected" />
</Popup>
</Grid>
</GroupBox>
</localView:BeWoView>

View File

@@ -0,0 +1,38 @@
using BeWo.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
namespace BeWo.View.TemplateSelectors
{
public class AiConversationMessageTemplateSelector : DataTemplateSelector
{
public DataTemplate SystemMessageTemplate { get; set; }
public DataTemplate AssistentMessageTemplate { get; set; }
public DataTemplate UserMessageTemplate { get; set; }
public override DataTemplate SelectTemplate(object item, DependencyObject container)
{
if (item is AiConversationMessageVM message)
{
switch (message.Role)
{
case BS.Shared.AiConversationMessageRole.System:
return SystemMessageTemplate;
case BS.Shared.AiConversationMessageRole.Assistent:
return AssistentMessageTemplate;
case BS.Shared.AiConversationMessageRole.User:
return UserMessageTemplate;
default:
break;
}
}
throw new NotImplementedException("AiConversationMessageVM.Role is null");
}
}
}

View File

@@ -1,53 +1,91 @@
<Window x:Class="BeWo.View.TwoFactorAuthMessageDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converter="clr-namespace:BeWo.Converter"
Title="BeWoPlaner" Height="400" Width="500" WindowStartupLocation="CenterScreen" WindowStyle="None" ResizeMode="NoResize" >
<Window.Resources>
<converter:BoolVisibilityConverter x:Key="BoolVisibilityConverter" />
</Window.Resources>
<Grid Background="{x:Null}" Margin="0,0,0,0">
<Border BorderThickness="1" Padding="5,5,5,5" BorderBrush="Black" Background="{DynamicResource LoginBackgroundColor}">
<Grid Opacity="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="80" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Image Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Top" Source="..\Ressources\Icons\bewoplaner_logo_small.png" Height="45" Margin="7,7,0,0"/>
<Grid Grid.Row="1" Margin="0,10,0,0" x:Name="rootGrid">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<TextBox Background="Transparent"
BorderThickness="0" IsReadOnly="True"
x:Name="txtMessage" TextWrapping="Wrap" Margin="3" FontSize="14">Wir haben Ihnen eine Mail an die hinterlegte Adresse geschickt. Bitte geben Sie den Code ein um sich anzumelden.</TextBox>
<Window
x:Class="BeWo.View.TwoFactorAuthMessageDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converter="clr-namespace:BeWo.Converter"
Title="BeWoPlaner"
Width="500"
Height="400"
ResizeMode="NoResize"
WindowStartupLocation="CenterScreen"
WindowStyle="None">
<Window.Resources>
<converter:BoolVisibilityConverter x:Key="BoolVisibilityConverter" />
</Window.Resources>
<Grid Margin="0,0,0,0" Background="{x:Null}">
<Border
Padding="5,5,5,5"
Background="{DynamicResource LoginBackgroundColor}"
BorderBrush="Black"
BorderThickness="1">
<Grid Opacity="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="80" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Image
Grid.Row="0"
Height="45"
Margin="7,7,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Source="..\Ressources\Icons\bewoplaner_logo_small.png" />
<Grid
x:Name="rootGrid"
Grid.Row="1"
Margin="0,10,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBox
x:Name="txtMessage"
Margin="3"
Background="Transparent"
BorderThickness="0"
FontSize="14"
IsReadOnly="True"
TextWrapping="Wrap">
Wir haben Ihnen eine Mail an die hinterlegte Adresse geschickt. Bitte geben Sie den Code ein um sich anzumelden.
</TextBox>
<Grid Grid.Row="1" HorizontalAlignment="Center" Margin="10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBox Grid.Row="0" Grid.Column="1" x:Name="textbox" VerticalContentAlignment="Center" Width="185" VerticalAlignment="Center" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" FontSize="20"></TextBox>
</Grid>
<!--<Grid >
<Grid
Grid.Row="1"
Margin="10"
HorizontalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBox
x:Name="textbox"
Grid.Row="0"
Grid.Column="1"
Width="185"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"
FontSize="20" />
</Grid>
<!--<Grid >
<Grid.RowDefinitions>
<RowDefinition Height="*" ></RowDefinition>
<RowDefinition Height="Auto" ></RowDefinition>
@@ -65,15 +103,45 @@
</Hyperlink>
</TextBlock>
</Grid>-->
<!--<Button Grid.Row="2" Grid.Column ="2" Width="100" Margin="3" IsCancel="True" IsEnabled="False" HorizontalAlignment="Right">Abbrechen</Button>-->
</Grid>
</Grid>
</Border>
<Line Grid.ColumnSpan="4" Stroke="#FFADADAD" X1="14" Y1="70" X2="486" Y2="70" StrokeThickness="1"></Line>
<Line x:Name="linkLine" Stroke="#FFADADAD" X1="14" Y1="320" X2="486" Y2="320" StrokeThickness="1" Margin="0,30,0,-30"></Line>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<Button x:Name="OkayButton" Width="120" Margin="3,3,3,10" VerticalAlignment="Bottom" Click="OkayButton_OnClick">Anmelden</Button>
<Button x:Name="CancelButton" Width="120" Margin="3,3,15,10" IsDefault="True" VerticalAlignment="Bottom" Click="CancelButton_OnClick">Abbrechen</Button>
</StackPanel>
<!--<Button Grid.Row="2" Grid.Column ="2" Width="100" Margin="3" IsCancel="True" IsEnabled="False" HorizontalAlignment="Right">Abbrechen</Button>-->
</Grid>
</Grid>
</Border>
<Line
Grid.ColumnSpan="4"
Stroke="#FFADADAD"
StrokeThickness="1"
X1="14"
X2="486"
Y1="70"
Y2="70" />
<Line
x:Name="linkLine"
Margin="0,30,0,-30"
Stroke="#FFADADAD"
StrokeThickness="1"
X1="14"
X2="486"
Y1="320"
Y2="320" />
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
<Button
x:Name="OkayButton"
Width="120"
Margin="3,3,3,10"
VerticalAlignment="Bottom"
Click="OkayButton_OnClick">
Anmelden
</Button>
<Button
x:Name="CancelButton"
Width="120"
Margin="3,3,15,10"
VerticalAlignment="Bottom"
Click="CancelButton_OnClick"
IsDefault="True">
Abbrechen
</Button>
</StackPanel>
</Grid>
</Window>

View File

@@ -1,10 +1,11 @@
<UserControl x:Class="BeWo.View.WaitLayer2"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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"
Foreground="{DynamicResource BSOrangeBrush}">
<UserControl
x:Class="BeWo.View.WaitLayer2"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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"
Foreground="{DynamicResource BSOrangeBrush}"
mc:Ignorable="d">
<UserControl.Resources>
<Style TargetType="{x:Type Rectangle}">
<Setter Property="Fill" Value="{Binding Path=Foreground, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}" />
@@ -12,28 +13,52 @@
<Setter Property="Height" Value="40" />
</Style>
<Storyboard x:Key="OnLoaded1" RepeatBehavior="Forever">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00.1" Storyboard.TargetName="bSLogoControl" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" >
<DoubleAnimationUsingKeyFrames
BeginTime="00:00:00.1"
Storyboard.TargetName="bSLogoControl"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
<LinearDoubleKeyFrame KeyTime="0:0:0" Value="45" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00.2" Storyboard.TargetName="bSLogoControl" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" >
<DoubleAnimationUsingKeyFrames
BeginTime="00:00:00.2"
Storyboard.TargetName="bSLogoControl"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
<LinearDoubleKeyFrame KeyTime="0:0:0" Value="90" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00.3" Storyboard.TargetName="bSLogoControl" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" >
<DoubleAnimationUsingKeyFrames
BeginTime="00:00:00.3"
Storyboard.TargetName="bSLogoControl"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
<LinearDoubleKeyFrame KeyTime="0:0:0" Value="135" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00.4" Storyboard.TargetName="bSLogoControl" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" >
<DoubleAnimationUsingKeyFrames
BeginTime="00:00:00.4"
Storyboard.TargetName="bSLogoControl"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
<LinearDoubleKeyFrame KeyTime="0:0:0" Value="180" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00.5" Storyboard.TargetName="bSLogoControl" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" >
<DoubleAnimationUsingKeyFrames
BeginTime="00:00:00.5"
Storyboard.TargetName="bSLogoControl"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
<LinearDoubleKeyFrame KeyTime="0:0:0" Value="225" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00.6" Storyboard.TargetName="bSLogoControl" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" >
<DoubleAnimationUsingKeyFrames
BeginTime="00:00:00.6"
Storyboard.TargetName="bSLogoControl"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
<LinearDoubleKeyFrame KeyTime="0:0:0" Value="270" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00.7" Storyboard.TargetName="bSLogoControl" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" >
<DoubleAnimationUsingKeyFrames
BeginTime="00:00:00.7"
Storyboard.TargetName="bSLogoControl"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
<LinearDoubleKeyFrame KeyTime="0:0:0" Value="315" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00.8" Storyboard.TargetName="bSLogoControl" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" >
<DoubleAnimationUsingKeyFrames
BeginTime="00:00:00.8"
Storyboard.TargetName="bSLogoControl"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
<LinearDoubleKeyFrame KeyTime="0:0:0" Value="360" />
</DoubleAnimationUsingKeyFrames>
</Storyboard>
@@ -45,11 +70,20 @@
</UserControl.Triggers>
<Grid>
<Grid Background="White" Opacity="0.01" />
<Border CornerRadius="5,5,5,5" Opacity="0.92" BorderThickness="1,1,1,1" Padding="5,5,5,5" BorderBrush="#FF606060" VerticalAlignment="Center" Width="250" Height="100" Background="#FFFFFFFF">
<Border
Width="250"
Height="100"
Padding="5,5,5,5"
VerticalAlignment="Center"
Background="#FFFFFFFF"
BorderBrush="#FF606060"
BorderThickness="1,1,1,1"
CornerRadius="5,5,5,5"
Opacity="0.92">
<Border.OpacityMask>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#F3FFFFFF" Offset="0.027" />
<GradientStop Color="#D7FFFFFF" Offset="1" />
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0.027" Color="#F3FFFFFF" />
<GradientStop Offset="1" Color="#D7FFFFFF" />
</LinearGradientBrush>
</Border.OpacityMask>
<Grid>
@@ -57,8 +91,23 @@
<RowDefinition Height="*" />
<RowDefinition Height="2*" />
</Grid.RowDefinitions>
<Label Content="Daten werden übertragen. Bitte warten..." Foreground="#FF000000" FontSize="12" FontFamily="Microsoft Sans Serif" FontWeight="Normal" HorizontalAlignment="Center" VerticalAlignment="Center" />
<Grid Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" Width="40" Height="40" x:Name="bSLogoControl" RenderTransformOrigin="0.5,0.5" Background="#00000000" >
<Label
HorizontalAlignment="Center"
VerticalAlignment="Center"
Content="Daten werden übertragen. Bitte warten..."
FontFamily="Microsoft Sans Serif"
FontSize="12"
FontWeight="Normal"
Foreground="#FF000000" />
<Grid
x:Name="bSLogoControl"
Grid.Row="1"
Width="40"
Height="40"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Background="#00000000"
RenderTransformOrigin="0.5,0.5">
<Grid.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
@@ -67,14 +116,29 @@
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Grid.RenderTransform>
<Viewbox StretchDirection="Both" Stretch="Fill"
MaxWidth="{Binding Path=ActualWidth, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}"
MaxHeight="{Binding Path=ActualHeight, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}">
<Viewbox
MaxWidth="{Binding Path=ActualWidth, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}"
MaxHeight="{Binding Path=ActualHeight, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}"
Stretch="Fill"
StretchDirection="Both">
<Canvas Width="100" Height="100">
<Canvas Width="100" Height="100" Canvas.Left="0" Canvas.Top="0">
<Rectangle Canvas.Left="44" Canvas.Top="0" RadiusX="6" RadiusY="6"/>
<Canvas
Canvas.Left="0"
Canvas.Top="0"
Width="100"
Height="100">
<Rectangle
Canvas.Left="44"
Canvas.Top="0"
RadiusX="6"
RadiusY="6" />
</Canvas>
<Canvas Width="100" Height="100" Canvas.Left="0" Canvas.Top="0" RenderTransformOrigin="0.5,0.5">
<Canvas
Canvas.Left="0"
Canvas.Top="0"
Width="100"
Height="100"
RenderTransformOrigin="0.5,0.5">
<Canvas.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
@@ -83,9 +147,19 @@
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Canvas.RenderTransform>
<Rectangle Canvas.Left="44" Canvas.Top="0" RadiusX="6" RadiusY="6" Opacity="0.875"/>
<Rectangle
Canvas.Left="44"
Canvas.Top="0"
Opacity="0.875"
RadiusX="6"
RadiusY="6" />
</Canvas>
<Canvas Width="100" Height="100" Canvas.Left="0" Canvas.Top="0" RenderTransformOrigin="0.5,0.5">
<Canvas
Canvas.Left="0"
Canvas.Top="0"
Width="100"
Height="100"
RenderTransformOrigin="0.5,0.5">
<Canvas.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
@@ -94,9 +168,19 @@
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Canvas.RenderTransform>
<Rectangle Canvas.Left="44" Canvas.Top="0" RadiusX="6" RadiusY="6" Opacity="0.75"/>
<Rectangle
Canvas.Left="44"
Canvas.Top="0"
Opacity="0.75"
RadiusX="6"
RadiusY="6" />
</Canvas>
<Canvas Width="100" Height="100" Canvas.Left="0" Canvas.Top="0" RenderTransformOrigin="0.5,0.5">
<Canvas
Canvas.Left="0"
Canvas.Top="0"
Width="100"
Height="100"
RenderTransformOrigin="0.5,0.5">
<Canvas.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
@@ -105,10 +189,20 @@
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Canvas.RenderTransform>
<Rectangle Canvas.Left="44" Canvas.Top="0" RadiusX="6" RadiusY="6" Opacity="0.625"/>
<Rectangle
Canvas.Left="44"
Canvas.Top="0"
Opacity="0.625"
RadiusX="6"
RadiusY="6" />
</Canvas>
<Canvas Width="100" Height="100" Canvas.Left="0" Canvas.Top="0" RenderTransformOrigin="0.5,0.5">
<Canvas
Canvas.Left="0"
Canvas.Top="0"
Width="100"
Height="100"
RenderTransformOrigin="0.5,0.5">
<Canvas.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
@@ -117,9 +211,19 @@
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Canvas.RenderTransform>
<Rectangle Canvas.Left="44" Canvas.Top="0" RadiusX="6" RadiusY="6" Opacity="0.5"/>
<Rectangle
Canvas.Left="44"
Canvas.Top="0"
Opacity="0.5"
RadiusX="6"
RadiusY="6" />
</Canvas>
<Canvas Width="100" Height="100" Canvas.Left="0" Canvas.Top="0" RenderTransformOrigin="0.5,0.5">
<Canvas
Canvas.Left="0"
Canvas.Top="0"
Width="100"
Height="100"
RenderTransformOrigin="0.5,0.5">
<Canvas.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
@@ -128,9 +232,19 @@
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Canvas.RenderTransform>
<Rectangle Canvas.Left="44" Canvas.Top="0" RadiusX="6" RadiusY="6" Opacity="0.375"/>
<Rectangle
Canvas.Left="44"
Canvas.Top="0"
Opacity="0.375"
RadiusX="6"
RadiusY="6" />
</Canvas>
<Canvas Width="100" Height="100" Canvas.Left="0" Canvas.Top="0" RenderTransformOrigin="0.5,0.5">
<Canvas
Canvas.Left="0"
Canvas.Top="0"
Width="100"
Height="100"
RenderTransformOrigin="0.5,0.5">
<Canvas.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
@@ -139,9 +253,19 @@
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Canvas.RenderTransform>
<Rectangle Canvas.Left="44" Canvas.Top="0" RadiusX="6" RadiusY="6" Opacity="0.25"/>
<Rectangle
Canvas.Left="44"
Canvas.Top="0"
Opacity="0.25"
RadiusX="6"
RadiusY="6" />
</Canvas>
<Canvas Width="100" Height="100" Canvas.Left="0" Canvas.Top="0" RenderTransformOrigin="0.5,0.5">
<Canvas
Canvas.Left="0"
Canvas.Top="0"
Width="100"
Height="100"
RenderTransformOrigin="0.5,0.5">
<Canvas.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
@@ -150,7 +274,12 @@
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Canvas.RenderTransform>
<Rectangle Canvas.Left="44" Canvas.Top="0" RadiusX="6" RadiusY="6" Opacity="0.125"/>
<Rectangle
Canvas.Left="44"
Canvas.Top="0"
Opacity="0.125"
RadiusX="6"
RadiusY="6" />
</Canvas>
</Canvas>
</Viewbox>

View File

@@ -0,0 +1,58 @@
using BeWo.View.Detail.AI;
using BS.Shared;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using static BeWo.View.Windows.BeWoWindowBuilder;
namespace BeWo.View.Windows
{
public class AiWindowBuilder
{
public Dictionary<UIContext, string> UIContext2Header { get; set; } = new Dictionary<UIContext, string>()
{
{UIContext.ServiceRecord, "Zeiterfassung KI Chat" },
{UIContext.Customer, "Klienten Übersicht KI Chat" },
};
public Window GetAiConversationWindow(UIContext uIContext, Dictionary<TableID, long[]> context, double height = 600, double width = 1200)
{
#if !DEBUG
BeWoApp.ShowInfoMessage("Diese Funktion befindet sich in der Testphase.");
return null;
#endif
string title = null;
UIContext2Header.TryGetValue(uIContext, out title);
if (string.IsNullOrEmpty(title))
title = "default";
var control = GetAiConversationControl(uIContext, context);
var window = GetAnimatedBeWoWindow(title, control, 400, height, 1000, 500, width, 1600);
return window;
}
public UserControl GetAiConversationControl(UIContext uIContext, Dictionary<TableID, long[]> context)
{
#if !DEBUG
BeWoApp.ShowInfoMessage("Diese Funktion befindet sich in der Testphase.");
return null;
#endif
var control = new AiConversationChatView();
control.ViewModel.UIContext = (int)uIContext;
control.ViewModel.ContextBeWoObjects = context;
return control;
}
}
}

View File

@@ -0,0 +1,36 @@
<Window
x:Class="BeWo.View.Windows.AnimatedBeWoWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="BeWoPlaner"
MinWidth="300"
MinHeight="300"
AllowsTransparency="True"
Background="Transparent"
Closed="Window_Closed"
Closing="Window_Closing"
ResizeMode="CanResizeWithGrip"
SnapsToDevicePixels="True"
TextOptions.TextFormattingMode="Display"
WindowStartupLocation="CenterOwner"
WindowStyle="None">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="..\..\Styles\ModernOrangeBlack.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
<Window.Triggers>
<EventTrigger RoutedEvent="Loaded">
<BeginStoryboard Storyboard="{StaticResource WindowLoadedAnimation}" />
</EventTrigger>
</Window.Triggers>
<Grid x:Name="rootGrid">
<GroupBox
x:Name="rootGroupBox"
MouseDoubleClick="RootGroupBox_OnMouseDoubleClick"
MouseLeftButtonDown="RootGroupBox_OnMouseLeftButtonDown"
Style="{DynamicResource MainContentGroupBoxWithoutMaximizeBtnStyle}" />
</Grid>
</Window>

View File

@@ -0,0 +1,190 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Threading;
namespace BeWo.View.Windows
{
/// <summary>
/// Interaktionslogik für AnimatedBeWoWindow.xaml
/// </summary>
public partial class AnimatedBeWoWindow : Window
{
private bool closeStoryBoardCompleted = false;
private bool isClosing = false;
private WaitLayer2 _WaitLayer;
private object _GroupBoxContent;
public object GroupBoxContent
{
get { return _GroupBoxContent; }
set
{
_GroupBoxContent = value;
rootGroupBox.Content = value;
}
}
public bool IsMaximizable = true;
public bool IsWaiting { get; set; } = false;
public AnimatedBeWoWindow()
{
InitializeComponent();
CommandBindings.Add(new CommandBinding(ApplicationCommands.Close, (s, e) => Close()));
StartWaiting();
if (BeWoApp.MainControl.CurrentAnimatedBeWoWindow == null)
{
BeWoApp.MainControl.CurrentAnimatedBeWoWindow = this;
}
else
{
throw new InvalidOperationException("Opening, BeWoApp.CurrentAnimatedBeWoWindow already set");
}
}
public AnimatedBeWoWindow(FrameworkElement fe) : this()
{
rootGroupBox.Content = fe;
}
public AnimatedBeWoWindow(FrameworkElement fe, string stylestring) : this(fe)
{
rootGroupBox.Style = (Style)FindResource(stylestring);
}
public void Window_Closing(object sender, CancelEventArgs e)
{
if (!closeStoryBoardCompleted && !isClosing)
{
isClosing = true;
if (BeWoApp.MainControl.CurrentAnimatedBeWoWindow == this)
{
BeWoApp.MainControl.CurrentAnimatedBeWoWindow = null;
}
else
{
throw new InvalidOperationException("Closing, BeWoApp.CurrentAnimatedBeWoWindow not found");
}
if (FindResource("WindowClosingAnimation") is Storyboard storyboard)
{
storyboard.Completed += closeStoryBoard_Completed;
Storyboard.SetTarget(storyboard.Children[0], this);
Storyboard.SetTarget(storyboard.Children[1], this);
storyboard.Begin();
e.Cancel = true;
}
else
{
throw new InvalidOperationException("WindowClosingAnimation not found");
}
}
}
private void closeStoryBoard_Completed(object sender, EventArgs e)
{
closeStoryBoardCompleted = true;
isClosing = false;
Close();
}
private void RootGroupBox_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
try
{
var p = e.GetPosition(this);
if (p.Y <= 40)
{
DragMove();
}
}
catch (Exception) { }
}
private void RootGroupBox_OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
if (!IsVisible)
{
return;
}
if (!IsMaximizable)
{
return;
}
var pos = PointToScreen(Mouse.GetPosition(this));
if (!(e.OriginalSource is Border) && !(e.OriginalSource is TextBlock) || pos.Y > 200d || e.OriginalSource is TextBlock && Mouse.DirectlyOver is Button)
{
return;
}
if (WindowState == WindowState.Maximized)
{
WindowState = WindowState.Normal;
return;
}
if (WindowState == WindowState.Normal)
{
WindowState = WindowState.Maximized;
}
}
public void Window_Closed(object sender, EventArgs e)
{
}
public void StartWaiting()
{
Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)StartWaitingImmediately);
}
public void StartWaitingImmediately()
{
if (_WaitLayer == null)
{
_WaitLayer = new WaitLayer2();
Grid.SetColumnSpan(_WaitLayer, 3);
Grid.SetRowSpan(_WaitLayer, 3);
rootGrid.Children.Add(_WaitLayer);
Panel.SetZIndex(_WaitLayer, int.MaxValue);
//_WaitLayer.RefreshUI();
}
}
public void EndWaiting()
{
Dispatcher.BeginInvoke(
DispatcherPriority.Normal,
(Action)delegate
{
if (_WaitLayer != null)
{
rootGrid.Children.Remove(_WaitLayer);
_WaitLayer = null;
}
});
}
}
}

View File

@@ -1,4 +1,6 @@
using BeWo.View.Controls;
using BeWo.View.Detail;
using BeWo.View.Detail.AI;
using BeWo.ViewModel;
using BS.Shared.Extensions;
using System;
@@ -9,11 +11,13 @@ using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
namespace BeWo.View
namespace BeWo.View.Windows
{
public static class BeWoWindowBuilder
{
public static BeWoWindow GetTextViewer(string title, string text, bool fixed_size = false, double height = 600, double width = 600)
public static AiWindowBuilder AiWindowBuilder { get; } = new AiWindowBuilder();
public static BeWoWindow GetTextViewer(string title, string text, bool fixed_size = false, double height = 600, double width = 600)
{
if (fixed_size)
return GetTextViewer(title, text, height, height, height, width, width, width);
@@ -48,19 +52,26 @@ namespace BeWo.View
return beWoWindow;
}
public static BeWoWindow GetBeWoWindow(String title, Control control, double height = 600, double width = 1200)
{
var beWoWindow = GetGenericBeWoWindow(title, 100, height, 1000, 100, width, 1600);
beWoWindow.GroupBoxContent = control;
public static BeWoWindow GetBeWoWindow(String title, Control control, double height = 600, double width = 1200)
{
var beWoWindow = GetGenericBeWoWindow(title, 100, height, 1000, 100, width, 1600);
return beWoWindow;
}
beWoWindow.GroupBoxContent = control;
private static BeWoWindow GetGenericBeWoWindow(string title, double min_height, double height, double max_height, double min_width, double width, double max_width)
return beWoWindow;
}
private static BeWoWindow GetGenericBeWoWindow(string title, double min_height, double height, double max_height, double min_width, double width, double max_width)
{
var beWoWindow = new BeWoWindow();
beWoWindow.Height = height;
if (min_height > height || height > max_height)
throw new InvalidOperationException($"Window Height: {min_height} < {height} < {max_height}");
if (min_width > width || width > max_width)
throw new InvalidOperationException($"Window Width: {min_width} < {width} < {max_width}");
beWoWindow.Height = height;
beWoWindow.MinHeight = min_height;
beWoWindow.MaxHeight = max_height;
beWoWindow.Width = width;
@@ -75,7 +86,33 @@ namespace BeWo.View
return beWoWindow;
}
public static void ShowErrorMessageBox(string text)
public static AnimatedBeWoWindow GetAnimatedBeWoWindow(string title, Control control, double min_height, double height, double max_height, double min_width, double width, double max_width)
{
var beWoWindow = new AnimatedBeWoWindow();
if (min_height > height || height > max_height)
throw new InvalidOperationException($"Window Height: {min_height} < {height} < {max_height}");
if (min_width > width || width > max_width)
throw new InvalidOperationException($"Window Width: {min_width} < {width} < {max_width}");
beWoWindow.Height = height;
beWoWindow.MinHeight = min_height;
beWoWindow.MaxHeight = max_height;
beWoWindow.Width = width;
beWoWindow.MinWidth = min_width;
beWoWindow.MaxHeight = max_width;
beWoWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
beWoWindow.Owner = BeWoApp.CurrentBeWo.MainWindow;
beWoWindow.Title = title + " Fenster";
beWoWindow.rootGroupBox.Header = title;
beWoWindow.GroupBoxContent = control;
return beWoWindow;
}
public static void ShowErrorMessageBox(string text)
{
MessageBox.Show(text, "Fehler", MessageBoxButton.OK, MessageBoxImage.Asterisk);
}

View File

@@ -1,4 +1,5 @@
using System;
using BS.Shared.DataContracts;
using System;
using System.Collections.Generic;
namespace BeWo.ViewModel
@@ -18,6 +19,8 @@ namespace BeWo.ViewModel
InitByDataContract(DataContract);
}
public AbstractDCMapperVM(DCType pDataContract, long? oid) : this(pDataContract, oid is null) { }
public override bool IsDirty
{
get { return _DirtyProps.Count > 0; }
@@ -35,10 +38,10 @@ namespace BeWo.ViewModel
return _IsNew.Value;
}
set
{
_IsNew = value;
}
set
{
_IsNew = value;
}
}
internal DCType DataContract { get; set; }

View File

@@ -0,0 +1,106 @@
using System;
using BS.Shared;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Feature.AI;
namespace BeWo.ViewModel
{
public class AiConfigVM : AbstractDCMapperVM<AiConfigDC>
{
private AiModelDC _SelectedModel;
private float _Temperature;
private float _Top_P;
private int _Max_Gen_Len;
public AiConfigVM() : this(null) { }
public AiConfigVM(AiConfigDC dc) : base(dc, dc.Oid)
{
}
public AiModelDC SelectedModel
{
get { return _SelectedModel; }
set
{
if (!AreDifferent(_SelectedModel?.Oid, value?.Oid))
return;
_SelectedModel = value;
StoreDirtyInformation(AreDifferent(DataContract.SelectedModel, value), nameof(SelectedModel));
FirePropertyChanged(nameof(SelectedModel));
}
}
public float Temperature
{
get { return _Temperature; }
set
{
if (!AreDifferent(_Temperature, value))
return;
_Temperature = value;
StoreDirtyInformation(AreDifferent(DataContract.Temperature, value), nameof(Temperature));
FirePropertyChanged(nameof(Temperature));
}
}
public float Top_P
{
get { return _Top_P; }
set
{
if (!AreDifferent(_Top_P, value))
return;
_Top_P = value;
StoreDirtyInformation(AreDifferent(DataContract.Top_P, value), nameof(Top_P));
FirePropertyChanged(nameof(Top_P));
}
}
public int Max_Gen_Len
{
get { return _Max_Gen_Len; }
set
{
if (!AreDifferent(_Max_Gen_Len, value))
return;
_Max_Gen_Len = value;
StoreDirtyInformation(AreDifferent(DataContract.Max_Gen_Len, value), nameof(Max_Gen_Len));
FirePropertyChanged(nameof(Max_Gen_Len));
}
}
protected override void InitByDataContract(AiConfigDC pDataContract)
{
_SelectedModel = pDataContract.SelectedModel;
_Temperature = pDataContract.Temperature;
_Top_P = pDataContract.Top_P;
_Max_Gen_Len = pDataContract.Max_Gen_Len;
}
protected override AiConfigDC MapToDataContract(AiConfigDC pDataContract, bool doCommit)
{
pDataContract.SelectedModel = _SelectedModel;
pDataContract.Temperature = _Temperature;
pDataContract.Top_P = _Top_P;
pDataContract.Max_Gen_Len = _Max_Gen_Len;
return pDataContract;
}
internal void Update(AiConfigDC pDataContract)
{
DataContract = pDataContract;
SelectedModel = pDataContract.SelectedModel;
Temperature = pDataContract.Temperature;
Top_P = pDataContract.Top_P;
Max_Gen_Len = pDataContract.Max_Gen_Len;
}
}
}

Some files were not shown because too many files have changed in this diff Show More