Exemplo n.º 1
0
        public void Show()
        {
            var win = new StickyWindow((r) => Persist.Put <PersistRect>("LexError", r), () => Persist.Get <PersistRect>("LexError", new PersistRect(100, 100, 500, 300)))
            {
                Title = "Compiler Error",
            };

            var dock = new DockPanel();

            win.Content = dock;

            TabControl tabbie = new TabControl()
            {
                TabStripPlacement = Dock.Bottom
            };

            Label Lab;

            dock.Children.Add(Lab = new Label()
            {
                Content = Message
            });
            DockPanel.SetDock(Lab, Dock.Top);

            dock.Children.Add(tabbie);

            bool firstFocus = true;

            if (CompilerList != null)
            {
                var dialog = new LexReadDialog(CompilerList, new FontFamily("Lucida Console"), 10);
                MakeDialogItem(tabbie, ref firstFocus, dialog, "Compiler");
            }

            if (Source != null)
            {
                var dialog = new LexReadDialog(Source, Index, new FontFamily("Lucida Console"), 10);
                MakeDialogItem(tabbie, ref firstFocus, dialog, "Source");
            }
            win.ShowDialog();
        }
Exemplo n.º 2
0
        public static void Show(TypeParser parser)
        {
            REPL repl = new REPL(parser);
            REPLRenderingPanel replPanel = new REPLRenderingPanel(repl.DisplayData, repl.Command, new FontFamily("Lucida Console"), 10);

            repl.ReplPanel = replPanel;
            var win = new StickyWindow((r) => Persist.Put <PersistRect>("REPL", r), () => Persist.Get <PersistRect>("REPL", new PersistRect(150, 150, 500, 400)))
            {
                Title   = "C# REPL by KamimuCode",
                Content = new ScrollerPanel()
                {
                    Content = new CursorPanel()
                    {
                        Content = replPanel
                    }
                }
            };

            replPanel.Focus();

            win.ShowDialog();
        }