Ejemplo n.º 1
0
        protected void CreateOutputWindow()
        {
            //IDockingFormService dockingService = ServiceManager.Get<IDockingFormService>();
            //Panel dock = dockingService.DockPanel;
            //Control docCanvas = FindDocument(dockingService, FlowSharpServiceInterfaces.Constants.META_CANVAS);

            //Control outputWindow = dockingService.CreateDocument(docCanvas, DockAlignment.Bottom, "Output", FlowSharpCodeServiceInterfaces.Constants.META_OUTPUT, 0.50);
            //Control pnlOutputWindow = new Panel() { Dock = DockStyle.Fill };
            //outputWindow.Controls.Add(pnlOutputWindow);

            IFlowSharpCodeOutputWindowService outputWindowService = ServiceManager.Get <IFlowSharpCodeOutputWindowService>();

            outputWindowService.CreateOutputWindow();
            // outputWindowService.CreateOutputWindow(pnlOutputWindow);
        }
Ejemplo n.º 2
0
        protected void OnContentResolver(object sender, ContentLoadedEventArgs e)
        {
            switch (e.Metadata.LeftOf(","))
            {
            case FlowSharpCodeServiceInterfaces.Constants.META_CSHARP_EDITOR:
                Panel pnlEditor = new Panel()
                {
                    Dock = DockStyle.Fill, Tag = FlowSharpCodeServiceInterfaces.Constants.META_CSHARP_EDITOR
                };
                e.DockContent.Controls.Add(pnlEditor);
                e.DockContent.Text = "C# Editor";
                IFlowSharpCodeEditorService csCodeEditorService = ServiceManager.Get <IFlowSharpCodeEditorService>();
                csCodeEditorService.CreateEditor(pnlEditor);
                csCodeEditorService.AddAssembly("Clifton.Core.dll");
                break;

            case FlowSharpCodeServiceInterfaces.Constants.META_OUTPUT:
                Panel pnlOutputWindow = new Panel()
                {
                    Dock = DockStyle.Fill, Tag = FlowSharpCodeServiceInterfaces.Constants.META_OUTPUT
                };
                e.DockContent.Controls.Add(pnlOutputWindow);
                e.DockContent.Text = "Output";
                IFlowSharpCodeOutputWindowService outputWindowService = ServiceManager.Get <IFlowSharpCodeOutputWindowService>();
                outputWindowService.CreateOutputWindow(pnlOutputWindow);
                break;

            case FlowSharpCodeServiceInterfaces.Constants.META_SCINTILLA_EDITOR:
                string language      = e.Metadata.RightOf(",");
                Panel  pnlCodeEditor = new Panel()
                {
                    Dock = DockStyle.Fill, Tag = language
                };
                e.DockContent.Controls.Add(pnlCodeEditor);
                e.DockContent.Text = language.CamelCase() + " Editor";

                IFlowSharpScintillaEditorService scintillaEditorService = ServiceManager.Get <IFlowSharpScintillaEditorService>();
                scintillaEditorService.CreateEditor(pnlCodeEditor, language);
                break;
            }
        }