Beispiel #1
0
            public propertiesDialog(CompassLayer layer)
            {
                InitializeComponent();
                //this.Icon = WorldWind.PluginEngine.Plugin.Icon;
                this.layer = layer;
                // Init texture list with *.png
                DirectoryInfo di = new DirectoryInfo(layer.pluginPath);

                FileInfo[] imgFiles = di.GetFiles("*.png");
                cboTexture.Items.AddRange(imgFiles);
                imgFiles = di.GetFiles("*.svg");                 // Tests vector graphics...
                cboTexture.Items.AddRange(imgFiles);
                // select current bitmap
                int i = cboTexture.FindString(layer.textureFileName);

                if (i != -1)
                {
                    cboTexture.SelectedIndex = i;
                }
                // Tilt
                chkTilt.Checked = layer.tilt;
                // Positions
                cboPosition.Items.Add("Top-Left");
                cboPosition.Items.Add("Top-Center");
                cboPosition.Items.Add("Top-Right");
                cboPosition.Items.Add("Bottom-Left");
                cboPosition.Items.Add("Bottom-Center");
                cboPosition.Items.Add("Screen-Center");
                i = cboPosition.FindString(layer.spritePos);
                if (i != -1)
                {
                    cboPosition.SelectedIndex = i;
                }
            }
Beispiel #2
0
 /// <summary>
 /// Plugin entry point - All plugins must implement this function
 /// </summary>
 public override void Load()
 {
     // Add layer visibility controller (and save it to make sure you can kill it later!)
     control.Visible         = true;
     evhand                  = new EventHandler(control_VisibleChanged);
     control.VisibleChanged += evhand;
     // Add toolbar item
     layer      = new CompassLayer(LayerName, PluginDirectory, Global.worldWindow);
     layer.IsOn = World.Settings.ShowCompass;
     Global.worldWindow.CurrentWorld.RenderableObjects.Add(layer);
 }
Beispiel #3
0
        /// <summary>
        /// Plugin entry point - All plugins must implement this function
        /// </summary>
        public override void Load()
        {
            // Add layer visibility controller (and save it to make sure you can kill it later!)
            control.Visible         = true;
            evhand                  = new EventHandler(control_VisibleChanged);
            control.VisibleChanged += evhand;
            // Add toolbar item
            m_ToolbarItem = new WorldWind.WindowsControlMenuButton("Compass", Path.Combine(this.PluginDirectory, @"Plugins\Compass\toolbar\tbcompass.png"), control);
            m_Application.WorldWindow.MenuBar.AddToolsMenuButton(m_ToolbarItem);

            layer      = new CompassLayer(LayerName, PluginDirectory, ParentApplication.WorldWindow);
            layer.IsOn = World.Settings.ShowCompass;
            ParentApplication.WorldWindow.CurrentWorld.RenderableObjects.Add(layer);
            m_ToolbarItem.SetPushed(World.Settings.ShowCompass);
        }
Beispiel #4
0
        /// <summary>
        /// Plugin entry point - All plugins must implement this function
        /// </summary>
        public override void Load()
        {
            // Add layer visibility controller (and save it to make sure you can kill it later!)
            control.Visible = true;
            evhand = new EventHandler(control_VisibleChanged);
            control.VisibleChanged += evhand;
            // Add toolbar item
            //			m_ToolbarItem = new WorldWind.WindowsControlMenuButton("Compass", Path.Combine(this.PluginDirectory, @"Plugins\Compass\tbcompass.png"), control);
            //			m_Application.WorldWindow.MenuBar.AddToolsMenuButton(m_ToolbarItem);

            layer = new CompassLayer(LayerName, PluginDirectory, ParentApplication.WorldWindow);
            layer.IsOn = World.Settings.ShowCompass;
            //ParentApplication.WorldWindow.CurrentWorld.RenderableObjects.ChildObjects.Insert(0,layer);
            ParentApplication.WorldWindow.CurrentWorld.RenderableObjects.Add(layer);
            //			m_ToolbarItem.SetPushed(World.Settings.ShowCompass);
        }
Beispiel #5
0
 internal propertiesDialog(CompassLayer layer)
 {
     InitializeComponent();
     //this.Icon = WorldWind.PluginEngine.Plugin.Icon;
     this.layer = layer;
     // Init texture list with *.png
     DirectoryInfo di = new DirectoryInfo(layer.pluginPath);
     FileInfo[] imgFiles = di.GetFiles("*.png");
     cboTexture.Items.AddRange(imgFiles);
     imgFiles = di.GetFiles("*.svg"); // Tests vector graphics...
     cboTexture.Items.AddRange(imgFiles);
     // select current bitmap
     int i = cboTexture.FindString(layer.textureFileName);
     if (i != -1) cboTexture.SelectedIndex = i;
     // Tilt
     chkTilt.Checked = layer.tilt;
     // Positions
     cboPosition.Items.Add("Top-Left");
     cboPosition.Items.Add("Top-Center");
     cboPosition.Items.Add("Top-Right");
     cboPosition.Items.Add("Bottom-Left");
     cboPosition.Items.Add("Bottom-Center");
     cboPosition.Items.Add("Screen-Center");
     i = cboPosition.FindString(layer.spritePos);
     if (i != -1) cboPosition.SelectedIndex = i;
 }