aktueller stand
This commit is contained in:
@@ -555,7 +555,7 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
parentWindow.Closing -= ParentWindow_Closing;
|
||||
}
|
||||
}
|
||||
private void ParentWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
|
||||
private void ParentWindow_Closing(object sender, CancelEventArgs e)
|
||||
{
|
||||
foreach (SelectionPill pill in NewOrExistingOrNoneTicketWrap.Children.OfType<SelectionPill>())
|
||||
{
|
||||
@@ -1097,11 +1097,9 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
if (!dataTable.Columns.TryGetValue("Name", out var nameColumn))
|
||||
yield break;
|
||||
|
||||
cF4SDHealthCardRawData.cHealthCardTableColumn parentIdColumn = null;
|
||||
cF4SDHealthCardRawData.cHealthCardTableColumn parentNameColumn = null;
|
||||
if (!dataTable.Columns.TryGetValue("parentValue", out parentIdColumn))
|
||||
if (!dataTable.Columns.TryGetValue("parentValue", out cF4SDHealthCardRawData.cHealthCardTableColumn parentIdColumn))
|
||||
dataTable.Columns.TryGetValue("Parent_Value", out parentIdColumn);
|
||||
if (!dataTable.Columns.TryGetValue("parent", out parentNameColumn))
|
||||
if (!dataTable.Columns.TryGetValue("parent", out cF4SDHealthCardRawData.cHealthCardTableColumn parentNameColumn))
|
||||
dataTable.Columns.TryGetValue("Parent", out parentNameColumn);
|
||||
|
||||
for (int index = 0; index < idColumn.Values.Count; index++)
|
||||
@@ -2198,7 +2196,6 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
break;
|
||||
|
||||
case ValidationPropertyNames.TicketStatusCombobox:
|
||||
validateComboboxNotEmpty(TicketStatusCombobox);
|
||||
if (!(TicketStatusCombobox.SelectedItem is ComboBoxItem a))
|
||||
break;
|
||||
|
||||
@@ -2534,30 +2531,6 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
ValidateProperty(ValidationPropertyNames.ErrorTypeValue);
|
||||
}
|
||||
|
||||
private static void validateComboboxNotEmpty(object sender)
|
||||
{
|
||||
//var comboBox = sender as ComboBox;
|
||||
//if (comboBox != null)
|
||||
//{
|
||||
// if (!(comboBox.SelectedItem is ComboBoxItem selectedItem))
|
||||
// return;
|
||||
|
||||
|
||||
|
||||
// // Überprüfe den Inhalt und setze die Hintergrundfarbe entsprechend
|
||||
// if (selectedItem.Tag == null)
|
||||
// {
|
||||
// // Setze die Hintergrundfarbe auf Rot, um einen Validierungsfehler anzuzeigen
|
||||
// comboBox.BorderBrush = SharedValidationBorderBrush;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// // Setze die ursprüngliche Hintergrundfarbe zurück, wenn die Validierung erfolgreich ist
|
||||
// comboBox.BorderBrush = (SolidColorBrush)new BrushConverter().ConvertFromString("#DEE2E6");
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
private void TicketSelectionBorder_Click()
|
||||
{
|
||||
var _h = Dispatcher.Invoke(async () =>
|
||||
@@ -2608,7 +2581,6 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
if (string.IsNullOrWhiteSpace(CaseNotesPreview.Text))
|
||||
CaseNotesPreview.Text = string.Empty;
|
||||
|
||||
SelectedTicket.Infos[TicketInfoKeys.Summary] = CaseNotesPreview.Text;
|
||||
ValidateProperty(ValidationPropertyNames.CaseNotesPreview);
|
||||
}
|
||||
catch (Exception E)
|
||||
@@ -2655,13 +2627,10 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
|
||||
private static void setTextboxErrorState(object sender, bool hasError)
|
||||
{
|
||||
var textBox = sender as TextBox;
|
||||
if (textBox == null)
|
||||
if (!(sender is TextBox textBox))
|
||||
return;
|
||||
|
||||
textBox.BorderBrush = hasError
|
||||
? SharedValidationBorderBrush
|
||||
: DefaultTextBoxBorderBrush;
|
||||
textBox.BorderBrush = hasError ? SharedValidationBorderBrush : DefaultTextBoxBorderBrush;
|
||||
}
|
||||
|
||||
private void UpdateCategoryValidationVisualState(bool hasError) =>
|
||||
@@ -2681,7 +2650,7 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
if (defaultBrush == null)
|
||||
{
|
||||
var borderBrush = border.BorderBrush;
|
||||
defaultBrush = borderBrush != null ? borderBrush.CloneCurrentValue() : null;
|
||||
defaultBrush = borderBrush?.CloneCurrentValue();
|
||||
}
|
||||
|
||||
if (!defaultThickness.HasValue)
|
||||
|
||||
@@ -281,7 +281,9 @@
|
||||
<Compile Include="Basics\UserControls\ComboBoxPageAble.xaml.cs">
|
||||
<DependentUpon>ComboBoxPageAble.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
||||
<Compile Include="Pages\DesktopWidgetPage\DesktopWidgetPageView.xaml.cs">
|
||||
<DependentUpon>DesktopWidgetPageView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Basics\UserControls\HierarchicalSelectionControl.xaml.cs">
|
||||
<DependentUpon>HierarchicalSelectionControl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -499,6 +501,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\DesktopWidgetPage\DesktopWidgetPageView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Basics\UserControls\HierarchicalSelectionControl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
||||
221
FasdDesktopUi/Pages/DesktopWidgetPage/DesktopWidgetPageView.xaml
Normal file
221
FasdDesktopUi/Pages/DesktopWidgetPage/DesktopWidgetPageView.xaml
Normal file
@@ -0,0 +1,221 @@
|
||||
<Window x:Class="FasdDesktopUi.Pages.DesktopWidgetPage.DesktopWidgetPageView"
|
||||
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:local="clr-namespace:FasdDesktopUi.Pages.DesktopWidgetPage"
|
||||
xmlns:vc="clr-namespace:FasdDesktopUi.Basics.Converter"
|
||||
xmlns:ico="clr-namespace:FasdDesktopUi.Basics.UserControls.AdaptableIcon;assembly=F4SD-AdaptableIcon"
|
||||
mc:Ignorable="d"
|
||||
Title="DesktopWidgetPageView"
|
||||
AllowsTransparency="True"
|
||||
WindowStyle="None"
|
||||
Background="Transparent"
|
||||
VerticalAlignment="Bottom"
|
||||
ResizeMode="NoResize"
|
||||
WindowState="Maximized"
|
||||
ShowInTaskbar="False"
|
||||
Topmost="True"
|
||||
x:Name="DesktopWidgetWindow">
|
||||
|
||||
<Window.Resources>
|
||||
<BooleanToVisibilityConverter x:Key="BoolToVisibility" />
|
||||
<vc:LanguageDefinitionsConverter x:Key="LanguageConverter" />
|
||||
<Style x:Key="DesktopWidget.Grid"
|
||||
TargetType="Grid">
|
||||
<Setter Property="Visibility" Value="{Binding ElementName=DesktopWidgetWindow, Path=AreAllWidgetsVisible, Converter={StaticResource BoolToVisibility}}" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsMouseOver, ElementName=F4SDWidget}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="DesktopWidget.WidgetIcon"
|
||||
TargetType="ico:AdaptableIcon">
|
||||
<Setter Property="IconBackgroundColor" Value="{DynamicResource Color.AppBackground}"/>
|
||||
<Setter Property="PrimaryIconColor" Value="{DynamicResource Color.Menu.Icon}"/>
|
||||
<Setter Property="IconWidth" Value="50"/>
|
||||
<Setter Property="IconHeight" Value="50"/>
|
||||
<Setter Property="IconCornerRadius" Value="25"/>
|
||||
<Setter Property="BorderPadding" Value="10"/>
|
||||
<Setter Property="Margin" Value="-1"/>
|
||||
<Setter Property="Cursor" Value="Hand"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="PrimaryIconColor" Value="{DynamicResource Color.Menu.Icon.Hover}" />
|
||||
<Setter Property="IconBackgroundColor" Value="{DynamicResource Background.Menu.Icon.Hover}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
<!--<Setter Property="BorderThickness" Value="10"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource Color.Menu.Icon}"/>-->
|
||||
</Style>
|
||||
<Style x:Key="DesktopWidget.F4SDIcon"
|
||||
TargetType="ico:AdaptableIcon">
|
||||
<Setter Property="IconBackgroundColor" Value="{DynamicResource Color.AppBackground}"/>
|
||||
<Setter Property="Cursor" Value="Hand"/>
|
||||
<Setter Property="Margin" Value="-1"/>
|
||||
<Setter Property="IconHeight" Value="70"/>
|
||||
<Setter Property="IconWidth" Value="70"/>
|
||||
<Setter Property="IconCornerRadius" Value="35"/>
|
||||
<Setter Property="BorderPadding" Value="15"/>
|
||||
<Setter Property="PrimaryIconColor" Value="{DynamicResource Color.F4SD}"/>
|
||||
<Setter Property="SecondaryIconColor" Value="{DynamicResource Color.AppBackground}"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="PrimaryIconColor" Value="{DynamicResource Color.Menu.Icon.Hover}" />
|
||||
<Setter Property="IconBackgroundColor" Value="{DynamicResource Background.Menu.Icon.Hover}" />
|
||||
<Setter Property="SecondaryIconColor" Value="{DynamicResource Background.Menu.Icon.Hover}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Window.Resources>
|
||||
|
||||
<Border x:Name="MainBorder"
|
||||
Background="Transparent"
|
||||
Padding="10"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Bottom"
|
||||
Visibility="{Binding ElementName=DesktopWidgetWindow, Path=IsWindowVisible, Converter={StaticResource BoolToVisibility}}">
|
||||
|
||||
<Grid VerticalAlignment="Bottom"
|
||||
Background="Transparent">
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid x:Name="RestartGrid"
|
||||
Style="{DynamicResource DesktopWidget.Grid}"
|
||||
Grid.Row="0">
|
||||
|
||||
<Border BorderBrush="{DynamicResource Color.Menu.Icon}"
|
||||
BorderThickness="5"
|
||||
CornerRadius="25"
|
||||
Margin="0,10,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
|
||||
<ico:AdaptableIcon x:Name="RestartWidget"
|
||||
Style="{DynamicResource DesktopWidget.WidgetIcon}"
|
||||
Grid.Row="0"
|
||||
SelectedMaterialIcon="ic_power_settings_new"
|
||||
MouseLeftButtonUp="RestartWidget_MouseLeftButtonUp"/>
|
||||
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid x:Name="SettingsGrid"
|
||||
Style="{DynamicResource DesktopWidget.Grid}"
|
||||
Grid.Row="1">
|
||||
|
||||
<Border BorderBrush="{DynamicResource Color.Menu.Icon}"
|
||||
BorderThickness="5"
|
||||
CornerRadius="25"
|
||||
Margin="0,10,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
|
||||
<ico:AdaptableIcon x:Name="SettingsWidget"
|
||||
Style="{DynamicResource DesktopWidget.WidgetIcon}"
|
||||
Grid.Row="0"
|
||||
SelectedInternIcon="menuBar_settings"
|
||||
MouseLeftButtonUp="SettingsWidget_MouseLeftButtonUp"/>
|
||||
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid x:Name="TicketNotifyGrid"
|
||||
Grid.Row="2"
|
||||
Style="{DynamicResource DesktopWidget.Grid}">
|
||||
|
||||
<Border BorderBrush="{DynamicResource Color.Menu.Icon}"
|
||||
BorderThickness="5"
|
||||
CornerRadius="25"
|
||||
Margin="0,10,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
|
||||
<ico:AdaptableIcon x:Name="TicketNotifyWidget"
|
||||
Style="{DynamicResource DesktopWidget.WidgetIcon}"
|
||||
Grid.Row="0"
|
||||
SelectedInternIcon="misc_ticket"
|
||||
MouseLeftButtonUp="TicketNotifyWidget_MouseLeftButtonUp"/>
|
||||
|
||||
</Border>
|
||||
|
||||
<Border Background="{DynamicResource Color.Red}"
|
||||
Height="15"
|
||||
Width="20"
|
||||
CornerRadius="5"
|
||||
Margin="0 -25 -35 0">
|
||||
<TextBlock VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center">
|
||||
1
|
||||
</TextBlock>
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid x:Name="SearchGrid"
|
||||
Grid.Row="3"
|
||||
Style="{DynamicResource DesktopWidget.Grid}">
|
||||
|
||||
<Border BorderBrush="{DynamicResource Color.Menu.Icon}"
|
||||
BorderThickness="5"
|
||||
CornerRadius="25"
|
||||
Margin="0,10,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
|
||||
<ico:AdaptableIcon x:Name="SearchWidget"
|
||||
Style="{DynamicResource DesktopWidget.WidgetIcon}"
|
||||
Grid.Row="1"
|
||||
SelectedInternIcon="menuBar_search"
|
||||
BorderPadding="5,5,12,12"
|
||||
MouseLeftButtonUp="SearchWidget_MouseLeftButtonUp"/>
|
||||
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="4">
|
||||
|
||||
<Border BorderBrush="{DynamicResource Color.Menu.Icon}"
|
||||
BorderThickness="5"
|
||||
CornerRadius="35"
|
||||
Margin="0,10,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
|
||||
<ico:AdaptableIcon x:Name="F4SDWidget"
|
||||
Style="{DynamicResource DesktopWidget.F4SDIcon}"
|
||||
SelectedInternIcon="f4sd"
|
||||
MouseLeftButtonUp="F4SDWidget_MouseLeftButtonUp"/>
|
||||
|
||||
</Border>
|
||||
|
||||
<Border Background="{DynamicResource Color.Red}"
|
||||
Height="15"
|
||||
Width="20"
|
||||
CornerRadius="5"
|
||||
Margin="0 -35 -50 0"
|
||||
Visibility="{Binding ElementName=DesktopWidgetWindow, Path=ShowMainNotification, Converter={StaticResource BoolToVisibility}}">
|
||||
<TextBlock VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center">
|
||||
1
|
||||
</TextBlock>
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
</Window>
|
||||
@@ -0,0 +1,179 @@
|
||||
using C4IT.MultiLanguage;
|
||||
using FasdDesktopUi.Basics;
|
||||
using FasdDesktopUi.Pages.SearchPage;
|
||||
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.Forms;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Interop;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
using ContextMenu = System.Windows.Controls.ContextMenu;
|
||||
using MenuItem = System.Windows.Controls.MenuItem;
|
||||
using MessageBox = System.Windows.MessageBox;
|
||||
|
||||
namespace FasdDesktopUi.Pages.DesktopWidgetPage
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for DesktopWidgetPageView.xaml
|
||||
/// </summary>
|
||||
public partial class DesktopWidgetPageView : Window
|
||||
{
|
||||
|
||||
public bool IsWindowVisible
|
||||
{
|
||||
get { return (bool)GetValue(IsWindowVisibleProperty); }
|
||||
set { SetValue(IsWindowVisibleProperty, value); }
|
||||
}
|
||||
|
||||
// Using a DependencyProperty as the backing store for IsWindowVisible. This enables animation, styling, binding, etc...
|
||||
public static readonly DependencyProperty IsWindowVisibleProperty =
|
||||
DependencyProperty.Register(nameof(IsWindowVisible), typeof(bool), typeof(DesktopWidgetPageView), new PropertyMetadata(true));
|
||||
|
||||
|
||||
public bool AreAllWidgetsVisible
|
||||
{
|
||||
get { return (bool)GetValue(AreAllWidgetsVisibleProperty); }
|
||||
set { SetValue(AreAllWidgetsVisibleProperty, value); }
|
||||
}
|
||||
|
||||
// Using a DependencyProperty as the backing store for AreAllWidgetsVisible. This enables animation, styling, binding, etc...
|
||||
public static readonly DependencyProperty AreAllWidgetsVisibleProperty =
|
||||
DependencyProperty.Register(nameof(AreAllWidgetsVisible), typeof(bool), typeof(DesktopWidgetPageView), new PropertyMetadata(false));
|
||||
|
||||
|
||||
|
||||
public bool ShowMainNotification
|
||||
{
|
||||
get { return (bool)GetValue(ShowMainNotificationProperty); }
|
||||
set { SetValue(ShowMainNotificationProperty, value); }
|
||||
}
|
||||
|
||||
// Using a DependencyProperty as the backing store for ShowMainNotification. This enables animation, styling, binding, etc...
|
||||
public static readonly DependencyProperty ShowMainNotificationProperty =
|
||||
DependencyProperty.Register(nameof(ShowMainNotification), typeof(bool), typeof(DesktopWidgetPageView), new PropertyMetadata(true));
|
||||
|
||||
|
||||
|
||||
|
||||
public DesktopWidgetPageView()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
SourceInitialized += (s, e) =>
|
||||
{
|
||||
IntPtr handle = new WindowInteropHelper(this).Handle;
|
||||
HwndSource.FromHwnd(handle).AddHook(new HwndSourceHook(cUtility.WindowProc));
|
||||
};
|
||||
}
|
||||
|
||||
private bool IsAnyOtherVisible() => cSupportCaseDataProvider.detailsPage.IsVisible || SearchPageView.Instance.IsVisible;
|
||||
protected override void OnInitialized(EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
cSupportCaseDataProvider.detailsPage.IsVisibleChanged += (sender, args) =>
|
||||
{
|
||||
this.Visibility = IsAnyOtherVisible() ? Visibility.Collapsed : Visibility.Visible;
|
||||
};
|
||||
|
||||
SearchPageView.Instance.IsVisibleChanged += (sender, args) =>
|
||||
{
|
||||
|
||||
this.Visibility = IsAnyOtherVisible() ? Visibility.Collapsed : Visibility.Visible;
|
||||
};
|
||||
|
||||
|
||||
base.OnInitialized(e);
|
||||
}
|
||||
|
||||
private void F4SDWidget_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
AreAllWidgetsVisible = !AreAllWidgetsVisible;
|
||||
ShowMainNotification = !ShowMainNotification;
|
||||
}
|
||||
|
||||
private void SearchWidget_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
SearchPageView.Instance.ActivateSearchView();
|
||||
}
|
||||
|
||||
private void SettingsWidget_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
ContextMenu menu = SetupSettingsContextMenu();
|
||||
SettingsWidget.ContextMenu = menu;
|
||||
SettingsWidget.ContextMenu.IsOpen = true;
|
||||
}
|
||||
|
||||
private ContextMenu SetupSettingsContextMenu()
|
||||
{
|
||||
ContextMenu menu = new ContextMenu();
|
||||
|
||||
MenuItem languageItem = new MenuItem();
|
||||
languageItem.Header = cMultiLanguageSupport.GetItem("Menu.SelectLanguage");
|
||||
languageItem.Items.Add(new MenuItem { Header = "DE" });
|
||||
languageItem.Items.Add(new MenuItem { Header = "EN" });
|
||||
menu.Items.Add(languageItem);
|
||||
|
||||
MenuItem optionsItem = new MenuItem();
|
||||
optionsItem.Header = cMultiLanguageSupport.GetItem("Menu.Options");
|
||||
optionsItem.Click += (s, e) => MessageBox.Show(cMultiLanguageSupport.GetItem("Menu.Options"));
|
||||
menu.Items.Add(optionsItem);
|
||||
|
||||
MenuItem m42Item = new MenuItem();
|
||||
m42Item.Header = cMultiLanguageSupport.GetItem("M42Settings.SystemTray");
|
||||
m42Item.Click += (s, e) => MessageBox.Show(cMultiLanguageSupport.GetItem("M42Settings.SystemTray"));
|
||||
menu.Items.Add(m42Item);
|
||||
|
||||
MenuItem phoneItem = new MenuItem();
|
||||
phoneItem.Header = cMultiLanguageSupport.GetItem("PhoneSettings.SystemTray");
|
||||
phoneItem.Click += (s, e) => MessageBox.Show(cMultiLanguageSupport.GetItem("PhoneSettings.SystemTray"));
|
||||
menu.Items.Add(phoneItem);
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
||||
private void ShowMessageBox(string message)
|
||||
{
|
||||
MessageBox.Show(message);
|
||||
}
|
||||
|
||||
private void RestartWidget_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
ContextMenu menu = SetupRestartContextMenu();
|
||||
RestartWidget.ContextMenu = menu;
|
||||
RestartWidget.ContextMenu.IsOpen = true;
|
||||
}
|
||||
|
||||
private ContextMenu SetupRestartContextMenu()
|
||||
{
|
||||
ContextMenu menu = new ContextMenu();
|
||||
|
||||
MenuItem restartItem = new MenuItem();
|
||||
restartItem.Header = cMultiLanguageSupport.GetItem("Menu.Restart");
|
||||
restartItem.Click += (s, e) => MessageBox.Show(cMultiLanguageSupport.GetItem("Menu.Restart"));
|
||||
menu.Items.Add(restartItem);
|
||||
|
||||
MenuItem quitItem = new MenuItem();
|
||||
quitItem.Header = cMultiLanguageSupport.GetItem("Menu.Quit");
|
||||
quitItem.Click += (s, e) => MessageBox.Show(cMultiLanguageSupport.GetItem("Menu.Quit"));
|
||||
menu.Items.Add(quitItem);
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
||||
private void TicketNotifyWidget_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
MessageBox.Show("Dies wurde leider noch nicht implementiert, sollte dich das stören setze es doch gerne selber um.");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -208,7 +208,8 @@
|
||||
Grid.Column="2"
|
||||
Margin="10 0"
|
||||
Background="#01000000"
|
||||
Padding="5 0">
|
||||
Padding="5 0"
|
||||
x:Name="VirtualSessionBorder">
|
||||
<StackPanel x:Name="VirtualSessionStack"
|
||||
Orientation="Horizontal">
|
||||
<Border x:Name="VirtualSessionStackHighlightBorder"
|
||||
@@ -256,7 +257,8 @@
|
||||
Grid.Column="3"
|
||||
Margin="10 0"
|
||||
Background="#01000000"
|
||||
Padding="5 0">
|
||||
Padding="5 0"
|
||||
x:Name="MobileDeviceBorder">
|
||||
<StackPanel x:Name="MobileDeviceStack"
|
||||
Orientation="Horizontal">
|
||||
<Border x:Name="MobileDeviceStackHighlightBorder"
|
||||
@@ -303,7 +305,8 @@
|
||||
Grid.Column="4"
|
||||
Margin="10 0"
|
||||
Background="#01000000"
|
||||
Padding="5 0">
|
||||
Padding="5 0"
|
||||
x:Name="TicketBorder">
|
||||
<StackPanel x:Name="TicketStack"
|
||||
Orientation="Horizontal">
|
||||
<Border x:Name="TicketStackHighlightBorder"
|
||||
|
||||
@@ -122,6 +122,11 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
TicketStack.Visibility = modules.HasM42Config ? Visibility.Visible : Visibility.Collapsed;
|
||||
MobileDeviceStack.Visibility = modules.HasMobileDeviceConfig ? Visibility.Visible : Visibility.Collapsed;
|
||||
VirtualSessionStack.Visibility = modules.HasCitrixConfig ? Visibility.Visible : Visibility.Collapsed;
|
||||
|
||||
TicketBorder.Visibility = modules.HasM42Config ? Visibility.Visible : Visibility.Collapsed;
|
||||
MobileDeviceBorder.Visibility = modules.HasMobileDeviceConfig ? Visibility.Visible : Visibility.Collapsed;
|
||||
VirtualSessionBorder.Visibility = modules.HasCitrixConfig ? Visibility.Visible : Visibility.Collapsed;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -146,7 +151,6 @@ namespace FasdDesktopUi.Pages.DetailsPage.UserControls
|
||||
return;
|
||||
|
||||
_me.ResetControl();
|
||||
//_me.SetTicketHeadingVisibility();
|
||||
_me.InitializeHeadings();
|
||||
_me.UpdateHeaderHighlights();
|
||||
}
|
||||
|
||||
@@ -123,7 +123,8 @@
|
||||
VerticalAlignment="Center"
|
||||
Text="Beta">
|
||||
<buc:Badge.LayoutTransform>
|
||||
<ScaleTransform ScaleX="0.85" ScaleY="0.85" />
|
||||
<ScaleTransform ScaleX="0.85"
|
||||
ScaleY="0.85" />
|
||||
</buc:Badge.LayoutTransform>
|
||||
</buc:Badge>
|
||||
</StackPanel>
|
||||
@@ -166,9 +167,9 @@
|
||||
VerticalAlignment="Bottom"
|
||||
Visibility="Collapsed">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<buc:CustomSearchResultCollection x:Name="ResultMenu"
|
||||
x:FieldModifier="private"
|
||||
PreviewMouseWheel="ResultMenu_PreviewMouseWheel"/>
|
||||
<buc:CustomSearchResultCollection x:Name="ResultMenu"
|
||||
x:FieldModifier="private"
|
||||
PreviewMouseWheel="ResultMenu_PreviewMouseWheel" />
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
@@ -162,20 +162,27 @@ namespace FasdDesktopUi.Pages.SearchPage
|
||||
private void SetSearchResultVisibility(bool isVisible)
|
||||
{
|
||||
SearchResultBorder.Visibility = isVisible ? Visibility.Visible : Visibility.Collapsed;
|
||||
BodyStack_SearchResults.Visibility = (isVisible || SearchResultBorder.IsVisible) ? Visibility.Visible : Visibility.Collapsed;
|
||||
BodyStack_SearchResults.Visibility =
|
||||
(SearchResultBorder.Visibility == Visibility.Visible || SearchHistoryBorder.Visibility == Visibility.Visible)
|
||||
? Visibility.Visible
|
||||
: Visibility.Collapsed;
|
||||
ScheduleSearchResultMaxHeightUpdate();
|
||||
}
|
||||
|
||||
public void SetSearchHistoryVisibility(bool isVisible)
|
||||
{
|
||||
SearchHistoryBorder.Visibility = isVisible && !SearchHistory.IsEmpty() ? Visibility.Visible : Visibility.Collapsed;
|
||||
BodyStack_SearchResults.Visibility = (isVisible || SearchResultBorder.IsVisible) ? Visibility.Visible : Visibility.Collapsed;
|
||||
BodyStack_SearchResults.Visibility =
|
||||
(SearchResultBorder.Visibility == Visibility.Visible || SearchHistoryBorder.Visibility == Visibility.Visible)
|
||||
? Visibility.Visible
|
||||
: Visibility.Collapsed;
|
||||
ScheduleSearchResultMaxHeightUpdate();
|
||||
}
|
||||
public void ShowLoadingTextItem(string itemText)
|
||||
{
|
||||
SetSearchHistoryVisibility(false);
|
||||
ResultMenu.ShowLoadingTextItem(itemText);
|
||||
BodyStack_SearchResults.Visibility = Visibility.Visible;
|
||||
}
|
||||
|
||||
public void ShowSearchRelations(cSearchHistorySearchResultEntry searchHistoryEntry, IRelationService relationService, ISearchUiProvider searchUiProvider)
|
||||
@@ -318,17 +325,16 @@ namespace FasdDesktopUi.Pages.SearchPage
|
||||
{
|
||||
await SearchBarUc.SetFixedSearchResultAsync(Class, strInfo, result);
|
||||
|
||||
if (result.AutoContinue && result.Results?.Count == 1)
|
||||
{
|
||||
ResultMenu.IndexOfSelectedResultItem = 0;
|
||||
ResultMenu.SelectCurrentResultItem();
|
||||
}
|
||||
|
||||
if (!suppressUi && !_ticketOverviewAutoContinueActive)
|
||||
{
|
||||
Show();
|
||||
Activate();
|
||||
}
|
||||
if (result.AutoContinue && result.Results?.Count == 1)
|
||||
{
|
||||
ResultMenu.IndexOfSelectedResultItem = 0;
|
||||
ResultMenu.SelectCurrentResultItem();
|
||||
}
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
@@ -437,14 +443,14 @@ namespace FasdDesktopUi.Pages.SearchPage
|
||||
LogMethodBegin(CM);
|
||||
try
|
||||
{
|
||||
var _h = Task.Run(async () =>
|
||||
_ = Task.Run(async () =>
|
||||
{
|
||||
try
|
||||
{
|
||||
var lstSids = searchInfo.sids.Split(',').Select((v) => v.Trim()).ToList();
|
||||
var _result = await cFasdCockpitCommunicationBase.Instance.GetUserSearchResults(searchInfo.name, lstSids);
|
||||
var searchResult = await cFasdCockpitCommunicationBase.Instance.GetUserSearchResults(searchInfo.name, lstSids);
|
||||
var strInfo = string.Format(cMultiLanguageSupport.GetItem("Searchbar.UserSearch.Info"), searchInfo.name);
|
||||
ShowExternalSearchInfo(strInfo, _result, enumF4sdSearchResultClass.User);
|
||||
ShowExternalSearchInfo(strInfo, searchResult, enumF4sdSearchResultClass.User);
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
@@ -745,10 +751,10 @@ namespace FasdDesktopUi.Pages.SearchPage
|
||||
cFasdCockpitConfig.Instance.UiSettingsChanged += UiSettingsChanged;
|
||||
|
||||
SearchBarUc.ChangedSearchValue = filteredResults =>
|
||||
{
|
||||
UpdateSearchResults(filteredResults);
|
||||
return Task.CompletedTask;
|
||||
};
|
||||
{
|
||||
UpdateSearchResults(filteredResults);
|
||||
return Task.CompletedTask;
|
||||
};
|
||||
|
||||
SearchBarUc.SearchValueChanged += HandleSearchValueChanged;
|
||||
SearchService.RelationsFound += HandleRelationsFound;
|
||||
@@ -866,16 +872,15 @@ namespace FasdDesktopUi.Pages.SearchPage
|
||||
|
||||
private void SetTicketOverviewVisibility(bool isVisible)
|
||||
{
|
||||
var b = isVisible;
|
||||
if (!CheckTicketOverviewAvailability())
|
||||
b = false;
|
||||
isVisible = false;
|
||||
|
||||
BodyStack_TicketOverview.Visibility = b ? Visibility.Visible : Visibility.Collapsed;
|
||||
TicketOverviewBorder.Visibility = b ? Visibility.Visible : Visibility.Collapsed;
|
||||
FilterCheckbox.Visibility = b ? Visibility.Visible : Visibility.Collapsed;
|
||||
RoleLabel.Visibility = b ? Visibility.Visible : Visibility.Collapsed;
|
||||
OwnTicketsLabel.Visibility = b ? Visibility.Visible : Visibility.Collapsed;
|
||||
TicketOverviewLabel.Visibility = b ? Visibility.Visible : Visibility.Collapsed;
|
||||
BodyStack_TicketOverview.Visibility = isVisible ? Visibility.Visible : Visibility.Collapsed;
|
||||
TicketOverviewBorder.Visibility = isVisible ? Visibility.Visible : Visibility.Collapsed;
|
||||
FilterCheckbox.Visibility = isVisible ? Visibility.Visible : Visibility.Collapsed;
|
||||
RoleLabel.Visibility = isVisible ? Visibility.Visible : Visibility.Collapsed;
|
||||
OwnTicketsLabel.Visibility = isVisible ? Visibility.Visible : Visibility.Collapsed;
|
||||
TicketOverviewLabel.Visibility = isVisible ? Visibility.Visible : Visibility.Collapsed;
|
||||
ScheduleSearchResultMaxHeightUpdate();
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<Product Id="*"
|
||||
Name="First Aid Service Desk (F4SD) Cockpit Client"
|
||||
Language="1033"
|
||||
Version="2.6.1.2"
|
||||
Version="2.7.0.2"
|
||||
Manufacturer="Consulting4IT GmbH, Germany"
|
||||
UpgradeCode="42C65B2F-5482-4A02-9A4F-07F97C8BB008">
|
||||
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
[assembly: AssemblyTrademark("")]
|
||||
|
||||
[assembly: AssemblyVersion("2.7.*")]
|
||||
[assembly: AssemblyInformationalVersion("2.7.0.0")]
|
||||
[assembly: AssemblyInformationalVersion("2.7.0.2")]
|
||||
|
||||
[assembly: AssemblyMinServerVersion("2.6.1.1")]
|
||||
[assembly: AssemblyMinServerVersion("2.7.0.0")]
|
||||
|
||||
Reference in New Issue
Block a user