private void generateToolStripMenuItem1_Click(object sender, EventArgs e) { Ability a = abilities[abilityBox.SelectedIndex]; GenAbilityForm gaf = new GenAbilityForm(); gaf.pbs += $@"{a.id},{a.intname},{a.name},""{a.description}"""; gaf.Show(); }
private void generateToolStripMenuItem2_Click(object sender, EventArgs e) { if (items.Count == 0) { MessageBox.Show("There are no items to generate!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } GenAbilityForm gaf = new GenAbilityForm(); gaf.pbs = generateAll(); gaf.Show(); }
private void generateToolStripMenuItem2_Click(object sender, EventArgs e) { abilities.Sort(delegate(Ability a1, Ability a2) { return(a1.id.CompareTo(a2.id)); }); abilityBinder.ResetBindings(false); GenAbilityForm gaf = new GenAbilityForm(); for (int i = 0; i < abilities.Count; i++) { Ability a = abilities[i]; if (i != abilities.Count - 1) { gaf.pbs += $"{a.id},{a.intname},{a.name},\"{a.description}\"\r\n"; } else { gaf.pbs += $@"{a.id},{a.intname},{a.name},""{a.description}"""; } } gaf.Show(); }