103 lines
3.2 KiB
C#
103 lines
3.2 KiB
C#
using BeWo.View.Navigation;
|
|
using BS.Shared.DataContracts.Compact;
|
|
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.Documents;
|
|
using System.Windows.Input;
|
|
|
|
namespace BeWo
|
|
{
|
|
partial class MainDictionary
|
|
{
|
|
public MainDictionary()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void Hyperlink_Hilfeplan_Reaktivieren_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
var scNavView = (SupportConceptNavigationView)MainSession.MainPage.ActiveView;
|
|
|
|
if (scNavView != null)
|
|
{
|
|
var supportConcept = (CompactSupportConceptDC)((Hyperlink)sender).Tag;
|
|
scNavView.MainNavigationView_OnReactivateObject(supportConcept);
|
|
}
|
|
}
|
|
|
|
private void BtnOpenServiceRecordView_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
var btn = sender as Button;
|
|
if (btn == null) return;
|
|
|
|
var dc = btn.Tag as CompactSupportConceptDC;
|
|
|
|
if (dc == null) return;
|
|
|
|
if (MainSession.MainPage != null)
|
|
MainSession.MainPage.NavigateToServiceRecordView(dc.SupportConceptOid);
|
|
}
|
|
|
|
private void Togglebutton_maximise_Checked(object sender, RoutedEventArgs e)
|
|
{
|
|
if (MainSession.MainPage != null)
|
|
MainSession.MainPage.Maximize();
|
|
}
|
|
|
|
private void Togglebutton_maximise_Unchecked(object sender, RoutedEventArgs e)
|
|
{
|
|
if (MainSession.MainPage != null)
|
|
MainSession.MainPage.Minimize();
|
|
}
|
|
|
|
private void TogglebuttonChat_maximise_Unchecked(object sender, RoutedEventArgs e)
|
|
{
|
|
if (MainSession.MainPage.HomeView.ServiceChatView != null)
|
|
MainSession.MainPage.HomeView.ServiceChatView.Normal();
|
|
}
|
|
|
|
private void TogglebuttonChat_maximise_Checked(object sender, RoutedEventArgs e)
|
|
{
|
|
if (MainSession.MainPage.HomeView.ServiceChatView != null)
|
|
MainSession.MainPage.HomeView.ServiceChatView.Maximize();
|
|
}
|
|
|
|
private void TogglebuttonChat_Minimize_Checked(object sender, RoutedEventArgs e)
|
|
{
|
|
if (MainSession.MainPage.HomeView.ServiceChatView != null)
|
|
MainSession.MainPage.HomeView.ServiceChatView.Minimize();
|
|
}
|
|
|
|
private void FrameLeftMouseDown(object sender, MouseButtonEventArgs e)
|
|
{
|
|
var border = (Border)sender;
|
|
var borderParent = (Grid)border.Parent;
|
|
DependencyObject template = borderParent.TemplatedParent;
|
|
var parent = new Window();
|
|
|
|
var x = (FrameworkElement)template;
|
|
if (x != null)
|
|
{
|
|
var y = new FrameworkElement();
|
|
while (y != null)
|
|
{
|
|
y = (FrameworkElement)x.Parent;
|
|
if (y != null)
|
|
x = y;
|
|
}
|
|
|
|
if (x is Window)
|
|
{
|
|
parent = (Window)x;
|
|
parent.DragMove();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|