Exemplo n.º 1
0
 /// <summar>y
 /// Handles the plugin ready event
 /// </summary>
 /// <param name="sender">The plugin object</param>
 /// <param name="e">The API version</param>
 void geWebBrowser1_PluginReady(object sender, GEEventArgs e)
 {
     // Here we can cast the sender to the IGEPlugin interface
     // Once this is done once can work with the plugin almost seemlessly
     InformationPool.ge = sender as IGEPlugin;
     PluginReady.Invoke(sender, e);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Handles the script error event
 /// </summary>
 /// <param name="sender">The sending object</param>
 /// <param name="e">The error message</param>
 void geWebBrowser1_ScriptError(object sender, GEEventArgs e)
 {
     MessageBox.Show(
         sender.ToString()
         + Environment.NewLine
         + e.Message,
         "Error " + e.Data);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Protected method for raising the ScriptError event
 /// </summary>
 /// <param name="sender">The sending object</param>
 /// <param name="e">Event arguments</param>
 protected virtual void OnScriptError(object sender, GEEventArgs e)
 {
     if (this.ScriptError != null)
     {
         this.ScriptError(sender, e);
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Protected method for raising the KmlLoaded event
 /// </summary>
 /// <param name="kmlFeature">The kmlFeature object</param>
 /// <param name="e">The Event arguments</param>
 protected virtual void OnKmlLoaded(IKmlFeature kmlFeature, GEEventArgs e)
 {
     if (this.KmlLoaded != null)
     {
         this.KmlLoaded(kmlFeature, e);
     }
 }
Exemplo n.º 5
0
 /// <summary>
 /// Protected method for raising the PluginReady event
 /// </summary>
 /// <param name="ge">The plugin object</param>
 /// <param name="e">The Event arguments</param>
 protected virtual void OnPluginReady(IGEPlugin ge, GEEventArgs e)
 {
     if (this.PluginReady != null)
     {
         this.PluginReady(ge, e);
     }
 }
Exemplo n.º 6
0
        /// <summary>
        /// Called when there is a script error in the window
        /// </summary>
        /// <param name="sender">The sending object</param>
        /// <param name="e">Event arguments</param>
        private void Window_Error(object sender, HtmlElementErrorEventArgs e)
        {
            // Handle the original error
            e.Handled = true;

            // Copy the error data
            GEEventArgs ea = new GEEventArgs();
            ea.Message = e.Description;
            ea.Data = e.LineNumber.ToString();

            // Bubble the error
            this.OnScriptError(this, ea);
        }
Exemplo n.º 7
0
 /// <summary>
 /// Protected method for raising the KmlEvent event
 /// </summary>
 /// <param name="kmlEvent">The kmlEvent object</param>
 /// <param name="e">The Event arguments</param>
 protected virtual void OnKmlEvent(IKmlEvent kmlEvent, GEEventArgs e)
 {
     if (this.KmlEvent != null)
     {
         this.KmlEvent(kmlEvent, e);
     }
 }
Exemplo n.º 8
0
 /// <summary>
 /// Called when the document has a ScriptError
 /// </summary>
 /// <param name="sender">The sending object</param>
 /// <param name="e">Event arguments</param>
 private void External_ScriptError(object sender, GEEventArgs e)
 {
     this.OnScriptError(sender, e);
 }
Exemplo n.º 9
0
        /// <summary>
        /// Called when the Plugin is Ready 
        /// </summary>
        /// <param name="plugin">The plugin instance</param>
        /// <param name="e">Event arguments</param>
        private void External_PluginReady(object plugin, GEEventArgs e)
        {
            this.geplugin = (IGEPlugin)plugin;

            // A label for the data
            e.Message = "ApiVersion";

            // The data is just the version info
            e.Data = this.geplugin.getApiVersion();

            // Raise the ready event
            this.OnPluginReady(this.geplugin, e);
        }
Exemplo n.º 10
0
 /// <summary>
 /// Called when a Kml/Kmz file has loaded
 /// </summary>
 /// <param name="kmlFeature">The kml feature</param>
 /// <param name="e">Event arguments</param>
 private void External_KmlLoaded(object kmlFeature, GEEventArgs e)
 {
     this.OnKmlLoaded(kmlFeature, e);
 }
Exemplo n.º 11
0
 /// <summary>
 /// Protected method for raising the PluginReady event
 /// </summary>
 /// <param name="plugin">The plugin object</param>
 /// <param name="e">Event arguments</param>
 protected virtual void OnPluginReady(object plugin, GEEventArgs e)
 {
     if (this.PluginReady != null)
     {
         this.PluginReady(plugin, e);
     }
 }
Exemplo n.º 12
0
 /// <summary>
 /// Protected method for raising the KmlLoaded event
 /// </summary>
 /// <param name="kmlObject">The kmlObject object</param>
 /// <param name="e">Event arguments</param>
 protected virtual void OnKmlLoaded(object kmlObject, GEEventArgs e)
 {
     if (this.KmlLoaded != null)
     {
         this.KmlLoaded(kmlObject, e);
     }
 }