private string vratiAnalize1() { string analiza = ""; foreach (string s in checkedListBox1.CheckedItems) { analiza += s.ToString() + " "; } return(analiza); }
private void btnPrihvati_Click(object sender, EventArgs e) { textBox1.Text = racunajCenu().ToString(); if (tbIme.Text != "" && izabranTipCheckedListBox()) { racunajCenu(); analiza = new Analiza(); analiza.Cena = racunajCenu(); analiza.Ime = tbIme.Text; analiza.Prioritet = trackBar1.Value; analiza.Tip = vratiAnalize(); MessageBox.Show("Uspesno ste uneli sve!", "Uspeh!", MessageBoxButtons.OK, MessageBoxIcon.Information); DialogResult = DialogResult.OK; } else { MessageBox.Show("Morate popuniti sve!", "Neuspeh", MessageBoxButtons.OK, MessageBoxIcon.Error); } }