public void InvokeCustomScript(ScriptCallback script) { if (OnCustomScript != null) { OnCustomScript(this, script); } }
/// <summary> /// Executes client java script /// </summary> /// <param name="script">Script to execute on client side</param> private void InvokeScriptCallback(ScriptCallback script) { if (script == null) { throw new ArgumentNullException("script"); } if (String.IsNullOrEmpty(script.ScriptName)) { throw new ArgumentNullException("ScriptName"); } try { //Debug.WriteLine("InvokingScript::" + script.ScriptName + " with args ::" + script.Args[0] + ", " + script.Args[1] + ", " + script.Args[2]); webBrowser.InvokeScript(script.ScriptName, script.Args); } catch (Exception ex) { Debug.WriteLine( "Exception in InvokeScriptCallback :: " + ex.Message); } }