private void btnIzmena_Click(object sender, EventArgs e) { Control activeForm = this.FindForm(); Point location = new Point(((Form1)activeForm).Location.X + 2, ((Form1)activeForm).Location.Y + 25); back = new Background(); back.Show(); back.Location = location; Image image = new Bitmap(222, 121); Sportiste_Collection.getInstance.Sportiste_collection.ContainsKey(new Guid(dgvSportisti.SelectedCells[0].Value.ToString())); foreach (KeyValuePair <Guid, Sportista> sportista in Sportiste_Collection.getInstance.Sportiste_collection) { if (sportista.Key.Equals(new Guid(dgvSportisti.SelectedCells[0].Value.ToString()))) { if (sportista.Value.Image != null) { image = new Bitmap(sportista.Value.Image); } } } DodavanjeSportista dodavanjeSportista = new DodavanjeSportista(new Guid(dgvSportisti.SelectedCells[0].Value.ToString()), dgvSportisti.SelectedCells[1].Value.ToString(), dgvSportisti.SelectedCells[2].Value.ToString(), dgvSportisti.SelectedCells[3].Value.ToString(), dgvSportisti.SelectedCells[4].Value.ToString(), dgvSportisti.SelectedCells[5].Value.ToString(), dgvSportisti.SelectedCells[6].Value.ToString(), image); dodavanjeSportista.ShowDialog(); }
private void btnDodavanje_Click(object sender, EventArgs e) { Control activeForm = this.FindForm(); Point location = new Point(((Form1)activeForm).Location.X + 2, ((Form1)activeForm).Location.Y + 25); DodavanjeSportista dodavanjeSportista = new DodavanjeSportista(); back = new Background(); back.Show(); back.Location = location; dodavanjeSportista.ShowDialog(); }
private void btnDodavanje_Click(object sender, EventArgs e) { DodavanjeSportista dodavanjeSportista = new DodavanjeSportista(); dodavanjeSportista.ShowDialog(); }