Beispiel #1
0
        private void RefreshFilesList()
        {
            if (_filePaths == null || _decodedFilenames == null)
            {
                return;
            }
            ;

            FilesListBox.Items.Clear();
            for (var i = 0; i < _filePaths.Length; i++)
            {
                var filePath = _filePaths[i];
                var fileNameWithoutExtension = Path.GetFileNameWithoutExtension(filePath);
                var fileNameDecoded          = TranslitDecoder.Decode(fileNameWithoutExtension, _dictionary);
                _decodedFilenames[i] = fileNameDecoded;
                FilesListBox.Items.Add(fileNameWithoutExtension + " -> " + fileNameDecoded);
            }
        }
Beispiel #2
0
        private void InitDictionary()
        {
            var dictionaryLines = File.ReadAllLines("Dictionary.txt");

            _dictionary = TranslitDecoder.ParseDictionary(dictionaryLines);
        }