Example #1
0
 void m_serverHandler_OnWallPaperReceived(object sender, WallpaperReceivedArgs e)
 {
     if (InvokeRequired)
     {
         this.Invoke((MethodInvoker) delegate
         {
             OnWallpaperReceived(e);
         });
     }
     else
     {
         OnWallpaperReceived(e);
     }
 }
Example #2
0
 void m_client_OnWallPaperReceived(object sender, WallpaperReceivedArgs e)
 {
     if (InvokeRequired)
     {
         this.BeginInvoke((MethodInvoker) delegate
         {
             OnWallPaperReceived(e);
         });
     }
     else
     {
         OnWallPaperReceived(e);
     }
 }
Example #3
0
        private void OnWallPaperReceived(WallpaperReceivedArgs e)
        {
            string path = Path.Combine(Environment.CurrentDirectory, "temp_wallpaper.wllpr");

            if (File.Exists(path))
            {
                File.Delete(path);
            }

            logViewer.WriteLine(e.Image, "New wallpaper received (" + e.Style + "):");

            e.Image.Save(path);
            e.Image.Dispose();
            Wallpaper.Set(new Uri(path), e.Style);
            File.Delete(path);
        }
Example #4
0
 private void OnWallpaperReceived(WallpaperReceivedArgs e)
 {
     logViewer.WriteLine("New image received (" + e.Style + ")");
 }