public newKombinace(Postava pos, Strelna kombo) { InitializeComponent(); postava = pos; r2.Checked = true; r1.Enabled = false; r2.Enabled = false; TreeNode[] nodes = tree.Nodes.Find(kombo.zbran, true); if (nodes.Length != 0) { tree.SelectedNode = nodes[0]; } else { MessageBox.Show("V databázi neexistuje zbraň " + kombo.zbran); DialogResult = DialogResult.Abort; this.Close(); } nazevKomba.Text = kombo.nazev; }
public void DeleteStrelna(Strelna kombo) { foreach (Strelna k in strelneList) { if (k.Equals(kombo)) { strelneList.Remove(k); return; } } }
public void AddKomb(String nazev, String zbran) { Strelna kom = new Strelna(this, flowPanel, nazev, zbran); strelneList.Add(kom); kom.Calculate(); }