示例#1
0
        void SpotifySession_OnImageLoaded(Session sender, ImageEventArgs e)
        {
            /*
            if (e.Image != null)
            {
                try
                {
                    string d = GetAppString()+"\\covers\\"+e.State+".jpg";
                    e.Image.Save(d, System.Drawing.Imaging.ImageFormat.Jpeg);

                }
                catch
                {
                }
            }*/
        }
示例#2
0
		static void HandleOnImageLoaded(Session sender, ImageEventArgs e)
		{
			Console.WriteLine("Image with id {0} loaded. {1}",
				e.Id, string.IsNullOrEmpty(e.Error) ? string.Empty : "Error: " + e.Error);
			
			if(e.Image != null)
			{
				try
				{
					e.Image.Save("cover.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
					Console.WriteLine("Cover saved to cover.jpg");
					System.Diagnostics.Process.Start("cover.jpg");
				}
				catch
				{
				}
			}
		}