public Question(int X, int Y) { panel = new System.Windows.Forms.Panel(); panel.AutoSize = true; panel.Location = new System.Drawing.Point(X, Y); panel.Name = "Question"; panel.TabIndex = 0; subject = new Statement("Subject"); verb = new Statement("Verb"); what = new Statement("What"); where = new Statement("Where"); when = new Statement("When"); why = new Statement("Why"); how = new Statement("How"); fact = new Boolean("Fact"); components = new List <PositionComponent>(); components.Add(subject); components.Add(verb); components.Add(what); components.Add(where); components.Add(when); components.Add(why); components.Add(how); components.Add(fact); setLocation(0, 0); ResetPanel(); generatedQuestions = new StringGenerator.StringGenerator("Questions.txt", "\\(([^)]+)\\)"); }
static void Main(string[] args) { if (args.Length < 2) { Console.WriteLine("Usage: StringGenerator [Strings...] [filename]"); Console.WriteLine("Example: StringGenerator \"You(are | aren't|killed|marked) a (black|green|yellow|beige|purple|pink) young great (man|woman)\" File.txt"); return; } string Filename = args[args.Length - 1]; StringGenerator generator = new StringGenerator(Filename, "\\(([^)]+)\\)"); for (int index = 0; index < args.Length - 1; ++index) { generator.ProcessString(args[index]); } }