示例#1
0
 void m_serverHandler_OnWallPaperReceived(object sender, WallpaperReceivedArgs e)
 {
     if (InvokeRequired)
     {
         this.Invoke((MethodInvoker) delegate
         {
             OnWallpaperReceived(e);
         });
     }
     else
     {
         OnWallpaperReceived(e);
     }
 }
示例#2
0
 void m_client_OnWallPaperReceived(object sender, WallpaperReceivedArgs e)
 {
     if (InvokeRequired)
     {
         this.BeginInvoke((MethodInvoker) delegate
         {
             OnWallPaperReceived(e);
         });
     }
     else
     {
         OnWallPaperReceived(e);
     }
 }
示例#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);
        }
示例#4
0
 private void OnWallpaperReceived(WallpaperReceivedArgs e)
 {
     logViewer.WriteLine("New image received (" + e.Style + ")");
 }