private void btDomacica_Click(object sender, EventArgs e) { KreirajDomacicu kd = new KreirajDomacicu(); DialogResult dr = kd.ShowDialog(); if (dr == DialogResult.Yes) { kd.gd.Upis(); LBdomacice.Items.Add(kd.gd.PunoIme()); } else if (dr==DialogResult.No) { } }
private void LBdomacice_MouseDoubleClick(object sender, MouseEventArgs e) { int indeks = (LBdomacice.SelectedItem.ToString()).IndexOf(" "); string imepom = (LBdomacice.SelectedItem.ToString()).Substring(0, indeks-1); string prezimepom = (LBdomacice.SelectedItem.ToString()).Substring(indeks + 1); var form2 = new KreirajDomacicu(); //StreamReader sr = new StreamReader(Globalne.pathgd.); //sr.ReadLine(); //while (!sr.EndOfStream) { // if (sr.ToString() == imepom) { // string pom=sr.ToString(); // if (sr.ReadLine() == prezimepom) { } } //sr.ReadLine(); } form2.ShowDialog(); }