private void stopToolStripMenuItem_Click(object sender, EventArgs e) { if (client != null) { client.Stop(); } client = null; startToolStripMenuItem.Enabled = true; // konfiguracjaToolStripMenuItem.Enabled = true; toolStripStatusLabel.Text = "Zatrzymany"; }
private void startToolStripMenuItem_Click(object sender, EventArgs e) { toolStripStatusLabel.Text = "Uruchomiony"; client = new TaskClient(configuration.Host, configuration.Port); client.ClientUpdate += new ClientUpdateEventHandler(client_ClientUpdate); client.StartAsync(); startToolStripMenuItem.Enabled = false; //konfiguracjaToolStripMenuItem.Enabled = false; }