Beispiel #1
0
        public QGPathFinder(Status status, MainForm parent)
        {
            m_parent = parent;
            m_status = status;

            graph = new AdjacencyGraph<string, Edge<string>>(true);
            edgeCost = new Dictionary<Edge<string>, double>(graph.EdgeCount);
            this.fp = m_status.floorPlan;
            if (this.m_status.position != null)
            {
                startPoint = this.m_status.position.location.X + "_" + this.m_status.position.location.Y;
                m_parent.PostMessage("start: " + startPoint);
            }
            else
            {
                startPoint = "4_4";
            }
            if (this.m_status.endPoint!= null)
            {
                targetPoint = this.m_status.endPoint.X + "_" + this.m_status.endPoint.Y;
                m_parent.PostMessage("end: " + targetPoint);
            }
            else
            {
                targetPoint = "4_6";
            }

            buildGraph();
        }
Beispiel #2
0
 public ScaleForm(double pixels, double feet, MainForm mainform)
 {
     InitializeComponent();
     m_pixels = pixels;
     m_feet = feet;
     this.pixelBox.Text = m_pixels.ToString();
     this.feetBox.Text = m_feet.ToString();
     m_mainform = mainform;
 }
Beispiel #3
0
        public PathForm(MainForm parent)
        {
            InitializeComponent();

            m_parent = parent;

            if (m_parent.status != null)
            {
                TileList.DataSource = m_parent.status.path;
            }
        }