Esempio n. 1
0
        public ViewportLayout InitViewport()
        {
            var displayModeSettingsRendered1 = new DisplayModeSettingsRendered(true, edgeColorMethodType.EntityColor, Color.Black, 1F, 2F, silhouettesDrawingType.LastFrame, false, shadowType.Realistic, null, false, true, 0.3F, realisticShadowQualityType.High);
            var backgroundSettings1 = new BackgroundSettings(backgroundStyleType.LinearGradient, Color.WhiteSmoke, Color.White, Color.FromArgb(102, 163, 210), 0.75D, null);
            var camera1 = new Camera(new Point3D(0D, 0D, 0D), 100D, new Quaternion(0.12940952255126034D, 0.22414386804201339D, 0.4829629131445341D, 0.83651630373780794D), projectionType.Perspective, 50D, 8D);
            var toolBarButton1 = new ToolBarButton(null, "Zoom Window", "Zoom Window", ToolBarButtonStyle.ToggleButton, true);
            var toolBarButton2 = new ToolBarButton(null, "Zoom", "Zoom", ToolBarButtonStyle.ToggleButton, true);
            var toolBarButton3 = new ToolBarButton(null, "Pan", "Pan", ToolBarButtonStyle.ToggleButton, true);
            var toolBarButton4 = new ToolBarButton(null, "Rotate", "Rotate", ToolBarButtonStyle.ToggleButton, true);
            var toolBarButton5 = new ToolBarButton(null, "Zoom Fit", "Zoom Fit", ToolBarButtonStyle.PushButton, true);
            var toolBar1 = new devDept.Eyeshot.ToolBar(toolBarPositionType.HorizontalTopRight, 32, 3, 4, Color.FromArgb(255, 146, 0), true, new[] {
                toolBarButton1,
                toolBarButton2,
                toolBarButton3,
                toolBarButton4,
                toolBarButton5
            });
            var legend1 = new Legend(0D, 100D, "Title", "Subtitle", new Point(24, 24), new Size(10, 30), true, false, false, "{0:0.##}", System.Drawing.Color.Transparent, System.Drawing.Color.Black, System.Drawing.Color.Black, new System.Drawing.Font("Tahoma", 10F, FontStyle.Bold), new Font("Tahoma", 8.25F), new[] {
                Color.FromArgb(0, 0, 255),
                Color.FromArgb(0, 63,  255),
                Color.FromArgb(0, 127, 255),
                Color.FromArgb(0, 191, 255),
                Color.FromArgb(0, 255, 255),
                Color.FromArgb(0, 255, 191),
                Color.FromArgb(0, 255, 127),
                Color.FromArgb(0, 255, 63),
                Color.FromArgb(0, 255, 0),
                Color.FromArgb(63,  255, 0),
                Color.FromArgb(127, 255, 0),
                Color.FromArgb(191, 255, 0),
                Color.FromArgb(255, 255, 0),
                Color.FromArgb(255, 191, 0),
                Color.FromArgb(255, 127, 0),
                Color.FromArgb(255, 63,  0),
                Color.FromArgb(255, 0,   0)
            });

            var originSymbol1 = new OriginSymbol(2, originSymbolStyleType.CoordinateSystem, new Font("Tahoma", 8.25F), Color.Black, Color.Red, Color.Green, Color.Blue, "Origin", "X", "Y", "Z", true);
            var rotateSettings1 = new RotateSettings(new MouseButton(MouseButtons.Middle, ModifierKeys.None), 10D, true, 1D, rotationStyleType.Trackball, rotationCenterType.CursorLocation, new devDept.Geometry.Point3D(0D, 0D, 0D));
            var zoomSettings1 = new ZoomSettings(new MouseButton(MouseButtons.Middle, ModifierKeys.Shift), 25, true, zoomStyleType.AtCursorLocation, false, 1D, Color.DeepSkyBlue, perspectiveFitType.Accurate);
            var viewport1 = new Viewport(new Point(0, 0),
                new Size(100, 10000),
                backgroundSettings1,
                camera1,
                toolBar1,
                new[] {
                    legend1
                },
                displayType.Rendered, true, false, false, CreateGrid(10),
                originSymbol1, false, rotateSettings1, zoomSettings1,
                new PanSettings(new MouseButton(MouseButtons.Middle, ModifierKeys.Ctrl), 25, true));

            _viewportLayout = new SingleViewportLayout();
            _viewportLayout.Dock = DockStyle.Fill;
            _viewportLayout.Cursor = Cursors.Arrow;
            _viewportLayout.Name = "SingleViewPort";
            _viewportLayout.Rendered = displayModeSettingsRendered1;
            _viewportLayout.Size = new Size(431, 405);
            _viewportLayout.TabIndex = 0;
            _viewportLayout.Viewports.Add(viewport1);

            return _viewportLayout;
        }
