コード例 #1
0
ファイル: Verb.cs プロジェクト: JacobFV/Sale
 public Verb(Verb verb)
 {
     this.randomtag           = verb.randomtag;
     this.englishForms        = verb.englishForms;
     this.englishInfinitive   = verb.englishInfinitive;
     this.englishParticiple   = verb.englishParticiple;
     this.spanishForms        = verb.spanishForms;
     this.spanishInfinitive   = verb.spanishInfinitive;
     this.spanishParticiple   = verb.spanishParticiple;
     this.spanishCommandForms = verb.spanishCommandForms;
     this.transitivity        = verb.transitivity;
 }
コード例 #2
0
ファイル: Verb.cs プロジェクト: JacobFV/Sale
 public Verb(int number)
 {
     this.randomtag           = DateTime.UtcNow;
     this.englishForms        = new TenseArray("", "", "", "", "", "");
     this.englishInfinitive   = "Verb" + number.ToString();
     this.englishParticiple   = "";
     this.spanishForms        = new TenseArray("", "", "", "", "", "");
     this.spanishInfinitive   = "Verbo" + number.ToString();
     this.spanishParticiple   = "";
     this.spanishCommandForms = new CommandForms("", "", "", "", "");
     this.transitivity        = Transitivity.ditransitive;
 }
コード例 #3
0
ファイル: Verb.cs プロジェクト: JacobFV/Sale
 public Verb(TenseArray englishForms, String englishInfinitive, String englishParticiple,
             TenseArray spanishForms, String spanishInfinitive, String spanishParticiple,
             CommandForms spanishCommandForms, Transitivity transitivity)
 {
     this.randomtag           = DateTime.UtcNow;
     this.englishForms        = englishForms;
     this.englishInfinitive   = englishInfinitive;
     this.englishParticiple   = englishParticiple;
     this.spanishForms        = spanishForms;
     this.spanishInfinitive   = spanishInfinitive;
     this.spanishParticiple   = spanishParticiple;
     this.spanishCommandForms = spanishCommandForms;
     this.transitivity        = transitivity;
 }
コード例 #4
0
        string command(Idea idea, Dictionary dictionary)
        {
            List <string> words = new List <string>(1);
            string        verb  = idea.verb.spanishCommandForms.allForms()
                                  [CommandForms.getIntForPerson(dictionary.subjects.findPersonForSubject
                                                                    (idea.subject, Language.spanish), idea.negitive)];

            if (idea.indirectObject != null && idea.directObject != null)
            {
                if (idea.indirectObject[0] == 'l' && idea.directObject[0] == 'l')
                {
                    string oldIO = idea.indirectObject;
                    idea.indirectObject = "se";
                }
            }
            if (idea.negitive == true)
            {
                words.Add("no");
                if (idea.indirectObject != null)
                {
                    words.Add(idea.indirectObject);
                }
                if (idea.directObject != null)
                {
                    words.Add(idea.directObject);
                }
                words.Add(verb);
            }
            else
            {
                words.Add(verb + ((idea.indirectObject != null) ? idea.indirectObject : "") +
                          ((idea.directObject != null) ? idea.directObject : ""));
            }
            switch (idea.verbTypes)
            {
            case VerbTypes.conjugated_infinitive:
                words.Add("a");
                words.Add(idea.auxilleryVerb.spanishInfinitive);
                break;

            case VerbTypes.conjugated_participle:
                words.Add(idea.auxilleryVerb.spanishParticiple);
                break;
            }
            return(grammer(words));
        }