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

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

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