private void button1_Click(object sender, EventArgs e) { try { if (listBox1.SelectedItem != null && listBox2.SelectedItem != null) { Functii.Tag((string)listBox1.SelectedItem, (string)listBox2.SelectedItem); MessageBox.Show("Tag adaugat"); this.Close(); } else { MessageBox.Show("Selectati poza si persoana", "Sugestie", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1); } this.Close(); } catch { MessageBox.Show("There was an error", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1); this.Close(); } }
void InterfaceFunctions.Tag(string path, string persoana) { Functii.Tag(path, persoana); }