コード例 #1
0
        public FIRDisplay(FIR _fir, bool _shown)
        {
            listFIRs = new List <FIR>();
            listFIRs.Add(_fir);

            isShown = _shown;
        }
コード例 #2
0
 public FIR(FIR _fir)
 {
     strIdent = _fir.strIdent;
     //strName = _fir.strName;
     isOceanic    = _fir.isOceanic;
     isExtension  = _fir.isExtension;
     listVertices = _fir.listVertices;
     dblCentreLat = _fir.dblCentreLat;
     dblCentreLon = _fir.dblCentreLon;
 }
コード例 #3
0
        public static void LoadFiles()
        {
            if (!Directory.Exists(strDataDirectory))
            {
                Directory.CreateDirectory(strDataDirectory);
            }

            if (!Directory.Exists(strPrefsDirectory))
            {
                Directory.CreateDirectory(strPrefsDirectory);
            }

            List <Task> listStandaloneTasks = new List <Task>();

            listStandaloneTasks.Add(Country.Load(Country.strDataFile));
            listStandaloneTasks.Add(FIR.Load(FIR.strDataFile));

            Task tskFavs = Client.LoadFavs();

            string[] strarrDirectories = Directory.GetDirectories(strDataDirectory);

            for (int i = 0; i < strarrDirectories.Length; i++)
            {
                strarrDirectories[i] = strarrDirectories[i].Split('\\').Last();
            }

            Controller.list = new List <Controller>();
            List <Task> listControllerTasks = new List <Task>();

            foreach (string strStr in strarrDirectories)
            {
                listControllerTasks.Add(Controller.Load(strStr));
            }

            Task.WaitAll(listControllerTasks.ToArray());
            Controller.SortAsync().Wait();

            Task.WaitAll(listStandaloneTasks.ToArray());

            Airport.Load(Airport.strDataFile, Airport.strFavFile).Wait();

            Runway.list = new List <Runway>();
            List <Task> listRunwayTasks = new List <Task>();

            foreach (string strStr in strarrDirectories)
            {
                listRunwayTasks.Add(Runway.Load(strStr));
            }

            Task.WaitAll(listRunwayTasks.ToArray());

            Runway.listSorted = Runway.Sort(Runway.list);
            Runway.LoadCurrents(Runway.strCurrentFile);

            Sector.list = new List <Sector>();
            List <Task> listSectorTasks = new List <Task>();

            foreach (string strStr in strarrDirectories)
            {
                listSectorTasks.Add(Sector.Load(strStr));
            }

            Task.WaitAll(listSectorTasks.ToArray());
            Sector.SortAsync().Wait();

            Airspace.list = new List <Airspace>();
            List <Task> listAirspaceTasks = new List <Task>();

            foreach (string strStr in strarrDirectories)
            {
                listAirspaceTasks.Add(Airspace.Load(strStr));
            }

            Task.WaitAll(listAirspaceTasks.ToArray());
            Airspace.listSorted = Airspace.Sort(Airspace.list);

            Task.WaitAll(tskFavs);
        }