Ejemplo n.º 1
0
        /// <summary>
        /// Base class load, calls Load.
        /// </summary>
        /// <param name="parent"></param>
        public virtual void PluginLoad(QrstAxGlobeControl parent, string pluginDirectory)
        {
            if (m_isLoaded)
            {
                // Already loaded
                return;
            }

            m_Application     = parent;
            m_PluginDirectory = pluginDirectory;
            Load();
            m_isLoaded = true;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref= "T:WorldWind.PluginEngine.PluginCompiler"/> class.
        /// </summary>
        /// <param name="worldWind"></param>
        /// <param name="pluginDirectory"></param>
        public PluginCompiler(QrstAxGlobeControl worldWind, string pluginDirectory)
        {
            this.worldWind = worldWind;

            // Add the available codeDomProviders
            // TODO: Enumerate codeDomProviders (easier in .net 2.0)
            AddCodeProvider(new Microsoft.CSharp.CSharpCodeProvider());
            AddCodeProvider(new Microsoft.VisualBasic.VBCodeProvider());
            AddCodeProvider(new Microsoft.JScript.JScriptCodeProvider());

            // Setup compiler parameters
            cp.GenerateExecutable      = false;
            cp.GenerateInMemory        = true;
            cp.IncludeDebugInformation = false;

            /*暂时不支持外部插件类库读入 2012 11 12 hxz
             *          // Load all assemblies WW has a reference to
             *          AssemblyName[] assemblyNames = Assembly.GetExecutingAssembly().GetReferencedAssemblies();
             *          foreach(AssemblyName assemblyName in assemblyNames)
             *                  Assembly.Load(assemblyName);
             */

            // Reference all assemblies WW has loaded
            Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
            foreach (Assembly assembly in assemblies)
            {
                try
                {
                    if (assembly.Location.Length > 0)
                    {
                        m_worldWindReferencesList.Add(assembly.Location);
                    }
                }
                catch (NotSupportedException)
                {
                    // In-memory compiled assembly etc.
                }
            }

            PluginRootDirectory = pluginDirectory;
        }
Ejemplo n.º 3
0
 public override void PluginLoad(QrstAxGlobeControl parent, string pluginDirectory)
 {
     base.PluginLoad(parent, pluginDirectory);
 }