Exemplo n.º 1
0
                    protected IntPtr EarthView_World_Spatial_Atlas_IMapSelection_getLayerSelection_ILayerSelection_ev_uint32_Function(uint index)
                    {
                        EarthView.World.Spatial.Atlas.Ilayerselection csret = GetLayerSelection(index);

                        if (!object.Equals(csret, null))
                        {
                            csret.Delegate = true;
                            return(csret.NativeObject);
                        }
                        else
                        {
                            return(IntPtr.Zero);
                        }
                    }
                /// <summary>
                /// 根据三维图层获得该图层的选择集
                /// </summary>
                /// <param name="layer">三维图层</param>
                /// <returns>三维图层选择集</returns>
                public EarthView.World.Spatial.Atlas.Ilayerselection Get(EarthView.World.Spatial3D.Atlas.Iglobelayer layer)
                {
                    IntPtr __ptr = EarthView_World_Spatial3D_CGlobeSelection_get_ILayerSelection_IGlobeLayer(this.NativeObject, object.Equals(layer, null) ? IntPtr.Zero : layer.NativeObject);

                    if (__ptr == IntPtr.Zero)
                    {
                        return(null);
                    }
                    EarthView.World.Spatial.Atlas.Ilayerselection csObj = new EarthView.World.Spatial.Atlas.Ilayerselection(CreatedWhenConstruct.CWC_NotToCreate);
                    csObj.BindNativeObject(__ptr, "ILayerSelection");
                    csObj.Delegate = true;
                    IClassFactory csObjClassFactory = GlobalClassFactoryMap.Get(csObj.GetCppInstanceTypeName());

                    if (csObjClassFactory != null)
                    {
                        csObj.Delegate = true;
                        csObj          = csObjClassFactory.Create() as EarthView.World.Spatial.Atlas.Ilayerselection;
                        csObj.BindNativeObject(__ptr, "ILayerSelection");
                        csObj.Delegate = true;
                    }
                    return(csObj);
                }
Exemplo n.º 3
0
                    /// <summary>
                    /// 获取指定索引的图层选择集
                    /// </summary>
                    /// <param name="index">索引</param>
                    /// <returns>图层选择集</returns>
                    public override EarthView.World.Spatial.Atlas.Ilayerselection GetLayerSelection(uint index)
                    {
                        IntPtr __ptr = EarthView_World_Spatial2D_Atlas_CMapSelection_getLayerSelection_ILayerSelection_ev_uint32(this.NativeObject, index);

                        if (__ptr == IntPtr.Zero)
                        {
                            return(null);
                        }
                        EarthView.World.Spatial.Atlas.Ilayerselection csObj = new EarthView.World.Spatial.Atlas.Ilayerselection(CreatedWhenConstruct.CWC_NotToCreate);
                        csObj.BindNativeObject(__ptr, "ILayerSelection");
                        csObj.Delegate = true;
                        IClassFactory csObjClassFactory = GlobalClassFactoryMap.Get(csObj.GetCppInstanceTypeName());

                        if (csObjClassFactory != null)
                        {
                            csObj.Delegate = true;
                            csObj          = csObjClassFactory.Create() as EarthView.World.Spatial.Atlas.Ilayerselection;
                            csObj.BindNativeObject(__ptr, "ILayerSelection");
                            csObj.Delegate = true;
                        }
                        return(csObj);
                    }
                /// <summary>
                /// 增加一条三维图层选择集记录
                /// </summary>
                /// <param name="ref_layer">三维图层</param>
                /// <param name="ref_selection">图层选择集</param>
                /// <returns>添加成功返回true,失败返回false</returns>
                public bool Add(EarthView.World.Spatial3D.Atlas.Iglobelayer ref_layer, EarthView.World.Spatial.Atlas.Ilayerselection ref_selection)
                {
                    byte ret = EarthView_World_Spatial3D_CGlobeSelection_add_ev_bool_IGlobeLayer_ILayerSelection(this.NativeObject, object.Equals(ref_layer, null) ? IntPtr.Zero : ref_layer.NativeObject, object.Equals(ref_selection, null) ? IntPtr.Zero : ref_selection.NativeObject);

                    return(Convert.ToBoolean(ret));
                }