Esempio n. 2
0
        public ViewportLayout InitViewport()
        {
            var displayModeSettingsRendered1 = new DisplayModeSettingsRendered(true, edgeColorMethodType.EntityColor, Color.Black, 1F, 2F, silhouettesDrawingType.LastFrame, false, shadowType.Realistic, null, false, true, 0.3F, realisticShadowQualityType.High);
            var backgroundSettings1          = new BackgroundSettings(backgroundStyleType.LinearGradient, Color.WhiteSmoke, Color.White, Color.FromArgb(102, 163, 210), 0.75D, null);
            var camera1        = new Camera(new Point3D(0D, 0D, 0D), 100D, new Quaternion(0.12940952255126034D, 0.22414386804201339D, 0.4829629131445341D, 0.83651630373780794D), projectionType.Perspective, 50D, 8D);
            var toolBarButton1 = new ToolBarButton(null, "Zoom Window", "Zoom Window", ToolBarButtonStyle.ToggleButton, true);
            var toolBarButton2 = new ToolBarButton(null, "Zoom", "Zoom", ToolBarButtonStyle.ToggleButton, true);
            var toolBarButton3 = new ToolBarButton(null, "Pan", "Pan", ToolBarButtonStyle.ToggleButton, true);
            var toolBarButton4 = new ToolBarButton(null, "Rotate", "Rotate", ToolBarButtonStyle.ToggleButton, true);
            var toolBarButton5 = new ToolBarButton(null, "Zoom Fit", "Zoom Fit", ToolBarButtonStyle.PushButton, true);
            var toolBar1       = new devDept.Eyeshot.ToolBar(toolBarPositionType.HorizontalTopRight, 32, 3, 4, Color.FromArgb(255, 146, 0), true, new[] {
                toolBarButton1,
                toolBarButton2,
                toolBarButton3,
                toolBarButton4,
                toolBarButton5
            });
            var legend1 = new Legend(0D, 100D, "Title", "Subtitle", new Point(24, 24), new Size(10, 30), true, false, false, "{0:0.##}", System.Drawing.Color.Transparent, System.Drawing.Color.Black, System.Drawing.Color.Black, new System.Drawing.Font("Tahoma", 10F, FontStyle.Bold), new Font("Tahoma", 8.25F), new[] {
                Color.FromArgb(0, 0, 255),
                Color.FromArgb(0, 63, 255),
                Color.FromArgb(0, 127, 255),
                Color.FromArgb(0, 191, 255),
                Color.FromArgb(0, 255, 255),
                Color.FromArgb(0, 255, 191),
                Color.FromArgb(0, 255, 127),
                Color.FromArgb(0, 255, 63),
                Color.FromArgb(0, 255, 0),
                Color.FromArgb(63, 255, 0),
                Color.FromArgb(127, 255, 0),
                Color.FromArgb(191, 255, 0),
                Color.FromArgb(255, 255, 0),
                Color.FromArgb(255, 191, 0),
                Color.FromArgb(255, 127, 0),
                Color.FromArgb(255, 63, 0),
                Color.FromArgb(255, 0, 0)
            });

            var originSymbol1   = new OriginSymbol(2, originSymbolStyleType.CoordinateSystem, new Font("Tahoma", 8.25F), Color.Black, Color.Red, Color.Green, Color.Blue, "Origin", "X", "Y", "Z", true);
            var rotateSettings1 = new RotateSettings(new MouseButton(MouseButtons.Middle, ModifierKeys.None), 10D, true, 1D, rotationStyleType.Trackball, rotationCenterType.CursorLocation, new devDept.Geometry.Point3D(0D, 0D, 0D));
            var zoomSettings1   = new ZoomSettings(new MouseButton(MouseButtons.Middle, ModifierKeys.Shift), 25, true, zoomStyleType.AtCursorLocation, false, 1D, Color.DeepSkyBlue, perspectiveFitType.Accurate);
            var viewport1       = new Viewport(new Point(0, 0),
                                               new Size(100, 10000),
                                               backgroundSettings1,
                                               camera1,
                                               toolBar1,
                                               new[] {
                legend1
            },
                                               displayType.Rendered, true, false, false, CreateGrid(10),
                                               originSymbol1, false, rotateSettings1, zoomSettings1,
                                               new PanSettings(new MouseButton(MouseButtons.Middle, ModifierKeys.Ctrl), 25, true));

            _viewportLayout          = new SingleViewportLayout();
            _viewportLayout.Dock     = DockStyle.Fill;
            _viewportLayout.Cursor   = Cursors.Arrow;
            _viewportLayout.Name     = "SingleViewPort";
            _viewportLayout.Rendered = displayModeSettingsRendered1;
            _viewportLayout.Size     = new Size(431, 405);
            _viewportLayout.TabIndex = 0;
            _viewportLayout.Viewports.Add(viewport1);

            return(_viewportLayout);
        }