public MainForm() { InitializeComponent(); this.rand = new Random(); this.work = new PrimeResolutionWork(this.rand); this.helper = new ClientHelper(this.rand, this.lbEventDiary, this.work); }
private void bWork_Click(object sender, EventArgs e) { ClientHelper helper = new ClientHelper(this.rand, this.lbEventDiary, this.work); try { helper.Connect(); Thread workThread = new Thread(helper.WorkOperationInThread); workThread.IsBackground = true; workThread.Start(); } catch (SocketException se) { log("Server is not responding (" + se.Message + ")."); } }