diff --git a/BeWo/View/ChatEmojisView.xaml b/BeWo/View/ChatEmojisView.xaml index 4ea1f499b..d18a5c182 100644 --- a/BeWo/View/ChatEmojisView.xaml +++ b/BeWo/View/ChatEmojisView.xaml @@ -13,9 +13,9 @@ - + - + diff --git a/BeWo/View/ChatEmojisView.xaml.cs b/BeWo/View/ChatEmojisView.xaml.cs index 4001469f7..dfb2f96b7 100644 --- a/BeWo/View/ChatEmojisView.xaml.cs +++ b/BeWo/View/ChatEmojisView.xaml.cs @@ -55,12 +55,8 @@ namespace BeWo.View private void LoadEmojipicsInView() { - - //Ordnungsgemäßes auslesen von Smileys. - - //################## Normale Emojis ######################################################################### -#region Normale Spackos check - + +#region Normale List normal = new List { @@ -82,12 +78,9 @@ namespace BeWo.View TabItem1.Header = tabheader1; - #endregion - - //############################## Variable Emojis ################################################################################################# -#region Variable Spackos +#region Variable List variable = new List { "D83DDE08", "D83DDC7F", "D83DDC79", "D83DDC7A", "D83DDC80","2620","D83DDC7B","D83DDC7D","D83DDC7E","D83DDCA9"}; @@ -100,10 +93,8 @@ namespace BeWo.View #endregion - //######################### Tier emojis #################################################### - -#region Tier Spackos check +#region Tier List tier = new List { @@ -121,26 +112,24 @@ namespace BeWo.View 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 - //#################################Menschen und ihre tücken########################################################## -#region Mensch Spackos + +#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 200D2764FE0F200DD83DDC8B200DD83DDC680009","D83DDC68200D2764FE0F200DD83DDC8B200DD83DDC68","D83DDC69200D2764FE0F200DD83DDC8B200DD83DDC690009", - "D83DDC91","D83DDC69200D2764FE0F200DD83DDC68","D83DDC68200D2764FE0F200DD83DDC680009","D83DDC69200D2764FE0F200DD83DDC690009", - "D83DDC6A0009","D83DDC68200DD83DDC69200DD83DDC660009","D83DDC68200DD83DDC69200DD83DDC670009","D83DDC68200DD83DDC69200DD83DDC67200DD83DDC6600090009", - "D83DDC68200DD83DDC69200DD83DDC66200DD83DDC6600090009","D83DDC68200DD83DDC69200DD83DDC67200DD83DDC6700090009","D83DDC68200DD83DDC68200DD83DDC660009", - "D83DDC68200DD83DDC68200DD83DDC6700090009","D83DDC68200DD83DDC68200DD83DDC67200DD83DDC6600090009","D83DDC68200DD83DDC68200DD83DDC66200DD83DDC6600090009", - "D83DDC68200DD83DDC68200DD83DDC67200DD83DDC670009","D83DDC69200DD83DDC69200DD83DDC660009","D83DDC69200DD83DDC69200DD83DDC6700090009", - "D83DDC69200DD83DDC69200DD83DDC67200DD83DDC66000900090009","D83DDC69200DD83DDC69200DD83DDC66200DD83DDC6600090009","D83DDC69200DD83DDC69200DD83DDC67200DD83DDC670009" + "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) @@ -151,9 +140,7 @@ namespace BeWo.View #endregion - - //########################## Zeichen Emojis ################################################################################### -#region Zeichen Spackos +#region Zeichen List zeichen = new List { @@ -174,8 +161,6 @@ namespace BeWo.View #endregion - - //################################# Nur die liebe zählt ###################################### #region Nur die Liebe Zählt List liebe = new List @@ -190,11 +175,9 @@ namespace BeWo.View select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray()))); } -#endregion +#endregion - //############################ Sonstige Scheiße ################################################ - -#region Sonstiges Spacko +#region Sonstiges List sonstiges = new List { @@ -208,12 +191,9 @@ namespace BeWo.View select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray()))); } +#endregion -#endregion - - //########################### kleidung Scheiß #################################################### - -#region Kleidung Spakos +#region Kleidung List kleidung = new List { @@ -227,14 +207,9 @@ namespace BeWo.View select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray()))); } - #endregion - - - //############################## Pflanzen Scheiße ################################################# - -#region Pflanzen Spakos check +#region Pflanzen List pflanzen = new List { @@ -256,9 +231,7 @@ namespace BeWo.View #endregion - - //############################### narungs gedöns ###################################################### -#region Nahrung spakos check +#region Nahrung List nahrung = new List { @@ -283,9 +256,7 @@ namespace BeWo.View #endregion - //################################### planet gedöns ###################################################### - -#region planet spackos check +#region planet List planet = new List { @@ -300,19 +271,10 @@ namespace BeWo.View } - - // string tabheader8 = string.Join("", (from Match m in Regex.Matches("D83CDF0D", @"\S{4}")select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray()); - - - // TabItem8.Header = tabheader8; #endregion - //######################### Bauten Gedöns ############################################################################# - - - -#region Tuck Tuck check +#region Tuck Tuck List tucktuck = new List { @@ -337,7 +299,7 @@ namespace BeWo.View #endregion -#region gebauten bauten kunst Spackos check +#region Bauten kunst List bauten = new List { @@ -357,10 +319,7 @@ namespace BeWo.View #endregion - - - -#region Klingel Bett UhrZeit wetter gedönse +#region Klingel Bett UhrZeit wetter List klingbett = new List @@ -379,11 +338,9 @@ namespace BeWo.View 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 gedönse +#region Party List party = new List { @@ -398,13 +355,10 @@ namespace BeWo.View select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray()))); } - - - #endregion -#region Sport check +#region Sport List sport = new List { @@ -428,7 +382,7 @@ namespace BeWo.View #endregion -#region Gaming Sound technik gedöns +#region Gaming Sound technik List gaming = new List @@ -523,29 +477,12 @@ namespace BeWo.View #endregion - //############################################################################################################## - // ausgewählte emojiss aus dem unicode implementieren - // in eine Datenbank speichern und auslesen - // aber vorher ausgewählte emojis erstma in dem Ressource ordener. } private void OnEmojiClick(object sender, RoutedEventArgs e) { - /*foreach (Object selecteditem in EmojisListBox.SelectedItems) - { - DirectoryListing Item = selecteditem as DirectoryListing; - - if (Item.EmojiCode != "") - { - // string emoji = string.Join("", (from Match m in Regex.Matches(str, @"\S{4}") - // select (char)int.Parse(m.Value, NumberStyles.HexNumber)).ToArray()); - - BeWoApp.MainControl.HomeView.ÜbergebeEmojiAnChatView(Item.EmojiCode,Item.Pfad); - } - }*/ - foreach (Object selecteditem in EmojisListBox1.SelectedItems) { DirectoryListing Item = selecteditem as DirectoryListing; @@ -617,17 +554,6 @@ namespace BeWo.View } } - /* foreach (Object selecteditem in EmojisListBox8.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; @@ -637,75 +563,9 @@ namespace BeWo.View EmojisListBox7.SelectedIndex = -1; ChatEmojiView.Activate(); - /* EmojisListBox8.SelectedIndex = -1; - EmojisListBox.SelectedIndex = -1;*/ } - - //################################ Versuchsobjekte ############################################ - - - /* public string Encode(string str) - { - byte[] encbuff = System.Text.Encoding.UTF8.GetBytes(str); - return Convert.ToBase64String(encbuff); - } - - public string Decode(string str) - { - byte[] decbuff = Convert.FromBase64String(str); - return System.Text.Encoding.UTF8.GetString(decbuff); - }*/ - - - - - /* public static string ToBinary(string data, bool formatBits = true) - { - char[] buffer = new char[(((data.Length * 8) + (formatBits ? (data.Length - 1) : 0)))]; - int index = 0; - for (int i = 0; i < data.Length; i++) - { - string binary = Convert.ToString(data[i], 2).PadLeft(8, '0'); - for (int j = 0; j < 8; j++) - { - buffer[index] = binary[j]; - index++; - } - if (formatBits && i < (data.Length - 1)) - { - buffer[index] = ' '; - index++; - } - } - return new string(buffer); - } - - public string ParseUnicodeHex(string hex) - { - var sb = new StringBuilder(); - for (int i = 0; i < hex.Length; i += 4) - { - string temp = hex.Substring(i, 4); - char character = (char)Convert.ToInt16(temp, 16); - sb.Append(character); - } - return sb.ToString(); - } - - - private string StringToHex(string hexstring) - { - var sb = new StringBuilder(); - foreach (char t in hexstring) - sb.Append(Convert.ToInt32(t).ToString("x") + " "); - return sb.ToString(); - }*/ - } - - //<----- Versuchsobjekte ################################### - public class DirectoryListing { public DirectoryListing(String pfad,String emojiCode) diff --git a/BeWo/View/ChatView.xaml b/BeWo/View/ChatView.xaml index 28f5dd2bd..79e271950 100644 --- a/BeWo/View/ChatView.xaml +++ b/BeWo/View/ChatView.xaml @@ -24,7 +24,7 @@ - + - + @@ -62,52 +62,75 @@ - - - - - - - + + + + + + + + + + + + + + + - + --> - + - - - + + + + - - + + + + + + + + - + + + + + + + + + - - - + + + @@ -127,7 +150,7 @@ - + diff --git a/BeWo/View/ChatView.xaml.cs b/BeWo/View/ChatView.xaml.cs index 6bc8de0df..eaaf02205 100644 --- a/BeWo/View/ChatView.xaml.cs +++ b/BeWo/View/ChatView.xaml.cs @@ -16,6 +16,7 @@ using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; using System.ComponentModel; +using System.Drawing; using System.Globalization; using System.IO; using System.Text; @@ -32,8 +33,11 @@ using DevExpress.Xpf.Docking; using DevExpress.XtraPrinting.Native; using DevExpress.XtraPrinting.XamlExport; using Microsoft.Office.Interop.Word; +using Brush = System.Windows.Media.Brush; using Color = System.Drawing.Color; +using Image = System.Windows.Controls.Image; using Point = System.Windows.Point; +using Size = System.Windows.Size; namespace BeWo.View { @@ -500,6 +504,11 @@ namespace BeWo.View ServiceFacade.DoEmployeeServiceSync(s => s.GetAllChatActiveEmployeesCompact()); var offklienten = ServiceFacade.DoCustomerServiceSync(s => s.GetAllChatActiveCustomersCompact()); + /* var employee = ServiceFacade.DoEmployeeServiceSync( + s => s.GetEmployeeWithPersonOid(BeWoApp.LoggedOnUser.Employee.EmployeeOid)); + + employee.Employee2CustomerList.Select(s => s.CustomerOid.Value);*/ + StatusType Goff = StatusType.Offline;//"Offline"; foreach (var team in employeeteamoids) @@ -517,6 +526,7 @@ namespace BeWo.View } foreach (var list in offklienten) { + Clientlist.Items.Add(new KontaktlistBuilder(list.FirstName + " " + list.LastName, Goff, BuildImg(ServiceFacade.DoCustomerServiceSync(s => s.GetCustomerImage(list.CustomerOid))), list.PersonOid, ChatType.Klienten,list)); @@ -1030,7 +1040,7 @@ namespace BeWo.View } else { - SaveChatMessageinDB(BeWoApp.LoggedOnUser.Employee.PersonOid, empfängeroid, msg, 0, type); + SaveChatMessageinDB(BeWoApp.LoggedOnUser.Employee.PersonOid, empfängeroid, msg, false, type); } } catch (Exception xe) @@ -1049,7 +1059,7 @@ namespace BeWo.View } } - public void SaveChatMessageinDB(long senderoid, long empfangid, string message, int istZugestellt, ChatType type) + public void SaveChatMessageinDB(long senderoid, long empfangid, string message, bool istZugestellt, ChatType type) { try { @@ -1275,7 +1285,7 @@ namespace BeWo.View } else if (statustyp == StatusType.Offline) { - this.Color = new SolidColorBrush(Colors.Red); + this.Color = new SolidColorBrush(Colors.Red); } else {