示例#1
0
        private void btnSubtract_Click(object sender, EventArgs e)
        {
            var myNum = new wref.MyNumbers
            {
                Number1 = int.Parse(txtNumber1.Text),
                Number2 = int.Parse(txtNumber2.Text)
            };

            txtResult.Text = _client.Subtract(myNum).ToString();
        }
示例#2
0
        private void btnSubtractAsync_Click(object sender, EventArgs e)
        {
            var myNum = new wref.MyNumbers
            {
                Number1 = int.Parse(txtNumber1.Text),
                Number2 = int.Parse(txtNumber2.Text)
            };

            _client.SubtractCompleted += new EventHandler <wref.SubtractCompletedEventArgs>(client_SubtractComplited);
            _client.SubtractAsync(myNum);
        }