Hi,
I'm so new at this so my question might sound a bit odd.
Alright, I'm trying to write a chat program that'll only work amongst the workers within the same company and network as msn and such messangers are prohibited.
I have made this form where you have nicknames. And I have written the command for preventing a window to be opened more than once when you doubleclick on it. But the problem is, when i close the popped query, and try opening it again with doubleclick it just does nothing. how do i solve that?PS: Sorry for my english.
That's what I've done so far... SecilenKisi indicates the person choosed and bulundu means found
I'm so new at this so my question might sound a bit odd.
Alright, I'm trying to write a chat program that'll only work amongst the workers within the same company and network as msn and such messangers are prohibited.
I have made this form where you have nicknames. And I have written the command for preventing a window to be opened more than once when you doubleclick on it. But the problem is, when i close the popped query, and try opening it again with doubleclick it just does nothing. how do i solve that?PS: Sorry for my english.
Code:
ListViewItem SecilenKisi;
private void listView1_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
{
SecilenKisi = e.Item;
}
ArrayList nameList = new ArrayList();
private void listView1_DoubleClick(object sender, EventArgs e)
{
bool bulundu = false;
if(!bulundu)
{
foreach (String names in nameList)
{
if (nameList.Contains(SecilenKisi.Text))
{
bulundu = true;
break;
}
}
if (bulundu == false)
{
Form2 frm = new Form2();
frm.Show();
frm.textBox1.Text = SecilenKisi.Text;
nameList.Add(SecilenKisi.Text);
}
Comment