private void SenderButton_Click(object sender, RoutedEventArgs e)
        {
            var openFileDialog = new OpenFileDialog();

            if (openFileDialog.ShowDialog() != true)
            {
                return;
            }
            var tempStringTab = File.ReadAllLines(openFileDialog.FileName);

            senderList = new List <ClientMessageWithTimeStamp>();

            foreach (var s in tempStringTab)
            {
                if (!s.Contains("Sent to Server"))
                {
                    continue;
                }
                var temp     = JsonConvert.DeserializeObject <ClientMessage>(s.Split(' ')[5].TrimEnd('@'));
                var withTime = new ClientMessageWithTimeStamp(temp,
                                                              DateTime.ParseExact((s.Split(' ')[0] + " " + s.Split(' ')[1]), "yyyy-MM-dd HH:mm:ss,fff",
                                                                                  CultureInfo.InvariantCulture));
                senderList.Add(withTime);
            }
            SenderListBox.ItemsSource = senderList;
        }
        private void ServerSelectFileButton_Click(object sender, RoutedEventArgs e)
        {
            serverReceiverList = new List <ClientMessageWithTimeStamp>();
            serverSenderList   = new List <ServerMessageWithTimestamp>();
            OpenFileDialog openFileDialog = new OpenFileDialog();

            if (openFileDialog.ShowDialog() == true)
            {
                var tempStringTab = File.ReadAllLines(openFileDialog.FileName);
                foreach (var s in tempStringTab)
                {
                    if (s.Split(' ')[2].Contains("Received"))
                    {
                        try
                        {
                            var temp     = JsonConvert.DeserializeObject <ClientMessage>(s.Split(' ')[5].TrimEnd('@'));
                            var withTime = new ClientMessageWithTimeStamp(temp,
                                                                          DateTime.ParseExact((s.Split(' ')[0] + " " + s.Split(' ')[1]), "yyyy-MM-dd HH:mm:ss,fff",
                                                                                              CultureInfo.InvariantCulture));
                            serverReceiverList.Add(withTime);
                        }
                        catch (Exception exception)
                        {
                            //LogAnError(exception);
                        }
                    }
                    if (s.Split(' ')[2].Contains("Sent"))
                    {
                        try
                        {
                            var temp     = JsonConvert.DeserializeObject <ServerMessage>(s.Split(' ')[5].TrimEnd('@'));
                            var withTime = new ServerMessageWithTimestamp(temp,
                                                                          DateTime.ParseExact((s.Split(' ')[0] + " " + s.Split(' ')[1]), "yyyy-MM-dd HH:mm:ss,fff",
                                                                                              CultureInfo.InvariantCulture));
                            serverSenderList.Add(withTime);
                        }
                        catch (Exception exception)
                        {
                            //LogAnError(exception);
                        }
                    }
                }
                ServerReceiverListBox.ItemsSource = serverReceiverList;
                ServerSenderListBox.ItemsSource   = serverSenderList;
            }
        }