private void OnTitlesLoaded(object sender, LoadCompletedEventArgs e) { if (e.Error == null) { // Make sure that we load all pages of the Customers feed. if (Titles.Continuation != null) { Titles.LoadNextPartialSetAsync(); } // Set the total page count, if we requested one. if (e.QueryOperationResponse.Query .RequestUri.Query.Contains("$inlinecount=allpages")) { _totalCount = (int)e.QueryOperationResponse.TotalCount; } IsDataLoaded = true; // Update the pages loaded text binding. NotifyPropertyChanged("PagesLoadedText"); } else { // Display the error message in the binding. this.Message = e.Error.Message; } }
//This is akin to ServiceConnected in Android Map2DOnline private static void buildings_LoadCompleted(object sender, LoadCompletedEventArgs e) { if (e.Error == null) { // Handling for a paged data feed. if (buildings.Continuation != null) { // Automatically load the next page. buildings.LoadNextPartialSetAsync(); } else { //The data is ready foreach (Building b in buildings) { CurrentBuilding = b; //TODO: Currently, LoadEdges just loops through the edges and does nothing LoadEdges(CurrentBuilding); break; } } } else { CurrentBuilding = null; } //Now notify the observers //we just let the observers know that something has happened. //They can then check if CurrentBuilding != null //TODO: MAYBE just replace this with WifiStatusChanged, where the Status is RADIOMAP_DOWNLOADED if (OnBuildingDownload != null) //any observers? OnBuildingDownload(null, null); }
// Handles the LoadCompleted event. private void Photos_LoadCompleted(object sender, LoadCompletedEventArgs e) { if (e.Error == null) { // Make sure that we load all pages of the Customers feed. if (_photos.Continuation != null) { // Request the next page from the data service. _photos.LoadNextPartialSetAsync(); } else { // All pages are loaded. IsDataLoaded = true; } } else { if (MessageBox.Show(e.Error.Message, "Retry request?", MessageBoxButton.OKCancel) == MessageBoxResult.OK) { this.LoadData(); } } }
// Token: 0x060004F5 RID: 1269 RVA: 0x0002866C File Offset: 0x0002686C private void webView_0_LoadCompleted(object sender, LoadCompletedEventArgs e) { Thread.Sleep(500); this.method_2(); this.webView_0.RegisterJSExtensionFunction("close", new JSExtInvokeHandler(this.method_8)); this.webView_0.RegisterJSExtensionFunction("retry", new JSExtInvokeHandler(this.method_9)); }
// Token: 0x06000515 RID: 1301 RVA: 0x0002BC04 File Offset: 0x00029E04 private void webView_0_LoadCompleted(object sender, LoadCompletedEventArgs e) { Thread.Sleep(500); this.method_2(); this.webView_0.RegisterJSExtensionFunction(Class185.smethod_0(537715225), new JSExtInvokeHandler(this.method_8)); this.webView_0.RegisterJSExtensionFunction(Class185.smethod_0(537715221), new JSExtInvokeHandler(this.method_9)); }
private void dumpLoader_LoadCompleted(object sender, LoadCompletedEventArgs e) { if (m_curTask != null) { m_curTask.Completed(); } if (e.Cancelled) { return; } try { Dump newDump = e.Dump; if (m_curDump != null) { m_curDump = null; // Dummy placeholder, switch dump here } m_curDump = newDump; } catch (Exception ex) { ShowErrorMessage("Error opening dump. Please file a bug.\n\nDetails:\n" + ex.ToString()); } }
protected virtual void OnLoadCompleted(object sender, LoadCompletedEventArgs e) { if (LoadCompleted != null) { LoadCompleted(sender, e); } }
private void _view_LoadCompleted(object sender, LoadCompletedEventArgs url) { //Dispatcher.BeginInvoke(new Action(() => //{ // maskLoading.Visibility = Visibility.Collapsed; //})); }
/// <summary> /// Handles the context LoadCompleted event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ContextLoadCompleted(object sender, LoadCompletedEventArgs e) { if (e.Exception == null) { loaded = true; // Notify that all of the collections changed OnPropertyChanged("Tags"); OnPropertyChanged("Statuses"); OnPropertyChanged("Priorities"); OnPropertyChanged("User"); OnPropertyChanged("UserTags"); OnPropertyChanged("Lists"); var loadCompleted = LoadCompleted; if (loadCompleted != null) { loadCompleted(this, e); } } else if (e.Exception is ArgumentException) { context.ClearCache(); context.LoadAsync(); } }
private void loaded(LoadCompletedEventArgs e, LoadModuleCallback callback) { lock (e.Request.ModuleInfo) { (e.Request.ModuleInfo as ModuleInfo).Status = ModuleStatus.Loaded; } try { e.Request.ModuleInfo.Initialize(); } catch (Exception ex) { (e.Request.ModuleInfo as ModuleInfo).Raise(this, new LoadCompletedEventArgs(e.Request, null, ex, e.Cancelled, e.UserState)); if (callback != null) { callback(this, new LoadedMoudleEventArgs(e.Request, ex, false, LoadModuleStatus.End, e.UserState)); } else { throw new PageException(MessageResource.PageException_ModuleInitializeError_Ttitle, MessageResource.PageException_ModuleInitializeError_Message, ex, e.Request); } } (e.Request.ModuleInfo as ModuleInfo).Raise(this, e); if (callback != null) { callback(this, new LoadedMoudleEventArgs(e.Request, null, false, LoadModuleStatus.End, e.UserState)); } }
/// <summary> /// Asynchronously executes an <see cref="T:System.Linq.IQueryable`1"/> and loads results into the <see cref="T:System.Data.Services.Client.DataServiceCollection`1"/>. /// </summary> /// <typeparam name="T">Entity type of the <see cref="T:System.Data.Services.Client.DataServiceCollection`1"/> instance.</typeparam> /// <param name="bindingCollection">The <see cref="T:System.Data.Services.Client.DataServiceCollection`1"/> instance on which this extension method is enabled.</param> /// <param name="query">Query that when executed loads entities into the collection.</param> /// <returns>A <see cref="T:System.Threading.Tasks.Task`1"/> that, when completed, returns a <see cref="T:System.Data.Services.Client.LoadCompletedEventArgs"/>.</returns> public static async Task <LoadCompletedEventArgs> LoadAsync <T>(this DataServiceCollection <T> bindingCollection, IQueryable <T> query) { var tcs = new TaskCompletionSource <LoadCompletedEventArgs>(); EventHandler <LoadCompletedEventArgs> handler = delegate(object o, LoadCompletedEventArgs e) { if (e.Error != null) { tcs.TrySetException(e.Error); } else if (e.Cancelled) { tcs.TrySetCanceled(); } else { tcs.TrySetResult(e); } }; bindingCollection.LoadCompleted += handler; bindingCollection.LoadAsync(query); LoadCompletedEventArgs eventArgs = await tcs.Task; bindingCollection.LoadCompleted -= handler; return(eventArgs); }
private void f_brow_onLoadCompleted(object sender, LoadCompletedEventArgs url) { string s = string.Format("LOAD_COMPLETED: ===== {0}", url.Url); Debug.WriteLine(s); f_brow_onDOMContentLoaded(); }
private void LoadCompleted(object sender, LoadCompletedEventArgs e) { Debug.Print("Print()"); if (!_testMode) { _hiddenForm.webView.Print(_printerSettings, _pageSettings); } }
private void OnWebViewLoadCompleted(object sender, LoadCompletedEventArgs e) { circularProgress.IsRunning = false; pnProgress.SendToBack(); _webKit.BringToFront(); UpdateYouTubeState(); _initialLoadComplete = true; }
void topMovieTitles_LoadCompleted(object sender, LoadCompletedEventArgs e) { Deployment.Current.Dispatcher.BeginInvoke(() => { ShowProgressBar = false; TopMovieTitles = topMovieTitles; }); }
void logsLoader_LoadCompleted(object sender, LoadCompletedEventArgs e) { var newEntries = (from le in e.LogEntries.Skip(logEntries.Count) select new LogEntryViewModel(le)); logEntries.AddRange(newEntries); UpdateFilter(); StopProcessing(); }
// Handles the DataServiceCollection<T>.LoadCompleted event. private void OnCustomersLoaded(object sender, LoadCompletedEventArgs e) { // Make sure that we load all pages of the Customers feed. if (Customers.Continuation != null) { Customers.LoadNextPartialSetAsync(); } IsDataLoaded = true; }
private void WebView_LoadCompleted(object sender, LoadCompletedEventArgs url) { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs("CanGoBack")); PropertyChanged(this, new PropertyChangedEventArgs("CanGoNext")); PropertyChanged(this, new PropertyChangedEventArgs("WebAddress")); } }
private void OnTitlesLoaded(object sender, LoadCompletedEventArgs e) { if (e.Error == null) { // Get the binding collection, which is the sender. DataServiceCollection <Title> loadedTitles = sender as DataServiceCollection <Title>; if (loadedTitles != null) { // Make sure that we load all pages of the Customers feed. if (loadedTitles.Continuation != null) { loadedTitles.LoadNextPartialSetAsync(); } // Set the total page count, if we requested one. if (e.QueryOperationResponse.Query .RequestUri.Query.Contains("$inlinecount=allpages")) { this.TotalCount = (int)e.QueryOperationResponse.TotalCount; } try { localDb.Titles.InsertAllOnSubmit <Title>(loadedTitles); // We want to try and add all the entities even if they already exist. localDb.SubmitChanges(ConflictMode.ContinueOnConflict); } catch (Exception) { // We don't care about general exceptions, which inculude SQL CE constraint // violations when we try to store the same entity twice, // so we just eat the error. } // Unregister the event handler. loadedTitles.LoadCompleted -= OnTitlesLoaded; // Set the binding collection to the loaded titles. this.Titles = loadedTitles; IsDataLoaded = true; } } else { // Display the error message in the binding. this.Message = e.Error.Message; } if (LoadCompleted != null) { LoadCompleted(this, new SourcesLoadCompletedEventArgs(e.Error)); } }
private void BrowserLoadCompleted(object sender, LoadCompletedEventArgs e) { var browser = (WebView)sender; if (e.Url == Href) { //TODO: Need to clean up the event subscription if the LoadCompleted event is never raised Unsubscribe(browser); base.Execute(browser); } }
void web_view_LoadCompleted(object sender, LoadCompletedEventArgs url) { document = GetWebHTML(); _url = GetCurrentURL(); if (DocumentCompleted != null) { DocumentCompleted(sender, url); } //MessageBox.Show("Complete"); //throw new NotImplementedException(); }
void RandomSongs_LoadCompleted(object sender, LoadCompletedEventArgs e) { songViews = new List <SongView>(); DataServiceCollection <RandomSongs> songs = (DataServiceCollection <RandomSongs>)sender; foreach (RandomSongs song in songs) { SongView songView = new SongView(song); songViews.Add(songView); } SongGrid.ItemsSource = songViews; }
internal void Raise(object sender, LoadCompletedEventArgs e) { lock (m_queue) { KeyValuePair <Request, LoadModuleCallback> pair; while (m_queue.Count > 0) { pair = m_queue.Dequeue(); pair.Value(sender, new LoadedMoudleEventArgs(pair.Key, e.Error, e.Cancelled, LoadModuleStatus.End, e.UserState)); } } }
private void BrowserLoaded(object sender, LoadCompletedEventArgs e) { webView.LoadCompleted -= BrowserLoaded; isBrowserLoaded = true; if (devToolsWindow == null) { devToolsWindow = new DevToolsWindow(); devToolsWindow.Attach(webView); devToolsWindow.Closed += (s, arg) => devToolsWindow = null; } devToolsWindow.Show(); }
/// <summary> /// Handles the LoadCompleted event of the movies control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="LoadCompletedEventArgs"/> instance containing the event data.</param> private void movies_LoadCompleted(object sender, LoadCompletedEventArgs e) { foreach (s.Movie c in movies) { MovieDataGroup movie = new MovieDataGroup("" + c.MovieId, c.Title, string.Empty, c.PosterImage, c.MovieDescription); foreach (s.Actor s in c.Actor) { movie.Items.Add(new ActorDataItem(c.MovieId.ToString() + s.ActorId.ToString(), s.Firstname + " " + s.Lastname, s.Title, s.Image, string.Empty, s.About, movie)); } dataSource.AllGroups.Add(movie); } this.DefaultViewModel["Groups"] = dataSource.AllGroups; }
private void LoadCompleted(object sender, LoadCompletedEventArgs e) { var meta = pdfView.DocumentMeta; Log.Error(Tag, "title = " + meta.Title); Log.Error(Tag, "author = " + meta.Author); Log.Error(Tag, "subject = " + meta.Subject); Log.Error(Tag, "keywords = " + meta.Keywords); Log.Error(Tag, "creator = " + meta.Creator); Log.Error(Tag, "producer = " + meta.Producer); Log.Error(Tag, "creationDate = " + meta.CreationDate); Log.Error(Tag, "modDate = " + meta.ModDate); PrintBookmarksTree(pdfView.TableOfContents, "-"); }
/// <summary> /// Called when the context is don laoding /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void ModelLoadCompleted(object sender, LoadCompletedEventArgs e) { // This callback is not guaranteed to occur on the UI thread, so dispatch on the // UI thread. Dispatcher.BeginInvoke(() => { if (e.Exception == null) { Bind(); } else { MessageBox.Show("Loading the context failed: " + e.Exception.ToString()); } }); }
async void Collection_LoadCompleted(object sender, LoadCompletedEventArgs e) { if (e.Error == null) { if (_collection.Continuation != null) { _collection.LoadNextPartialSetAsync(); } TitleGrid.UpdateLayout(); } else { var dialog = new MessageDialog(e.Error.Message); await dialog.ShowAsync(); } }
private void WebView_LoadCompleted(object sender, LoadCompletedEventArgs e) { try { this.Invoke(new Action(() => { string js = string.Format(@"window.scrollTo({0},{1});", Pos.X, Pos.Y); if (!OverflowVisible) { js += @"document.documentElement.style.overflowX = 'hidden';"; js += @"document.documentElement.style.overflowY = 'hidden';"; } webControl1.WebView.EvalScript(js);//显示固定区域,隐藏滚动条。 })); } catch (Exception) { } }
private void OnEventsLoaded(object sender, LoadCompletedEventArgs e) { try { if (e.Error == null) { // Make sure that we load all pages of the Content feed. if (Events.Continuation != null) { Events.LoadNextPartialSetAsync(); } // We have loaded all the events. IsEventDataLoaded = true; IsDataLoading = false; if (this.Events.Count == 0) { this.Message = "No events found."; } } else { IsEventDataLoaded = false; IsDataLoading = false; // Set the message this.Message = e.Error.Message; } // Deregister a handler for the LoadCompleted callback. _events.LoadCompleted -= OnEventsLoaded; if (LoadCompleted != null) { // Notify the UI that we are done. LoadCompleted(this, new SourcesLoadCompletedEventArgs(e.Error)); } } catch (Exception) { throw; } }
private void WebView_LoadComplete(object sender, LoadCompletedEventArgs e) { ExtractAllImages(); HideProgress(); BrowseBar.Enabled = true; }
private void OnMainWebViewLoadComplete(Object sender, LoadCompletedEventArgs e) { FormProgress.CloseProgress(); TabControl.Enabled = true; Loaded = true; }
private void WebView_LoadComplete(object sender, LoadCompletedEventArgs loadCompletedEventArgs) { HideProgress(); BrowseBar.Enabled = true; }