public void LoadFile() { if (File.Exists("Settings.txt")) { FileSettings = new List <string>(File.ReadAllLines("Settings.txt")); string nameLine = ""; nameLine = TextFileRedactor.GetNameOfLine(FileSettings[0]); ValueShowWrods = Convert.ToInt32(TextFileRedactor.DeleteSpace(TextFileRedactor.GetValueNF(FileSettings, nameLine))); nameLine = TextFileRedactor.GetNameOfLine(FileSettings[1]); ValueMustTrueAnswer = Convert.ToInt32(TextFileRedactor.DeleteSpace(TextFileRedactor.GetValueNF(FileSettings, nameLine))); strFI = FileSettings[2]; strFIsafe = FileSettings[3]; } else { FileSettings.Add("ValueShowWrods-" + ValueShowWrods + ";"); FileSettings.Add("ValeMustTrueAnswer-" + ValueMustTrueAnswer + ";"); FileSettings.Add(strFI); FileSettings.Add(strFIsafe); File.WriteAllLines("Settings.txt", FileSettings); } StrFI = FileSettings[2]; FileWords = new List <string>(File.ReadAllLines(strFI)); for (int i = 0; i < FileWords.Count; i++) { FileWords[i] = TextFileRedactor.LineConctructor(FileWords[i], ValueMustTrueAnswer); } File.Delete(strFI); File.WriteAllLines(strFI, FileWords); }