private void DeleteCurrRow(object sender, RowActivatedArgs args)
        {
            var ret = sideDiag.Run();

            sideDiag.Hide();
            if (ret == 1)             // User decides otherwise
            {
                return;
            }

            SQLiteConnection conn = null;

            try {
                conn = new SQLiteConnection(name);
                TreeStore treeContent = (TreeStore)((TreeView)sender).Model;

                // Delete on: UI, SQL, intern list
                TreeIter iter;
                treeContent.GetIter(out iter, args.Path);
                treeContent.Remove(ref iter);                 // UI
                int index = int.Parse(args.Path.ToString());  // Get index
                SQLDelete(conn, invalidEntrys[index].table);  // Database
                invalidEntrys.Remove(invalidEntrys[index]);   // Intern List

                // Are all Entrys removed?
                if (invalidEntrys.Count == 0)
                {
                    if (mainDiag == null)
                    {
                        throw new InvalidDataException("main Diag not inited!");
                    }
                    mainDiag.Respond(0);                     // Close mainDiag
                }
            } catch (Exception e) {
                Console.WriteLine("[DatabaseChecker] DeleteCurrRow:\n" + e);
            } finally {
                if (conn != null)
                {
                    conn.Close();
                }
            }
        }
        public bool ShowInvalidEntrys()
        {
            if (!finished)             // Check Integrity first
            {
                CheckIntegrity();
            }

            if (wrong_schema)
            {
                mainDiag = new SafeCallDialog(new Label("Datenbank wird nicht untersützt!"), "Ok");
            }
            else if (no_file)
            {
                mainDiag = new SafeCallDialog(new Label("Keine solche Datei"), "Ok");
            }
            else
            {
                // Save ressources and only init that once!
                sideDiag = new SafeCallDialog("Soll der Eintrag wirklich gelösch werden?", "Ja", 0, "Nein", 1);
                sideDiag.Hide();

                // Pass invalid entrys to UI
                TreeView invalidItems = GenInvalidEntryView();

                VBox content = new VBox();
                content.PackStart(new Label("Inkonsistente Einträge:"), false, false, 5);
                content.PackStart(invalidItems, true, true, 2);
                mainDiag = new SafeCallDialog(content, "Ok");
            }

            mainDiag.Run();
            mainDiag.Destroy();
            mainDiag = null;

            if (sideDiag != null)
            {
                sideDiag.Destroy();
            }
            sideDiag = null;

            return(invalidEntrys.Count == 0);
        }