Ejemplo n.º 1
0
        /// <summary>
        /// Unloads our plugin
        /// </summary>
        public override void Unload()
        {
            // write settings
            layer.SaveSettings();

            // Remove layer controller
            control.VisibleChanged -= evhand;
            control.Dispose();

            // Remove toolbar item
            if (m_ToolbarItem != null)
            {
                m_Application.WorldWindow.MenuBar.RemoveToolsMenuButton(m_ToolbarItem);
            }

            ParentApplication.WorldWindow.CurrentWorld.RenderableObjects.Remove(LayerName);
        }
Ejemplo n.º 2
0
 private void btnOK_Click(object sender, System.EventArgs e)
 {
     if (cboTexture.SelectedItem != null)
     {
         string[] size;
         //System.Windows.Forms.MessageBox.Show("Texture : " + cboTexture.SelectedItem.ToString());
         layer.Dispose();
         layer.textureFileName = cboTexture.SelectedItem.ToString();
         layer.showGlobe       = chkGlobe.Checked;
         layer.spritePos       = cboPosition.SelectedItem.ToString();
         size = cboSize.SelectedItem.ToString().Split('x');
         layer.globeRadius = int.Parse(size[0]) / 2;
         layer.showInset   = chkInset.Checked;
         layer.insetPos    = cboPosition2.SelectedItem.ToString();
         size              = cboSize2.SelectedItem.ToString().Split('x');
         layer.insetWidth  = int.Parse(size[0]);
         layer.insetHeight = int.Parse(size[1]);
         layer.Initialize(layer.drawArgs);
         layer.SaveSettings();
     }
     // Close this form
     this.Close();
 }