public static TextWindow OpenWindow(TextWindowCreateArgs args) { return((TextWindow)GuiInvoke(new Func <TextWindow>(() => { return GuiOpenWindow(args); }))); }
public static TextWindow GuiOpenWindow(TextWindowCreateArgs args) { var form = new TextForm(args); if (args.Owned) { form.Owner = TerminalWindow; } return(form.Content.Window); }
public TextFormBase(TextWindowCreateArgs args) { Text = args.Caption; Cols = args.Width; Rows = args.Height; BackColor = args.BackColor; OnCloseFunction = args.OnCloseFunction; if (args.Left == -1 || args.Top == -1) { StartPosition = FormStartPosition.CenterScreen; } else { SetDesktopLocation(args.Left * CharWidth, args.Top * LineHeight); StartPosition = FormStartPosition.Manual; } if (args.Scrollable) { VertScrollBar = new TerminalVScrollBar(this); Controls.Add(VertScrollBar); HoriScrollBar = new TerminalHScrollBar(this); Controls.Add(HoriScrollBar); } else { VertScrollBar = null; HoriScrollBar = null; } if (args.Resizable) { FormBorderStyle = FormBorderStyle.Sizable; } else if (args.Border) { FormBorderStyle = FormBorderStyle.FixedSingle; } else { FormBorderStyle = FormBorderStyle.FixedToolWindow; ShowInTaskbar = false; } Content = new TextControl(this); Content.Location = new Point(0, 0); Content.Size = new Size(CharWidth * Cols, LineHeight * Rows); ClientSize = new Size(Content.Width + ExtraWidth, Content.Height + ExtraHeight); Content.Anchor = AnchorStyles.Bottom | AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; Controls.Add(Content); Visible = args.Visible; }
internal TextWindow(TextControl parent, TextWindowCreateArgs args) { ParentControl = parent; ForeColor = args.ForeColor; BackColor = args.BackColor; HighlightForeColor = RuntimeRepl.DefaultHighlightForeColor; HighlightBackColor = RuntimeRepl.DefaultHighlightBackColor; ShadowBackColor = RuntimeRepl.DefaultShadowBackColor; Buffer = new TextBuffer(args.BufferWidth, args.BufferHeight, foreColor, backColor); CodeCompletion = args.CodeCompletion; HtmlPrefix = args.HtmlPrefix; HtmlSuffix = RuntimeRepl.GetSuffixFromPrefix(HtmlPrefix); TextWriter = TextWriter.Synchronized(new TextWindowTextWriter(this)); InitEditHandlers(); InitScrollHandlers(); dirty = true; Style = 0; BufferMark = BufferBound = -1; }
internal ReplTextWindow(TextControl parent, TextWindowCreateArgs args) : base(parent, args) { InitReplEditHandlers(); }
public static TextWindow Open(params object[] args) { var createArgs = new TextWindowCreateArgs(args); return RuntimeRepl.OpenWindow(createArgs); }
public ReplTextForm(TextWindowCreateArgs args) : base(args) { Content.Window = new ReplTextWindow(Content, args); Content.InitScrollBars(); }
public static TextWindow OpenWindow(TextWindowCreateArgs args) { return (TextWindow)GuiInvoke(new Func<TextWindow>(() => { return GuiOpenWindow(args); })); }
public static TextWindow GuiOpenWindow(TextWindowCreateArgs args) { var form = new TextForm(args); if (args.Owned) { form.Owner = TerminalWindow; } return form.Content.Window; }
public static TextWindow Open(params object[] args) { var createArgs = new TextWindowCreateArgs(args); return(RuntimeRepl.OpenWindow(createArgs)); }