Ejemplo n.º 1
0
 public MainForm()
 {
     InitializeComponent();
     this.rand = new Random();
     this.work = new PrimeResolutionWork(this.rand);
     this.helper = new ClientHelper(this.rand, this.lbEventDiary, this.work);
 }
Ejemplo n.º 2
0
        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 + ").");
            }
        }