private void UpdateFeed(object sender, RoutedEventArgs e) { if (!InnerTubeFeedWorker.IsRunningAsync()) { InnerTubeFeedWorker iWork = InnerTubeFeedWorker.GetInstance(App.InnerTubeFeeds, App.Settings); iWork.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(iWork_RunWorkerCompleted); iWork.RunWorkerAsync(WorkType.UpdateFeeds); } }
private void button1_Click(object sender, RoutedEventArgs e) { ResetControls(); if (!InnerTubeFeedWorker.IsRunningAsync()) { InnerTubeFeedWorker iWork = InnerTubeFeedWorker.GetInstance(App.InnerTubeFeeds, App.Settings); iWork.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(iWork_RunWorkerCompleted); iWork.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(iWork_ProgressChanged); iWork.RunWorkerAsync(WorkType.All); } }