Пример #1
0
        private void ButtonCallRemote_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            UIPublic.ShowWaitingForm();
            string resultString = "";
            var    task         = Task.Factory.StartNew(() =>
            {
                var testService = new TcpRemoteFactory <ITestService>()
                {
                    ServerAddress = "localhost:7990",
                    ServiceName   = "TestService"
                }.Value;
                resultString = testService.GetString("Hello world!");
            });

            task.Wait();
            UIPublic.CloseWaitingForm();
            UIPublic.ShowInfomationDialog(resultString);
        }