public void FindDuplicates(object sender, RoutedEventArgs e) { try { if (_mainViewModel.LogList != null) { string message = _mainViewModel.FindDuplicates(); MessageBox.Show(message, "Duplikate"); } else { MessageBox.Show("Laden Sie zuerst die Daten.", "Daten laden"); } } catch (Exception ex) { MessageBox.Show("Exception occured: " + ex.Message, "Exception occured"); } }