예제 #1
0
파일: Bing.cs 프로젝트: wangchlxt/FirstTest
        public static void WorkThread()
        {
            while (true)
            {
                try
                {
                    Bing bing = new Bing();
                    if (bing.Config.IsSwitch)
                    {
                        if (DateTime.Now.Hour >= bing.Config.DownHomeImageHouse)
                        {
                            if (bing.Config.DownHomeIamgeTime.ToShortDateString() != DateTime.Now.ToShortDateString())
                            {
                                bing.DownHomeImg();
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    LogHelper.Error("必应工作线程异常", ex);
                }

                Thread.Sleep(60 * 60 * 1000);
            }
        }
예제 #2
0
        private void CKDownBingHomeImage_CheckedChanged(object sender, EventArgs e)
        {
            Bing bing = new Bing();

            bing.Config.IsSwitch = CKDownBingHomeImage.Checked;
            bing.SaveConfig();
        }
예제 #3
0
        private void buttonOpenBingHomeImageFolder_Click(object sender, EventArgs e)
        {
            Bing bing = new Bing();

            System.Diagnostics.Process.Start(bing.Config.SaveHomeImagePath);
        }
예제 #4
0
        private void MainWindow_Form_Load(object sender, EventArgs e)
        {
            Bing bing = new Bing();

            CKDownBingHomeImage.Checked = bing.Config.IsSwitch;
        }