Ejemplo n.º 1
0
        private void SetScale(double scaleLength)
        {
            m_fpState = fpState.IMAGE;
            using (ScaleForm sf = new ScaleForm(scaleLength, scaleLength / m_pixelsperfoot, this))
            {
                sf.ShowDialog();
                m_pixelsperfoot = sf.m_scale;
                m_status        = new Status(m_floorPlanImage, m_pixelsperfoot);
                m_pathfinder    = new QGPathFinder(m_status, this);
                m_ratioX        = (double)(m_status.floorPlan.getXTileNum()) / (double)(floorPlanPanel.Width);
                m_ratioY        = (double)m_status.floorPlan.getYTileNum() / (double)floorPlanPanel.Height;
                m_fpState       = fpState.SETDEST;
            }
            if (t_DrawScaleTimer != null)
            {
                t_DrawScaleTimer.Dispose();
            }

            m_fpState = fpState.SETDEST;
            DrawFloor();
        }
Ejemplo n.º 2
0
        private void SetScale(double scaleLength)
        {
            m_fpState = fpState.IMAGE;
            using (ScaleForm sf = new ScaleForm(scaleLength, scaleLength / m_pixelsperfoot, this))
            {
                sf.ShowDialog();
                m_pixelsperfoot = sf.m_scale;
                m_status = new Status(m_floorPlanImage, m_pixelsperfoot);
                m_pathfinder = new QGPathFinder(m_status, this);
                m_ratioX = (double)(m_status.floorPlan.getXTileNum()) / (double)(floorPlanPanel.Width);
                m_ratioY = (double)m_status.floorPlan.getYTileNum() / (double)floorPlanPanel.Height;
                m_fpState = fpState.SETDEST;
            }
            if (t_DrawScaleTimer != null)
            {
                t_DrawScaleTimer.Dispose();
            }

            m_fpState = fpState.SETDEST;
            DrawFloor();
        }