/// <summary>The callback used to process a completed request.</summary> /// <param name="request">The HttpRequest that has now completed.</param> private static void OnAjaxDone(HttpRequest request) { object[] extraData = (object[])request.ExtraData; DynamicMethod <Nitro.Void> callback = (DynamicMethod <Nitro.Void>)extraData[0]; request.ExtraData = extraData[1]; if (callback != null) { callback.Run(request); } }
/// <summary>Runs the keydown events.</summary> /// <param name="e">The event which has occured.</param> public bool RunKeyDown(UIEvent e) { if (KeyDown != null && KeyDown(e)) { return(true); } if (onkeydown != null) { onkeydown.Run(e); } return(false); }
/// <summary>Runs the keyup events.</summary> /// <param name="e">The event which has occured.</param> public bool RunKeyUp(UIEvent e) { if (KeyUp != null && KeyUp(e)) { return(true); } if (onkeyup != null) { onkeyup.Run(e); } return(false); }
/// <summary>Called when the mouse moves over this document.</summary> /// <param name="e">The mouse event containing the position.</param> public bool RunMouseMove(UIEvent e) { // Run mouse over on the HTML element (and internally bubbles to it's kids): bool result = html.RunMouseOver(e); // Run the mousemove C# event: if (MouseMove != null) { MouseMove(e); } // Run the Nitro event: if (onmousemove != null) { // Run the Nitro event: onmousemove.Run(e); } return(result); }
/// <summary>The method called when the system timer has waited for the specified interval.</summary> private void Elapsed(object sender, System.Timers.ElapsedEventArgs e) { #endif try{ if (OneOff) { Stop(); } if (Callback != null) { Callback.Run(); } if (OnComplete != null) { OnComplete(); } }catch (Exception er) { Dom.Log.Add("Error in an timed/interval function: " + er.ToString()); } }
/// <summary>Called when this animation is finished.</summary> public void Finished() { if (FinishedPlaying) { return; } FinishedPlaying = true; try{ if (Done != null) { Done.Run(this); } if (OnComplete != null) { OnComplete(this); } }catch (Exception e) { Dom.Log.Add("Error running animation OnDone method: " + e); } }