Beispiel #1
0
        private void LoadButton_Click(object sender, EventArgs e)
        {
            Save_and_Load <TreasureCard> sl = new Save_and_Load <TreasureCard>();

            TC[0] = sl.Load();
            if (TC[0].CardType == TreasureType.DEFAULT)
            {
                DefaultType.Checked   = true;
                EquipmentType.Checked = false;
            }
            else
            {
                DefaultType.Checked   = false;
                EquipmentType.Checked = true;
            }
            PowerTB.Text       = TC[0].Power.ToString();
            GoldTB.Text        = TC[0].Gold.ToString();
            CardNameTB.Text    = TC[0].Name;
            DescriptionTB.Text = TC[0].Description;
        }
        private void LoadButton_Click(object sender, EventArgs e)
        {
            Save_and_Load <MysteryCard> sl = new Save_and_Load <MysteryCard>();

            MC[0] = sl.Load();
            if (MC[0].CardType == MysteryType.CURSE)
            {
                CurseType.Checked   = true;
                MonsterType.Checked = false;
            }
            else
            {
                CurseType.Checked   = false;
                MonsterType.Checked = true;
            }
            PowerTB.Text       = MC[0].Power.ToString();
            RewardTB.Text      = MC[0].Reward.ToString();
            CardNameTB.Text    = MC[0].Name;
            DescriptionTB.Text = MC[0].Description;
        }