private void NewCharacterToolStripMenuItem_Click(object sender, EventArgs e) { frmRace frmRace = new frmRace(); frmRace.ShowDialog(); Player player = frmRace.getPlayer(); if (frmRace.DialogResult == DialogResult.OK) { frmSpecial Special = new frmSpecial(player); Special.ShowDialog(); if (Special.DialogResult == DialogResult.OK) { frmTag Tag = new frmTag(player); Tag.ShowDialog(); if (Tag.DialogResult == DialogResult.OK) { this.player = player; player.Created = true; FrmCareer career = new FrmCareer(player) { MdiParent = this, WindowState = FormWindowState.Maximized }; career.Show(); closeCharacterToolStripMenuItem.Visible = true; } } } }
private void LoadCharacter(string fileName) { if (File.Exists(fileName) && fileName.EndsWith("geck")) { Player player = new Player() { FileName = fileName }; player.Load(); this.player = player; FrmCareer career = new FrmCareer(player) { MdiParent = this, WindowState = FormWindowState.Maximized }; if (player.Created) { career.Show(); } closeCharacterToolStripMenuItem.Visible = true; } }