private void Window_Closed(object sender, EventArgs e) { if (GlobalDataUtil.GetInstance().Browser != null) { GlobalDataUtil.GetInstance().Browser.Close(); } }
private void SetDefaultBackground() { //后面从配置文件加载吧 var themeList = GlobalDataUtil.GetInstance().CrawlerConfig.ThemeList; var fileName = themeList.Last().Background; fileName = fileName.Replace(".jpg", ".mp4"); SetBackgroundVideo(fileName); }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if (GlobalDataUtil.GetInstance().Browser != null) { GlobalDataUtil.GetInstance().Browser.Close(); } hostWindow.Close(); }
public void SetDefaultBackground() { var crawlerConfig = GlobalDataUtil.GetInstance().CrawlerConfig; var theme = crawlerConfig.ThemeList[crawlerConfig.SelectedThemeIndex]; if (theme.BackgroundType == BackgroundType.Dynamic) { var fileName = theme.Background.Replace(".jpg", ".mp4"); SetBackgroundVideo(fileName); } else { SetBackgroundImage(theme.Background, 0.8); } SetCurrentWindowToTop(); }
public void SetDefaultBackground() { //后面从配置文件加载吧 var themeList = GlobalDataUtil.GetInstance().CrawlerConfig.ThemeList; var fileName = themeList.Last().Background; fileName = fileName.Replace(".jpg", ".mp4"); if (IsHostBackground) { SetHostBackgroundVideo(fileName); this.Activate(); } else { SetBackgroundVideo(fileName); } }
private void Application_Startup(object sender, StartupEventArgs e) { //初始化全局数据 GlobalDataUtil.GetInstance(); }