public AddImagesLayer(QRSTWorldGlobeControl globeControl) { InitializeComponent(); m_GlobeControl = globeControl; numericUpDownGeoTiffLevelZeroDegree.Enabled = false; numericUpDownGeoTiffPyramidLevelCount.Enabled = false; }
public AddShapeLayer(QRSTWorldGlobeControl GlobeControl) { InitializeComponent(); m_GlobeControl = GlobeControl; numericUpDownShapeLevelZeroDegree.Enabled = false; numericUpDownShapePyramidLevelCount.Enabled = false; }
/// <summary> /// 释放资源 /// </summary> public override void Dispose() { if (this.QrstGlobe != null) { this.QrstGlobe.MouseDown -= new System.Windows.Forms.MouseEventHandler(QrstGlobe_MouseDown); this.QrstGlobe.MouseUp -= new System.Windows.Forms.MouseEventHandler(QrstGlobe_MouseUp); this.QrstGlobe = null; } this.SaveFilePath = null; this.overlays = null; this.m_positionD = null; this.m_latitude = double.NaN; this.m_latitude = double.NaN; this.m_x = double.NaN; this.m_y = double.NaN; this.Altitude = double.NaN; this.TextureFileName = null; this.Image = null; this.Width = 0; this.Height = 0; this.MaximumDisplayDistance = double.NaN; this.MinimumDisplayDistance = double.NaN; this.SelectionRectangle = Rectangle.Empty; this.lastView = Matrix.Zero; }
/// <summary> /// Constructor /// </summary> public SkyLayer(string LayerName, QRSTWorldGlobeControl globe) : base(LayerName) { this.pluginPath = Path.Combine(globe.DataDirectory, @"Space"); this.world = globe.CurrentWorld; this.drawArgs = globe.DrawArgs; this.RenderPriority = RenderPriority.SurfaceImages; }
/// <summary> /// Constructor /// </summary> public Stars3DLayer(string LayerName, string pluginPath, QRSTWorldGlobeControl QrstWindow) : base(LayerName) { this.pluginPath = pluginPath; this.world = QrstWindow.CurrentWorld; this.drawArgs = QrstWindow.DrawArgs; this.RenderPriority = RenderPriority.SurfaceImages; //this.sphereRadius = this.drawArgs.WorldCamera.WorldRadius * 20; ReadSettings(); }
/// <summary> /// 基本的加载方法,调用加载方法 /// </summary> /// <param name="parent"></param> public virtual void PluginLoad(QRSTWorldGlobeControl parent, string pluginDirectory) { if (m_isLoaded) // Already loaded { return; } m_Application = parent; m_PluginDirectory = pluginDirectory; Load(); m_isLoaded = true; }
/// <summary> /// 初始化“PluginCompiler”类的新实例 /// </summary> /// <param name="qrstWorldGlobe">三维球主程序</param> /// <param name="pluginDirectory">插件目录</param> public PluginCompiler(QRSTWorldGlobeControl qrstWorldGlobe, string pluginDirectory) { this.qrstWorldGlobe = qrstWorldGlobe; //添加可用的代码编译提供者 AddCodeProvider(new Microsoft.CSharp.CSharpCodeProvider()); AddCodeProvider(new Microsoft.VisualBasic.VBCodeProvider()); AddCodeProvider(new Microsoft.JScript.JScriptCodeProvider()); //设置编译参数 cp.GenerateExecutable = false; cp.GenerateInMemory = true; cp.IncludeDebugInformation = false; // 加载所有的引用程序集 AssemblyName[] assemblyNames = Assembly.GetExecutingAssembly().GetReferencedAssemblies(); foreach (AssemblyName assemblyName in assemblyNames) { try { Assembly.Load(assemblyName); } catch { } } //引用所有已经加载的程序集 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; }
/// <summary> /// 加载插件 /// </summary> /// <param name="parent">插件所属的球体控件</param> /// <param name="pluginDirectory">插件目录</param> public override void PluginLoad(QRSTWorldGlobeControl parent, string pluginDirectory) { base.PluginLoad(parent, pluginDirectory); }
public GotoPlace(QRSTWorldGlobeControl GlobeControl) { InitializeComponent(); m_GlobeControl = GlobeControl; }