Beispiel #1
0
        async Task updateDb_doPostDnld(DnLd dr)
        {
            dr.DownloadedAt    = DateTime.Now;
            dr.DownloadedByPC  = Environment.MachineName;
            dr.DownloadedToDir = MiscHelper.DirPlyr;
            dr.DnldStatusId    = "H"; // HasBeenDownloaded
            dr.ReDownload      = false;
            onSaveChanges(null);

            if (Environment.MachineName == "LN1")
            {
                return;
            }

            //Task.Factory.StartNew(() => PostDnldHelper.DoPostDownloadProcessing(dr)).ContinueWith(_ =>                {
            await Application.Current.Dispatcher.BeginInvoke(new Action(async() =>
            {
                await PostDnldHelper.DoPostDownloadProcessing(dr);

                dr.DnldStatusId = "A"; // All done
                dr.ReDownload = false;
                if (_dgD != null)
                {
                    _dgD.Items.Refresh();
                }
                //}, TaskScheduler.FromCurrentSynchronizationContext());
            }));
        }
Beispiel #2
0
 async Task onCutOne(object x)
 {
     Bpr.BeepOk(); await PostDnldHelper.DoPostDownloadProcessing(SelectedDnLd);
 }