Пример #1
0
 /// <param name="fg">XFlights array</param>
 public MapForm(Settings settings, Platform.Xvt.FlightGroupCollection fg)
 {
     _platform = Settings.Platform.XvT;
     Import(fg);
     InitializeComponent();
     try { imgCraft.Images.AddStrip(Image.FromFile(Application.StartupPath + "\\images\\craft_XvT.bmp")); }
     catch (Exception x)
     {
         MessageBox.Show(x.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         Close();
     }
     startup(settings);
 }
Пример #2
0
        /// <summary>Loads FG data into the MapData class the form uses</summary>
        /// <param name="fg">XFlights array</param>
        public void Import(Platform.Xvt.FlightGroupCollection fg)
        {
            int numCraft = fg.Count;

            _mapData = new MapData[numCraft];
            for (int i = 0; i < numCraft; i++)
            {
                _mapData[i]        = new MapData(_platform);
                _mapData[i].Craft  = fg[i].CraftType;
                _mapData[i].WPs[0] = fg[i].Waypoints;
                _mapData[i].IFF    = fg[i].IFF;
                _mapData[i].Name   = fg[i].Name;
            }
        }