private static void initializeWordList() { words = new WordList(); words.Add("test"); // Contains: test words.Add("dog"); // Contains: test, dog words.Insert(1, "shit"); // Contains: test, shit, dog words.Sort(); }
public Word Add(string text) { var xw = new Word { Row = this, Text = text }; words.Add(xw); return(xw); }
void Page_Loaded(object sender, RoutedEventArgs e) { // connect toolbar to C1RichTextBox _rtbToolbar.RichTextBox = _richTextBox; _richTextBox.SpellChecker = _c1SpellChecker; // bind DataGrid _dataGrid.ItemsSource = Beatle.GetBeatles(); // load sample text into text boxes using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("SpellCheckerSamples.Resources.test.txt")) using (var sr = new StreamReader(stream)) { var text = sr.ReadToEnd(); _plainTextBox.Text = text; _richTextBox.Text = text; } // set up ignore list WordList il = _c1SpellChecker.IgnoreList; il.Add("ComponentOne"); il.Add("Silverlight"); // monitor events _c1SpellChecker.BadWordFound += _c1SpellChecker_BadWordFound; _c1SpellChecker.CheckControlCompleted += _c1SpellChecker_CheckControlCompleted; // load main dictionary if (_c1SpellChecker.MainDictionary.State != DictionaryState.Loaded) { _c1SpellChecker.MainDictionary.Load(Application.GetResourceStream(new Uri("/" + new AssemblyName(Assembly.GetExecutingAssembly().FullName).Name + ";component/Resources/C1Spell_en-US.dct", UriKind.Relative)).Stream); } if (_c1SpellChecker.MainDictionary.State == DictionaryState.Loaded) { _btnBatch.IsEnabled = _btnModal.IsEnabled = true; WriteLine("loaded main dictionary ({0:n0} words).", _c1SpellChecker.MainDictionary.WordCount); } else { WriteLine("failed to load dictionary: {0}", _c1SpellChecker.MainDictionary.State); } // load user dictionary //UserDictionary ud = _c1SpellChecker.UserDictionary; //ud.LoadFromIsolatedStorage("Custom.dct"); // save user dictionary when app exits App.Current.Exit += App_Exit; _cmbControl.SelectedIndex = 0; // set focus to textbox //_plainTextBox.Focus(); }
private WordList DoTextItemSelection_Block(Point mouse_down_point, Point mouse_move_point) { WordList selected_words = new WordList(); double left = Math.Min(mouse_move_point.X, mouse_down_point.X) / actual_width; double top = Math.Min(mouse_move_point.Y, mouse_down_point.Y) / actual_height; double width = Math.Abs(mouse_move_point.X - mouse_down_point.X) / actual_width; double height = Math.Abs(mouse_move_point.Y - mouse_down_point.Y) / actual_height; foreach (Word word in words) { bool is_inside = true; is_inside = is_inside && word.Left >= left; is_inside = is_inside && word.Left + word.Width <= left + width; is_inside = is_inside && word.Top >= top; is_inside = is_inside && word.Top + word.Height <= top + height; if (is_inside) { selected_words.Add(word); } } return(selected_words); }
public void TestMixedEventOrder() { WordList wordList = new WordList(); Word word = wordList.Add("test", "test", ""); wordList.ResetHistory(); DateTime utcNow = DateTime.UtcNow; word.Events.Add(new WordEvent(utcNow.AddDays(-1), WordEventType.Remembered)); word.Events.Add(new WordEvent(utcNow.AddDays(-3), WordEventType.Forgotten)); word.Events.Add(new WordEvent(utcNow.AddDays(-2), WordEventType.Added)); var wordListXml = WordListXmlConverter.ConvertToXml(wordList); WordList wordList2 = WordListXmlConverter.ConvertToObject(wordListXml); List <WordInfo> words2 = wordList2.GetAllWords().ToList(); Assert.That(words2.Count, Is.EqualTo(1)); Word word2 = words2[0].Word; Assert.That(word2.Events.Count, Is.EqualTo(3)); Assert.That(word2.Events[0].EventType, Is.EqualTo(WordEventType.Added)); Assert.That(word2.Events[1].EventType, Is.EqualTo(WordEventType.Forgotten)); Assert.That(word2.Events[2].EventType, Is.EqualTo(WordEventType.Remembered)); Assert.That(word2.Events[0].EventDate, Is.EqualTo(utcNow.AddDays(-3))); Assert.That(word2.Events[1].EventDate, Is.EqualTo(utcNow.AddDays(-3))); Assert.That(word2.Events[2].EventDate, Is.EqualTo(utcNow.AddDays(-1))); }
public void OnDragStarted(TextLayerSelectionMode text_layer_selection_mode, WordList words, double actual_width, double actual_height, bool button_left_pressed, bool button_right_pressed, Point mouse_down_point) { this.text_layer_selection_mode = text_layer_selection_mode; this.words = words; this.actual_width = actual_width; this.actual_height = actual_height; if (null == words) { Logging.Info("OCR has not been done so no text to select"); return; } if (button_left_pressed) { last_selected_words = WORDS_EMPTY; WordList selected_words = new WordList(); // Find any clicked word double mouse_down_left = mouse_down_point.X / actual_width; double mouse_down_top = mouse_down_point.Y / actual_height; foreach (Word word in words) { if (word.Contains(mouse_down_left, mouse_down_top)) { selected_words.Add(word); } } } }
private static void AddWords(string name, string[] languages) { Console.WriteLine("Press enter(empty line) to stop adding new words.\n"); WordList list = WordList.LoadList(name); bool isRunning = true; while (isRunning) { var words = new string[languages.Length]; for (int i = 0; i < languages.Length; i++) { Console.Write(i == 0 ? $"Add new word {languages[i]}: " : $"Add {languages[i]} translation: "); var input = Console.ReadLine().ToLower(); if (string.IsNullOrWhiteSpace(input)) { list.Save(); isRunning = false; break; } words[i] = input; } if (isRunning) { list.Add(words); } } //Console.WriteLine($"{list.ToString().Count()} word was added to list '{name}'\n"); }
private async void ButtonAdd_Click(object sender, EventArgs e) { string[] words = new string[dataGridViewWords.RowCount]; for (int i = 0; i < dataGridViewWords.RowCount; i++) { words[i] = dataGridViewWords.Rows[i].Cells[1].Value.ToString(); } int countWordsBefore = wordList.Count(); wordList.Add(words); wordList.Save(); int countWordsAfter = wordList.Count(); if (countWordsAfter != countWordsBefore + 1) { await ShowInfoTextAsync("Duplicate", Color.DarkRed); } else { await ShowInfoTextAsync("Added.", Color.Green); } FormAddWorks_OnWordsAdded(this, new EventArgs()); }
public void AddPair(string phrase, string translation) { System.Diagnostics.Debug.Assert(!InvokeRequired); list.Add(new WordListEntry(list, phrase, translation)); grid.DataSource = list; }
public ActionResult Create(CreateWordListViewModel model) { try { var newList = new WordList(); newList.Name = model.Name; var words = model.CommaSeparatedList .Replace(" ", string.Empty) .Split(',', StringSplitOptions.RemoveEmptyEntries); foreach (var word in words) { newList.Add(new Word() { Value = word }); } _writer.Save(newList); return(RedirectToAction(nameof(Index))); } catch { return(View()); } }
private static void AddTranslationToList(WordList wordList) { var enterNothing = true; while (enterNothing) { var translations = new string[wordList.Languages.Length]; for (var i = 0; i < wordList.Languages.Length; i++) { Console.WriteLine($"Please write the word in {wordList.Languages[i]} "); var input = Console.ReadLine().ToLower(); if (string.IsNullOrWhiteSpace(input)) { wordList.Save(); enterNothing = false; break; } translations[i] = input; } if (enterNothing) { wordList.Add(translations); } } }
private void button1_Click(object sender, EventArgs e) { WordList w = WordList.LoadList(Text); foreach (DataGridViewRow row in dataGridView1.Rows) { string[] words = new string[w.Languages.Length]; for (int i = 0; i < row.Cells.Count; i++) { if (row.Cells[i].Value != null) { string word = row.Cells[i].Value.ToString(); words[i] = word; } else { MessageBox.Show("Fill all the translations to save", "Empty translations", MessageBoxButtons.OK); return; } } w.Add(words); } w.Save(); Close(); }
/// <summary> /// Word remove from black list /// </summary> /// <param name="sender"></param> public void RemoveFromBlackList(object sender) { var textBlock = sender as TextBlock; var wordItem = textBlock.DataContext as WordItem; using var db = new AppDbContext(); db.DiaryBlackWords.Remove(new DiaryBlackWord { Id = wordItem.Id, Word = wordItem.Word }); db.SaveChanges(); var item = BlackWordsList.First(x => x.Word == wordItem.Word); BlackWordsList.Remove(item); WordList.Add(new WordItem { Id = wordItem.Id, Word = wordItem.Word, Count = 0, Command = new RelayParameterizedCommand(AddToBlackList) }); }
private void SaveWord(object sender, ExecutedRoutedEventArgs e) { string oldName = CurrentWordForm == null ? null : CurrentWordForm.WordInfo.Word.Name; string newName = (EditableWord.Name ?? "").Trim(); string description = EditableWord.Description; string tags = EditableWord.Tags; if (oldName != newName && WordList.Contains(newName)) { throw new Exception(string.Format("Word '{0}' is present in dictionary already.", newName)); } if (oldName == null) { WordList.Add(newName, description, tags); } else { WordList.Update(oldName, newName, description, tags); } EditableWord = null; SearchText = newName; MarkSearchPending(); }
public Crawling(Crawling crawling) : this() { Url = new MyUrl(crawling.Url); BaseXPath = crawling.BaseXPath; foreach (Word word in crawling.WordList) { WordList.Add(new Word(word)); } foreach (BaseAction action in crawling.ActionList) { ActionList.Add(new BaseAction(action)); } foreach (CrawlingInfo info in crawling.OtherCrawlingList) { OtherCrawlingList.Add(new CrawlingInfo(info)); } foreach (UrlOption option in crawling.UrlOptionLIst) { UrlOptionLIst.Add(new UrlOption(option)); } foreach (WhenCrawling when in crawling.WhenList) { WhenList.Add(new WhenCrawling(when)); } }
//Adds Words to list - DONE. private void button_AddWordOK_Click(object sender, EventArgs e) { List <string> words = new List <string>(); WordList editList = WordList.LoadList(FormWordList.NameOfList); for (int i = 0; i < dataGridView_AddWords.Columns.Count; i++) { foreach (DataGridViewRow item in dataGridView_AddWords.Rows) { words.Add(item.Cells[i].Value?.ToString()); } } if (words.Contains(null)) { MessageBox.Show("No word entered!"); } else { string[] translations = words.ToArray(); editList.Add(translations); editList.Save(); DialogResult = DialogResult.OK; Close(); } }
public void open(string filename) { WordList currentWords = WordListFromText.get(new TextLoader(filename)); newWords = new WordList(); // remove trash and known foreach (string str in currentWords) { bool bypass = true; foreach (IWordFilter filter in filters) { if (!filter.bypass(str)) { bypass = false; break; } } if (!bypass) { continue; } // no duplicates if (newWords.Contains(str)) { continue; } // add to new words newWords.Add(str); } }
private static WordList createWordList() { // Create an array of words for the default WordList. // Note that when words are added to a WordList, it // capitalized versions are also implicitly added. string[] words = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "a'", "b'", "c'", "d'", "e'", "f'", "g'", "h'", "i'", "j'", "k'", "l'", "m'", "n'", "o'", "p'", "q'", "r'", "s'", "t'", "u'", "v'", "w'", "x'", "y'", "z'", "out", "in", "cout", "cin", "reset", "clock", "en", "Sa", "Sb", "Sc", "Sd", "Se", "Sf", "Sg", "Sout", "Sin", "S1", "S0", "S1'", "S0'", "AB", "A+B", "SW", }; // Create the WordList WordList wordList = new WordList(); foreach (string word in words) { wordList.Add(word); } return(wordList); }
private static void AddWords(WordList wordList) { Console.WriteLine("Press enter(empty line) to stop adding new words.\n"); bool isRunning = true; do { var words = new string[wordList.Languages.Length]; for (int i = 0; i < wordList.Languages.Length; i++) { Console.Write(i == 0 ? $"Add new word {wordList.Languages[i]}: " : $"Add {wordList.Languages[i]} translation: "); words[i] = Console.ReadLine().ToLower(); isRunning = (words[i] == ""); if (isRunning) { break; } } if (!isRunning) { wordList.Add(words); } wordList.Save(); } while (isRunning == false); }
private void SaveButton_Click(object sender, EventArgs e) { for (var i = _wordList.Count(); i < WorddataGridView.RowCount; i++) { var translations = new string[_wordList.Languages.Length]; for (var j = 0; j < translations.Length; j++) { if (WorddataGridView.Rows[i].Cells[j].Value == null || string.IsNullOrWhiteSpace(WorddataGridView.Rows[i].Cells[j].Value.ToString())) { MessageBox.Show("Before pressing save make sure all languages have translations"); WorddataGridView.Rows.RemoveAt(i); break; } translations[j] = WorddataGridView.Rows[i].Cells[j].Value.ToString(); } if (!translations.Contains(null) || translations.Contains(string.Empty)) { _wordList.Add(translations); } } _wordList.Save(); }
/// <summary> /// This is for adding new words. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void button5_Click(object sender, EventArgs e) { WordList wordlist = WordList.LoadList(fileName); if (label_WordOrTranslation.Text == "Word in") { addWord = new List <string>(); label_WordOrTranslation.Text = "Translation in"; lanuagesCount++; label_InLanguages.Text = wordlist.Languages[lanuagesCount]; addWord.Add(txt_word.Text); txt_word.Text = ""; } else if (label_WordOrTranslation.Text == "Translation in") { lanuagesCount++; addWord.Add(txt_word.Text); txt_word.Text = ""; } if (lanuagesCount == wordlist.Languages.Length) { label_WordOrTranslation.Text = "Word in"; wordlist.Add(addWord.ToArray()); label_InLanguages.Text = wordlist.Languages[0]; lanuagesCount = 0; } else { label_InLanguages.Text = wordlist.Languages[lanuagesCount]; } }
public static void AddWord(WordList wordlist) { List <string> temp = new List <string>(); bool exit = false; while (!exit) { exit = false; Console.WriteLine("What word would u like to add? (Empty line to finish) "); temp.Add(Console.ReadLine()); if (temp[0] != "") { int i = 0; while (!exit) { Console.WriteLine("Enter translation to that word? (Empty line for a new word)"); string input = Console.ReadLine(); if (input != "") { temp.Add(input); } if (input == "") { exit = true; } i++; } } } wordlist.Add(temp.ToArray()); }
/// <summary> /// Общий метод для всех способов открытия файла списка. /// </summary> /// <param name="file">Файл списка, который требуется открыть.</param> /// <param name="askSelectAction">Требуется ли запрашивать выбор действия.</param> private async void OpenList(StorageFile file, bool askSelectAction = true) { if (file == null) { return; } List <ListWordModel> data = new List <ListWordModel>(); try { data = new XmlService().ReadList(await FileIO.ReadTextAsync(file), !askSelectAction); if (data == null) { return; } } catch (Exception ex) { Messages.OpenFileError(ex.Message); return; } if (askSelectAction && WordList.Count > 0) { MessageDialogResult result = await Messages.SelectOperationWithLoadedListFileAsync(); switch (result) { case MessageDialogResult.Yes: WordList.Clear(); new AppHelper().AddFileToMRU(file); break; case MessageDialogResult.No: break; case MessageDialogResult.Cancel: return; } } else { WordList.Clear(); } ListFile = file; ObservableCollection <ListWordViewModel> readed = new ObservableCollection <ListWordViewModel>(data?.Select(e => new ListWordViewModel(e))); foreach (ListWordViewModel item in readed) { WordList.Add(item); } for (int i = 0; i < WordList.Count; i++) { WordList[i].ID = (ushort)i; } }
static void Main(string[] args) { var sentence = new WordList(); sentence.AddWordType <ColorWord>(); sentence.AddWordType <NumberWord>(); sentence.Add(new UntypedWord { Text = "two" }); sentence.Add(new UntypedWord { Text = "green" }); sentence.Add(new UntypedWord { Text = "frogs" }); sentence.Add(new UntypedWord { Text = "and" }); sentence.Add(new UntypedWord { Text = "one" }); sentence.Add(new UntypedWord { Text = "red" }); sentence.Add(new UntypedWord { Text = "rose" }); Console.WriteLine("color words: " + sentence.HowManyWordsOfType <ColorWord>()); Console.WriteLine("number words: " + sentence.HowManyWordsOfType <NumberWord>()); }
private async Task LoadWordFileAsync() { ApplicationData.Current.LocalSettings.Values["IsPicking"] = true; FileOpenPicker picker = new FileOpenPicker(); picker.FileTypeFilter.Add(".csv"); _currentFile = await picker.PickSingleFileAsync(); ApplicationData.Current.LocalSettings.Values["IsPicking"] = false; if (_currentFile == null) { throw new Exception("ファイルが選択されていません"); } CurrentFileName = _currentFile.Name; var buff = await FileIO.ReadBufferAsync(_currentFile); DataReader reader = DataReader.FromBuffer(buff); byte[] dataBuff = new byte[buff.Length]; reader.ReadBytes(dataBuff); string dataStr = Portable.Text.Encoding.GetEncoding("Shift-JIS").GetString(dataBuff, 0, dataBuff.Length); IList <string> lines = dataStr.Split('\n').ToList(); WordList.Clear(); foreach (string line in lines) { string tempLine = line.Replace("\r", ""); if (string.IsNullOrEmpty(tempLine)) { continue; } string[] str = tempLine.Split(','); WordItem item = null; if (str.Length == 4) { int col2 = 0; int.TryParse(str[2], out col2); int col3 = 0; int.TryParse(str[3], out col3); item = new WordItem(str[0], str[1], col2, col3); } else { item = new WordItem(str[0], str[1], 0, 0); } WordList.Add(item); } RaisePropertyChanged("MaxWordNum"); }
// TODO Sync tags private async Task SyncSet(IQuizletService api, WordList list, CancellationToken cancel) { Debug.Assert(list.SyncID != null, "list.SyncID != null"); Debug.Assert(list.ID != null, "list.ID != null"); if (list.SyncNeeded) { try { var info = await api.FetchSetInfo(list.SyncID.Value, cancel); // Find updates from Quizlet var missingLocally = (from qTerm in info.Terms where list.All(e => !SameTerm(e.Phrase, e.Translation, qTerm.Term, qTerm.Definition)) select new TranslationPair(qTerm.Term, qTerm.Definition)).ToList(); var missingRemotely = (from lTerm in list where info.Terms.All(t => !SameTerm(lTerm.Phrase, lTerm.Translation, t.Term, t.Definition)) select new TranslationPair(lTerm.Phrase, lTerm.Translation)).ToList(); var modifiedLocally = list.SyncNeeded; var modifiedRemotely = info.Modified > list.SyncDate || !list.SyncDate.HasValue; if (modifiedLocally && modifiedRemotely) { // Merge conflict! } else if (modifiedRemotely) { // Apply deletions from Quizlet for (int i = 0; i < missingRemotely.Count; i++) { var qd = missingRemotely[i]; list.Remove(e => SameTerm(e.Phrase, e.Translation, qd.Phrase, qd.Translation)); } // Apply insertions from Quizlet foreach (var qi in missingLocally) { list.Add(new WordListEntry(list, qi.Phrase, qi.Translation)); } } else { // Just push a full update of the entries to Quizlet var set = GetSetModel(list); // Update properties that aren't stored locally await api.UpdateSet(set, cancel); } } catch (Exception e) { OnItemError(list, e); return; } } OnItemFinished(list); }
public void addKnownWord(string word) { if (newWords == null) { return; } appendKnown.append(word); knownWords.Add(word); }
public GameViewModel() { string[] wordList = Letters.Properties.Resources.WordList .Replace("\r\n", "\n") .Split('\n'); foreach (string word in wordList) { WordList.Add(word); } }
private void SearchWord(string searchWord) { try { if (string.IsNullOrWhiteSpace(searchWord)) { return; } searchWord = searchWord.TrimStart().TrimEnd().ToLower(); if (temp == searchWord) { return; } _Word = temp = searchWord; WordList?.Clear(); if (!Regex.IsMatch(searchWord, @"[a-z]+[\-\']?[a-z]*")) { WordList?.Add(new Word() { word = searchWord, translation = "无释义" }); return; } string result = RestSharpService.Search(searchWord); Console.WriteLine(result); if (result == "[]") { WordList?.Add(new Word() { word = searchWord, translation = "无释义" }); } else { List <Word> list = JsonConvert.DeserializeObject <List <Word> >(result); if (list?.Count > 0) { list.ForEach(item => WordList.Add(item)); } } } catch (Exception) { throw; } }
static void Main(string[] args) { Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); Dictionary <Char[], List <string> > AllWords = new Dictionary <Char[], List <string> >(new CompareArrayOfCharactor()); foreach (string word in FindAnagramWords()) { List <string> WordList; Char[] key = ToCharArray(word); if (!AllWords.TryGetValue(key, out WordList)) { WordList = new List <string>(); AllWords.Add(key, WordList); } WordList.Add(word); } string CompareWord; do { Console.Write(string.Format("{0}Type the word you would like to see the anagram for: ", Environment.NewLine)); CompareWord = Console.ReadLine(); stopWatch.Reset(); stopWatch.Start(); if (CompareWord != null) { IEnumerable <string> Anagrams = new List <string>(); try { Anagrams = AllWords[ToCharArray(CompareWord)]; } catch (Exception e) { Console.WriteLine("Oops, the word you typed does not exist in the list, please try again!"); continue; } stopWatch.Stop(); Console.WriteLine("Anagram for " + CompareWord + " are:"); foreach (string word in Anagrams) { Console.WriteLine(word); } } } while (CompareWord != null); }
private void CreateRecognizer(InkOverlay overlay) { Recognizers recognizers = new Recognizers(); Recognizer english = recognizers.GetDefaultRecognizer(); context = english.CreateRecognizerContext(); WordList wordList = new WordList(); for (int i = 0; i < 100; ++i) wordList.Add(i.ToString()); context.WordList = wordList; context.Factoid = Factoid.WordList; context.RecognitionFlags = RecognitionModes.Coerce; }
// TODO Sync tags private async Task SyncSet(IQuizletService api, WordList list, CancellationToken cancel) { Debug.Assert(list.SyncID != null, "list.SyncID != null"); Debug.Assert(list.ID != null, "list.ID != null"); if (list.SyncNeeded) { try { var info = await api.FetchSetInfo(list.SyncID.Value, cancel); // Find updates from Quizlet var missingLocally = (from qTerm in info.Terms where list.All(e => !SameTerm(e.Phrase, e.Translation, qTerm.Term, qTerm.Definition)) select new TranslationPair(qTerm.Term, qTerm.Definition)).ToList(); var missingRemotely = (from lTerm in list where info.Terms.All(t => !SameTerm(lTerm.Phrase, lTerm.Translation, t.Term, t.Definition)) select new TranslationPair(lTerm.Phrase, lTerm.Translation)).ToList(); var modifiedLocally = list.SyncNeeded; var modifiedRemotely = info.Modified > list.SyncDate || !list.SyncDate.HasValue; if (modifiedLocally && modifiedRemotely) { // Merge conflict! } else if (modifiedRemotely) { // Apply deletions from Quizlet for (int i = 0; i < missingRemotely.Count; i++) { var qd = missingRemotely[i]; list.Remove(e => SameTerm(e.Phrase, e.Translation, qd.Phrase, qd.Translation)); } // Apply insertions from Quizlet foreach (var qi in missingLocally) list.Add(new WordListEntry(list, qi.Phrase, qi.Translation)); } else { // Just push a full update of the entries to Quizlet var set = GetSetModel(list); // Update properties that aren't stored locally await api.UpdateSet(set, cancel); } } catch (Exception e) { OnItemError(list, e); return; } } OnItemFinished(list); }
/// <summary>Process a line of script input.</summary> /// <remarks>Process a line of script input.</remarks> private void Collect(string s) { string[] lines = new string[4]; if (EString.Match(s, "*reasmb: *", lines)) { if (lastReasemb == null) { ConsoleSurrogate.WriteLine("Error: no last reasemb"); return; } lastReasemb.Add(lines[1]); } else { if (EString.Match(s, "*decomp: *", lines)) { if (lastDecomp == null) { ConsoleSurrogate.WriteLine("Error: no last decomp"); return; } lastReasemb = new ReasembList(); string temp = lines[1]; if (EString.Match(temp, "$ *", lines)) { lastDecomp.Add(lines[0], true, lastReasemb); } else { lastDecomp.Add(temp, false, lastReasemb); } } else { if (EString.Match(s, "*key: * #*", lines)) { lastDecomp = new DecompList(); lastReasemb = null; int n = 0; if (lines[2].Length != 0) { try { n = int.Parse(lines[2]); } catch (FormatException) { ConsoleSurrogate.WriteLine("Number is wrong in key: " + lines[2]); } } keys.Add(lines[1], n, lastDecomp); } else { if (EString.Match(s, "*key: *", lines)) { lastDecomp = new DecompList(); lastReasemb = null; keys.Add(lines[1], 0, lastDecomp); } else { if (EString.Match(s, "*synon: * *", lines)) { WordList words = new WordList(); words.Add(lines[1]); s = lines[2]; while (EString.Match(s, "* *", lines)) { words.Add(lines[0]); s = lines[1]; } words.Add(s); syns.Add(words); } else { if (EString.Match(s, "*pre: * *", lines)) { pre.Add(lines[1], lines[2]); } else { if (EString.Match(s, "*post: * *", lines)) { post.Add(lines[1], lines[2]); } else { if (EString.Match(s, "*initial: *", lines)) { initial = lines[1]; } else { if (EString.Match(s, "*final: *", lines)) { finl = lines[1]; } else { if (EString.Match(s, "*quit: *", lines)) { quit.Add(" " + lines[1] + " "); } else { ConsoleSurrogate.WriteLine("Unrecognized input: " + s); } } } } } } } } } } }