Пример #1
0
        private void Form3_Load(object sender, EventArgs e)
        {
            showstats();
            Form2 f2 = this.Owner as Form2;

            if (f2.listBox2.Items.Count != 0)
            {
                for (int i = 0; i < f2.listBox2.Items.Count; i++)
                {
                    listBox2.Items.Insert(i, f2.listBox2.Items[i]);
                }
            }
            if (f2.listBox1.Items.Count != 0)
            {
                for (int i = 0; i < f2.listBox1.Items.Count; i++)
                {
                    listBox1.Items.Insert(i, f2.listBox1.Items[i]);
                }
            }
            f2.listBox1.Items.Clear();
            f2.listBox2.Items.Clear();
            f2.showstats();
            label4.Text += " " + f2.Pendragon.maxhealth.ToString();
            label5.Text += " " + f2.Pendragon.maxmana.ToString();
            label6.Text += " " + f2.Pendragon.strengh.ToString();
            label7.Text += " " + f2.Pendragon.inteligens.ToString();
            label8.Text += " " + f2.Pendragon.agility.ToString();
            label9.Text += " " + f2.Pendragon.charisma.ToString();
        }
Пример #2
0
        private void Form3_FormClosing(object sender, FormClosingEventArgs e)
        {
            Form2 f2 = this.Owner as Form2;

            if (listBox2.Items.Count != 0)
            {
                for (int i = 0; i < listBox2.Items.Count; i++)
                {
                    f2.listBox2.Items.Insert(i, listBox2.Items[i]);
                }
            }
            if (listBox1.Items.Count != 0)
            {
                for (int i = 0; i < listBox1.Items.Count; i++)
                {
                    f2.listBox1.Items.Insert(i, listBox1.Items[i]);
                }
            }
            f2.showstats();
        }
Пример #3
0
        /*string head = " ";
         * string chest = " ";
         * string legs = " ";
         * string feet = " ";
         * string leftarm = " ";
         * string rightarm = "";
         * string neck = " ";
         * string trinket = " ";
         */

        public void listBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            Form2 f2 = this.Owner as Form2;

            f2.showstats();
        }