public TimelinePage()
 {
     InitializeComponent();
     BuildTimeline();
     timelinePage = this;
 }
Exemple #2
0
        private async void ParseButton_Click(object sender, RoutedEventArgs e)
        {
            if (!ConfigurationFilesAreValid())
            {
                return;
            }

            if (OfflineCheck.IsChecked == true)
            {
                if (!OfflineSelectionsAreValid())
                {
                    return;
                }
            }

            //cover UI
            ShowParsingInProgress(true);

            //begin the parsing process
            Stopwatch stopwatch = new Stopwatch();

            stopwatch.Start();

            try
            {
                List <IShellItem> shellItems = await ParseShellBags();

                if (shellItems.Count == 0)
                {
                    LogAggregator.Instance.ShowIfNotEmpty();
                    ShowParsingInProgress(false);
                    return;
                }
                App.ShellItems = shellItems;
                List <IEvent> events = EventParser.GetEvents(App.ShellItems);
                if (App.nodeCollection.nodeList != null)
                {
                    App.nodeCollection.nodeList.Clear();
                }
                App.nodeCollection.ClearAllFilters();
                App.nodeCollection.nodeList.AddRange(NodeParser.GetNodes(events));
            }
            catch (System.Security.SecurityException)
            {
                showErrorMessage("Please exit the program and run SeeShells as an administrator to parse a live registry.", "Access Denied");
                ShowParsingInProgress(false);
                return;
            }

            stopwatch.Stop();
            logger.Info("Parsing Complete. ShellItems Parsed: " + App.ShellItems.Count + ". Time Elapsed: " + stopwatch.ElapsedMilliseconds / 1000 + " seconds");

            //Restore UI
            ShowParsingInProgress(false);

            //Go to Timeline
            if (timelinePage == null)
            {
                timelinePage = new TimelinePage();
                NavigationService.Navigate(timelinePage);
            }
            else
            {
                timelinePage.RebuildTimeline();
                NavigationService.Navigate(timelinePage);
            }
            App.NavigationService = NavigationService;
            if (!(App.pages.ContainsKey("timelinepage")))
            {
                App.pages.Add("timelinepage", timelinePage);
            }
        }