示例#1
0
        /// <summary>
        /// 检测书源可用率
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Testing_Click(object sender, RoutedEventArgs e)
        {
            MessageBox.Show("状态码如果为1代表书源站正常访问,如果为0代表不可访问", "提示");


            App.Current.Dispatcher.Invoke((Action)(() =>
            {
                //更新书源状态
                DataFetch.UpdateSourceState();
                //加载书源
                ListSource.ItemsSource = DataFetch.GetBookSources(0);
                TempData.UpdateBookSourceS();
            }));
        }