void GenerateImportFile() { List <string> fileContent = new List <string>(File.ReadAllLines(openFileDialog.FileName)); Thread thrTranslate = new Thread(TranslateImportFile); wndProgress = new WindowProgress(this); wndProgress.Show(); thrTranslate.Start((object)TextFileRedactor.GenerateFileImport(fileContent)); }