private void ScannFileList(string[] files, string path, string extension)
        {
            if (path == "")
            {
                return;
            }

            #region processing files
            List <string> fileList = new List <string>();

            foreach (string file in files)
            {
                fileList.Add(file);
            }

            var filedetailsList = new FileDetailsList(fileList, path, extension);
            _fileDetails = filedetailsList.LoadFiles();

            labelFolders.Content = filedetailsList.DirCount.ToString();
            labelFiles.Content   = filedetailsList.FileCount.ToString();

            if (_fileDetails.Count > 0)
            {
                buttonImport.IsEnabled = true;
            }

            checkboxSampler.IsChecked    = CheckIfSampler(_fileDetails);
            datagridFilelist.ItemsSource = _fileDetails;

            #endregion

            #region processing parser tokens

            List <ParserToken> tokens     = new List <ParserToken>();
            ParserTokenList    parserlist = new ParserTokenList(path);
            tokens = parserlist.Get();

            UpdateCombos(tokens);

            #endregion
        }
        private void ScannFolder(string startDirectory, string filePattern)
        {
            if (startDirectory == "")
            {
                return;
            }

            #region processing files

            var filedetails = new FileDetailsList(startDirectory, filePattern);
            _fileDetails = filedetails.Load();

            labelFolders.Content = filedetails.DirCount.ToString();
            labelFiles.Content   = filedetails.FileCount.ToString();

            var size = filedetails.FileSizeAll / 1024;
            labelSize.Content = size.ToString("#,#") + " Kb";

            if (filedetails.FileSizeAll > 0)
            {
                buttonImport.IsEnabled = true;
            }

            checkboxSampler.IsChecked    = CheckIfSampler(_fileDetails);
            datagridFilelist.ItemsSource = _fileDetails;

            #endregion

            #region processing parser tokens

            List <ParserToken> tokens     = new List <ParserToken>();
            ParserTokenList    parserlist = new ParserTokenList(startDirectory);
            tokens = parserlist.Get();

            UpdateCombos(tokens);

            #endregion

            #region Fill Albums condtionaly
            var folders = Convert.ToInt32(labelFolders.Content);

            if (comboboxArtist.SelectedItem.ToString() != "NA" && folders > 0)
            {
                DirectoryInfo di      = null;
                List <string> allDirs = Helpers.GetDirectories(startDirectory, false);
                _albums.Clear();

                foreach (string dir in allDirs)
                {
                    di = new DirectoryInfo(dir);

                    if (_ignores.Contains(dir.Split('\\').Last()) != true)
                    {
                        _albums.Add(di.Name);
                    }
                    else
                    {
                        _albums.Add(di.Parent.Name);
                    }
                }
                comboboxAlbum.SelectedIndex = 0;
            }

            #endregion
        }