From 2a746c76597b3dbc15619c3678780c418069781f Mon Sep 17 00:00:00 2001 From: Waldi Date: Tue, 5 Sep 2017 09:23:53 +0200 Subject: [PATCH] =?UTF-8?q?ChatController=20update=20kleinigkeiten=20plus?= =?UTF-8?q?=20=C3=BCbermittlung=20=C3=BCber=20post,=20Neue=20Chat=20Techno?= =?UTF-8?q?logie=20Implementierung?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BeWo/BeWo.csproj | 33 +- BeWo/MainControl.xaml.cs | 4 +- BeWo/MainWindow.xaml.cs | 22 +- BeWo/View/ChatDokumentationsView.xaml.cs | 7 +- BeWo/View/ChatEmojiView.xaml | 13 + BeWo/View/ChatEmojiView.xaml.cs | 48 + BeWo/View/ChatEmojisView.xaml | 188 - BeWo/View/ChatEmojisView.xaml.cs | 590 --- BeWo/View/ChatProgressBarView.xaml | 14 - BeWo/View/ChatProgressBarView.xaml.cs | 21 - BeWo/View/ChatService.xaml | 20 + BeWo/View/ChatService.xaml.cs | 136 + BeWo/View/ChatView.xaml | 341 -- BeWo/View/ChatView.xaml.cs | 3339 ----------------- BeWo/View/HomeDragPanelView.xaml | 4 +- BeWo/View/HomeDragPanelView.xaml.cs | 752 +--- BeWo/View/MiniChatView.xaml.cs | 60 +- BeWoChatServer/Multitenancy/demo.config | 8 +- BeWoOhneReports.sln | 19 +- BeWoPlanerMobil/Controllers/ChatController.cs | 99 +- BeWoPlanerMobil/Web.config | 3 +- Host/Multitenancy/demo.config | 8 +- 22 files changed, 394 insertions(+), 5335 deletions(-) create mode 100644 BeWo/View/ChatEmojiView.xaml create mode 100644 BeWo/View/ChatEmojiView.xaml.cs delete mode 100644 BeWo/View/ChatEmojisView.xaml delete mode 100644 BeWo/View/ChatEmojisView.xaml.cs delete mode 100644 BeWo/View/ChatProgressBarView.xaml delete mode 100644 BeWo/View/ChatProgressBarView.xaml.cs create mode 100644 BeWo/View/ChatService.xaml create mode 100644 BeWo/View/ChatService.xaml.cs delete mode 100644 BeWo/View/ChatView.xaml delete mode 100644 BeWo/View/ChatView.xaml.cs diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj index eb152e13b..80f49ba7d 100644 --- a/BeWo/BeWo.csproj +++ b/BeWo/BeWo.csproj @@ -268,9 +268,13 @@ Designer MSBuild:Compile - - MSBuild:Compile + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile Designer @@ -440,10 +444,6 @@ Designer MSBuild:Compile - - MSBuild:Compile - Designer - MSBuild:Compile Designer @@ -456,10 +456,6 @@ MSBuild:Compile Designer - - MSBuild:Compile - Designer - MSBuild:Compile Designer @@ -731,8 +727,11 @@ BeWoWindow.xaml - - ChatProgressBarView.xaml + + ChatEmojiView.xaml + + + ChatService.xaml ServiceRecordRTFWindowView.xaml @@ -860,9 +859,6 @@ TextbausteinView.xaml - - ChatView.xaml - ChatServiceCustomer.xaml @@ -872,9 +868,6 @@ ChatDokumentationsView.xaml - - ChatEmojisView.xaml - EmployeeArbeitszeitView.xaml @@ -1973,6 +1966,10 @@ + + {8a83c4dc-a0b1-4a51-ae1d-366d7a05b298} + ChatController + {D5E53B0F-BF5A-41E8-93E2-0F32845FC729} Controls diff --git a/BeWo/MainControl.xaml.cs b/BeWo/MainControl.xaml.cs index 7f46b4d5c..844cd3e73 100644 --- a/BeWo/MainControl.xaml.cs +++ b/BeWo/MainControl.xaml.cs @@ -848,9 +848,7 @@ namespace BeWo { Cache.GetInstance().ClearAll(); _Views = new Dictionary(); - - _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))); diff --git a/BeWo/MainWindow.xaml.cs b/BeWo/MainWindow.xaml.cs index 5ada5e2a2..2475e2dd0 100644 --- a/BeWo/MainWindow.xaml.cs +++ b/BeWo/MainWindow.xaml.cs @@ -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(); diff --git a/BeWo/View/ChatDokumentationsView.xaml.cs b/BeWo/View/ChatDokumentationsView.xaml.cs index 3f2127b67..39f35e4c7 100644 --- a/BeWo/View/ChatDokumentationsView.xaml.cs +++ b/BeWo/View/ChatDokumentationsView.xaml.cs @@ -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 listarray; + protected List listarray; protected long? loggedOnMitarbeiter; private ServiceRecordVM serviceRecord; //Konstruktor für Chat - public ChatDokumentationsView(List _listarray, long? _loggedOnMitarbeiter,long _customerPersonOid,CompactCustomerDC _compactCustomer) + public ChatDokumentationsView(List _listarray, long? _loggedOnMitarbeiter,CompactCustomerDC _compactCustomer) { InitializeComponent(); @@ -52,7 +53,7 @@ namespace BeWo.View - long? customerOid = _customerPersonOid; + // long? customerOid = _customerPersonOid; string message = ""; diff --git a/BeWo/View/ChatEmojiView.xaml b/BeWo/View/ChatEmojiView.xaml new file mode 100644 index 000000000..fe6f2be88 --- /dev/null +++ b/BeWo/View/ChatEmojiView.xaml @@ -0,0 +1,13 @@ + + + + + diff --git a/BeWo/View/ChatEmojiView.xaml.cs b/BeWo/View/ChatEmojiView.xaml.cs new file mode 100644 index 000000000..a54697ca7 --- /dev/null +++ b/BeWo/View/ChatEmojiView.xaml.cs @@ -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 +{ + /// + /// Interaktionslogik für ChatEmojiService.xaml + /// + 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(); + } + } + } +} diff --git a/BeWo/View/ChatEmojisView.xaml b/BeWo/View/ChatEmojisView.xaml deleted file mode 100644 index 944e7360a..000000000 --- a/BeWo/View/ChatEmojisView.xaml +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/BeWo/View/ChatEmojisView.xaml.cs b/BeWo/View/ChatEmojisView.xaml.cs deleted file mode 100644 index a960cea43..000000000 --- a/BeWo/View/ChatEmojisView.xaml.cs +++ /dev/null @@ -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 normal = new List - { - "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 variable = new List { "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 tier = new List - { - "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 mensch = new List - { - "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 zeichen = new List - { - "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 liebe = new List - { - "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 sonstiges = new List - { - "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 kleidung = new List - { - "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 pflanzen = new List - { - "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 nahrung = new List - { - "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 planet = new List - { - "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 tucktuck = new List - { - "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 bauten = new List - { - "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 klingbett = new List - { - "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 party = new List - { - "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 sport = new List - { - "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 gaming = new List - { - "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 schule = new List - { - "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 waffen = new List - { - "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 schilder = new List - { - - "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; } - } - -} diff --git a/BeWo/View/ChatProgressBarView.xaml b/BeWo/View/ChatProgressBarView.xaml deleted file mode 100644 index e93d8cb9e..000000000 --- a/BeWo/View/ChatProgressBarView.xaml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - diff --git a/BeWo/View/ChatProgressBarView.xaml.cs b/BeWo/View/ChatProgressBarView.xaml.cs deleted file mode 100644 index e3d5a0570..000000000 --- a/BeWo/View/ChatProgressBarView.xaml.cs +++ /dev/null @@ -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; - } - } -} diff --git a/BeWo/View/ChatService.xaml b/BeWo/View/ChatService.xaml new file mode 100644 index 000000000..1892e5dde --- /dev/null +++ b/BeWo/View/ChatService.xaml @@ -0,0 +1,20 @@ + + + + + + + + + + diff --git a/BeWo/View/ChatService.xaml.cs b/BeWo/View/ChatService.xaml.cs new file mode 100644 index 000000000..c0c7b34f4 --- /dev/null +++ b/BeWo/View/ChatService.xaml.cs @@ -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 +{ + /// + /// Interaktionslogik für ChatService.xaml + /// + 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 sdf = new List(); + + //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"); + } + } + } +} diff --git a/BeWo/View/ChatView.xaml b/BeWo/View/ChatView.xaml deleted file mode 100644 index 75bb31570..000000000 --- a/BeWo/View/ChatView.xaml +++ /dev/null @@ -1,341 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -