コード例 #1
0
ファイル: WorkbenchSingleton.cs プロジェクト: ratoy/VisualMap
        public static void InitializeWorkbench()
        {
            workbench = new DefaultWorkbench();
            MessageService.MainForm = workbench;

            caller = new STAThreadCaller(workbench);

            workbench.InitializeWorkspace();

            workbench.WorkbenchLayout = new SdiWorkbenchLayout();

            //display mapview
            IViewContent browserPane = new MapViewPane();
            browserPane.TitleName = "view1";
            if (browserPane != null)
            {
                WorkbenchSingleton.Workbench.ShowView(browserPane);
            }
            //link layertree and mapview
            foreach (PadDescriptor item in workbench.PadContentCollection)
            {
                LayerTree tree = item.PadContent as LayerTree;
                if (tree != null)
                {
                    DotSpatial.Controls.Legend legend = tree.Control as DotSpatial.Controls.Legend;
                    
                    ((browserPane as MapViewPane).Control as MapView).MapControl.Legend = legend;
                    break;
                }
            }
        }
コード例 #2
0
ファイル: WorkbenchSingleton.cs プロジェクト: figwh/VisualMap
        public static void InitializeWorkbench()
        {
            workbench = new DefaultWorkbench();
            MessageService.MainForm = workbench;

            caller = new STAThreadCaller(workbench);

            workbench.InitializeWorkspace();

            workbench.WorkbenchLayout = new SdiWorkbenchLayout();

            //display mapview
            IViewContent browserPane = new MapViewPane();

            browserPane.TitleName = "view1";
            if (browserPane != null)
            {
                WorkbenchSingleton.Workbench.ShowView(browserPane);
            }
            //link layertree and mapview
            foreach (PadDescriptor item in workbench.PadContentCollection)
            {
                LayerTree tree = item.PadContent as LayerTree;
                if (tree != null)
                {
                    DotSpatial.Controls.Legend legend = tree.Control as DotSpatial.Controls.Legend;

                    ((browserPane as MapViewPane).Control as MapView).MapControl.Legend = legend;
                    break;
                }
            }
        }
コード例 #3
0
ファイル: SdiWorkspaceLayout.cs プロジェクト: figwh/VisualMap
        public void Attach(IWorkbench workbench)
        {
            wbForm = (DefaultWorkbench)workbench;
            wbForm.SuspendLayout();
            wbForm.IsMdiContainer = true;

            dockPanel = new WeifenLuo.WinFormsUI.DockPanel();
            dockPanel.ActiveAutoHideContent = null;
            dockPanel.Dock = DockStyle.Fill;
            wbForm.Controls.Add(dockPanel);

            wbForm.Controls.Add(wbForm.TopToolStrip);
            wbForm.Controls.Add(wbForm.TopMenu);

            LoadConfiguration();

            ShowPads();
            //ShowViewContents();
            RedrawAllComponents();

            wbForm.ResumeLayout(false);
        }
コード例 #4
0
ファイル: SdiWorkspaceLayout.cs プロジェクト: ratoy/VisualMap
        public void Attach(IWorkbench workbench)
        {
            wbForm = (DefaultWorkbench)workbench;
            wbForm.SuspendLayout();
            wbForm.IsMdiContainer = true;

            dockPanel = new WeifenLuo.WinFormsUI.DockPanel();
            dockPanel.ActiveAutoHideContent = null;
            dockPanel.Dock = DockStyle.Fill;
            wbForm.Controls.Add(dockPanel);

            wbForm.Controls.Add(wbForm.TopToolStrip);
            wbForm.Controls.Add(wbForm.TopMenu);

            LoadConfiguration();

            ShowPads();
            //ShowViewContents();
            RedrawAllComponents();

            wbForm.ResumeLayout(false);
        }