protected override void DestroyHandle() { Disconnect(); base.DestroyHandle(); instance = null; }
// public ClientForm() { instance = this; InitializeComponent(); Random random = new Random(); textBoxUserName.Text = "User" + random.Next(999); }
private void buttonClient_Click( object sender, EventArgs e ) { if( ClientForm.instance == null ) { ClientForm form = new ClientForm(); form.Show(); } else ClientForm.instance.Activate(); }
private void buttonClient_Click(object sender, EventArgs e) { if (ClientForm.instance == null) { ClientForm form = new ClientForm(); form.Show(); } else { ClientForm.instance.Activate(); } }