Example #1
0
        public void Database_GetImage()
        {
            Byte[]        result = null;
            Task <Byte[]> tmp    = WebRequester.GetPicture("Illmitz", "Neusiedl am See");

            tmp.Wait();
            result = tmp.Result;
            Mainlogic.SaveImage(result, "test");
            Assert.IsNotNull(result);
        }
Example #2
0
        public static async Task <int> FetchImage(string tourname, string from, string to)
        {
            byte[] image = null;
            try
            {
                byte [] tmp = await WebRequester.GetPicture(from, to);

                image = tmp;
                SaveImage(image, tourname);
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception Encountered: {0}", e.Message);
            }

            return(0);
        }