private static VerbTableEntry MakeEntry(Verb v, string person, int index) { var pr = v.Lookup(Verb.Mode.Indicativo, Verb.Tense.Presente)[index]; var im = v.Lookup(Verb.Mode.Indicativo, Verb.Tense.Imperfecto)[index]; var pret = v.Lookup(Verb.Mode.Indicativo, Verb.Tense.Pretérito)[index]; var cond = v.Lookup(Verb.Mode.Indicativo, Verb.Tense.Condicional)[index]; var fut = v.Lookup(Verb.Mode.Indicativo, Verb.Tense.Futuro)[index]; return(new VerbTableEntry(person, pr, im, pret, cond, fut, true)); //creates a master copy }
/* * private DataGridCell GetDataGridCell(DataGridCellInfo cellInfo) * { * var cellContent = cellInfo.Column.GetCellContent(cellInfo.Item); * * if (cellContent != null) * return ((DataGridCell)cellContent.Parent); * * return (null); * }*/ private static ObservableCollection <VerbTableEntry> LoadTable(Verb v) { //Present //Preterite //Imperfect //Conditional //Future v.Lookup(Verb.Mode.Indicativo, Verb.Tense.Presente); var lst = new ObservableCollection <VerbTableEntry> { MakeEntry(v, "yo", 0), MakeEntry(v, "tú", 1), MakeEntry(v, "él/ella/Ud.", 2), MakeEntry(v, "nosotros", 3), MakeEntry(v, "nosotros", 4), MakeEntry(v, "éllos/ellas/Uds.", 5) }; return(lst); }