示例#1
0
        public TableLayoutPanelForProjection(CurrentTrajectory currentTrajectory, DisplayChoice displayChoice)
        {
            InitializeComponent();
            BorderStyle     = BorderStyle.None;
            CellBorderStyle = TableLayoutPanelCellBorderStyle.Single;
            RowCount        = 1;
            AutoScroll      = true;
            Dock            = DockStyle.Fill;

            this.CurrentTrajectory = currentTrajectory;
            zoomInformation        = new ZoomInformationOfView();
            this.displayChoice     = displayChoice;

            ColumnCount = 3;
            this.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33));
            this.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33));
            this.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33));

            mainViewPanel = new PanelForProjection(Vector3.UnitY, CurrentTrajectory, zoomInformation, displayChoice);
            leftViewPanel = new PanelForProjection(Vector3.UnitX, CurrentTrajectory, zoomInformation, displayChoice);
            topViewPanel  = new PanelForProjection(Vector3.UnitZ, CurrentTrajectory, zoomInformation, displayChoice);

            this.SuspendLayout();
            this.Controls.Add(mainViewPanel, 0, 0);
            this.Controls.Add(leftViewPanel, 1, 0);
            this.Controls.Add(topViewPanel, 2, 0);
            this.ResumeLayout();
        }
示例#2
0
        public PanelForProjection(Vector3 normalVector, CurrentTrajectory currentTrajectory, ZoomInformationOfView zoomInformation, DisplayChoice displayChoice)
        {
            //initialize panel property
            Dock        = DockStyle.Fill;
            BorderStyle = BorderStyle.None;
            Name        = Projection.GetProjectionView(normalVector);

            this.currentTrajectory = currentTrajectory;
            this.currentTrajectory.PropertyChanged += UpdateParameters;
            this.normalVector  = normalVector;
            this.displayChoice = displayChoice;
            //zoom and drag
            isDrag               = false;
            isChoosingRegion     = false;
            this.zoomInformation = zoomInformation;

            UpdateParameters();

            //Initialize drawing property
            numberOfDataInAxisX    = 5;
            numberOfDataInAxisY    = 10;
            spaceHeightForViewName = 25;
            segementLength         = 5;
            marginAxis             = 10;
            widthOfCoordinate      = 50;
            heightOfCoordinate     = 18;
            widthOfAxisName        = 35;
            heightOfAxisName       = 18;
            leftPaddingX           = segementLength * 3 / 2 + marginAxis + widthOfCoordinate + 5;
            rightPaddingX          = segementLength / 2 + marginAxis + widthOfAxisName + 5;
            paddingY = segementLength * 3 / 2 + marginAxis + Math.Max(heightOfAxisName, heightOfCoordinate) + 5;

            //tool tip
            toolTipForAnnotation = new ToolTip()
            {
                AutoPopDelay = 50000,
                InitialDelay = 500,
                ReshowDelay  = 100,
                ShowAlways   = true,
            };

            Paint      += new PaintEventHandler(PaintPanel);
            MouseMove  += new MouseEventHandler(Panel_MouseMove);
            MouseDown  += new MouseEventHandler(Panel_MouseDown);
            MouseUp    += new MouseEventHandler(Panel_MouseUp);
            MouseWheel += new MouseEventHandler(Panel_MouseWheel);

            //MouseHover += new EventHandler(Panel_MouseHover);
        }
示例#3
0
        float[] centerOfZoom; // {newCenterOfZoomX, newCenterOfZoomY, previousZoomX, previousZoomY}

        public PanelFor3DView(CurrentTrajectory currentTrajectory, DisplayChoice displayChoice)
        {
            paddingForAxis         = Math.Max((int)(currentTrajectory.Radius / 10), 5);
            paddingForAxisNotation = Math.Max((int)(currentTrajectory.Radius / 30), 2);
            paddingX = 15;
            paddingY = 10;

            Dock        = DockStyle.Fill;
            BorderStyle = BorderStyle.None;
            //BackColor = Color.FromArgb(149, 163, 166);

            zoom         = 0;
            centerOfZoom = new float[] { 0, 0 };
            angleX       = 0;
            //- 10 * Math.PI / 180;
            angleZ = 0;
            //- 10 * Math.PI / 180;

            this.currentTrajectory = currentTrajectory;
            this.displayChoice     = displayChoice;
            InitializeIntermediareNodes();
            InitializeBoundingBox();
            InitializeXYZAxis();
            sizeOfScreen = LargestAllowedSizeOfScreen;


            InitializeIntermediareNodes();

            toolTipForAnnotation = new ToolTip()
            {
                AutoPopDelay = 50000,
                InitialDelay = 500,
                ReshowDelay  = 100,
                ShowAlways   = true,
            };

            Paint      += new PaintEventHandler(PaintPanel);
            MouseMove  += new MouseEventHandler(Panel_MouseMove);
            MouseDown  += new MouseEventHandler(Panel_MouseDown);
            MouseUp    += new MouseEventHandler(Panel_MouseUp);
            MouseWheel += new MouseEventHandler(Panel_MouseWheel);
        }