Exemple #1
0
 private void scanning(object sender, EventArgs e)
 {
     try
     {
         dispatcherTimer.Stop();
         // HttpRequestHelper.HttpGet("http://video.zxchobits.com:8282/nas/dir/index", "");
         HttpRequestHelper.HttpGet("http://center.zxchobits.com/zxchobits/dns/checkIp?code=115599", "");
         //eachDir();
         dispatcherTimer.Start();
         log.Text = DateTime.Now.ToString("yyyy年MM月dd日 HH:mm:ss") + "刷新了一次\r\n";
         log.ScrollToEnd();
     }
     catch (Exception error)
     {
         errorLog.Text += error.Message + "\r\n";
     }
 }
Exemple #2
0
 public void eachDir()
 {
     copyNum = 0;
     each(dirPath, "");
     kg = true;
     if (copyNum > 0)
     {
         //如果 有复制文件,请求网页刷新列表
         HttpRequestHelper.HttpGet("http://video.zxchobits.com:8282/nas/dir/index", "");
     }
     else
     {
         //如果 没有复制文件,请求网页刷新列表
         HttpRequestHelper.HttpGet("http://video.zxchobits.com:8282/nas/dir/updateTime", "");
     }
     copyNum = 0;
 }
Exemple #3
0
        public MainWindow()
        {
            InitializeComponent();
            //shuaxin();
            //while (true)
            //{
            log.Text = "";
            // HttpRequestHelper.HttpGet("http://video.zxchobits.com:8282/nas/dir/index", "");
            log.Text += HttpRequestHelper.HttpGet("http://center.zxchobits.com/zxchobits/dns/checkIp", "code=115599");
            log.Text  = DateTime.Now.ToString("yyyy年MM月dd日 HH:mm:ss") + "启动刷新了一次\r\n";

            //这里写代码
            dispatcherTimer          = new DispatcherTimer();
            dispatcherTimer.Tick    += new EventHandler(scanning);
            dispatcherTimer.Interval = new TimeSpan(0, 0, 30);
            dispatcherTimer.Start();


            //    //Thread.Sleep(200);
            //}
        }