private void CreateAccessPointsPnls()
        {
            AccessPointPnl apPnlN  = new AccessPointPnl("N", lblDirN, cbZoneN, cbLocN, btnMoreN);
            AccessPointPnl apPnlNE = new AccessPointPnl("NE", lblDirNE, cbZoneNE, cbLocNE, btnMoreNE);
            AccessPointPnl apPnlE  = new AccessPointPnl("E", lblDirE, cbZoneE, cbLocE, btnMoreE);
            AccessPointPnl apPnlSE = new AccessPointPnl("SE", lblDirSE, cbZoneSE, cbLocSE, btnMoreSE);
            AccessPointPnl apPnlS  = new AccessPointPnl("S", lblDirS, cbZoneS, cbLocS, btnMoreS);
            AccessPointPnl apPnlSW = new AccessPointPnl("SW", lblDirSW, cbZoneSW, cbLocSW, btnMoreSW);
            AccessPointPnl apPnlW  = new AccessPointPnl("W", lblDirW, cbZoneW, cbLocW, btnMoreW);
            AccessPointPnl apPnlNW = new AccessPointPnl("NW", lblDirNW, cbZoneNW, cbLocNW, btnMoreNW);


            accessPointsPnls.Add(apPnlN);
            accessPointsPnls.Add(apPnlNE);
            accessPointsPnls.Add(apPnlE);
            accessPointsPnls.Add(apPnlSE);
            accessPointsPnls.Add(apPnlS);
            accessPointsPnls.Add(apPnlSW);
            accessPointsPnls.Add(apPnlW);
            accessPointsPnls.Add(apPnlNW);

            FillCbZones();
            SubscribeZonesToSelectedIndexChanged();
            SubscribeDestinationToOnLeave();
        }
 private AccessPoint GetAccessPointFromAnAccessPointPanel(AccessPointPnl currentApPnl)
 {
     if (currentApPnl.cbZone.Text != "NONE" &&
         (!String.IsNullOrWhiteSpace(currentApPnl.cbDest.Text)))
     {
         AccessPoint tempAp = new AccessPoint(currentApPnl.lblDir.Text,
                                              currentApPnl.cbZone.Text,
                                              currentApPnl.cbDest.Text);
         return(tempAp);
     }
     return(null);
 }
        private void ResetAllFieldsInThisAccessPointPnl(AccessPointPnl apPnl)
        {
            apPnl.cbDest.Text     = "";
            apPnl.cbDest.Enabled  = false;
            apPnl.btnMore.Enabled = false;


            if (apPnl.cbZone.Text != "NONE")
            {
                apPnl.cbDest.Enabled  = true;
                apPnl.btnMore.Enabled = true;
                FillCbDest(apPnl.cbZone.Text, apPnl.cbDest);
            }
        }
        private AccessPoint GetConflictingAccessPoint(ComboBox cb)
        {
            if (!String.IsNullOrWhiteSpace(cb.Text))
            {
                AccessPointPnl     currentApPnl    = GetAccessPointPanelFromCb(cb);
                AccessPoint        tempAp          = GetAccessPointFromAnAccessPointPanel(currentApPnl);
                List <AccessPoint> allAccessPoints = AccessPoint.GetAllAccessPointFromWorldExceptFromOneLocation(world, currentLocation);

                foreach (AccessPoint ap in allAccessPoints)
                {
                    if (ap.IsEqualTo(tempAp))
                    {
                        return(ap);
                    }
                }
                return(null);
            }
            return(null);
        }