예제 #1
0
        private void RecursiveFileOpen(string dir)
        {
            try
            {
                foreach (string d in Directory.GetDirectories(dir))
                {
                    foreach (string s in Directory.GetFiles(d).Where(s => s.EndsWith(".onc")))
                    {
                        _logs.AddRange(_reader.ReadLogFile(s));
                    }

                    RecursiveFileOpen(d);
                }
            }
            catch
            {
                MessageBox.Show("Something went wrong while opening Chat Log Files. Exiting...", "Error",
                                MessageBoxButton.OK, MessageBoxImage.Error);
                Environment.Exit(-1);
            }
        }