private void SynchWithLogging() { foreach (GoogleAccount ga in _GoogleAccounts) { _currentGA = ga; ga.UploadBusy -= ga_UploadBusy; ga.UploadEnd -= ga_UploadEnd; ga.UploadStart -= ga_UploadStart; ga.UploadBusy += ga_UploadBusy; ga.UploadEnd += ga_UploadEnd; ga.UploadStart += ga_UploadStart; cs.CurrentAccount = ga.Name; cs.TotalFileUploadValue = 0; cs.CurrentFileUploadValue = 0; cs.CurrentFile = ""; cs.CurrentFolder = ""; if (ga.ItemListOnGoogleDrive == null || ga.ItemListOnGoogleDrive.Count == 0) { //ga.FillItemListOnGoogleDrive(); ga.FillItemListOnGoogleDriveNew(); } if (ga.ItemListToUpload != null && ga.ItemListToUpload.Count > 0) { List <Item> lstItemsToUpload = ga.GetListOfItemsToUpload(ga.ItemListToUpload, _rootFolder); if (lstItemsToUpload != null && lstItemsToUpload.Count > 0) { ga.UploadItems = lstItemsToUpload; } } } UploadWindow wind = new UploadWindow(); wind.Show(); wind.SetItems(_GoogleAccounts, _rootFolder); System.Windows.Threading.Dispatcher.Run(); }
private void SynchWithLogging() { foreach (GoogleAccount ga in _GoogleAccounts) { _currentGA = ga; ga.UploadBusy -= ga_UploadBusy; ga.UploadEnd -= ga_UploadEnd; ga.UploadStart -= ga_UploadStart; ga.UploadBusy += ga_UploadBusy; ga.UploadEnd += ga_UploadEnd; ga.UploadStart += ga_UploadStart; cs.CurrentAccount = ga.Name; cs.TotalFileUploadValue = 0; cs.CurrentFileUploadValue = 0; cs.CurrentFile = ""; cs.CurrentFolder = ""; if (ga.ItemListOnGoogleDrive == null || ga.ItemListOnGoogleDrive.Count == 0) { //ga.FillItemListOnGoogleDrive(); ga.FillItemListOnGoogleDriveNew(); } if (ga.ItemListToUpload != null && ga.ItemListToUpload.Count > 0) { List<Item> lstItemsToUpload = ga.GetListOfItemsToUpload(ga.ItemListToUpload, _rootFolder); if (lstItemsToUpload != null && lstItemsToUpload.Count > 0) { ga.UploadItems = lstItemsToUpload; } } } UploadWindow wind = new UploadWindow(); wind.Show(); wind.SetItems(_GoogleAccounts, _rootFolder); System.Windows.Threading.Dispatcher.Run(); }