private void PowerBrowserBtn_Click(object sender, EventArgs e) { int level = (fCreature != null) ? fCreature.Level : 0; IRole role = (fCreature != null) ? fCreature.Role : null; PowerBrowserForm dlg = new PowerBrowserForm(null, level, role, null); if (dlg.ShowDialog() == DialogResult.OK) { if (dlg.SelectedPower != null) { fPower = dlg.SelectedPower.Copy(); fPower.ID = Guid.NewGuid(); update_statblock(); } } }
private void PowerBrowserBtn_Click(object sender, EventArgs e) { IRole role; int num = (this.fCreature != null ? this.fCreature.Level : 0); if (this.fCreature != null) { role = this.fCreature.Role; } else { role = null; } PowerBrowserForm powerBrowserForm = new PowerBrowserForm(null, num, role, null); if (powerBrowserForm.ShowDialog() == System.Windows.Forms.DialogResult.OK && powerBrowserForm.SelectedPower != null) { this.fPower = powerBrowserForm.SelectedPower.Copy(); this.fPower.ID = Guid.NewGuid(); this.update_statblock(); } }
private void SelectPowerBtn_Click(object sender, EventArgs e) { PowerBrowserForm dlg = new PowerBrowserForm(NameBox.Text, (int)LevelBox.Value, fNPC.Role, add_power); dlg.ShowDialog(); }
private void PowerBrowse_Click(object sender, EventArgs e) { PowerBrowserForm powerBrowserForm = new PowerBrowserForm(this.NameBox.Text, 0, null, new PowerCallback(this.add_power)); powerBrowserForm.ShowDialog(); }
private void PowerBrowse_Click(object sender, EventArgs e) { PowerBrowserForm dlg = new PowerBrowserForm(NameBox.Text, 0, null, add_power); dlg.ShowDialog(); }