Ejemplo n.º 1
0
        private void btnAddFlag_Click(object sender, EventArgs e)
        {
            frmAddFlag flagform = new frmAddFlag();

            flagform.ShowDialog();
            if (flagform.Flags.Count == 0)
            {
                return;
            }

            lstFlags.BeginUpdate();
            lstFlags.Items.AddRange(flagform.Flags.ToArray());
            lstFlags.EndUpdate();

            List <String> flags = new List <String>();

            foreach (object i in lstFlags.Items)
            {
                flags.Add(i.ToString());
            }

            Zone zone = (Zone)worldmap.GetSelectedZone();

            if (zone == null)
            {
                return;
            }
            zone.Flags = flags;
        }
Ejemplo n.º 2
0
        private void btnAddFlag_Click(object sender, EventArgs e)
        {
            frmAddFlag flagform = new frmAddFlag();
            flagform.ShowDialog();
            if (flagform.Flags.Count == 0)
                return;

            lstFlags.BeginUpdate();
            lstFlags.Items.AddRange(flagform.Flags.ToArray());
            lstFlags.EndUpdate();

            List<String> flags = new List<String>();
            foreach (object i in lstFlags.Items)
                flags.Add(i.ToString());

            Zone zone = (Zone)worldmap.GetSelectedZone();
            if (zone == null)
                return;
            zone.Flags = flags;
        }