如何解决服务请求和计时器

时间:2015-12-08 02:22:10

标签: c#

 private static void TranslateMethod(string authToken)
        {
            // Add TranslatorService as a service reference, Address:http://api.microsofttranslator.com/V2/Soap.svc
            TranslatorService.LanguageServiceClient client = new TranslatorService.LanguageServiceClient();//error occur here
...
accessTokenRenewer = new Timer(new TimerCallback(OnTokenExpiredCallback), this, TimeSpan.FromMinutes(RefreshTokenDuration), TimeSpan.FromMilliseconds(-1));//error occur here also

/// 错误1找不到类型或命名空间名称“TranslatorService”(您是否缺少using指令或程序集引用?)C:\ Users \ user-pc \ Documents \ Visual Studio 2013 \ Projects \ WindowsFormsApplication1 \ WindowsFormsApplication1 \ Form1。 cs 62 13 WindowsFormsApplication1

错误2找不到类型或命名空间名称“TranslatorService”(您是否缺少using指令或程序集引用?)C:\ Users \ user-pc \ Documents \ Visual Studio 2013 \ Projects \ WindowsFormsApplication1 \ WindowsFormsApplication1 \ Form1.cs 62 66 WindowsFormsApplication1

错误3'Timer'是'System.Windows.Forms.Timer'和'System.Threading.Timer'C:\ Users \ user-pc \ Documents \ Visual Studio 2013 \ Projects \ WindowsFormsApplication1 \ WindowsFormsApplication1之间的模糊引用\ Form1.cs 101 17 WindowsFormsApplication1

错误4'Timer'是'System.Windows.Forms.Timer'和'System.Threading.Timer'C:\ Users \ user-pc \ Documents \ Visual Studio 2013 \ Projects \ WindowsFormsApplication1 \ WindowsFormsApplication1之间的模糊引用\ Form1.cs 112 38 WindowsFormsApplication1

错误5'System.Windows.Forms.Timer'不包含带有4个参数的构造函数C:\ Users \ user-pc \ Documents \ Visual Studio 2013 \ Projects \ WindowsFormsApplication1 \ WindowsFormsApplication1 \ Form1.cs 112 34 WindowsFormsApplication1

0 个答案:

没有答案