Пример #1
0
        public override void AddMenuItems()
        {
            if (_AppManager == null)
            {
                base.Initialize();
            }
            _sub_menus.Clear();
            if (_AppManager.AppMode == AppMode.VHF)
            {
                var item = new ExplorerMenuItem(_LD, Resources.AddContent16, LoadValues_Clicked);
                item.Enabled = false;
                _sub_menus.Add(item);
                item = new ExplorerMenuItem(_AT, Resources.AttributesWindow16, AttributeTable_Clicked);
                _sub_menus.Add(item);
                item = new ExplorerMenuItem(_A2T, Resources.GeoprocessingTool16, Add2Toolbox_Clicked);
                _sub_menus.Add(item);
                item = new ExplorerMenuItem(_A2DC, null, Add2DCEditor_Clicked);
                _sub_menus.Add(item);
                item.Enabled = false;
                item         = new ExplorerMenuItem(_RLEASE, null, ReleaseData_Clicked);
                _sub_menus.Add(item);

                _sub_menus.Add(new ExplorerMenuItem(PEContextMenu.MenuSeparator, null, null));
                item = new ExplorerMenuItem(_SOM, Resources.LayerRasterOptimized16, ShowOnMap_Clicked);
                _sub_menus.Add(item);
                item = new ExplorerMenuItem(_VI3, Resources._3dplot16, ShowOn3D_Clicked);
                _sub_menus.Add(item);

                var animate = new ExplorerMenuItem(_AN, Resources.AnimationVideo16, Animate_Clicked);
                animate.Enabled = false;
                _sub_menus.Add(animate);

                var set_as_act = new ExplorerMenuItem(_SETAS_ACTSource, null, SetAsActiveSource_Clicked);
                set_as_act.Enabled = false;
                _sub_menus.Add(set_as_act);

                _sub_menus.Add(new ExplorerMenuItem(PEContextMenu.MenuSeparator, null, null));
                item = new ExplorerMenuItem(_EX, null, Export_Clicked);
                _sub_menus.Add(item);

                ContextMenuItems.AddRange(_sub_menus);
                this.Enable(_RLEASE, false);
            }
            else if (_AppManager.AppMode == AppMode.HE)
            {
                var item = new ExplorerMenuItem(_LD, Resources.AddContent16, LoadValues_Clicked);
                item.Enabled = false;
                _sub_menus.Add(item);
                item = new ExplorerMenuItem(_AT, Resources.AttributesWindow16, AttributeTable_Clicked);
                _sub_menus.Add(item);
                item = (new ExplorerMenuItem(_VI3, Resources._3dplot16, ShowOn3D_Clicked));
                _sub_menus.Add(item);
                item = new ExplorerMenuItem(_AN, Resources.AnimationVideo16, Animate_Clicked);
                _sub_menus.Add(item);
                item = new ExplorerMenuItem(_SETAS_ACTSource, null, SetAsActiveSource_Clicked);
                _sub_menus.Add(item);
                item = new ExplorerMenuItem(_RLEASE, null, ReleaseData_Clicked);
                _sub_menus.Add(item);
                ContextMenuItems.AddRange(_sub_menus);
            }
        }