Example #1
0
        public static void LogMatchingEntry(RegistryEntry entry, string matching_field)
        {
            SQLiteCommand command = DatabaseManager.Connection.CreateCommand();

            command.CommandText = DBStringFormatter.GetMatchingEntryInsertStatement(entry, matching_field, AnalysisRunLogger.CurrentRunID);
            command.ExecuteNonQuery();
            Console.WriteLine("MATCH: " + command.CommandText);
            main_window.MainApp.Analyzer.NumMatchingEntries += 1;
        }
Example #2
0
        public static void LogEntries(List <RegistryEntry> entries)
        {
            main_window.Dispatcher.Invoke(() =>
            {
                main_window.LogScrollViewer.Visibility = System.Windows.Visibility.Visible;
                main_window.LogScrollViewer.Content    = "";
            });

            foreach (RegistryEntry entry in entries)
            {
                SQLiteCommand command = DatabaseManager.Connection.CreateCommand();
                command.CommandText = DBStringFormatter.GetEntryInsertStatement(entry, AnalysisRunLogger.CurrentRunID);
                command.ExecuteNonQuery();
                main_window.LogScrollViewer.Dispatcher.Invoke(() =>
                {
                    main_window.LogScrollViewer.Content += command.CommandText + "\n";
                    main_window.LogScrollViewer.ScrollToBottom();
                });
            }
        }