Example #1
0
File: picasa.cs Project: ynkbt/moon
        public void DisplayNextImage()
        {
            Console.WriteLine("-----displaying image " + imgIdx + " - " + DateTime.Now);

            SlideImage img = images[imgIdx];

            if (!img.Ready)
            {
                Console.WriteLine("----bummer image not ready " + DateTime.Now);
                img.ImageReady += delegate { DisplayNextImage(); };
                return;
            }
            if (active != null)
            {
                active.Remove();
            }
            img.Add();
            active = img;

            if (++imgIdx >= images.Count)
            {
                imgIdx = 0;
            }

            storyBoard.Begin();
        }
Example #2
0
File: picasa.cs Project: dfr0/moon
		public void DownloadImage (int idx)
		{
			Console.WriteLine ("Downloading "+idx);
			
			//Download images in a pipelines fashion
			//FIXME: use only one downloader instance once it supports been used multiple times.
			Downloader downloader = new Downloader ();
			if (idx + 1 < urls.Length)
				downloader.Completed += delegate { DownloadImage (idx + 1); };

			SlideImage img = new SlideImage (this, urls [idx], downloader);
			images.Add (img); 
			if (images.Count == 1)
				DisplayNextImage ();
		}
Example #3
0
File: picasa.cs Project: ynkbt/moon
        public void DownloadImage(int idx)
        {
            Console.WriteLine("Downloading " + idx);

            //Download images in a pipelines fashion
            //FIXME: use only one downloader instance once it supports been used multiple times.
            Downloader downloader = new Downloader();

            if (idx + 1 < urls.Length)
            {
                downloader.Completed += delegate { DownloadImage(idx + 1); }
            }
            ;

            SlideImage img = new SlideImage(this, urls [idx], downloader);

            images.Add(img);
            if (images.Count == 1)
            {
                DisplayNextImage();
            }
        }
Example #4
0
File: picasa.cs Project: dfr0/moon
		public void DisplayNextImage () {
			Console.WriteLine ("-----displaying image "+imgIdx+" - "+DateTime.Now);

			SlideImage img = images[imgIdx];
			if (!img.Ready) {
				Console.WriteLine ("----bummer image not ready "+DateTime.Now);
				img.ImageReady += delegate { DisplayNextImage(); };
				return;
			}
			if (active != null)
				active.Remove ();
			img.Add();
			active = img;

			if (++imgIdx >= images.Count) 
				imgIdx = 0;

			storyBoard.Begin ();
		}