예제 #1
0
        private void btnSync_Click(object sender, EventArgs e)
        {
            TestProxy.DataServiceClient client = new TestProxy.DataServiceClient();

            string data = client.GetData();

            MessageBox.Show(data);
        }
예제 #2
0
        private void btnAsync_Click(object sender, EventArgs e)
        {
            TestProxy.DataServiceClient client = new TestProxy.DataServiceClient();
            client.GetDataCompleted += delegate(object src, TestProxy.GetDataCompletedEventArgs args)
            {
                MessageBox.Show(args.Result);
            };

            client.GetDataAsync();
        }
예제 #3
0
        private void btnThread_Click(object sender, EventArgs e)
        {
            Thread th = new Thread(
                delegate()
            {
                TestProxy.DataServiceClient client = new TestProxy.DataServiceClient();

                string data = client.GetData();

                MessageBox.Show(data);
            }
                );

            th.Start();
        }