private static void InnerShow(string absolutePath, int _displayMonitor) { ForeachVideoRenders((_videoRender, screen, index) => { if (_displayMonitor == index || _displayMonitor < 0) { if (_videoRender == null || _videoRender.RenderDisposed) { Execute.OnUIThread(() => { _videoRender = new VideoRender(); _videoRender.Init(screen); InnerApplyVideoAspect(_videoRender, VideoAspect, screen); bool ok = LiveWallpaperEngineManager.Show(_videoRender, screen); if (!ok) { LiveWallpaperEngineManager.Close(_videoRender); System.Windows.MessageBox.Show("巨应壁纸貌似不能正常工作,请关闭杀软重试"); } else { _videoRenders[index] = _videoRender; } }); } } _videoRender?.Play(absolutePath); if (index == _audioSourceMonitor) { _videoRender?.Mute(false); } }); }
public static void InitMonitor(int displayMonitor) { _displayMonitor = displayMonitor; ForeachVideoRenders((render, screen, i) => { if (displayMonitor > -1 && i != displayMonitor) { LiveWallpaperEngineManager.Close(render); _videoRenders[i] = null; } }); }
private void btnCloseCustomHandle_Click(object sender, RoutedEventArgs e) { LiveWallpaperEngineManager.Close(_handleRender); }
private void btnCloseProcess_Click(object sender, RoutedEventArgs e) { var btn = sender as Button; LiveWallpaperEngineManager.Close(_handleRender); }