// Conjuge the infinitive verb in parameters with the person and the time given in parameters public static ConjugatedVerb Conjugate(InfinitiveVerb verb, string person, string time) { con.Open(); string conjugatedVerb = verb.stem + new CMD(@"SELECT ending FROM Conjugaison WHERE verbGroup = '" + verb.group + "' AND time = '" + time + "' AND person = '" + person + "'", con).ExecuteScalar().ToString(); con.Close(); return(new ConjugatedVerb(conjugatedVerb, verb.verb, verb.group, verb.stem, person, time)); }
static void Main() { // MINI PROGRAMME DE TEST POUR LA CONJUGAISON DES VERBES string temps; string verbe = "aimer"; InfinitiveVerb verbe1 = new InfinitiveVerb(verbe); Console.WriteLine("Le verbe choisi est : " + verbe1.ToString()); Console.WriteLine(); temps = "présent indicatif"; Console.WriteLine("Voici sa conjugaison au : " + temps); for (int i = 1; i < 7; i++) { Console.WriteLine(verbe1.Conjugate(i.ToString(), temps)); } Console.WriteLine(); temps = "futur_simple indicatif"; Console.WriteLine("Voici sa conjugaison au : " + temps); for (int i = 1; i < 7; i++) { Console.WriteLine(verbe1.Conjugate(i.ToString(), temps)); } Console.WriteLine(); temps = "imparfait indicatif"; Console.WriteLine("Voici sa conjugaison au : " + temps); for (int i = 1; i < 7; i++) { Console.WriteLine(verbe1.Conjugate(i.ToString(), temps)); } Console.WriteLine(); temps = "passé_simple indicatif"; Console.WriteLine("Voici sa conjugaison au : " + temps); for (int i = 1; i < 7; i++) { Console.WriteLine(verbe1.Conjugate(i.ToString(), temps)); } Console.WriteLine("\n"); Console.ReadLine(); // POUR CRÉER UN FICHIER TEXTE CONTENANT LA LISTE DES VERBES À AJOUTER // Conjugaison.AjoutAutomatiqueVerbe.triVerbes(); }
static void Main() { InfinitiveVerb verbe1 = new InfinitiveVerb("aimer"); Console.ReadLine(); }