Ejemplo n.º 1
0
        private void Button_SelectFolder_Click(object sender, RoutedEventArgs e)
        {
            var openFileDialog = new VistaFolderBrowserDialog();

            if (openFileDialog.ShowDialog() == false)
            {
                return;
            }

            ViewModel.Files.Clear();
            foreach (var file in Directory.GetFiles(openFileDialog.SelectedPath).Where(f => !Path.GetFileName(f).StartsWith("~$")))
            {
                ViewModel.Files.Add(new ImportEntry()
                {
                    IsSelected = false,
                    Path       = file,
                    Count      = ExcelLoader.LoadFileCount(file)
                });
            }
        }