示例#1
0
文件: Form1.cs 项目: lyhyl/WingkouWeb
        private void button1_Click(object sender, EventArgs e)
        {
            ImageProcessingServiceClient client = new ImageProcessingServiceClient();

            client.Open();
            MessageBox.Show(client.GetData(0));
            client.Close();
        }
示例#2
0
        private static string Process(string method, string base64, Action <float> report)
        {
            string result;

            using (ImageProcessingServiceClient client = new ImageProcessingServiceClient())
            {
                result = client.ProcessImage(base64, method);

                report(1);

                if (string.IsNullOrEmpty(result))
                {
                    throw new InvalidDataException($"Null result", client.GetLastError());
                }
            }

            return(result);
        }