Esempio n. 1
0
        public override void Unload()
        {
            if (m_form != null)
            {
                DrawArgs.NewRootWidget.ChildWidgets.Remove(m_form);
                m_form.Dispose();
                m_form = null;
            }

            ParentApplication.ToolsMenu.MenuItems.Remove(m_menuItem);

            if (m_toolbarItem != null)
            {
                ParentApplication.WorldWindow.MenuBar.RemoveToolsMenuButton(m_toolbarItem);
                m_toolbarItem.Dispose();
                m_toolbarItem = null;
            }

            base.Unload();
        }
Esempio n. 2
0
        public override void Unload()
        {
            if (m_form != null)
            {
                DrawArgs.NewRootWidget.ChildWidgets.Remove(m_form);
                m_form.Dispose();
                m_form = null;
            }

            ParentApplication.ToolsMenu.MenuItems.Remove(m_menuItem);

            if (m_toolbarItem != null)
            {
                ParentApplication.WorldWindow.MenuBar.RemoveToolsMenuButton(m_toolbarItem);
                m_toolbarItem.Dispose();
                m_toolbarItem = null;
            }

            base.Unload();
        }
Esempio n. 3
0
        public override void Load()
        {
            m_menuItem         = new System.Windows.Forms.MenuItem("Compass");
            m_menuItem.Click  += new EventHandler(m_menuItem_Click);
            m_menuItem.Checked = World.Settings.ShowCompass;
            ParentApplication.ToolsMenu.MenuItems.Add(m_menuItem);

            m_form                            = new FormWidget("Compass");
            m_form.ClientSize                 = new System.Drawing.Size(200, 200);
            m_form.Location                   = new System.Drawing.Point(0, 400);
            m_form.BackgroundColor            = World.Settings.WidgetBackgroundColor;
            m_form.AutoHideHeader             = true;
            m_form.VerticalScrollbarEnabled   = false;
            m_form.HorizontalScrollbarEnabled = false;
            m_form.BorderEnabled              = false;

            m_form.OnResizeEvent    += new FormWidget.ResizeHandler(m_form_OnResizeEvent);
            m_form.OnVisibleChanged += new VisibleChangedHandler(m_form_OnVisibleChanged);

            m_compass              = new Compass3DWidget();
            m_compass.Location     = new System.Drawing.Point(5, 0);
            m_compass.Font         = new System.Drawing.Font("Ariel", 10.0f, System.Drawing.FontStyle.Bold);
            m_compass.ParentWidget = m_form;
            m_form_OnResizeEvent(m_form, m_form.WidgetSize);

            m_form.ChildWidgets.Add(m_compass);
            m_form.Visible = World.Settings.ShowCompass;

            DrawArgs.NewRootWidget.ChildWidgets.Add(m_form);

            m_toolbarItem = new WorldWind.NewWidgets.WidgetMenuButton(
                "Compass 3D",
                basePath + "\\Data\\Icons\\Interface\\compass2.png",
                m_form);

            ParentApplication.WorldWindow.MenuBar.AddToolsMenuButton(m_toolbarItem);


            base.Load();
        }
Esempio n. 4
0
        public override void Load()
        {
            m_menuItem = new System.Windows.Forms.MenuItem("Compass");
            m_menuItem.Click += new EventHandler(m_menuItem_Click);
            m_menuItem.Checked = World.Settings.ShowCompass;
            ParentApplication.ToolsMenu.MenuItems.Add(m_menuItem);
            
            m_form = new FormWidget("Compass");
            m_form.ClientSize = new System.Drawing.Size(200, 200);
            m_form.Location = new System.Drawing.Point(0, 400);
            m_form.BackgroundColor = World.Settings.WidgetBackgroundColor;
            m_form.AutoHideHeader = true;
            m_form.VerticalScrollbarEnabled = false;
            m_form.HorizontalScrollbarEnabled = false;
            m_form.BorderEnabled = false;

            m_form.OnResizeEvent += new FormWidget.ResizeHandler(m_form_OnResizeEvent);
            m_form.OnVisibleChanged += new VisibleChangedHandler(m_form_OnVisibleChanged);
            
            m_compass = new Compass3DWidget();
            m_compass.Location = new System.Drawing.Point(5, 0);
            m_compass.Font = new System.Drawing.Font("Ariel", 10.0f, System.Drawing.FontStyle.Bold);
            m_compass.ParentWidget = m_form;
            m_form_OnResizeEvent(m_form, m_form.WidgetSize);
            
            m_form.ChildWidgets.Add(m_compass);
            m_form.Visible = World.Settings.ShowCompass;

            DrawArgs.NewRootWidget.ChildWidgets.Add(m_form);

            m_toolbarItem = new WorldWind.NewWidgets.WidgetMenuButton(
                    "Compass 3D",
                    basePath + "\\Data\\Icons\\Interface\\compass2.png",
                    m_form);

            ParentApplication.WorldWindow.MenuBar.AddToolsMenuButton(m_toolbarItem);


            base.Load();
        }