internal void setContext(MyContext ctx) { this.ctx = ctx; Text = ctx.getFullName() + " - Log"; this.textBox1.AppendText(string.Join("\r\n\r\n", ctx.getLog())); ctx.onSentence += onContextSentence; }
internal static ContextLogForm getForContext(MyContext ctx, Form parentForm) { ContextLogForm res; if (!forms.TryGetValue(ctx.id, out res)) { res = new ContextLogForm(); res.Location = res.getLocationNear(parentForm); res.setContext(ctx); forms.Add(ctx.id, res); } return res; }