Esempio n. 1
0
        private void button10_Click(object sender, EventArgs e)
        {
            if (mission != null)
                {
            if (Weapons == null)
                {
                Weapons = new Weapons(gamedir, mission);
                 Weapons.Show();

                }
            else
            if (Weapons.IsClosed == true)
                {
                Weapons = new Weapons(gamedir, mission);
                 Weapons.Show();
                }
            mission.currrentteam = 0;
            timer1.Start();

                }
        }
Esempio n. 2
0
        private void listView2_SelectedIndexChanged(object sender, EventArgs e)
        {
            foreach (ListViewItem item in listView2.SelectedItems)
                if (item != null)
                    if (mission != null)
                    {
                        if (Weapons == null)
                        {
                            Weapons = new Weapons(gamedir, mission);
                            Weapons.Show();

                        }
                        else
                            if (Weapons.IsClosed == true)
                            {
                                Weapons = new Weapons(gamedir, mission);
                                Weapons.Show();
                            }
                        int id = (int)Enum.Parse(typeof(WeaponType), "am" + item.Text);
                        int count = Convert.ToInt32(item.SubItems[1].Text);
                        int delay = Convert.ToInt32(item.SubItems[2].Text);

                        Weapons.Update(id, count, delay);
                        mission.currrentteam = 1;
                        timer1.Start();

                    }
        }