private void LoadZones(ZonesPinsApiCall zonesPins)
        {
            if (zonesPins != null && zonesPins.Zones != null)
            {
                _zonesList = new List<Zoneski>();

                foreach (Zone zone in zonesPins.Zones)
                {
                    Zoneski zoneski = new Zoneski();

                    zoneski.ControlState = ZoneControlStateConverter(zone.ControlState);
                    zoneski.ZoneName = zone.ZoneName;
                    zoneski.ZoneId = zone.ZoneId.ToString();
                    zoneski.Latitude = zone.Latitude.ToString();
                    zoneski.Longitude = zone.Longitude.ToString();

                    _zonesList.Add(zoneski);
                }
            }
        }
Exemple #2
0
        private static void UpdateAttackMenuDropdown(ZonesPinsApiCall zonesPins)
        {
            Form.comboBox_attack.Items.Clear();

            foreach (Zone zone in zonesPins.Zones)
            {
                string controlState = ZoneControlStateConverter(zone.ControlState);
                Form.comboBox_attack.Items.Add(string.Format("{0} {1} [{2}] <{3}/{4}>",
                    controlState, zone.ZoneName, zone.ZoneId, zone.Latitude, zone.Longitude));
            }
            Form.Refresh();
        }