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