private void Window_Closed(object sender, EventArgs e)
 {
     if (GlobalDataUtil.GetInstance().Browser != null)
     {
         GlobalDataUtil.GetInstance().Browser.Close();
     }
 }
Exemple #2
0
        private void SetDefaultBackground()
        {
            //后面从配置文件加载吧
            var themeList = GlobalDataUtil.GetInstance().CrawlerConfig.ThemeList;
            var fileName  = themeList.Last().Background;

            fileName = fileName.Replace(".jpg", ".mp4");
            SetBackgroundVideo(fileName);
        }
Exemple #3
0
        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            if (GlobalDataUtil.GetInstance().Browser != null)
            {
                GlobalDataUtil.GetInstance().Browser.Close();
            }

            hostWindow.Close();
        }
Exemple #4
0
        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);
            }
        }
Exemple #6
0
 private void Application_Startup(object sender, StartupEventArgs e)
 {
     //初始化全局数据
     GlobalDataUtil.GetInstance();
 }