public void PutWord(string word, WordSize size) { var wordInformation = new WordInformation(word, size); var rectangle = Cloud.PutNextRectangle(wordInformation.RectangleSize); WordToRectangle.Add(wordInformation, rectangle); }
public static string GetRandomWord(WordSize size) { string[] wordArray = null; switch (size) { case WordSize.Any: wordArray = AllWords; break; case WordSize.Short: wordArray = ShortWords; break; case WordSize.Medium: wordArray = MediumWords; break; case WordSize.Long: wordArray = LongWords; break; case WordSize.VeryLong: wordArray = VeryLongWords; break; default: break; } return(Utils.GetRandomFromList <string>(wordArray)); }
public static string GetRandomSentences(WordSize size, int count) { var result = new StringBuilder(); for (var i = 0; i < count; i++) { var sentence = GetRandomSentence(size); sentence = string.Concat(sentence.First().ToString().ToUpper(), sentence.Substring(1), ". "); result.Append(sentence.Trim()); result.Append("\n\n"); } return(result.ToString().Trim()); }
public static string GetRandomSentences(WordSize size, int count) { var result = new StringBuilder(); for (var i = 0; i < count; i++) { var sentence = GetRandomSentence(size); sentence = string.Concat(sentence.First().ToString().ToUpper(), sentence.Substring(1), ". "); result.Append(sentence.Trim()); result.Append("\n\n"); } return result.ToString().Trim(); }
public static string GetRandomSentence(WordSize size) { if (size == WordSize.Short) return Fragments.GetRandomFragment(); if (size == WordSize.Any) { var randomSize = Utils.GetRandomEnumValue<WordSize>(); return GetRandomSentence(randomSize); } return string.Concat( GetRandomSentence(Paragraphs.GetLessEnumParagraph(size)), Words.GetPreposition(), GetRandomSentence(Paragraphs.GetLessEnumParagraph(size))); }
public static WordSize GetLessEnumParagraph(WordSize size) { var newSize = WordSize.Short; switch (newSize) { case WordSize.Long: newSize = WordSize.Medium; break; case WordSize.VeryLong: newSize = WordSize.Long; break; } return newSize; }
public static WordSize GetLessEnumParagraph(WordSize size) { var newSize = WordSize.Short; switch (newSize) { case WordSize.Long: newSize = WordSize.Medium; break; case WordSize.VeryLong: newSize = WordSize.Long; break; } return(newSize); }
public static string GetRandomSentence(WordSize size) { if (size == WordSize.Short) { return(Fragments.GetRandomFragment()); } if (size == WordSize.Any) { var randomSize = Utils.GetRandomEnumValue <WordSize>(); return(GetRandomSentence(randomSize)); } return(string.Concat( GetRandomSentence(Paragraphs.GetLessEnumParagraph(size)), Words.GetPreposition(), GetRandomSentence(Paragraphs.GetLessEnumParagraph(size)))); }
public WordInformation(string word, WordSize size) { Font = new Font("Arial", fontSize[size]); Word = word; RectangleSize = new Size((int)(word.Length * Font.Size), Font.Height); }
public static string GetRandomWord(WordSize size) { string[] wordArray = null; switch (size) { case WordSize.Any: wordArray = AllWords; break; case WordSize.Short: wordArray = ShortWords; break; case WordSize.Medium: wordArray = MediumWords; break; case WordSize.Long: wordArray = LongWords; break; case WordSize.VeryLong: wordArray = VeryLongWords; break; default: break; } return Utils.GetRandomFromList<string>(wordArray); }
public WordType(WordSize size, WordSign sign) { Size = size; Sign = sign; }