Beispiel #1
0
        public oEN_TRANSLATE_GOOGLE_MESSAGE(WebRequest _webRequest, TranslateCallBack _translateCallBack)
        {
            this.success           = false;
            this.webRequest        = _webRequest;
            this.translateCallBack = _translateCallBack;

            this.mean_vi = string.Empty;
            this.type    = string.Empty;
        }
Beispiel #2
0
        public oEN_TRANSLATE_GOOGLE_MESSAGE()
        {
            this.success           = false;
            this.webRequest        = null;
            this.translateCallBack = null;

            this.mean_vi = string.Empty;
            this.type    = string.Empty;
        }
        public static void TranslateAsync(
            string text,
            string sourceLng,
            string destLng,
            string textTranslatorUrlKey,
            TranslateCallBack callBack)
        {
            var request = CreateWebRequest(text, sourceLng, destLng, textTranslatorUrlKey);

            request.BeginGetResponse(
                TranslateRequestCallBack,
                new KeyValuePair <WebRequest, TranslateCallBack>(request, callBack));
        }
Beispiel #4
0
        public static void TranslateAsync(
            oEN_TRANSLATE_GOOGLE_MESSAGE oTranslateObject,
            string text,
            string sourceLng,
            string destLng,
            string textTranslatorUrlKey,
            TranslateCallBack callBack)
        {
            var request = CreateWebRequest(text, sourceLng, destLng, textTranslatorUrlKey);

            oTranslateObject.translateCallBack = callBack;
            oTranslateObject.webRequest        = request;

            request.BeginGetResponse(TranslateRequestCallBack, oTranslateObject);
        }