Esempio n. 1
0
        /// <summary>
        /// Allows a user to select a directory.  All files matching "nuix*.log*" are located and
        /// then loaded using loadLogFiles method.
        /// </summary>
        private void menuLoadDirectory_Click(object sender, RoutedEventArgs e)
        {
            VistaFolderBrowserDialog dialog = new VistaFolderBrowserDialog();

            if (dialog.ShowDialog() == true)
            {
                string   selectedDirectory = dialog.SelectedPath;
                string[] logFiles          = System.IO.Directory.GetFiles(selectedDirectory, "nuix*.log*", System.IO.SearchOption.AllDirectories);

                // Dispose of current repo
                NuixLogRepo prev = repo;
                repo = new NuixLogRepo();
                prev.DisposeRepo();

                loadLogFiles(logFiles);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Allows a user to select one or more individual log files to be loaded using loadLogFiles method.
        /// </summary>
        private void menuLoadNuixLogs_Click(object sender, RoutedEventArgs e)
        {
            Microsoft.Win32.OpenFileDialog ofd = new Microsoft.Win32.OpenFileDialog();
            ofd.Title            = "Load Nuix Logs";
            ofd.Filter           = "Nuix Logs|nuix*.log*;*.log";
            ofd.Multiselect      = true;
            ofd.InitialDirectory = System.IO.Path.Combine(Environment.GetEnvironmentVariable("LocalAppData"), @"Nuix\Logs");
            if (ofd.ShowDialog() == true)
            {
                // Dispose of current repo
                NuixLogRepo prev = repo;
                repo = new NuixLogRepo();
                prev.DisposeRepo();

                string[] filesToLoad = ofd.FileNames;
                loadLogFiles(filesToLoad);
            }
        }
Esempio n. 3
0
 /// <summary>
 /// When the window is closing we will try to have the repo cleanup its on disk work product:
 /// - SQLite DB
 /// - Lucene search index
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     repo.DisposeRepo();
 }