Ejemplo n.º 1
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            if (rbHumanoid.Checked)
            {
                _filename = @"C:\ITL\Character.xml";
            }
            else if (rbCreature.Checked)
            {
                _filename = @"C:\ITL\Creature.xml";
            }
            else
            {
                _filename = @"C:\ITL\Npc.xml";
            }
            //update creature or humanoid
            FloraFauna f = new FloraFauna();
            f.UpdateChar(_filename, tbName.Text, cbType.Text, cbSubType.Text, tbSt.Text, tbDx.Text, tbIq.Text, tbMa.Text, cbType.Text, cbSubType.Text, tbAttack.Text, tbDmgDie.Text, tbDmgMod.Text, tbArmor.Text, tbHitStop.Text, tbDxMod.Text, tbTalents.Text, tbNotes.Text);

            RefreshList(null);
        }
Ejemplo n.º 2
0
        private void btnLoadCombat1_Click(object sender, EventArgs e)
        {
            //save record

            FloraFauna f = new FloraFauna();
            f.SaveCombat(tbName.Text, tbSt.Text, tbDx.Text, tbIq.Text, tbMa.Text, tbAttack.Text, tbDmgDie.Text, tbDmgMod.Text, tbArmor.Text, tbHitStop.Text, tbDxMod.Text);

            RefreshList(null);
            ClearAll();
        }
Ejemplo n.º 3
0
        //private void cbNam_SelectedIndexChanged(object sender, EventArgs e)
        //{
        //    tbName.Text = cbNam.Text;
        //}
        private void btnLoad_Click(object sender, EventArgs e)
        {
            if (_filename == @"C:\ITL\Character.xml")
            {
                rbHumanoid.Checked = true;
            }
            else if (_filename == @"C:\ITL\Creature.xml")
            {
                rbCreature.Checked = true;
            }
            else
            {
                rbNpc.Checked = true;
            }

            if (cbNam.Text == "---")
            {
                MessageBox.Show("You must select an item.");
            }
            else
            {
                try
                {
                    FloraFauna f = new FloraFauna();
                    List<string> _opponent = f.LoadChar(_filename, cbNam.Text);
                    //tbName.Text = cbNam.Text;

                    if (_opponent[0] == "")
                    {
                        MessageBox.Show("You must select a character before loading.");
                    }
                    else
                    {

                        string tempname = _opponent[0];
                        tbName.Text = tempname;
                        cbType.Text = _opponent[1];
                        cbSubType.Text = _opponent[2];
                        tbSt.Text = _opponent[3];
                        tbDx.Text = _opponent[4];
                        tbIq.Text = _opponent[5];
                        tbMa.Text = _opponent[6];
                        tbArmor.Text = _opponent[7];
                        tbHitStop.Text = _opponent[8];
                        tbDxMod.Text = _opponent[9];
                        tbAttack.Text = _opponent[10];
                        tbDmgDie.Text = _opponent[11];
                        tbDmgMod.Text = _opponent[12];
                        tbTalents.Text = _opponent[13];
                        tbNotes.Text = _opponent[14];
                    }
                }
                catch
                {
                    MessageBox.Show("An unhandled exception has occurred.  You suck.  Try again.");
                }
            }

            RefreshList(null);
        }
Ejemplo n.º 4
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if (rbHumanoid.Checked)
            {
                _filename = @"C:\ITL\Character.xml";
            }
            else if (rbCreature.Checked)
            {
                _filename = @"C:\ITL\Creature.xml";
            }
            else
            {
                _filename = @"C:\ITL\Npc.xml";
            }
            //delete creature or humanoid
            FloraFauna f = new FloraFauna();
            f.DeleteChar(_filename, tbName.Text);

            RefreshList(null);
        }