private void lvMessages_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (lvmessages.SelectedItem is MessageCSV)
     {
         MessageCSV message = (MessageCSV)lvmessages.SelectedItem;
         tbMessageID.Text         = "ID: " + message.ID;
         tbMessageTimestamp.Text  = "Timestamp: " + message.Timestamp;
         tbMessageAttachment.Text = "Attachment: " + message.Attachments;
     }
 }
 private void lvMessage_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     if (lvmessages.SelectedItem is MessageCSV)
     {
         if (sender is ListViewItem item && item.IsSelected)
         {
             MessageCSV messageCSV = item.DataContext as MessageCSV;
             Clipboard.SetText(messageCSV.Contents);
             MessageBox.Show("Message copied to clipboard", "Message copied", MessageBoxButton.OK, MessageBoxImage.Information);
         }
     }
 }