ChatController update kleinigkeiten plus übermittlung über post,
Neue Chat Technologie Implementierung
This commit is contained in:
@@ -268,9 +268,13 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\ChatProgressBarView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<Page Include="View\ChatEmojiView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\ChatService.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\Detail\ServiceRecordRTFWindowView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
@@ -440,10 +444,6 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\ChatView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\ChatServiceCustomer.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -456,10 +456,6 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\ChatEmojisView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\EmployeeArbeitszeitView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -731,8 +727,11 @@
|
||||
<Compile Include="View\BeWoWindow.xaml.cs">
|
||||
<DependentUpon>BeWoWindow.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\ChatProgressBarView.xaml.cs">
|
||||
<DependentUpon>ChatProgressBarView.xaml</DependentUpon>
|
||||
<Compile Include="View\ChatEmojiView.xaml.cs">
|
||||
<DependentUpon>ChatEmojiView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\ChatService.xaml.cs">
|
||||
<DependentUpon>ChatService.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Detail\ServiceRecordRTFWindowView.xaml.cs">
|
||||
<DependentUpon>ServiceRecordRTFWindowView.xaml</DependentUpon>
|
||||
@@ -860,9 +859,6 @@
|
||||
<Compile Include="View\Detail\TextbausteinView.xaml.cs">
|
||||
<DependentUpon>TextbausteinView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\ChatView.xaml.cs">
|
||||
<DependentUpon>ChatView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\ChatServiceCustomer.xaml.cs">
|
||||
<DependentUpon>ChatServiceCustomer.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -872,9 +868,6 @@
|
||||
<Compile Include="View\ChatDokumentationsView.xaml.cs">
|
||||
<DependentUpon>ChatDokumentationsView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\ChatEmojisView.xaml.cs">
|
||||
<DependentUpon>ChatEmojisView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\EmployeeArbeitszeitView.xaml.cs">
|
||||
<DependentUpon>EmployeeArbeitszeitView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -1973,6 +1966,10 @@
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Chat\ChatController\ChatController.csproj">
|
||||
<Project>{8a83c4dc-a0b1-4a51-ae1d-366d7a05b298}</Project>
|
||||
<Name>ChatController</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Controls\Controls.csproj">
|
||||
<Project>{D5E53B0F-BF5A-41E8-93E2-0F32845FC729}</Project>
|
||||
<Name>Controls</Name>
|
||||
|
||||
@@ -848,9 +848,7 @@ namespace BeWo
|
||||
{
|
||||
Cache.GetInstance().ClearAll();
|
||||
_Views = new Dictionary<UIContext, BeWoView>();
|
||||
|
||||
_HomeView.CloseServerConnection();
|
||||
|
||||
|
||||
var animation = new DoubleAnimationUsingKeyFrames();
|
||||
|
||||
animation.KeyFrames.Add(new SplineDoubleKeyFrame(100, KeyTime.FromTimeSpan(new TimeSpan(0, 0, 0, 0, 500)), new KeySpline(1, 0, 1, 1)));
|
||||
|
||||
@@ -81,27 +81,7 @@ namespace BeWo
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
BeWoApp.MainControl.HomeView.CloseServerConnection();
|
||||
|
||||
foreach (var xyz in BeWoApp.MainControl.HomeView.chatView.Speicherpfad)
|
||||
{
|
||||
try
|
||||
{
|
||||
File.Delete(xyz.Value);
|
||||
}
|
||||
catch (Exception esx)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception edf)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
BeWoApp.CurrentBeWo.DocumentWatcher.LoescheTempDateien();
|
||||
|
||||
Application.Current.Shutdown();
|
||||
|
||||
@@ -27,6 +27,7 @@ using BeWo.ViewModel.ListViewModel;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using ChatController.ChatKlassen;
|
||||
using DevExpress.Xpf.Core;
|
||||
using DevExpress.XtraPrinting.Native;
|
||||
using DevExpress.XtraPrinting.XamlExport;
|
||||
@@ -37,13 +38,13 @@ namespace BeWo.View
|
||||
{
|
||||
public partial class ChatDokumentationsView
|
||||
{
|
||||
protected List<KontakMessageBuilder> listarray;
|
||||
protected List<KontaktMessageBuilder> listarray;
|
||||
protected long? loggedOnMitarbeiter;
|
||||
|
||||
private ServiceRecordVM serviceRecord;
|
||||
|
||||
//Konstruktor für Chat
|
||||
public ChatDokumentationsView(List<KontakMessageBuilder> _listarray, long? _loggedOnMitarbeiter,long _customerPersonOid,CompactCustomerDC _compactCustomer)
|
||||
public ChatDokumentationsView(List<KontaktMessageBuilder> _listarray, long? _loggedOnMitarbeiter,CompactCustomerDC _compactCustomer)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
@@ -52,7 +53,7 @@ namespace BeWo.View
|
||||
|
||||
|
||||
|
||||
long? customerOid = _customerPersonOid;
|
||||
// long? customerOid = _customerPersonOid;
|
||||
string message = "";
|
||||
|
||||
|
||||
|
||||
13
BeWo/View/ChatEmojiView.xaml
Normal file
13
BeWo/View/ChatEmojiView.xaml
Normal file
@@ -0,0 +1,13 @@
|
||||
<Window x:Class="BeWo.View.ChatEmojiView"
|
||||
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:BeWo.View"
|
||||
xmlns:chatController1="clr-namespace:ChatController;assembly=ChatController"
|
||||
mc:Ignorable="d" x:Name="ChatEmojiVM"
|
||||
Title="ChatEmojiService" Height="200" Width="300">
|
||||
<Grid >
|
||||
<chatController1:ChatEmojiiControl x:Name="Cec" ></chatController1:ChatEmojiiControl>
|
||||
</Grid>
|
||||
</Window>
|
||||
48
BeWo/View/ChatEmojiView.xaml.cs
Normal file
48
BeWo/View/ChatEmojiView.xaml.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
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.Shapes;
|
||||
using ChatController;
|
||||
using ChatController.HauptKlassen;
|
||||
|
||||
namespace BeWo.View
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für ChatEmojiService.xaml
|
||||
/// </summary>
|
||||
public partial class ChatEmojiView : Window
|
||||
{
|
||||
|
||||
private ChatEmoji _emojii;
|
||||
|
||||
public ChatEmojiView(ChatMainControl chatMainControler)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
Cec.InitChatView(chatMainControler);
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void ChatEmojisView_OnFocusableChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
if (ChatEmojiVM.Visibility == Visibility.Visible)
|
||||
{
|
||||
ChatEmojiVM.Visibility = Visibility.Collapsed;
|
||||
|
||||
ChatEmojiVM.Activate();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,188 +0,0 @@
|
||||
<Window x:Class="BeWo.View.ChatEmojisView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:view="clr-namespace:BeWo.View"
|
||||
Title="Emojis" Height="150" Width="300" WindowStartupLocation="Manual" WindowStyle="None" x:Name="ChatEmojiView" Deactivated="ChatEmojisView_OnFocusableChanged"
|
||||
AllowsTransparency="True"
|
||||
Background="AliceBlue"
|
||||
ResizeMode="NoResize"
|
||||
BorderThickness="2"
|
||||
BorderBrush="Black"
|
||||
>
|
||||
<Grid>
|
||||
<TabControl>
|
||||
<TabItem Header="1" x:Name="TabItem1" >
|
||||
<ListBox x:Name="EmojisListBox1" HorizontalAlignment="Left" Height="114" VerticalAlignment="Top" Width="285" ScrollViewer.HorizontalScrollBarVisibility="Disabled" SelectionChanged="OnEmojiClick" >
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type view:DirectoryListing}" >
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock Text="{Binding EmojiCode}" Height="22" MinWidth="22" FontSize="18" Foreground="OrangeRed" Margin="1" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel IsItemsHost="True" Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
</ListBox>
|
||||
</TabItem>
|
||||
<TabItem Header="2" x:Name="TabItem2">
|
||||
<ListBox x:Name="EmojisListBox2" HorizontalAlignment="Left" Height="114" VerticalAlignment="Top" Width="285" ScrollViewer.HorizontalScrollBarVisibility="Disabled" SelectionChanged="OnEmojiClick" >
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type view:DirectoryListing}">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock Text="{Binding EmojiCode}" Height="22" Width="22" FontSize="18" Foreground="OrangeRed"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel IsItemsHost="True" Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
</ListBox>
|
||||
</TabItem>
|
||||
<TabItem Header="3" x:Name="TabItem3">
|
||||
<ListBox x:Name="EmojisListBox3" HorizontalAlignment="Left" Height="114" VerticalAlignment="Top" Width="285" ScrollViewer.HorizontalScrollBarVisibility="Disabled" SelectionChanged="OnEmojiClick" >
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type view:DirectoryListing}">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock Text="{Binding EmojiCode}" Height="22" Width="22" FontSize="18" Foreground="OrangeRed"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel IsItemsHost="True" Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
</ListBox>
|
||||
</TabItem>
|
||||
<TabItem Header="4" x:Name="TabItem4">
|
||||
<ListBox x:Name="EmojisListBox4" HorizontalAlignment="Left" Height="114" VerticalAlignment="Top" Width="285" ScrollViewer.HorizontalScrollBarVisibility="Disabled" SelectionChanged="OnEmojiClick" >
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type view:DirectoryListing}">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock Text="{Binding EmojiCode}" Height="22" Width="22" FontSize="18" Foreground="OrangeRed"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel IsItemsHost="True" Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
</ListBox>
|
||||
</TabItem>
|
||||
<TabItem Header="5" x:Name="TabItem5">
|
||||
<ListBox x:Name="EmojisListBox5" HorizontalAlignment="Left" Height="114" VerticalAlignment="Top" Width="285" ScrollViewer.HorizontalScrollBarVisibility="Disabled" SelectionChanged="OnEmojiClick" >
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type view:DirectoryListing}">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock Text="{Binding EmojiCode}" Height="22" Width="22" FontSize="18" Foreground="OrangeRed"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel IsItemsHost="True" Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
</ListBox>
|
||||
</TabItem>
|
||||
<TabItem Header="6" x:Name="TabItem6">
|
||||
<ListBox x:Name="EmojisListBox6" HorizontalAlignment="Left" Height="114" VerticalAlignment="Top" Width="285" ScrollViewer.HorizontalScrollBarVisibility="Disabled" SelectionChanged="OnEmojiClick" >
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type view:DirectoryListing}">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock Text="{Binding EmojiCode}" Height="22" Width="22" FontSize="18" Foreground="OrangeRed"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel IsItemsHost="True" Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
</ListBox>
|
||||
</TabItem>
|
||||
<TabItem Header="7" x:Name="TabItem7">
|
||||
<ListBox x:Name="EmojisListBox7" HorizontalAlignment="Left" Height="114" VerticalAlignment="Top" Width="285" ScrollViewer.HorizontalScrollBarVisibility="Disabled" SelectionChanged="OnEmojiClick" >
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type view:DirectoryListing}">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock Text="{Binding EmojiCode}" Height="22" Width="22" FontSize="18" Foreground="OrangeRed"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel IsItemsHost="True" Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
</ListBox>
|
||||
</TabItem>
|
||||
<!-- <TabItem Header="8" x:Name="TabItem8">
|
||||
<ListBox x:Name="EmojisListBox8" HorizontalAlignment="Left" Height="114" VerticalAlignment="Top" Width="285" ScrollViewer.HorizontalScrollBarVisibility="Disabled" SelectionChanged="OnEmojiClick" >
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type view:DirectoryListing}">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock Text="{Binding EmojiCode}" Height="22" Width="22" FontSize="18"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel IsItemsHost="True" Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
</ListBox>
|
||||
</TabItem>
|
||||
<TabItem Header="9">
|
||||
<ListBox x:Name="EmojisListBox" HorizontalAlignment="Left" Height="114" VerticalAlignment="Top" Width="285" ScrollViewer.HorizontalScrollBarVisibility="Disabled" SelectionChanged="OnEmojiClick" >
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type view:DirectoryListing}">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock Text="{Binding EmojiCode}" Height="22" Width="22" FontSize="18"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel IsItemsHost="True" Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
</ListBox>
|
||||
</TabItem>-->
|
||||
</TabControl>
|
||||
|
||||
<!--
|
||||
<ListBox x:Name="EmojisListBox" HorizontalAlignment="Left" Height="100" VerticalAlignment="Top" Width="200" ScrollViewer.HorizontalScrollBarVisibility="Disabled" SelectionChanged="OnEmojiClick" >
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type view:DirectoryListing}">
|
||||
<StackPanel Orientation="Vertical">
|
||||
|
||||
// diese bereich muss auskommentiert werden <Image Margin="3" Source="{Binding Pfad}" Height="16" Width="16" />
|
||||
|
||||
|
||||
<TextBlock Text="{Binding EmojiCode}" Height="22" Width="22" FontSize="18"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel IsItemsHost="True" Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
</ListBox>
|
||||
-->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
|
||||
@@ -1,590 +0,0 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
|
||||
using BeWo.ServiceProxy;
|
||||
using BeWo.ViewModel;
|
||||
|
||||
using BS.Shared.Extensions;
|
||||
using System.Windows.Controls;
|
||||
using System.Net.Sockets;
|
||||
using System.Threading;
|
||||
using System.Windows.Threading;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Media.Imaging;
|
||||
using BeWo.Core.Service;
|
||||
using BeWo.View.Detail;
|
||||
using BeWo.ViewModel.ListViewModel;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using DevExpress.Xpf.Core;
|
||||
using DevExpress.XtraPrinting.Native;
|
||||
using DevExpress.XtraPrinting.XamlExport;
|
||||
using Microsoft.Office.Interop.Word;
|
||||
using Color = System.Drawing.Color;
|
||||
|
||||
namespace BeWo.View
|
||||
{
|
||||
public partial class ChatEmojisView
|
||||
{
|
||||
|
||||
ChatView chatView;
|
||||
|
||||
|
||||
public ChatEmojisView()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
|
||||
LoadEmojipicsInView();
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void LoadEmojipicsInView()
|
||||
{
|
||||
|
||||
#region Normale
|
||||
|
||||
List<String> normal = new List<string>
|
||||
{
|
||||
"D83DDE00", "D83DDE01", "D83DDE02", "D83DDE03", "D83DDE04", "D83DDE05", "D83DDE06", "D83DDE09", "D83DDE0A", "D83DDE0B", "D83DDE0E",
|
||||
"D83DDE0D","D83DDE18","D83DDE17","D83DDE19","D83DDE1A","263A","D83DDE42","D83DDE10","D83DDE11","D83DDE36","D83DDE0F","D83DDE23","D83DDE25","D83DDE2E","D83DDE2F",
|
||||
"D83DDE2A","D83DDE2B","D83DDE34","D83DDE0C","D83DDE1B","D83DDE1C","D83DDE1D","D83DDE12","D83DDE13","D83DDE14","D83DDE15","D83DDE32","2639","D83DDE41","D83DDE16",
|
||||
"D83DDE1E","D83DDE1F","D83DDE24","D83DDE22","D83DDE2D","D83DDE26","D83DDE27","D83DDE28","D83DDE29","D83DDE2C","D83DDE30","D83DDE31","D83DDE33","D83DDE35","D83DDE21",
|
||||
"D83DDE20","D83DDE07","D83DDE37"
|
||||
};
|
||||
|
||||
foreach (var x in normal)
|
||||
{
|
||||
EmojisListBox1.Items.Add(new DirectoryListing("", string.Join("", (from Match m in Regex.Matches(x, @"\S{4}")
|
||||
select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray())));
|
||||
}
|
||||
|
||||
string tabheader1 = string.Join("", (from Match m in Regex.Matches("D83DDE0A", @"\S{4}") select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray());
|
||||
|
||||
|
||||
TabItem1.Header = tabheader1;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Variable
|
||||
|
||||
List<String> variable = new List<string> { "D83DDE08", "D83DDC7F", "D83DDC79", "D83DDC7A", "D83DDC80","2620","D83DDC7B","D83DDC7D","D83DDC7E","D83DDCA9"};
|
||||
|
||||
|
||||
foreach (var x in variable)
|
||||
{
|
||||
EmojisListBox1.Items.Add(new DirectoryListing("", string.Join("", (from Match m in Regex.Matches(x, @"\S{4}")
|
||||
select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray())));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Tier
|
||||
|
||||
List<String> tier = new List<string>
|
||||
{
|
||||
"D83DDE3A","D83DDE38","D83DDE39","D83DDE3B","D83DDE3C","D83DDE3D","D83DDE40","D83DDE3F","D83DDE3E","D83DDE48","D83DDE49","D83DDE4A","D83D DC35","D83D DC12",
|
||||
"D83D DC36", "D83D DC15","D83D DC29","D83D DC3A","D83D DC31","D83D DC08","D83D DC2F","D83D DC05","D83D DC06","D83D DC34","D83D DC0E 0009","D83D DC2E","D83D DC02",
|
||||
"D83D DC03","D83D DC04","D83D DC37","D83D DC16","D83D DC17","D83D DC3D","D83D DC0F","D83D DC11","D83D DC10","D83D DC2A","D83D DC2B","D83D DC18","D83D DC2D","D83D DC01",
|
||||
"D83D DC00","D83D DC39","D83D DC30","D83D DC07","D83D DC3F","D83D DC3B","D83D DC28","D83D DC3C","D83D DC3E","D83D DC14","D83D DC13","D83D DC23","D83D DC24","D83D DC25",
|
||||
"D83D DC26","D83D DC27","D83D DD4A","D83D DC38","D83D DC0A","D83D DC22","D83D DC0D","D83D DC32","D83D DC09","D83D DC33","D83D DC0B","D83D DC2C","D83D DC1F","D83D DC20",
|
||||
"D83D DC21","D83D DC19","D83D DC1A","D83D DC0C","D83D DC1B","D83D DC1C","D83D DC1D","D83D DC1E","D83D DD77","D83D DD78"
|
||||
|
||||
};
|
||||
|
||||
foreach (var x in tier)
|
||||
{
|
||||
EmojisListBox2.Items.Add(new DirectoryListing("", string.Join("", (from Match m in Regex.Matches(x, @"\S{4}")
|
||||
select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray())));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Mensch
|
||||
|
||||
List<String> mensch = new List<string>
|
||||
{
|
||||
"D83DDC66","D83DDC67","D83DDC68","D83DDC69","D83DDC74","D83DDC75","D83DDC76","D83DDC7C","D83DDC6E","D83DDD75","D83DDC82","D83DDC77","D83DDC73",
|
||||
"D83DDC71","D83CDF85","D83DDC78","D83DDC70","D83DDC72","D83DDE4D","D83DDE4E","D83DDE45","D83DDE46","D83DDC81","D83DDE4B","D83DDE47","D83DDC86",
|
||||
"D83DDC87","D83DDEB6","D83CDFC3","D83DDC83","D83DDC6F","D83DDD74","D83DDDE3","D83DDC64","D83DDC65","D83DDC6B","D83DDC6C","D83DDC6D","D83DDC8F",
|
||||
"D83DDC69 200D2764FE0F200DD83DDC8B200DD83DDC68","D83DDC68200D2764FE0F200DD83DDC8B200DD83DDC68","D83DDC69200D2764FE0F200DD83DDC8B200DD83DDC69",
|
||||
"D83DDC91","D83DDC69200D2764FE0F200DD83DDC68","D83DDC68200D2764FE0F200DD83DDC68","D83DDC69200D2764FE0F200DD83DDC69",
|
||||
"D83DDC6A","D83DDC68200DD83DDC69200DD83DDC66","D83DDC68200DD83DDC69200DD83DDC67","D83DDC68200DD83DDC69200DD83DDC67200DD83DDC66",
|
||||
"D83DDC68200DD83DDC69200DD83DDC66200DD83DDC66","D83DDC68200DD83DDC69200DD83DDC67200DD83DDC67","D83DDC68200DD83DDC68200DD83DDC66",
|
||||
"D83DDC68200DD83DDC68200DD83DDC67","D83DDC68200DD83DDC68200DD83DDC67200DD83DDC66","D83DDC68200DD83DDC68200DD83DDC66200DD83DDC66",
|
||||
"D83DDC68200DD83DDC68200DD83DDC67200DD83DDC67","D83DDC69200DD83DDC69200DD83DDC66","D83DDC69200DD83DDC69200DD83DDC67",
|
||||
"D83DDC69200DD83DDC69200DD83DDC67200DD83DDC66","D83DDC69200DD83DDC69200DD83DDC66200DD83DDC66","D83DDC69200DD83DDC69200DD83DDC67200DD83DDC67"
|
||||
};
|
||||
|
||||
foreach (var x in mensch)
|
||||
{
|
||||
EmojisListBox1.Items.Add(new DirectoryListing("", string.Join("", (from Match m in Regex.Matches(x, @"\S{4}")
|
||||
select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray())));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Zeichen
|
||||
|
||||
List<String> zeichen = new List<string>
|
||||
{
|
||||
"D83DDCAA","D83DDC48","D83DDC49","261D","D83DDC46","D83DDD95","D83DDC47","270C","D83DDD96","D83DDD90","270B","D83DDC4C","D83DDC4D","D83DDC4E","270A",
|
||||
"D83DDC4A","D83DDC4B","D83DDC4F","270D","D83DDC50","D83DDE4C","D83DDE4F","D83DDC85","D83DDC42","D83DDC43","D83DDC63","D83DDC40","D83DDC41","D83DDC41200DD83DDDE8"
|
||||
};
|
||||
|
||||
foreach (var x in zeichen)
|
||||
{
|
||||
EmojisListBox7.Items.Add(new DirectoryListing("", string.Join("", (from Match m in Regex.Matches(x, @"\S{4}")
|
||||
select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray())));
|
||||
}
|
||||
|
||||
string tabheader7 = string.Join("", (from Match m in Regex.Matches("270C", @"\S{4}") select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray());
|
||||
|
||||
|
||||
TabItem7.Header = tabheader7;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Nur die Liebe Zählt
|
||||
|
||||
List<String> liebe = new List<string>
|
||||
{
|
||||
"D83DDC45","D83DDC44","D83DDC8B","D83DDC98","2764","D83DDC93","D83DDC94","D83DDC95","D83DDC96","D83DDC97","D83DDC99","D83DDC9A","D83DDC9B","D83DDC9C",
|
||||
"D83DDC9D","D83DDC9E","D83DDC9F","2763","D83DDC8C"
|
||||
};
|
||||
|
||||
foreach (var x in liebe)
|
||||
{
|
||||
EmojisListBox1.Items.Add(new DirectoryListing("", string.Join("", (from Match m in Regex.Matches(x, @"\S{4}")
|
||||
select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray())));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Sonstiges
|
||||
|
||||
List<String> sonstiges = new List<string>
|
||||
{
|
||||
"D83DDCA4","D83DDCA2","D83DDCA3","D83DDCA5","D83DDCA6", "D83DDCA8","D83DDCAB","D83DDCAC","D83DDDE8","D83DDDEF","D83DDCAD","D83DDD73"
|
||||
|
||||
};
|
||||
|
||||
foreach (var x in sonstiges)
|
||||
{
|
||||
EmojisListBox1.Items.Add(new DirectoryListing("", string.Join("", (from Match m in Regex.Matches(x, @"\S{4}")
|
||||
select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray())));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Kleidung
|
||||
|
||||
List<String> kleidung = new List<string>
|
||||
{
|
||||
"D83D DC53","D83D DD76","D83D DC54","D83DDC55","D83D DC56","D83D DC57","D83D DC58","D83D DC59","D83D DC5A","D83D DC5B","D83D DC5C","D83D DC5D","D83D DECD","D83C DF92",
|
||||
"D83D DC5E","D83D DC5F","D83D DC60","D83D DC61","D83D DC62","D83D DC51","D83D DC52","D83C DFA9","D83C DF93","26D1","D83D DC84","D83D DC8D","D83D DC8E"
|
||||
};
|
||||
|
||||
foreach (var x in kleidung)
|
||||
{
|
||||
EmojisListBox1.Items.Add(new DirectoryListing("", string.Join("", (from Match m in Regex.Matches(x, @"\S{4}")
|
||||
select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray())));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pflanzen
|
||||
|
||||
List<String> pflanzen = new List<string>
|
||||
{
|
||||
"D83DDC90","D83CDF38","D83DDCAE","D83CDFF5","D83CDF39","D83CDF3A","D83CDF3B","D83CDF3C","D83CDF37","D83CDF31","D83CDF32","D83CDF33","D83CDF34",
|
||||
"D83CDF35","D83CDF3E","D83CDF3F","2618","D83CDF40","D83CDF41","D83CDF42","D83CDF43"
|
||||
|
||||
};
|
||||
|
||||
foreach (var x in pflanzen)
|
||||
{
|
||||
EmojisListBox2.Items.Add(new DirectoryListing("", string.Join("", (from Match m in Regex.Matches(x, @"\S{4}")
|
||||
select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray())));
|
||||
}
|
||||
|
||||
string tabheader2 = string.Join("", (from Match m in Regex.Matches("D83CDF3C", @"\S{4}") select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray());
|
||||
|
||||
|
||||
TabItem2.Header = tabheader2;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Nahrung
|
||||
|
||||
List<String> nahrung = new List<string>
|
||||
{
|
||||
"D83CDF47","D83CDF48","D83CDF49","D83CDF4A","D83CDF4B","D83CDF4C","D83CDF4D","D83CDF4E","D83CDF4F","D83CDF50","D83CDF51","D83CDF52","D83CDF53",
|
||||
"D83CDF45","D83CDF46","D83CDF3D","D83CDF36","D83CDF44","D83CDF30","D83CDF5E","D83CDF56","D83CDF57","D83CDF54","D83CDF5F","D83CDF55","D83CDF73",
|
||||
"D83CDF72","D83CDF71","D83CDF58","D83CDF59","D83CDF5A","D83CDF5B","D83CDF5C","D83CDF5D","D83CDF60","D83CDF62","D83CDF63","D83CDF64","D83CDF65",
|
||||
"D83CDF61","D83CDF66","D83CDF67","D83CDF68","D83CDF69","D83CDF6A","D83CDF82","D83CDF70","D83CDF6B","D83CDF6C","D83CDF6D","D83CDF6E","D83CDF6F",
|
||||
"D83CDF7C","2615","D83CDF75","D83CDF76","D83CDF77","D83CDF78","D83CDF79","D83CDF7A","D83CDF7B","D83CDF7D","D83CDF74","D83DDD2A"
|
||||
|
||||
};
|
||||
|
||||
foreach (var x in nahrung)
|
||||
{
|
||||
EmojisListBox3.Items.Add(new DirectoryListing("", string.Join("", (from Match m in Regex.Matches(x, @"\S{4}")
|
||||
select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray())));
|
||||
}
|
||||
|
||||
string tabheader3 = string.Join("", (from Match m in Regex.Matches("D83CDF74", @"\S{4}") select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray());
|
||||
|
||||
|
||||
TabItem3.Header = tabheader3;
|
||||
|
||||
#endregion
|
||||
|
||||
#region planet
|
||||
|
||||
List<String> planet = new List<string>
|
||||
{
|
||||
"D83CDF0D","D83CDF0E","D83CDF0F","D83CDF10","D83DDDFA","D83DDDFE","D83CDFD4","26F0","D83CDF0B","D83CDFD5","D83CDFD6","D83CDFDC","D83CDFDD","D83CDFDE"
|
||||
|
||||
};
|
||||
|
||||
foreach (var x in planet)
|
||||
{
|
||||
EmojisListBox2.Items.Add(new DirectoryListing("", string.Join("", (from Match m in Regex.Matches(x, @"\S{4}")
|
||||
select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray())));
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region Tuck Tuck
|
||||
|
||||
List<String> tucktuck = new List<string>
|
||||
{
|
||||
"D83DDE82","D83DDE83","D83DDE84","D83DDE85","D83DDE86","D83DDE87","D83DDE88","D83DDE89","D83DDE8A","D83DDE9D","D83DDE9E","D83DDE8B","D83DDE8C",
|
||||
"D83DDE8D","D83DDE8E","D83DDE90","D83DDE91","D83DDE92","D83DDE93","D83DDE94","D83DDE95","D83DDE96","D83DDE97","D83DDE98","D83DDE99","D83DDE9A",
|
||||
"D83DDE9B","D83DDE9C","D83DDEB2","D83CDFCE","D83CDFCD","D83DDE8F","D83DDEE3","D83DDEE4","26FD","D83DDEA8","D83DDEA5","D83DDEA6","D83DDEA7","2693",
|
||||
"26F5","D83DDEA4","D83DDEF3","26F4","D83DDEE5","D83DDEA2","2708","D83DDEE9","D83DDEEB","D83DDEEC","D83DDCBA","D83DDE81","D83DDE9F","D83DDEA0","D83DDEA1",
|
||||
"D83DDE80","D83DDEF0"
|
||||
|
||||
};
|
||||
|
||||
foreach (var x in tucktuck)
|
||||
{
|
||||
EmojisListBox5.Items.Add(new DirectoryListing("", string.Join("", (from Match m in Regex.Matches(x, @"\S{4}")
|
||||
select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray())));
|
||||
}
|
||||
|
||||
string tabheader5 = string.Join("", (from Match m in Regex.Matches("D83DDE97", @"\S{4}") select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray());
|
||||
|
||||
|
||||
TabItem5.Header = tabheader5;
|
||||
#endregion
|
||||
|
||||
|
||||
#region Bauten kunst
|
||||
|
||||
List<String> bauten = new List<string>
|
||||
{
|
||||
"D83CDFDF","D83CDFDB","D83CDFD7","D83CDFD8","D83CDFD9","D83CDFDA","D83CDFE0","D83CDFE1","D83CDFE2","D83CDFE3","D83CDFE4","D83CDFE5","D83CDFE6",
|
||||
"D83CDFE8","D83CDFE9","D83CDFEA","D83CDFEB","D83CDFEC","D83CDFED","D83CDFEF","D83CDFF0","D83DDC92","D83DDDFC","D83DDDFD","26EA","26E9","26F2","26FA",
|
||||
"D83CDF01","D83CDF03","D83CDF04","D83CDF05","D83CDF06","D83CDF07","D83CDF09","2668","D83CDF0C","D83CDFA0","D83CDFA1","D83CDFA2","D83DDC88","D83CDFAA",
|
||||
"D83CDFAD","D83DDDBC","D83CDFA8","D83CDFB0",
|
||||
|
||||
};
|
||||
|
||||
foreach (var x in bauten)
|
||||
{
|
||||
EmojisListBox5.Items.Add(new DirectoryListing("", string.Join("", (from Match m in Regex.Matches(x, @"\S{4}")
|
||||
select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray())));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Klingel Bett UhrZeit wetter
|
||||
|
||||
|
||||
List<String> klingbett = new List<string>
|
||||
{
|
||||
"D83DDECE","D83DDEAA","D83DDECC","D83DDECF","D83DDECB","D83DDEBD","D83DDEBF","D83DDEC0","D83DDEC1","231B","23F3","231A","23F0","23F1","23F2","D83DDD70","D83DDD5B",
|
||||
"D83DDD67","D83DDD50","D83DDD5C","D83DDD51","D83DDD5D","D83DDD52","D83DDD5E","D83DDD53","D83DDD5F","D83DDD54","D83DDD60","D83DDD55","D83DDD61","D83DDD56",
|
||||
"D83DDD62","D83DDD57","D83DDD63","D83DDD58","D83DDD64","D83DDD59","D83DDD65","D83DDD5A","D83DDD66","D83CDF11","D83CDF12","D83CDF13","D83CDF14","D83CDF15",
|
||||
"D83CDF16","D83CDF17","D83CDF18","D83CDF19","D83CDF1A","D83CDF1B","D83CDF1C","D83CDF21","2600","D83CDF1D","D83CDF1E","2B50","D83CDF1F","D83CDF20","2601",
|
||||
"26C5","26C8","D83CDF24","D83CDF25","D83CDF26","D83CDF27","D83CDF28","D83CDF29","D83CDF2A","D83CDF2B","D83CDF2C","D83CDF00","D83CDF08","D83CDF02",
|
||||
"2602","2614","26F1","26A1","2744","2603","26C4","2604","D83DDD25","D83DDCA7","D83CDF0A"
|
||||
|
||||
};
|
||||
|
||||
foreach (var x in klingbett)
|
||||
{
|
||||
EmojisListBox2.Items.Add(new DirectoryListing("", string.Join("", (from Match m in Regex.Matches(x, @"\S{4}")
|
||||
select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray())));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Party
|
||||
|
||||
List<String> party = new List<string>
|
||||
{
|
||||
"D83CDF83","D83CDF84","D83CDF86","D83CDF87","2728","D83CDF88","D83CDF89","D83CDF8A","D83CDF8B","D83CDF8D","D83CDF8E","D83CDF8F","D83CDF90",
|
||||
"D83CDF91","D83CDF80","D83CDF81","D83CDF97","D83CDF9F","D83CDFAB"
|
||||
|
||||
};
|
||||
|
||||
foreach (var x in party)
|
||||
{
|
||||
EmojisListBox1.Items.Add(new DirectoryListing("", string.Join("", (from Match m in Regex.Matches(x, @"\S{4}")
|
||||
select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray())));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Sport
|
||||
|
||||
List<String> sport = new List<string>
|
||||
{
|
||||
"D83CDF96","D83CDFC6","D83CDFC5","26BD","26BE","D83CDFC0","D83CDFC8","D83CDFC9","D83CDFBE","D83CDFB1","D83CDFB3","D83CDFAF",
|
||||
"26F3","26F8","D83CDFA3","D83CDFBD","D83CDFBF","D83CDFC7","26F7","D83CDFC2","D83CDFCC","D83CDFC4","D83DDEA3000A","D83CDFCA",
|
||||
"26F9","D83CDFCB","D83DDEB4","D83DDEB5"
|
||||
};
|
||||
|
||||
foreach (var x in sport)
|
||||
{
|
||||
EmojisListBox4.Items.Add(new DirectoryListing("", string.Join("", (from Match m in Regex.Matches(x, @"\S{4}")
|
||||
select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray())));
|
||||
}
|
||||
|
||||
string tabheader4 = string.Join("", (from Match m in Regex.Matches("26BD", @"\S{4}") select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray());
|
||||
|
||||
|
||||
TabItem4.Header = tabheader4;
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Gaming Sound technik
|
||||
|
||||
|
||||
List<String> gaming = new List<string>
|
||||
{
|
||||
"D83CDFAE","D83DDD79","D83CDFB2","2660","2665","2666","2663","D83CDCCF","D83CDC04","D83CDFB4","D83DDD07","D83DDD08","D83DDD09","D83DDD0A","D83DDCE2",
|
||||
"D83DDCE3","D83DDCEF","D83DDD14","D83DDD15","D83CDFBC","D83CDFB5","D83CDFB6","D83CDF99","D83CDF9A","D83CDF9B","D83CDFA4","D83CDFA7","D83DDCFB","D83CDFB7",
|
||||
"D83CDFB8","D83CDFB9","D83CDFBA","D83CDFBB","D83DDCF1","D83DDCF2","260E","D83DDCDE","D83DDCDF","D83DDCE0","D83DDD0B","D83DDD0C","D83DDCBB","D83DDDA5",
|
||||
"D83DDDA8","2328","D83DDDB1","D83DDDB2","D83DDCBD","D83DDCBE","D83DDCBF","D83DDCC0","D83CDFA5","D83CDF9E","D83DDCFD","D83CDFAC","D83DDCFA","D83DDCF7",
|
||||
"D83DDCF8","D83DDCF9","D83DDCFC","D83DDD0D","D83DDD0E","D83DDD2C","D83DDD2D","D83DDCE1","D83DDD6F","D83DDCA1","D83DDD26","D83CDFEE"
|
||||
|
||||
};
|
||||
|
||||
foreach (var x in gaming)
|
||||
{
|
||||
EmojisListBox6.Items.Add(new DirectoryListing("", string.Join("", (from Match m in Regex.Matches(x, @"\S{4}")
|
||||
select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray())));
|
||||
}
|
||||
|
||||
string tabheader6 = string.Join("", (from Match m in Regex.Matches("D83DDD79", @"\S{4}") select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray());
|
||||
|
||||
|
||||
TabItem6.Header = tabheader6;
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Schule und so
|
||||
|
||||
List<String> schule = new List<string>
|
||||
{
|
||||
"D83DDCD4","D83DDCD5","D83DDCD6","D83DDCD7","D83DDCD8","D83DDCD9","D83DDCDA","D83DDCD3","D83DDCD2","D83DDCC3","D83DDCDC","D83DDCC4","D83DDCF0","D83DDDDE",
|
||||
"D83DDCD1","D83DDD16","D83CDFF7","D83DDCB0","D83DDCB4","D83DDCB5","D83DDCB6","D83DDCB7","D83DDCB8","D83DDCB3","D83DDCB9","D83DDCB1","D83DDCB2","2709",
|
||||
"D83DDCE7","D83DDCE8","D83DDCE9","D83DDCE4","D83DDCE5","D83DDCE6","D83DDCEB","D83DDCEA","D83DDCEC","D83DDCED","D83DDCEE","D83DDDF3","270F","2712","D83DDD8B",
|
||||
"D83DDD8A","D83DDD8C","D83DDD8D","D83DDCDD","D83DDCBC","D83DDCC1","D83DDCC2","D83DDDC2","D83DDCC5","D83DDCC6","D83DDDD2","D83DDDD3","D83DDCC7","D83DDCC8",
|
||||
"D83DDCC9","D83DDCCA","D83DDCCB","D83DDCCC","D83DDCCD","D83DDCCE","D83DDD87","D83DDCCF","D83DDCD0","2702","D83DDDC3","D83DDDC4","D83DDDD1","D83DDD12",
|
||||
"D83DDD13","D83DDD0F","D83DDD10","D83DDD11","D83DDDDD"
|
||||
|
||||
};
|
||||
|
||||
foreach (var x in schule)
|
||||
{
|
||||
EmojisListBox6.Items.Add(new DirectoryListing("", string.Join("", (from Match m in Regex.Matches(x, @"\S{4}")
|
||||
select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray())));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region waffen
|
||||
|
||||
List<String> waffen = new List<string>
|
||||
{
|
||||
"D83DDD28","26CF","2692","D83DDEE0","D83DDDE1","2694","D83DDD2B","D83DDEE1","D83DDD27","D83DDD29","2699","D83DDDDC","2697","2696","D83DDD17",
|
||||
"26D3","D83DDC89","D83DDC8A","D83DDEAC","26B0","26B1","D83DDDFF","D83DDEE2","D83DDD2E"
|
||||
|
||||
|
||||
};
|
||||
|
||||
foreach (var x in waffen)
|
||||
{
|
||||
EmojisListBox6.Items.Add(new DirectoryListing("", string.Join("", (from Match m in Regex.Matches(x, @"\S{4}")
|
||||
select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray())));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Schilder
|
||||
|
||||
List<String> schilder = new List<string>
|
||||
{
|
||||
|
||||
"D83CDFE7","D83DDEAE","D83DDEB0","267F","D83DDEB9","D83DDEBA","D83DDEBB","D83DDEBC","D83DDEBE","D83DDEC2","D83DDEC3","D83DDEC4","D83DDEC5","26A0","D83DDEB8",
|
||||
"26D4","D83DDEAB","D83DDEB3","D83DDEAD","D83DDEAF","D83DDEB1","D83DDEB7","D83DDCF5","D83DDD1E","2622","2623","2B06","2197","27A1","2198","2B07","2199","2B05",
|
||||
"2196","2195","2194","21A9","21AA","2934","2935","D83DDD03","D83DDD04","D83DDD19","D83DDD1A","D83DDD1B","D83DDD1C","D83DDD1D","269B","D83DDD49","2721","2638",
|
||||
"262F","271D","2626","262A","262E","D83DDD2F","267B","D83DDCDB","269C","D83DDD30","D83DDD31","2B55","2705","2611","2714","2716","274C","274E","2795","2796",
|
||||
"2797","27B0","27BF","303D","2733","2734","2747","203C","2049","2753","2754","2755","2757 0009","3030","00A9","00AE","2122","2648","2649","264A","264B","264C",
|
||||
"264D","264E","264F","2650","2651","2652","2653","26CE","D83DDD00","D83DDD01","D83DDD02","25B6","23E9","23ED","23EF","25C0","23EA","23EE","D83D DD3C","23EB",
|
||||
"D83DDD3D","23EC","23F8","23F9","23FA","23CF","D83CDFA6","D83DDD05","D83DDD06","D83DDCF6","D83DDCF3","D83DDCF4","D83DDCAF","D83DDD20","D83DDD21",
|
||||
"D83DDD22","D83DDD23","D83DDD24","D83CDD70","D83CDD8E","D83CDD71","D83CDD91","D83CDD92","D83CDD93","D83CDD94","24C2","D83CDD95","D83CDD96","D83CDD7E",
|
||||
"D83CDD97","D83CDD7F","D83CDD98","D83CDD99","D83CDD9A","D83CDE01","D83CDE02","D83CDE37","D83CDE36","D83CDE2F" ,"D83CDE50","D83CDE39","D83CDE1A","D83CDE32",
|
||||
"D83CDE51","D83CDE38","D83CDE34","D83CDE33","3297","3299","D83CDE3A","D83CDE35","25AA","25AB","25FB","25FC","25FD","25FE","2B1B","2B1C","D83DDD36","D83DDD37",
|
||||
"D83DDD38","D83DDD39","D83DDD3A","D83DDD3B","D83DDCA0","D83DDD18","D83DDD32","D83DDD33","26AA","26AB","D83DDD34","D83DDD35","D83CDFC1","D83DDEA9","D83CDF8C",
|
||||
"D83CDFF4","D83CDFF3"
|
||||
|
||||
};
|
||||
|
||||
foreach (var x in schilder)
|
||||
{
|
||||
EmojisListBox7.Items.Add(new DirectoryListing("", string.Join("", (from Match m in Regex.Matches(x, @"\S{4}")
|
||||
select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray())));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void OnEmojiClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
foreach (Object selecteditem in EmojisListBox1.SelectedItems)
|
||||
{
|
||||
DirectoryListing Item = selecteditem as DirectoryListing;
|
||||
|
||||
if (Item.EmojiCode != "")
|
||||
{
|
||||
BeWoApp.MainControl.HomeView.ÜbergebeEmojiAnChatView(Item.EmojiCode, Item.Pfad);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (Object selecteditem in EmojisListBox2.SelectedItems)
|
||||
{
|
||||
DirectoryListing Item = selecteditem as DirectoryListing;
|
||||
|
||||
if (Item.EmojiCode != "")
|
||||
{
|
||||
BeWoApp.MainControl.HomeView.ÜbergebeEmojiAnChatView(Item.EmojiCode, Item.Pfad);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach (Object selecteditem in EmojisListBox3.SelectedItems)
|
||||
{
|
||||
DirectoryListing Item = selecteditem as DirectoryListing;
|
||||
|
||||
if (Item.EmojiCode != "")
|
||||
{
|
||||
BeWoApp.MainControl.HomeView.ÜbergebeEmojiAnChatView(Item.EmojiCode, Item.Pfad);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (Object selecteditem in EmojisListBox4.SelectedItems)
|
||||
{
|
||||
DirectoryListing Item = selecteditem as DirectoryListing;
|
||||
|
||||
if (Item.EmojiCode != "")
|
||||
{
|
||||
BeWoApp.MainControl.HomeView.ÜbergebeEmojiAnChatView(Item.EmojiCode, Item.Pfad);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (Object selecteditem in EmojisListBox5.SelectedItems)
|
||||
{
|
||||
DirectoryListing Item = selecteditem as DirectoryListing;
|
||||
|
||||
if (Item.EmojiCode != "")
|
||||
{
|
||||
BeWoApp.MainControl.HomeView.ÜbergebeEmojiAnChatView(Item.EmojiCode, Item.Pfad);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (Object selecteditem in EmojisListBox6.SelectedItems)
|
||||
{
|
||||
DirectoryListing Item = selecteditem as DirectoryListing;
|
||||
|
||||
if (Item.EmojiCode != "")
|
||||
{
|
||||
BeWoApp.MainControl.HomeView.ÜbergebeEmojiAnChatView(Item.EmojiCode, Item.Pfad);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (Object selecteditem in EmojisListBox7.SelectedItems)
|
||||
{
|
||||
DirectoryListing Item = selecteditem as DirectoryListing;
|
||||
|
||||
if (Item.EmojiCode != "")
|
||||
{
|
||||
BeWoApp.MainControl.HomeView.ÜbergebeEmojiAnChatView(Item.EmojiCode, Item.Pfad);
|
||||
}
|
||||
}
|
||||
|
||||
EmojisListBox1.SelectedIndex = -1;
|
||||
EmojisListBox2.SelectedIndex = -1;
|
||||
EmojisListBox3.SelectedIndex = -1;
|
||||
EmojisListBox4.SelectedIndex = -1;
|
||||
EmojisListBox5.SelectedIndex = -1;
|
||||
EmojisListBox6.SelectedIndex = -1;
|
||||
EmojisListBox7.SelectedIndex = -1;
|
||||
|
||||
ChatEmojiView.Activate();
|
||||
}
|
||||
|
||||
private void ChatEmojisView_OnFocusableChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (ChatEmojiView.Visibility == Visibility.Visible)
|
||||
{
|
||||
ChatEmojiView.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class DirectoryListing
|
||||
{
|
||||
public DirectoryListing(String pfad,String emojiCode)
|
||||
{
|
||||
Pfad = pfad;
|
||||
EmojiCode = emojiCode;
|
||||
}
|
||||
|
||||
public string Pfad { get; set; }
|
||||
public string EmojiCode { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
<Window x:Class="BeWo.View.ChatProgressBarView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:view="clr-namespace:BeWo.View"
|
||||
Height="100" Width="300" WindowStartupLocation="CenterScreen"
|
||||
ResizeMode="NoResize"
|
||||
>
|
||||
<Grid Margin="20">
|
||||
<ProgressBar x:Name="progressBar" Minimum="0" Maximum="100" />
|
||||
<TextBlock Text="{Binding ElementName=progressBar, Path=Value, StringFormat={}Bitte warten... {0:0}%}" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace BeWo.View
|
||||
{
|
||||
public partial class ChatProgressBarView
|
||||
{
|
||||
|
||||
ChatView chatView;
|
||||
BackgroundWorker worker = null;
|
||||
int ubergabe = 0;
|
||||
|
||||
public ChatProgressBarView(String name)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
Title = name;
|
||||
}
|
||||
}
|
||||
}
|
||||
20
BeWo/View/ChatService.xaml
Normal file
20
BeWo/View/ChatService.xaml
Normal file
@@ -0,0 +1,20 @@
|
||||
<Window x:Class="BeWo.View.ChatService"
|
||||
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:BeWo.View"
|
||||
xmlns:cc="clr-namespace:ChatController;assembly=ChatController"
|
||||
mc:Ignorable="d" x:Name="ServiceChat"
|
||||
Title="ChatService" Height="700" Width="900"
|
||||
WindowStartupLocation="CenterScreen" WindowStyle="None"
|
||||
AllowsTransparency="True" Background="Transparent" >
|
||||
|
||||
<Grid>
|
||||
<GroupBox Header="Bewoplaner Chat" x:Name="rootGroupBox" Style="{DynamicResource MainContentGroupBoxWithoutMaximizeBtnStyle}" MouseLeftButtonDown="RootGroupBox_OnMouseLeftButtonDown">
|
||||
|
||||
<cc:ChatMainControl x:Name="ChatMainControl" OnEmojii="ChatMainControl_OnOnEmoji" ></cc:ChatMainControl>
|
||||
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
</Window>
|
||||
136
BeWo/View/ChatService.xaml.cs
Normal file
136
BeWo/View/ChatService.xaml.cs
Normal file
@@ -0,0 +1,136 @@
|
||||
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.Shapes;
|
||||
using BeWo.ServiceProxy;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using ChatController.ChatKlassen;
|
||||
using ChatController.Klassen;
|
||||
|
||||
namespace BeWo.View
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für ChatService.xaml
|
||||
/// </summary>
|
||||
public partial class ChatService : Window
|
||||
{
|
||||
|
||||
private ChatEmojiView _emojiView;
|
||||
|
||||
public ChatService(ChatDatenUebergabe chatDaten)
|
||||
{
|
||||
InitializeComponent();
|
||||
CloseWindow();
|
||||
|
||||
ChatMainControl.InitMitChatdaten(chatDaten);
|
||||
ChatMainControl.AddContextMenu("In Dokumentation übernehmen", ChatMainControl_OnClickContextMenuItem);
|
||||
}
|
||||
|
||||
private void RootGroupBox_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
DragMove();
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
|
||||
private void CloseWindow()
|
||||
{
|
||||
CommandBindings.Add(new CommandBinding(ApplicationCommands.Close, (s, e) =>
|
||||
{
|
||||
//Close();
|
||||
Visibility = Visibility.Hidden;
|
||||
|
||||
if (_emojiView != null)
|
||||
{
|
||||
_emojiView.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
}));
|
||||
}
|
||||
|
||||
private void ChatMainControl_OnOnEmoji(Button emojiButton)
|
||||
{
|
||||
if (_emojiView == null)
|
||||
{
|
||||
_emojiView = new ChatEmojiView(ChatMainControl);
|
||||
|
||||
var x = emojiButton.PointToScreen(new Point(0, 0));
|
||||
PresentationSource source = PresentationSource.FromVisual(emojiButton);
|
||||
|
||||
_emojiView.Top = (x.Y / source.CompositionTarget.TransformToDevice.M22) - _emojiView.Height - 5;
|
||||
_emojiView.Left = x.X / source.CompositionTarget.TransformToDevice.M11;
|
||||
|
||||
|
||||
_emojiView.Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_emojiView.Visibility == Visibility.Visible)
|
||||
{
|
||||
_emojiView.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
else
|
||||
{
|
||||
_emojiView.Visibility = Visibility.Visible;
|
||||
|
||||
var x = emojiButton.PointToScreen(new Point(0, 0));
|
||||
PresentationSource source = PresentationSource.FromVisual(emojiButton);
|
||||
|
||||
_emojiView.Top = (x.Y / source.CompositionTarget.TransformToDevice.M22) - _emojiView.Height - 5;
|
||||
_emojiView.Left = x.X / source.CompositionTarget.TransformToDevice.M11;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ChatMainControl_OnClickContextMenuItem(String menuItem)
|
||||
{
|
||||
var aktuellerKontakt = ChatMainControl.GetAktuellenKontakt();
|
||||
|
||||
if (aktuellerKontakt != null)
|
||||
{
|
||||
var itemListe = ChatMainControl.GetSelectedMessages();
|
||||
|
||||
if (itemListe != null)
|
||||
{
|
||||
List<long> sdf = new List<long>();
|
||||
|
||||
//hier die Customer Oid hinzufügen
|
||||
sdf.Add(1);
|
||||
|
||||
var compactCustomerlist = ServiceFacade.DoCustomerServiceSync(s => s.GetCompactCustomersById(sdf));
|
||||
|
||||
CompactCustomerDC compactCustomer = null;
|
||||
|
||||
foreach (var cc in compactCustomerlist)
|
||||
{
|
||||
compactCustomer = cc;
|
||||
}
|
||||
|
||||
ChatDokumentationsView newView = new ChatDokumentationsView(itemListe,
|
||||
BeWoApp.LoggedOnUser.Employee.PersonOid, compactCustomer);
|
||||
|
||||
newView.ShowDialog();
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Bitte Nachrichten auswählen");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Dokumentiert werden kann nur im Chat der Klienten");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,341 +0,0 @@
|
||||
<Window x:Class="BeWo.View.ChatView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:view="clr-namespace:BeWo.View"
|
||||
Title="Chat View" WindowStartupLocation="CenterScreen" WindowStyle="None"
|
||||
AllowsTransparency="True"
|
||||
Background="Transparent"
|
||||
ResizeMode="CanResizeWithGrip"
|
||||
x:Name="ChatViewName"
|
||||
StateChanged="ChatView_OnStateChanged"
|
||||
>
|
||||
|
||||
<GroupBox Header="Chat" x:Name="rootGroupBox" Style="{DynamicResource MainContentGroupBoxWithoutMaximizeBtnStyle}" MouseLeftButtonDown="RootGroupBox_OnMouseLeftButtonDown">
|
||||
<Grid Background="{StaticResource ObjectEditBackgroundBrush}" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2.12*"/>
|
||||
<ColumnDefinition Width="7.88*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="10*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
<!-- ########################## Linkes panel ########################### -->
|
||||
<Grid Grid.Column="0" Grid.Row="0" >
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.80*"/>
|
||||
<RowDefinition Height="9.20*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="0" >
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="5.25*"/>
|
||||
<RowDefinition Height="4.75*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Left" >
|
||||
<Label Content="Mein Status: " MaxWidth="80"/>
|
||||
<RadioButton GroupName="status" x:Name="RadioButtonOnline" BorderBrush="Green" MaxWidth="15" ToolTip="Online" VerticalAlignment="Center" Checked="ComboBox_SelectionChanged" Foreground="Green"/>
|
||||
<RadioButton GroupName="status" x:Name="RadioButtonOffline" BorderBrush="Red" MaxWidth="15" ToolTip="Offline" VerticalAlignment="Center" Checked="ComboBox_SelectionChanged" Foreground="Red"/>
|
||||
<RadioButton GroupName="status" x:Name="RadioButtonBeschaeftigt" BorderBrush="DarkOrange" MaxWidth="15" ToolTip="Beschäftigt" VerticalAlignment="Center" Checked="ComboBox_SelectionChanged" Foreground="DarkOrange"/>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
<StackPanel Grid.Row="0" MaxWidth="20" HorizontalAlignment="Right" Orientation="Horizontal" VerticalAlignment="Bottom" >
|
||||
<Button Style="{DynamicResource IconButtonStyle}" x:Name="ButtonSortLabel" Background="Transparent" BorderBrush="Transparent" HorizontalAlignment="Right" VerticalAlignment="Center" Width="20" Height="20" Click="ButtonSortLabel_OnClick" >
|
||||
<Image x:Name="SortLabel" ToolTip="Sortierung ändern" Source="pack://application:,,,/Ressources/icons/unsortiert.png" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<TextBox x:Name="Suche" Grid.Column="0" Margin="3,1,3,3" MinHeight="25" VerticalContentAlignment="Center" KeyDown="Suche_OnKeyDown" Grid.Row="1" TextChanged="Suche_OnTextChanged" LostFocus="Suche_OnLostFocus" VerticalAlignment="Bottom" ToolTip="Suchen Sie hier nach einem User in der Liste">
|
||||
<TextBox.Resources>
|
||||
<Style TargetType="{x:Type Border}">
|
||||
<Setter Property="CornerRadius" Value="3"/>
|
||||
<Setter Property="Padding" Value="5,0,0,0" />
|
||||
</Style>
|
||||
</TextBox.Resources>
|
||||
</TextBox>
|
||||
</Grid>
|
||||
|
||||
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="1" >
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
|
||||
</Grid.ColumnDefinitions>
|
||||
<!--###################################### Liste aller User mit Chat Berechtigung ###################################################### -->
|
||||
<ListView x:Name="Clientlist" HorizontalAlignment="Stretch" Grid.Row="0" Grid.Column="0" VerticalAlignment="Stretch" Margin="3" SelectionChanged="ListBoxSelectedIndexChanged" Style="{DynamicResource ResourceKey=styleListBox}" ItemTemplate="{DynamicResource DataTemplate1}" >
|
||||
<ListView.Resources>
|
||||
<DataTemplate x:Key="DataTemplate1">
|
||||
<Grid Margin="7,0,0,0" x:Name="GridMargin">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="35"/>
|
||||
<ColumnDefinition Width="7"/>
|
||||
<ColumnDefinition Width="100"/>
|
||||
<ColumnDefinition Width="25"/>
|
||||
<ColumnDefinition Width="12"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Border BorderThickness="0.25" CornerRadius="3" Grid.RowSpan="2" Grid.ColumnSpan="5" Background="White" >
|
||||
<Border.BorderBrush>
|
||||
<SolidColorBrush Color="Black" />
|
||||
</Border.BorderBrush>
|
||||
</Border>
|
||||
|
||||
<Ellipse Width='30' Height='30' RenderOptions.BitmapScalingMode="HighQuality">
|
||||
<Ellipse.Fill>
|
||||
<ImageBrush ImageSource='{Binding Image}' Stretch='Fill' RenderOptions.BitmapScalingMode="HighQuality" />
|
||||
</Ellipse.Fill>
|
||||
|
||||
</Ellipse>
|
||||
|
||||
<StackPanel Grid.Column="1" Height="30" >
|
||||
<Ellipse Width='7' Height='7' Fill="{Binding Path=Color}" Margin="-23,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center" Stretch="Fill" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Column="2" Margin="5" >
|
||||
<StackPanel Orientation="Horizontal" TextBlock.FontWeight="Bold" >
|
||||
<TextBlock Text="{Binding Path=Name, FallbackValue=FirstName}" />
|
||||
</StackPanel>
|
||||
<!-- <TextBlock Text="{Binding Path=StatusTyp, FallbackValue=Message}" />-->
|
||||
</StackPanel>
|
||||
|
||||
<!--Für die anzeige der anzahl ungelesener Nachrichten Height="30"-->
|
||||
<StackPanel Grid.Column="3" Margin="5">
|
||||
<TextBlock Text="{Binding Path=Receivems}" FontWeight="Bold" Foreground="Black" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Column="4" Margin="7,0,0,0">
|
||||
<Rectangle Fill="{Binding Path=ColorType}" Stretch="Fill" Height="30" Width="2" />
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListView.Resources>
|
||||
|
||||
<!--Uberschríft Mitarbeiter, ItemCount-->
|
||||
<ListView.GroupStyle>
|
||||
<GroupStyle>
|
||||
<GroupStyle.ContainerStyle>
|
||||
<Style TargetType="{x:Type GroupItem}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Expander IsExpanded="True">
|
||||
<Expander.Header>
|
||||
<StackPanel Orientation="Horizontal" >
|
||||
<TextBlock Text="{Binding Name}" FontWeight="Bold" Foreground="Black" FontSize="18" VerticalAlignment="Bottom" Width="148" />
|
||||
<TextBlock Text="{Binding ItemCount}" FontSize="12" Foreground="Black" FontWeight="Bold" Margin="10,0,0,1" VerticalAlignment="Bottom" HorizontalAlignment="Right" />
|
||||
</StackPanel>
|
||||
</Expander.Header>
|
||||
<ItemsPresenter />
|
||||
</Expander>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</GroupStyle.ContainerStyle>
|
||||
</GroupStyle>
|
||||
</ListView.GroupStyle>
|
||||
|
||||
<!-- <ListView.ItemContainerStyle>
|
||||
<Style TargetType="ListViewItem">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="White" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ListView.ItemContainerStyle> -->
|
||||
</ListView>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
|
||||
|
||||
<!-- ####################### Rechtes Panel ################################-->
|
||||
<Grid Grid.Column="1" Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.80*"/>
|
||||
<RowDefinition Height="8.45*" />
|
||||
<RowDefinition Height="0.75*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
<ListBox x:Name="AktChatUser" HorizontalAlignment="Left" Grid.Row="0" Background="Transparent" BorderBrush="Transparent" VerticalAlignment="Bottom" ItemTemplate="{DynamicResource DataTemplate2}" MouseDoubleClick="AktChatUser_OnMouseDoubleClick" >
|
||||
<ListBox.Resources>
|
||||
<DataTemplate x:Key="DataTemplate2">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="50"/>
|
||||
<ColumnDefinition Width="100"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="10*" />
|
||||
</Grid.RowDefinitions>
|
||||
<!-- <Border Margin="5" BorderBrush="DarkGray" BorderThickness="1"> -->
|
||||
<Ellipse Width='30' Height='30' VerticalAlignment="Center" RenderOptions.BitmapScalingMode="HighQuality">
|
||||
<Ellipse.Fill >
|
||||
<ImageBrush ImageSource='{Binding Image}' Stretch='Fill'/>
|
||||
</Ellipse.Fill>
|
||||
</Ellipse>
|
||||
<!-- <Image Source="{Binding Path=Image}" Stretch="Fill" Width="30" Height="30" />-->
|
||||
<!-- </Border> -->
|
||||
<StackPanel Grid.Column="1" Margin="5" VerticalAlignment="Center">
|
||||
<StackPanel Orientation="Horizontal" TextBlock.FontWeight="Bold" >
|
||||
|
||||
<TextBlock Text="{Binding Path=Name, FallbackValue=FirstName}" />
|
||||
</StackPanel>
|
||||
<!-- <TextBlock Text="{Binding Path=StatusTyp, FallbackValue=Message}" />-->
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.Resources>
|
||||
</ListBox>
|
||||
|
||||
<Button Style="{DynamicResource IconButtonStyle}" x:Name="ButtonAlarmLabel" Grid.Row="0" Background="Transparent" BorderBrush="Transparent" HorizontalAlignment="Right" Height="20" Margin="0,-31,40,0" VerticalAlignment="Top" Width="20" Visibility="Collapsed" >
|
||||
<Image x:Name="AlarmLabel" ToolTip="Zurzeit nicht Verbunden" Source="" />
|
||||
</Button>
|
||||
|
||||
<!--####################### Media Gedöns ###############################################################-->
|
||||
<Grid Grid.Row="0" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="35"/>
|
||||
<ColumnDefinition Width="125"/>
|
||||
<ColumnDefinition Width="55"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Grid.Column="0" PreviewMouseDown="Sound_OnPreviewMouseDown" PreviewMouseUp="Sound_OnPreviewMouseUp" HorizontalAlignment="Center" Margin="1" Width="30" Visibility="Collapsed">
|
||||
<Image x:Name="SmileySound" ToolTip="Sound Aufnehmen und verschicken" Source="/BeWoPlaner;component/Ressources/Icons/glucklicher.png" Stretch="Uniform" VerticalAlignment="Center" HorizontalAlignment="Center" RenderOptions.BitmapScalingMode="HighQuality" />
|
||||
</Button>
|
||||
<Button Content="Media" Grid.Column="2" Click="MediaBase_OnClick" HorizontalAlignment="Center" Width="50" Margin="1" />
|
||||
<Button Content="Video Chatten" Grid.Column="1" Click="ButtonVideoChat_OnClick" HorizontalAlignment="Center" Width="120" Margin="1" Visibility="Collapsed"/>
|
||||
</Grid>
|
||||
|
||||
|
||||
<ListBox x:Name="Chat" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="3" Grid.Row="1" VirtualizingStackPanel.IsVirtualizing="True" VirtualizingStackPanel.VirtualizationMode="Recycling" SelectionMode="Extended" MouseRightButtonDown="OnRightClickEvent" >
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="HorizontalAlignment" Value="{Binding Posi}" />
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.Resources>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="CornerRadius" Value="3" />
|
||||
<Setter Property="Padding" Value="10,0,0,0" />
|
||||
</Style>
|
||||
</ListBox.Resources>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
|
||||
<StackPanel>
|
||||
|
||||
<!--Lade Weitere Nachrichten anzeige -->
|
||||
<StackPanel Visibility="{Binding LoadNextVisibility}" >
|
||||
<Image ToolTip="Weitere Nachrichten Laden" Source="/BeWoPlaner;component/Ressources/Icons/WeitereNachrichtLaden.png" Width="25" Height="25" Stretch="Uniform" RenderOptions.BitmapScalingMode="HighQuality" VerticalAlignment="Center" Tag="{Binding LoadObject}" HorizontalAlignment="Center" MouseDown="WeitereNachrichten_OnMouse" />
|
||||
</StackPanel>
|
||||
|
||||
|
||||
<Border BorderBrush="{Binding ChatColor}" BorderThickness="1,1,1,1" CornerRadius="8,8,8,8" Background="{Binding ChatColor}" Visibility="{Binding MainVisibility}" >
|
||||
<DockPanel MinHeight="15" Margin="5" LastChildFill="True" Background="{Binding ChatColor}" Visibility="{Binding MainVisibility}" >
|
||||
|
||||
<StackPanel DockPanel.Dock="Bottom" Visibility="{Binding ChatVisibility}" >
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding UserMessage}" MinWidth="0" MaxWidth="500" TextWrapping="Wrap" />
|
||||
</StackPanel>
|
||||
|
||||
|
||||
<!--Herunterlade bereich wird nicht genutzt weg damit ?-->
|
||||
<DockPanel DockPanel.Dock="Bottom" Visibility="{Binding Herunterladen}" >
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="25" />
|
||||
<RowDefinition Height="25" />
|
||||
</Grid.RowDefinitions>
|
||||
<!-- Name Der Datei -->
|
||||
<TextBlock Text="{Binding UserMessage}" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
<!-- Herunterlade Button -->
|
||||
<Button Content="Herunterladen" Grid.Row="1" ToolTip="Datei Herunterladen" HorizontalAlignment="Center" VerticalAlignment="Center" Width="125" Height="25" Tag="{Binding Herunterladbares}" Click="DatenRunterladen_OnClick" />
|
||||
</Grid>
|
||||
</DockPanel>
|
||||
<!-- #++++++++++++++++++++++++++++++++++++++++++++++# -->
|
||||
|
||||
<!-- Bild bereich-->
|
||||
<DockPanel DockPanel.Dock="Bottom" Visibility="{Binding PictureVisibility}" >
|
||||
<Image Stretch="Uniform" MaxHeight="200" MaxWidth="300" Source="{Binding ImageSources}" RenderOptions.BitmapScalingMode="HighQuality" />
|
||||
</DockPanel>
|
||||
|
||||
<!--Dokument bereich -->
|
||||
<DockPanel DockPanel.Dock="Bottom" Visibility="{Binding DokumentVisibility}" >
|
||||
<Button HorizontalAlignment="Center" VerticalAlignment="Center" Click="OpenDokument_OnClick" Height="25" Width="25" Tag="{Binding Dokpfad}" >
|
||||
<Image ToolTip="Dokument öffnen" Source="/BeWoPlaner;component/Ressources/Icons/ClipboardDisabled.png" Stretch="Uniform" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
</Button>
|
||||
<TextBlock Margin="2,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding UserMessage}"/>
|
||||
</DockPanel>
|
||||
|
||||
<StackPanel DockPanel.Dock="Left" Margin="0,0,0,5" >
|
||||
<TextBlock Text="{Binding Username}" FontWeight="Bold" MaxWidth="150" HorizontalAlignment="Left" TextAlignment="Left" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel DockPanel.Dock="Right" Margin="5,0,0,5" >
|
||||
<TextBlock Text="{Binding SendTime}" MaxWidth="350" HorizontalAlignment="Right" TextAlignment="Right" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
|
||||
<Grid Grid.Row="2" Margin="3,0,3,3" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="8.5*"/>
|
||||
<ColumnDefinition Width=".5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="10*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
<TextBox x:Name="Chatbox" HorizontalAlignment="Stretch" Grid.Column="0" TextWrapping="Wrap" Text="Nachricht schreiben" VerticalScrollBarVisibility="Auto" MaxLines="5" MaxHeight="70"
|
||||
VerticalContentAlignment="Center" MinHeight="25" ToolTip="Schreiben Sie hier eine Nachricht hinein" KeyDown="OnKeyDownHandler" GotFocus="OnFocus" Foreground="DarkGray" VerticalAlignment="Bottom" >
|
||||
<TextBox.Resources>
|
||||
<Style TargetType="{x:Type Border}">
|
||||
<Setter Property="CornerRadius" Value="3"/>
|
||||
<Setter Property="Padding" Value="10,0,0,0" />
|
||||
</Style>
|
||||
</TextBox.Resources>
|
||||
</TextBox>
|
||||
|
||||
<Button HorizontalAlignment="Stretch" x:Name="EmojiButton" Margin="2,0,0,0" Grid.Column="1" VerticalAlignment="Bottom" Click="SmileyButton_OnClick">
|
||||
<Image x:Name="Smiley" ToolTip="Smiley einfügen" Source="/BeWoPlaner;component/Ressources/Icons/glucklicher.png" Stretch="Uniform" VerticalAlignment="Center" HorizontalAlignment="Center" RenderOptions.BitmapScalingMode="HighQuality" />
|
||||
</Button>
|
||||
|
||||
<Button x:Name="SendButton" Content="Senden" HorizontalAlignment="Stretch" Margin="2,0,0,0" Grid.Column="2" VerticalAlignment="Bottom" Click="SendButton_Click" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</Window>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -216,8 +216,8 @@
|
||||
</TextBlock>
|
||||
|
||||
<!-- ########################################## Achtung Chat Verlinkung ########################################################################################### -->
|
||||
<TextBlock x:Name="BewoChat" VerticalAlignment="Center" Foreground="{DynamicResource MainGroupBoxForegroundBrush}" Margin="5,3,3,3">
|
||||
<Hyperlink RequestNavigate="ChatLinkOnRequestNavigate" NavigateUri="#" Foreground="{DynamicResource MainGroupBoxForegroundBrush}">
|
||||
<TextBlock x:Name="BewoChat" VerticalAlignment="Center" Foreground="{DynamicResource MainGroupBoxForegroundBrush}" Margin="5,3,3,3" >
|
||||
<Hyperlink RequestNavigate="HyperlinkChat_OnRequestNavigate" NavigateUri="#" Foreground="{DynamicResource MainGroupBoxForegroundBrush}" >
|
||||
<TextBlock Text="BeWo Chat" HorizontalAlignment="Center" Foreground="{DynamicResource MainGroupBoxForegroundBrush}" FontSize="12" VerticalAlignment="Center" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
|
||||
@@ -41,11 +41,13 @@ using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Forms;
|
||||
using BS.Shared.Core;
|
||||
using ChatController.HauptKlassen;
|
||||
using Newtonsoft.Json;
|
||||
using Brushes = System.Windows.Media.Brushes;
|
||||
using Button = System.Windows.Controls.Button;
|
||||
using Color = System.Windows.Media.Color;
|
||||
using Control = System.Windows.Controls.Control;
|
||||
using Cursors = System.Windows.Input.Cursors;
|
||||
using Image = System.Windows.Controls.Image;
|
||||
using ListBox = System.Windows.Controls.ListBox;
|
||||
using MessageBox = System.Windows.MessageBox;
|
||||
@@ -60,38 +62,10 @@ namespace BeWo.View
|
||||
public partial class HomeDragPanelView : BeWoView
|
||||
{
|
||||
private List<TaskDC> _AllTasks;
|
||||
|
||||
|
||||
//################# Variablen der Serveranwendung #################
|
||||
protected ListBox Clientlist = new ListBox();
|
||||
protected TextBox ServerStats = new TextBox();
|
||||
protected TextBox chat = new TextBox();
|
||||
|
||||
protected MiniChatView miniChatView = null;
|
||||
public ChatView chatView = null;
|
||||
|
||||
Dictionary<long, MiniChatView> miniChatViewList = new Dictionary<long, MiniChatView>();
|
||||
Dictionary<long, MiniChatView> miniChatTeamViewList = new Dictionary<long, MiniChatView>();
|
||||
|
||||
|
||||
Dictionary<long, Packet> SaveAnkommendeServerMeldungen = new Dictionary<long, Packet>();
|
||||
protected long zaehler = 1;
|
||||
|
||||
|
||||
|
||||
//Neue Version : Version 0.80
|
||||
public TcpClient clientSocket = new TcpClient();
|
||||
NetworkStream serverStream;
|
||||
protected Thread asx;
|
||||
protected bool isReconnect = false;
|
||||
Packet messagePaket;
|
||||
|
||||
protected bool threadstop = false;
|
||||
|
||||
//chat berechtigung
|
||||
protected bool berechtigt = false;
|
||||
|
||||
//################################################################
|
||||
|
||||
|
||||
//int staerke
|
||||
public HomeDragPanelView()
|
||||
{
|
||||
@@ -147,12 +121,13 @@ namespace BeWo.View
|
||||
|
||||
if (berechtigt)
|
||||
{
|
||||
asx = new Thread(ConnectWithServer);
|
||||
asx.Start();
|
||||
//asx = new Thread(ConnectWithServer);
|
||||
//asx.Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
BewoChat.Visibility = Visibility.Hidden;
|
||||
|
||||
// BewoChat.Visibility = Visibility.Visible;//Hidden
|
||||
}
|
||||
|
||||
PruefePasswortStaerke();
|
||||
@@ -1232,71 +1207,7 @@ namespace BeWo.View
|
||||
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo((sender as System.Windows.Documents.Hyperlink).NavigateUri.ToString()));
|
||||
}
|
||||
|
||||
private void ChatLinkOnRequestNavigate(object sender, RequestNavigateEventArgs e)
|
||||
{
|
||||
if (chatView == null)
|
||||
{
|
||||
chatView = new ChatView("BeWo Chat", chat.Text, clientSocket);
|
||||
|
||||
if (clientSocket.Connected)
|
||||
{
|
||||
Dispatcher.Invoke(
|
||||
DispatcherPriority.Normal,
|
||||
(ThreadStart) delegate
|
||||
{
|
||||
chatView.SetServerStats("Verbunden");
|
||||
|
||||
chatView.RadioButtonOnline.IsChecked = true;
|
||||
chatView.ButtonAlarmLabel.Visibility = Visibility.Collapsed;
|
||||
});
|
||||
|
||||
if (SaveAnkommendeServerMeldungen.Count > 0)
|
||||
{
|
||||
foreach (var dateiverarbeitung in SaveAnkommendeServerMeldungen)
|
||||
{
|
||||
ChatBuilder(dateiverarbeitung.Value);
|
||||
}
|
||||
|
||||
SaveAnkommendeServerMeldungen.Clear();
|
||||
zaehler = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Dispatcher.Invoke(
|
||||
DispatcherPriority.Normal,
|
||||
(ThreadStart) delegate
|
||||
{
|
||||
chatView.SetServerStats("Zurzeit nicht Verbunden");
|
||||
chatView.RadioButtonOffline.IsChecked = true;
|
||||
});
|
||||
}
|
||||
|
||||
Dispatcher.Invoke(
|
||||
DispatcherPriority.Normal,
|
||||
(ThreadStart)delegate
|
||||
{
|
||||
//Lade alle Ungelesenen Nachrichten
|
||||
chatView.PruefeInDbObNeueNachrichtenVerfügbar();
|
||||
});
|
||||
|
||||
chatView.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(chatView.Visibility == Visibility.Collapsed){
|
||||
chatView.Visibility = Visibility.Visible;
|
||||
chatView.AktualisiereChatKontakt();
|
||||
chatView.Activate();
|
||||
}
|
||||
else
|
||||
{
|
||||
chatView.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void BtnCreateNewsItem_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
TeamNewsItemVM teamVm = ((Button) sender).Tag as TeamNewsItemVM;
|
||||
@@ -1387,620 +1298,39 @@ namespace BeWo.View
|
||||
}
|
||||
|
||||
//####### Connection with Server ###########
|
||||
private void ConnectWithServer()
|
||||
{
|
||||
try
|
||||
{
|
||||
var ipAdresse = "192.168.1.109"; //3 |9 || 192.168.1.103"app4.bewoplaner.de"
|
||||
var port = 5000;
|
||||
var uri = BeWoApp.SiteOfOrigin;
|
||||
|
||||
clientSocket.Connect(uri.Host, port);
|
||||
|
||||
Dispatcher.Invoke(
|
||||
DispatcherPriority.Normal,
|
||||
(ThreadStart) delegate
|
||||
{
|
||||
if (chatView != null)
|
||||
{
|
||||
chatView.SetServerStats("Verbunden");
|
||||
|
||||
chatView.ButtonAlarmLabel.Visibility = Visibility.Collapsed;
|
||||
|
||||
if (isReconnect)
|
||||
{
|
||||
// MessageBox.Show("Die Verbindung konnte wieder Hergestellt werden. ", "", MessageBoxButton.OK);
|
||||
}
|
||||
|
||||
isReconnect = false;
|
||||
}
|
||||
});
|
||||
|
||||
Thread prf = new Thread(PruefeServerDisconection);
|
||||
prf.Start();
|
||||
|
||||
SendAnmeldungsMessagetoServer(clientSocket);
|
||||
|
||||
Thread getMs = new Thread(WaitForMsFromServer);
|
||||
getMs.Start();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
//if (!isReconnect){
|
||||
// SystemSounds.Hand.Play();
|
||||
// MessageBox.Show("Verbindung zum Chat-Server konnte nicht aufgebaut werden.", "Fehler: 2010 ",
|
||||
// MessageBoxButton.OK);
|
||||
//}
|
||||
|
||||
if(!threadstop){
|
||||
Dispatcher.Invoke(
|
||||
DispatcherPriority.Normal,
|
||||
(ThreadStart) delegate
|
||||
{
|
||||
if (chatView != null)
|
||||
{
|
||||
chatView.RadioButtonOffline.IsChecked = true;
|
||||
chatView.setConnectionLostIcon();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Thread.Sleep(6000);
|
||||
|
||||
ReConnectAfterLoseConnection();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void SendAnmeldungsMessagetoServer(TcpClient s)
|
||||
{
|
||||
try
|
||||
{
|
||||
var serverStream = s.GetStream();
|
||||
|
||||
var macAddress = NetworkInterface.GetAllNetworkInterfaces().Where(inc => inc.OperationalStatus == OperationalStatus.Up).Select(inc => inc.GetPhysicalAddress().ToString()).FirstOrDefault();
|
||||
|
||||
var formattedMacAddress = "";
|
||||
if(macAddress != null)
|
||||
{
|
||||
for(var i = 0; i < macAddress.Length; i++)
|
||||
{
|
||||
formattedMacAddress += macAddress[i];
|
||||
if((i + 1) % 2 == 0 && i < macAddress.Length - 1)
|
||||
{
|
||||
formattedMacAddress += ":";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var a = new Packet();
|
||||
|
||||
|
||||
var guid = Guid.NewGuid();
|
||||
var outStream = a.GetDataStream(BeWoApp.LoggedOnUser.Employee.PersonOid, 0, BeWoApp.LoggedOnUser.LoginName, formattedMacAddress, DataIdentifier.Login, BeWoApp.Tenant, false, true, guid.ToString(), 0, null);
|
||||
|
||||
serverStream.Write(outStream, 0, outStream.Length);
|
||||
serverStream.Flush();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MessageBox.Show("Anmeldung am Server zurzeit nicht möglich.", "Fehler: 2020 ", MessageBoxButton.OK);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void WaitForMsFromServer()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (clientSocket != null)
|
||||
{
|
||||
serverStream = clientSocket.GetStream();
|
||||
|
||||
byte[] inStream = new byte[31457280]; //<--- 30 MB
|
||||
|
||||
var bits = serverStream.Read(inStream, 0, inStream.Length); // Int32
|
||||
|
||||
string data = Encoding.UTF8.GetString(inStream, 0, bits);
|
||||
|
||||
ErhalteDatenFromString(data);
|
||||
|
||||
if (chatView == null)
|
||||
{
|
||||
SaveAnkommendeServerMeldungen.Add(zaehler, messagePaket);
|
||||
zaehler++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SaveAnkommendeServerMeldungen.Count > 0)
|
||||
{
|
||||
foreach (var dateiverarbeitung in SaveAnkommendeServerMeldungen)
|
||||
{
|
||||
ChatBuilder(dateiverarbeitung.Value);
|
||||
}
|
||||
|
||||
SaveAnkommendeServerMeldungen.Clear();
|
||||
zaehler = 1;
|
||||
WaitForMsFromServer();
|
||||
}
|
||||
else
|
||||
{
|
||||
ChatBuilder(messagePaket);
|
||||
zaehler = 1;
|
||||
WaitForMsFromServer();
|
||||
}
|
||||
|
||||
}
|
||||
WaitForMsFromServer();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
if (clientSocket.Connected)
|
||||
MessageBox.Show("Beim Erhalten von Nachrichten ist ein Fehler aufgetreten.", "Fehler: 2030 ",
|
||||
MessageBoxButton.OK);
|
||||
}
|
||||
}
|
||||
|
||||
public void ChatBuilder(Packet paket)
|
||||
{
|
||||
try
|
||||
{
|
||||
long persoid = paket.SenderPersonOid;
|
||||
|
||||
if (persoid != 0)
|
||||
{
|
||||
|
||||
List<long> x = new List<long>();
|
||||
x.Add(paket.SenderPersonOid);
|
||||
|
||||
var person = ServiceFacade.DoCustomerServiceSync(s => s.GetPersonsById(x));
|
||||
|
||||
switch (paket.DataIdentifier)
|
||||
{
|
||||
case DataIdentifier.StatusNotificationLoginBroadcast:
|
||||
|
||||
String[] oids = paket.ChatMessage.Split(',');
|
||||
|
||||
foreach (var oid in oids)
|
||||
{
|
||||
int result = Convert.ToInt32(oid);
|
||||
if (!chatView.CompareWithListItem(result))
|
||||
{
|
||||
ErstelleChatViews(result);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case DataIdentifier.StatusNotificationLogin:
|
||||
|
||||
if (!chatView.CompareWithListItem(persoid))
|
||||
{
|
||||
ErstelleChatViews(persoid);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case DataIdentifier.StatusNotificationBeschäftigt:
|
||||
|
||||
if (chatView.CompareWithListItem(persoid))
|
||||
{
|
||||
AktualisiereStatus(persoid, paket.DataIdentifier);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case DataIdentifier.StatusNotificationOnline:
|
||||
|
||||
if (chatView.CompareWithListItem(persoid))
|
||||
{
|
||||
AktualisiereStatus(persoid, paket.DataIdentifier);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case DataIdentifier.StatusNotificationOffline:
|
||||
|
||||
if (chatView.CompareWithListItem(persoid))
|
||||
{
|
||||
AktualisiereStatus(persoid, paket.DataIdentifier);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case DataIdentifier.StatusNotificationLogout:
|
||||
|
||||
DeleteLoggedOffUsers(person[0].FirstName + " " + person[0].LastName, persoid);
|
||||
|
||||
break;
|
||||
|
||||
case DataIdentifier.Message:
|
||||
|
||||
UebergebeNachricht(paket.ChatMessage, person[0].FirstName, persoid,paket.MediaTyp,paket.MediaDatei,paket.MessageId);
|
||||
|
||||
break;
|
||||
|
||||
case DataIdentifier.Team:
|
||||
|
||||
UebergebeTeamNachricht(paket.ChatMessage, person[0].FirstName + " " + person[0].LastName,
|
||||
paket.RecipientPersonOid,paket.MediaTyp,paket.MediaDatei,paket.MessageId);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception edf)
|
||||
{
|
||||
MessageBox.Show("Beim Sortieren von Nachrichten ist ein Fehler aufgetreten. " + edf.Message + "\n" + edf.StackTrace , "Fehler",
|
||||
MessageBoxButton.OK);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void ErhalteDatenFromString(String message)
|
||||
{
|
||||
try
|
||||
{
|
||||
messagePaket = new Packet();
|
||||
|
||||
messagePaket.GetData(message);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MessageBox.Show("Beim Sortieren von Nachrichten ist ein Fehler aufgetreten.", "Fehler: 2040 ",
|
||||
MessageBoxButton.OK);
|
||||
}
|
||||
}
|
||||
|
||||
public void AktualisiereStatus(long oid, DataIdentifier type)
|
||||
{
|
||||
try
|
||||
{
|
||||
chatView.SetUserBeschäftigt(oid, type);
|
||||
}
|
||||
catch (Exception edf)
|
||||
{
|
||||
MessageBox.Show("Beim Setzen des Statuses auf Beschäftigt ist ein Fehler aufgetreten.", "Fehler: 2130 ",
|
||||
MessageBoxButton.OK);
|
||||
}
|
||||
}
|
||||
|
||||
public void AktualisiereOnlineList(string name,long oid)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (chatView.CompareWithListItem(oid))
|
||||
{
|
||||
DeleteLoggedOffUsers(name,oid);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MessageBox.Show("Beim Aktualisieren der Online-Liste ist ein Fehler aufgetreten ", "Fehler: 2050 ", MessageBoxButton.OK);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void UebergebeNachricht(String text,String name, long personoid,int mediaart,byte[] media,string messageid)
|
||||
{
|
||||
try
|
||||
{
|
||||
Dispatcher.Invoke(
|
||||
DispatcherPriority.Normal,
|
||||
(ThreadStart) delegate
|
||||
{
|
||||
if (chatView.AktChatUser.Items.Count > 0)
|
||||
{
|
||||
KontaktlistBuilder curItem = (KontaktlistBuilder)chatView.AktChatUser.Items[0];
|
||||
|
||||
if (chatView.Visibility == Visibility.Visible && curItem.EmpfaengerOid.Equals(personoid))
|
||||
{
|
||||
chatView.SetText(text, name, personoid,mediaart,media,messageid);
|
||||
}
|
||||
else if (!curItem.EmpfaengerOid.Equals(personoid))
|
||||
{
|
||||
chatView.SetAnzahlErhalteneNachricht(personoid);
|
||||
}
|
||||
else if(chatView.Visibility == Visibility.Collapsed && curItem.EmpfaengerOid.Equals(personoid))
|
||||
{
|
||||
miniChatViewList[personoid].Visibility = Visibility.Visible;
|
||||
miniChatViewList[personoid].SetText(text, 1);
|
||||
miniChatViewList[personoid].setTimer();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
chatView.SetAnzahlErhalteneNachricht(personoid);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MessageBox.Show("Nachrichtenübermittlung fehlgeschlagen ", "Fehler: 2060 ", MessageBoxButton.OK);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void UebergebeTeamNachricht(String text, String name, long empfaenger, int mediaart, byte[] media, string messageid)
|
||||
{
|
||||
try
|
||||
{
|
||||
Dispatcher.Invoke(
|
||||
DispatcherPriority.Normal,
|
||||
(ThreadStart) delegate
|
||||
{
|
||||
if (chatView.AktChatUser.Items.Count > 0)
|
||||
{
|
||||
KontaktlistBuilder curItem = (KontaktlistBuilder) chatView.AktChatUser.Items[0];
|
||||
|
||||
if (curItem.TypeChat == ChatType.Team && curItem.EmpfaengerOid.Equals(empfaenger) && chatView.Visibility == Visibility.Visible)
|
||||
{
|
||||
var zugehorigkeit =
|
||||
ServiceFacade.DoEmployeeServiceSync(
|
||||
s => s.GetTeamOidsByEmployee(BeWoApp.LoggedOnUser.Employee.PersonOid));
|
||||
|
||||
foreach (var dc in zugehorigkeit)
|
||||
{
|
||||
if (dc.TeamOid == curItem.EmpfaengerOid)
|
||||
{
|
||||
chatView.SetText(text, name, dc.TeamOid, mediaart,media,messageid);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(!curItem.EmpfaengerOid.Equals(empfaenger))
|
||||
{
|
||||
var zugehorigkeit =
|
||||
ServiceFacade.DoEmployeeServiceSync(
|
||||
s => s.GetTeamOidsByEmployee(BeWoApp.LoggedOnUser.Employee.PersonOid));
|
||||
|
||||
foreach (var dc in zugehorigkeit)
|
||||
{
|
||||
if (dc.TeamOid == empfaenger)
|
||||
{
|
||||
chatView.SetTeamAnzahlErhalteneNachricht(dc.TeamOid, ChatType.Team);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (chatView.Visibility == Visibility.Collapsed && curItem.EmpfaengerOid.Equals(empfaenger) && curItem.TypeChat == ChatType.Team)
|
||||
{
|
||||
var zugehorigkeit =
|
||||
ServiceFacade.DoEmployeeServiceSync(
|
||||
s => s.GetTeamOidsByEmployee(BeWoApp.LoggedOnUser.Employee.PersonOid));
|
||||
|
||||
foreach (var dc in zugehorigkeit)
|
||||
{
|
||||
if (dc.TeamOid == empfaenger)
|
||||
{
|
||||
if (!miniChatTeamViewList.ContainsKey(empfaenger))
|
||||
{
|
||||
var miniChatView = new MiniChatView(dc.Name,"", "", chatView, empfaenger, ChatType.Team);
|
||||
|
||||
miniChatTeamViewList.Add(empfaenger,miniChatView);
|
||||
|
||||
miniChatTeamViewList[empfaenger].Visibility = Visibility.Visible;
|
||||
miniChatTeamViewList[empfaenger].SetText(text, 1);
|
||||
miniChatTeamViewList[empfaenger].setTimer();
|
||||
}
|
||||
else
|
||||
{
|
||||
miniChatTeamViewList[empfaenger].Visibility = Visibility.Visible;
|
||||
miniChatTeamViewList[empfaenger].SetText(text, 1);
|
||||
miniChatTeamViewList[empfaenger].setTimer();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var zugehorigkeit =
|
||||
ServiceFacade.DoEmployeeServiceSync(
|
||||
s => s.GetTeamOidsByEmployee(BeWoApp.LoggedOnUser.Employee.PersonOid));
|
||||
|
||||
foreach (var dc in zugehorigkeit)
|
||||
{
|
||||
if (dc.TeamOid == empfaenger)
|
||||
{
|
||||
chatView.SetTeamAnzahlErhalteneNachricht(dc.TeamOid, ChatType.Team);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MessageBox.Show("Team Nachrichtenübermittlung fehlgeschlagen ", "Fehler: 2060 ", MessageBoxButton.OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void DeleteLoggedOffUsers(String personname,long personoid)
|
||||
{
|
||||
try
|
||||
{
|
||||
Dispatcher.Invoke(
|
||||
DispatcherPriority.Normal,
|
||||
(ThreadStart)delegate
|
||||
{
|
||||
chatView.RemoveListItem(personoid);
|
||||
chatView.SetServerStats(personname + " Disconnected ! ");
|
||||
|
||||
miniChatViewList.Remove(personoid);
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MessageBox.Show("Es ist ein Fehler aufgetreten, bei dem versucht wurde User aus der Onlineanzeige zu entfernen", "Fehler: 2070 ", MessageBoxButton.OK);
|
||||
}
|
||||
}
|
||||
|
||||
public void ÜbergebeEmojiAnChatView(String Emojicode, String EmojiPfad)
|
||||
{
|
||||
try
|
||||
{
|
||||
Dispatcher.Invoke(
|
||||
DispatcherPriority.Normal,
|
||||
(ThreadStart)delegate
|
||||
{
|
||||
chatView.Chatbox.Focus();
|
||||
chatView.Chatbox.Text += " " + Emojicode;
|
||||
chatView.Chatbox.SelectionStart = chatView.Chatbox.Text.Length;
|
||||
});
|
||||
}
|
||||
catch (Exception edf)
|
||||
{
|
||||
MessageBox.Show("Es ist ein Fehler aufgetreten, bei dem versucht wurde User aus der Onlineanzeige zu entfernen", "Fehler: ", MessageBoxButton.OK);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void PruefeServerDisconection()
|
||||
{
|
||||
try
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
if (clientSocket.Connected == false)
|
||||
{
|
||||
if (!threadstop)
|
||||
{
|
||||
//MessageBox.Show("Die verbindung zum Server wurde seitens dem Server unterbrochen", "Info", MessageBoxButton.OK);
|
||||
clientSocket.Client.Disconnect(true);
|
||||
clientSocket.Client.Close();
|
||||
clientSocket = null;
|
||||
clientSocket = new TcpClient();
|
||||
|
||||
|
||||
this.Dispatcher.BeginInvoke(
|
||||
DispatcherPriority.Normal,
|
||||
(Action) delegate
|
||||
{
|
||||
if(chatView != null){
|
||||
chatView.UpdateTcp(clientSocket);
|
||||
chatView.ButtonAlarmLabel.Visibility = Visibility.Visible;
|
||||
chatView.SetAllUserOfflineIfNoInet();
|
||||
|
||||
chatView.RadioButtonOffline.IsChecked = true;
|
||||
chatView.SetServerStats("Verbindung zum Server Unterbrochen");
|
||||
}
|
||||
});
|
||||
|
||||
ReConnectAfterLoseConnection();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MessageBox.Show("Es ist ein Fehler mit der Verbindung aufgetreten", "Fehler: 2080 ", MessageBoxButton.OK);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void ReConnectAfterLoseConnection()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (clientSocket.Client != null)
|
||||
{
|
||||
if (clientSocket.Client.Connected)
|
||||
{
|
||||
isReconnect = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
asx = new Thread(ConnectWithServer);
|
||||
asx.Start();
|
||||
isReconnect = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MessageBox.Show("Fehler, Siehe fehlercode."+ e.Message + "\n" + e.StackTrace , "Fehler: 2120 ", MessageBoxButton.OK);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void ErstelleChatViews(long personOid)
|
||||
{
|
||||
try
|
||||
{
|
||||
Dispatcher.Invoke(
|
||||
DispatcherPriority.Normal,
|
||||
(ThreadStart)delegate
|
||||
{
|
||||
List<long> x = new List<long>();
|
||||
x.Add(personOid);
|
||||
|
||||
var person = ServiceFacade.DoCustomerServiceSync(s => s.GetPersonsById(x));
|
||||
|
||||
chatView.SetList(person[0].FirstName + " " + person[0].LastName, personOid);
|
||||
chatView.SetServerStats(person[0].FirstName + " " + person[0].LastName + " Connected");
|
||||
|
||||
if(person[0].Type == PersonType.Customer)
|
||||
miniChatView = new MiniChatView(person[0].FirstName, person[0].LastName, "", chatView, personOid, ChatType.Klienten);
|
||||
else if (person[0].Type == PersonType.Employee)
|
||||
miniChatView = new MiniChatView(person[0].FirstName, person[0].LastName, "", chatView, personOid, ChatType.Mitarbeiter);
|
||||
else if(person[0].Type == PersonType.Others)
|
||||
miniChatView = new MiniChatView(person[0].FirstName, person[0].LastName, "", chatView, personOid, ChatType.Team);
|
||||
|
||||
miniChatView.Visibility = Visibility.Collapsed;
|
||||
|
||||
if(!miniChatViewList.ContainsKey(personOid))
|
||||
miniChatViewList.Add(personOid, miniChatView);
|
||||
});
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MessageBox.Show("Das Erstellen der Chat-Views konnt nicht ausgeführt werden", "Fehler: 2090 ", MessageBoxButton.OK);
|
||||
}
|
||||
}
|
||||
|
||||
public void CloseServerConnection()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (clientSocket != null)
|
||||
{
|
||||
threadstop = true;
|
||||
clientSocket.Close();
|
||||
}
|
||||
|
||||
if (serverStream != null)
|
||||
{
|
||||
serverStream.Close();
|
||||
}
|
||||
|
||||
if (asx != null)
|
||||
{
|
||||
if (asx.IsAlive)
|
||||
{
|
||||
asx.Join();
|
||||
// asx.Abort();
|
||||
asx = null;
|
||||
|
||||
threadstop = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
catch (Exception edf)
|
||||
{
|
||||
//MessageBox.Show("Beim Versuch, die Verbindung mit dem Server zu trennen, ist ein Fehler unterlaufen. " + edf.Message +"\n"+edf.StackTrace, "Fehler: 2100 ", MessageBoxButton.OK);
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------------
|
||||
}
|
||||
private ChatService ServiceChat;
|
||||
|
||||
private void HyperlinkChat_OnRequestNavigate(object sender, RequestNavigateEventArgs e)
|
||||
{
|
||||
if (ServiceChat == null)
|
||||
{
|
||||
//Tu hier anmeldung starten
|
||||
//Cursor = Cursors.Wait;
|
||||
|
||||
//Hier die Anmelde Infos Vom User
|
||||
Login _login = new Login("4368658435", "ZMCKb-BckTt", "RuppelW", "ABXT32wgtruppeldiedup");
|
||||
|
||||
var x = _login.AnmeldevorgangDurchFuehren();
|
||||
|
||||
if (x != null) {
|
||||
ServiceChat = new ChatService(x);
|
||||
ServiceChat.Show();
|
||||
}
|
||||
//Cursor = Cursors.Arrow;
|
||||
|
||||
}
|
||||
else if (ServiceChat.Visibility == Visibility.Visible)
|
||||
{
|
||||
ServiceChat.Visibility = Visibility.Hidden;
|
||||
}
|
||||
else if (ServiceChat.Visibility == Visibility.Hidden)
|
||||
{
|
||||
ServiceChat.Visibility = Visibility.Visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class TaskDateDescriptionConverter : IValueConverter
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace BeWo.View
|
||||
public int abr = 0;
|
||||
|
||||
//protected TCPClient tcpClient;
|
||||
protected ChatView viewChat;
|
||||
//protected ChatView viewChat;
|
||||
|
||||
protected String incommingString;
|
||||
|
||||
@@ -44,14 +44,14 @@ namespace BeWo.View
|
||||
protected int anzahlDS = 0;
|
||||
//#######################################################################
|
||||
|
||||
public MiniChatView(String CLientName,String ClientNachname, String chat, ChatView view , long oid, ChatType type)
|
||||
public MiniChatView(String CLientName,String ClientNachname, String chat, long oid, ChatType type)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
namenInfo = CLientName;
|
||||
nachname = ClientNachname;
|
||||
|
||||
viewChat = view;
|
||||
//viewChat = view;
|
||||
|
||||
rootGroupBox.Header = CLientName + " " + ClientNachname ;
|
||||
Minichat.AppendText(chat);
|
||||
@@ -84,18 +84,18 @@ namespace BeWo.View
|
||||
try
|
||||
{
|
||||
// DragMove();
|
||||
if (viewChat != null && viewChat.Visibility != Visibility.Visible)
|
||||
{
|
||||
anzahlDS = 0;
|
||||
viewChat.SetListBoxSelection(incommingEmpfangOid, incomminType);
|
||||
//if (viewChat != null && viewChat.Visibility != Visibility.Visible)
|
||||
//{
|
||||
// anzahlDS = 0;
|
||||
// viewChat.SetListBoxSelection(incommingEmpfangOid, incomminType);
|
||||
|
||||
viewChat.Visibility = Visibility.Visible;
|
||||
myListDS.Clear();
|
||||
Visibility = Visibility.Collapsed;
|
||||
}else
|
||||
{
|
||||
Visibility = Visibility.Collapsed;
|
||||
}
|
||||
// viewChat.Visibility = Visibility.Visible;
|
||||
// myListDS.Clear();
|
||||
// Visibility = Visibility.Collapsed;
|
||||
//}else
|
||||
//{
|
||||
// Visibility = Visibility.Collapsed;
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
@@ -118,15 +118,15 @@ namespace BeWo.View
|
||||
abr = 1;
|
||||
|
||||
//Close();
|
||||
if (Visibility != Visibility.Collapsed)
|
||||
{
|
||||
anzahlDS = 0;
|
||||
viewChat.SetListBoxSelection(incommingEmpfangOid, incomminType);
|
||||
//if (Visibility != Visibility.Collapsed)
|
||||
//{
|
||||
// anzahlDS = 0;
|
||||
// viewChat.SetListBoxSelection(incommingEmpfangOid, incomminType);
|
||||
|
||||
viewChat.Visibility = Visibility.Visible;
|
||||
myListDS.Clear();
|
||||
Visibility = Visibility.Collapsed;
|
||||
}
|
||||
// viewChat.Visibility = Visibility.Visible;
|
||||
// myListDS.Clear();
|
||||
// Visibility = Visibility.Collapsed;
|
||||
//}
|
||||
|
||||
}));
|
||||
}
|
||||
@@ -212,16 +212,16 @@ namespace BeWo.View
|
||||
try
|
||||
{
|
||||
|
||||
if (viewChat != null && viewChat.Visibility != Visibility.Visible)
|
||||
{
|
||||
anzahlDS = 0;
|
||||
//if (viewChat != null && viewChat.Visibility != Visibility.Visible)
|
||||
//{
|
||||
// anzahlDS = 0;
|
||||
|
||||
viewChat.SetListBoxSelection(incommingEmpfangOid, incomminType);
|
||||
// viewChat.SetListBoxSelection(incommingEmpfangOid, incomminType);
|
||||
|
||||
viewChat.Visibility = Visibility.Visible;
|
||||
myListDS.Clear();
|
||||
Visibility = Visibility.Collapsed;
|
||||
}
|
||||
// viewChat.Visibility = Visibility.Visible;
|
||||
// myListDS.Clear();
|
||||
// Visibility = Visibility.Collapsed;
|
||||
//}
|
||||
|
||||
}
|
||||
catch (Exception edf)
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
NHibernate.Driver.MySqlDataDriver
|
||||
</property>
|
||||
|
||||
<property name="connection.connection_string">
|
||||
<!-- <property name="connection.connection_string">
|
||||
Server=localhost;Password=root;User ID=root;Initial Catalog=bewodemo
|
||||
</property>
|
||||
</property>-->
|
||||
|
||||
<!--<property name="connection.connection_string">
|
||||
<property name="connection.connection_string">
|
||||
Server=localhost;Password=root;User ID=root;Initial Catalog=1234567890
|
||||
</property>-->
|
||||
</property>
|
||||
|
||||
<property name="dialect">
|
||||
NHibernate.Dialect.MySQLDialect
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25123.0
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.26228.9
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Client", "Client", "{E7543C39-A44C-40C9-82C9-E7FAA2D9A852}"
|
||||
EndProject
|
||||
@@ -33,6 +33,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BeWoPlanerAndroid", "BeWoPl
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BeWoChatServer", "BeWoChatServer\BeWoChatServer.csproj", "{4E069DC0-8153-41E0-A89A-FC1916DF4A5F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChatController", "..\Chat\ChatController\ChatController.csproj", "{8A83C4DC-A0B1-4A51-AE1D-366D7A05B298}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|.NET = Debug|.NET
|
||||
@@ -153,6 +155,18 @@ Global
|
||||
{4E069DC0-8153-41E0-A89A-FC1916DF4A5F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4E069DC0-8153-41E0-A89A-FC1916DF4A5F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{4E069DC0-8153-41E0-A89A-FC1916DF4A5F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{8A83C4DC-A0B1-4A51-AE1D-366D7A05B298}.Debug|.NET.ActiveCfg = Debug|Any CPU
|
||||
{8A83C4DC-A0B1-4A51-AE1D-366D7A05B298}.Debug|.NET.Build.0 = Debug|Any CPU
|
||||
{8A83C4DC-A0B1-4A51-AE1D-366D7A05B298}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8A83C4DC-A0B1-4A51-AE1D-366D7A05B298}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8A83C4DC-A0B1-4A51-AE1D-366D7A05B298}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{8A83C4DC-A0B1-4A51-AE1D-366D7A05B298}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{8A83C4DC-A0B1-4A51-AE1D-366D7A05B298}.Release|.NET.ActiveCfg = Release|Any CPU
|
||||
{8A83C4DC-A0B1-4A51-AE1D-366D7A05B298}.Release|.NET.Build.0 = Release|Any CPU
|
||||
{8A83C4DC-A0B1-4A51-AE1D-366D7A05B298}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8A83C4DC-A0B1-4A51-AE1D-366D7A05B298}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8A83C4DC-A0B1-4A51-AE1D-366D7A05B298}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{8A83C4DC-A0B1-4A51-AE1D-366D7A05B298}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -168,5 +182,6 @@ Global
|
||||
{663EFCB5-9E3E-4C76-97EE-3188E072634C} = {FEB0336B-F053-40B6-92DD-7DE56AB9408A}
|
||||
{D3E18AE6-05A4-44B3-B0F6-6EF696DD306C} = {FEB0336B-F053-40B6-92DD-7DE56AB9408A}
|
||||
{4E069DC0-8153-41E0-A89A-FC1916DF4A5F} = {FEB0336B-F053-40B6-92DD-7DE56AB9408A}
|
||||
{8A83C4DC-A0B1-4A51-AE1D-366D7A05B298} = {E7543C39-A44C-40C9-82C9-E7FAA2D9A852}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
@@ -2,14 +2,17 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
using System.Web.Mvc;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Service.ServiceImplementations;
|
||||
using BeWoPlanerMobil.Service;
|
||||
using BS.Shared;
|
||||
using BS.Shared.Extensions;
|
||||
using log4net.Core;
|
||||
|
||||
|
||||
namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
public class ChatController : Controller
|
||||
@@ -27,7 +30,8 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return "Das ist die <b>Default</b> Aktion... Sie haben hier nix verloren.";
|
||||
}
|
||||
|
||||
public JsonResult LoginToken(string benutzername , string passwort, string kundennummer,string typ)
|
||||
[System.Web.Mvc.HttpPost]
|
||||
public JsonResult LoginToken(string benutzername , string passwort, string kundennummer, string typ)
|
||||
{
|
||||
// lese hier die daten aus dem header aus
|
||||
//var x = HttpUtility.HtmlEncode("Benutzer: "+benutzername+" / "+ "Passwort: "+passwort +" / "+"Kundennummer: "+kundennummer);
|
||||
@@ -55,6 +59,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
if (user == null || !DAOFactory.UserDAO.CheckPassword(user, passwort))
|
||||
{
|
||||
//gib json zurück {"STATE":1}
|
||||
System.Threading.Thread.Sleep(5000);
|
||||
return Json("1", JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
|
||||
@@ -78,16 +83,18 @@ namespace BeWoPlanerMobil.Controllers
|
||||
var alledaten = DAOFactory.GenericDAO.GetAllActive<Customer>();
|
||||
|
||||
|
||||
List<JsonInputKlient2> inputList = new List<JsonInputKlient2>();
|
||||
// List<JsonInputKlient2> inputList = new List<JsonInputKlient2>();
|
||||
|
||||
List<JsonInputKlient1> input1 = new List<JsonInputKlient1>();
|
||||
|
||||
var appUser = DAOFactory.GenericDAO.GetAllActive<ApplicationUser>();
|
||||
var appUser = DAOFactory.GenericDAO.GetAllActiveAndArchived<ApplicationUser>();
|
||||
|
||||
// input 2 als liste übergeben und für jeden Mitarbeiter dem Customer zugeteilt ist
|
||||
foreach (var daten in alledaten)
|
||||
{
|
||||
foreach (var e2c in daten.Employee2CustomerList)
|
||||
List<JsonInputKlient2> inputList = new List<JsonInputKlient2>();
|
||||
|
||||
foreach (var e2c in daten.Employee2CustomerList)
|
||||
{
|
||||
foreach (var v2o in e2c.ValueList)
|
||||
{
|
||||
@@ -104,15 +111,12 @@ namespace BeWoPlanerMobil.Controllers
|
||||
input2.Status = "3";
|
||||
if (e2c.IsActive == ActivationTypeId.Archived)
|
||||
input2.Status = "2";
|
||||
|
||||
|
||||
|
||||
inputList.Add(input2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
JsonInputKlient1 input = new JsonInputKlient1(daten.Oid.ToString(),"1",
|
||||
@@ -125,7 +129,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
input.Status = "2";
|
||||
|
||||
input1.Add(input);
|
||||
|
||||
|
||||
}
|
||||
|
||||
var ssx = new JsonRueckgabeKlient("0", input1);
|
||||
@@ -135,11 +139,13 @@ namespace BeWoPlanerMobil.Controllers
|
||||
}
|
||||
else if (typ.Equals("users"))
|
||||
{
|
||||
var empChatCode = DAOFactory.GenericDAO.GetAllActive<EmployeeAPPCode>();
|
||||
|
||||
var employee = DAOFactory.GenericDAO.GetAllActive<Employee>();
|
||||
//Bitte alle Employees zurückgeben
|
||||
var empChatCode = DAOFactory.GenericDAO.GetAllActiveAndArchived<EmployeeAPPCode>();
|
||||
|
||||
var applicationUser = DAOFactory.GenericDAO.GetAllActive<ApplicationUser>();
|
||||
var employee = DAOFactory.GenericDAO.GetAllActiveAndArchived<Employee>();
|
||||
|
||||
var applicationUser = DAOFactory.GenericDAO.GetAllActiveAndArchived<ApplicationUser>();
|
||||
|
||||
List< JsonRueckgabeMitarbeiterInput> miInputList = new List<JsonRueckgabeMitarbeiterInput>();
|
||||
|
||||
@@ -244,7 +250,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
List<JsonRueckgabeTeamMitarbeiterInput> JRTMI = new List<JsonRueckgabeTeamMitarbeiterInput>();
|
||||
|
||||
var applicationUser = DAOFactory.GenericDAO.GetAllActive<ApplicationUser>();
|
||||
var applicationUser = DAOFactory.GenericDAO.GetAllActiveAndArchived<ApplicationUser>();
|
||||
Dictionary<long?, ApplicationUser> appus = new Dictionary<long?, ApplicationUser>();
|
||||
|
||||
foreach (var appUser in applicationUser)
|
||||
@@ -254,10 +260,10 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
foreach (var dat in daten)
|
||||
{
|
||||
foreach (var mem in dat.MemberList)
|
||||
{
|
||||
if (mem.Oid == user.Employee.Oid)
|
||||
{
|
||||
//foreach (var mem in dat.MemberList)
|
||||
//{
|
||||
//if (mem.Oid == user.Employee.Oid)
|
||||
//{
|
||||
List<JsonRueckgabeTeamMitarbeiterInput2> mtInputList = new List<JsonRueckgabeTeamMitarbeiterInput2>();
|
||||
|
||||
foreach (var member in dat.MemberList)
|
||||
@@ -297,25 +303,29 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
JRTMI.Add(mtInput1);
|
||||
|
||||
}
|
||||
}
|
||||
//}
|
||||
//}
|
||||
}
|
||||
|
||||
JsonRueckgabeTeamMitarbeiter mt = new JsonRueckgabeTeamMitarbeiter("0", JRTMI);
|
||||
|
||||
return Json(mt, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
//Falls typ nicht stimmt
|
||||
return Json("1", JsonRequestBehavior.AllowGet);
|
||||
//Falls typ nicht stimmt
|
||||
|
||||
System.Threading.Thread.Sleep(5000);
|
||||
return Json("1", JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
|
||||
#endregion
|
||||
//fallsa typ nicht vorhanden
|
||||
return Json("1", JsonRequestBehavior.AllowGet);
|
||||
#endregion
|
||||
//fallsa typ nicht vorhanden
|
||||
System.Threading.Thread.Sleep(5000);
|
||||
return Json("1", JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
//gib json zurück {"STATE":1}
|
||||
System.Threading.Thread.Sleep(5000);
|
||||
return Json("1", JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
}
|
||||
@@ -331,12 +341,15 @@ namespace BeWoPlanerMobil.Controllers
|
||||
public JsonResult BildUrl(long oid)
|
||||
{
|
||||
var img = DAOFactory.GenericDAO.GetByID<Person>(oid);
|
||||
|
||||
if(img.Images.Count > 0)
|
||||
return Json(img.Images[0].SmallThumbnail, JsonRequestBehavior.AllowGet);
|
||||
else
|
||||
return Json("1", JsonRequestBehavior.AllowGet);
|
||||
|
||||
if (img.Images.Count > 0)
|
||||
return Json(img.Images[0].SmallThumbnail, JsonRequestBehavior.AllowGet);
|
||||
else
|
||||
{
|
||||
System.Threading.Thread.Sleep(5000);
|
||||
return Json("1", JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -347,12 +360,12 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
public string State { get; set; }
|
||||
|
||||
public List<JsonInputKlient1> Input { get; set; }
|
||||
public List<JsonInputKlient1> Data { get; set; }
|
||||
|
||||
public JsonRueckgabeKlient(string state, List<JsonInputKlient1> input )
|
||||
public JsonRueckgabeKlient(string state, List<JsonInputKlient1> data )
|
||||
{
|
||||
State = state;
|
||||
Input = input;
|
||||
Data = data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -400,12 +413,12 @@ namespace BeWoPlanerMobil.Controllers
|
||||
public class JsonRueckgabeMitarbeiter
|
||||
{
|
||||
public string State { get; set; }
|
||||
public List<JsonRueckgabeMitarbeiterInput> Input { get; set; }
|
||||
public List<JsonRueckgabeMitarbeiterInput> Data { get; set; }
|
||||
|
||||
public JsonRueckgabeMitarbeiter(string state, List<JsonRueckgabeMitarbeiterInput> input )
|
||||
public JsonRueckgabeMitarbeiter(string state, List<JsonRueckgabeMitarbeiterInput> data)
|
||||
{
|
||||
State = state;
|
||||
Input = input;
|
||||
Data = data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -448,12 +461,12 @@ namespace BeWoPlanerMobil.Controllers
|
||||
public class JsonRueckgabeTeamMitarbeiter
|
||||
{
|
||||
public string State { get; set; }
|
||||
public List<JsonRueckgabeTeamMitarbeiterInput> Input { get; set; }
|
||||
public List<JsonRueckgabeTeamMitarbeiterInput> Data { get; set; }
|
||||
|
||||
public JsonRueckgabeTeamMitarbeiter(string state, List<JsonRueckgabeTeamMitarbeiterInput> input)
|
||||
public JsonRueckgabeTeamMitarbeiter(string state, List<JsonRueckgabeTeamMitarbeiterInput> data)
|
||||
{
|
||||
State = state;
|
||||
Input = input;
|
||||
Data = data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -462,13 +475,13 @@ namespace BeWoPlanerMobil.Controllers
|
||||
public string Oid { get; set; }
|
||||
public string Status { get; set; }
|
||||
public string Name { get; set; }
|
||||
public List<JsonRueckgabeTeamMitarbeiterInput2> Member { get; set; }
|
||||
public List<JsonRueckgabeTeamMitarbeiterInput2> Members { get; set; }
|
||||
|
||||
public JsonRueckgabeTeamMitarbeiterInput(string oid,string status, string name,List<JsonRueckgabeTeamMitarbeiterInput2> member)
|
||||
public JsonRueckgabeTeamMitarbeiterInput(string oid,string status, string name,List<JsonRueckgabeTeamMitarbeiterInput2> members)
|
||||
{
|
||||
Oid = oid;
|
||||
Name = name;
|
||||
Member = member;
|
||||
Members = members;
|
||||
Status = status;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,7 +118,8 @@
|
||||
<add key="PreserveLoginUrl" value="true"/>
|
||||
<add key="ClientValidationEnabled" value="true"/>
|
||||
<add key="UnobtrusiveJavaScriptEnabled" value="true"/>
|
||||
<add key="MultitenancyPath" value="F:\Projects\BeWo\Host\Multitenancy\"/>
|
||||
<!--<add key="MultitenancyPath" value="F:\Projects\BeWo\Host\Multitenancy\"/>-->
|
||||
<add key="MultitenancyPath" value="C:\Projekte\BeWo\Host\Multitenancy\"/>
|
||||
<!--<add key="MultitenancyPath" value="..\Host\Multitenancy"/>-->
|
||||
</appSettings>
|
||||
<!--
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
NHibernate.Driver.MySqlDataDriver
|
||||
</property>
|
||||
|
||||
<property name="connection.connection_string">
|
||||
<!-- <property name="connection.connection_string">
|
||||
Server=localhost;Password=root;User ID=root;Initial Catalog=bewodemo
|
||||
</property>
|
||||
</property>-->
|
||||
|
||||
<!--<property name="connection.connection_string">
|
||||
<property name="connection.connection_string">
|
||||
Server=localhost;Password=root;User ID=root;Initial Catalog=1234567890
|
||||
</property>-->
|
||||
</property>
|
||||
|
||||
<property name="dialect">
|
||||
NHibernate.Dialect.MySQLDialect
|
||||
|
||||
Reference in New Issue
Block a user