Exemplo n.º 1
0
        /// <summary>
        /// Creates a deep copy of the object.
        /// </summary>
        public virtual object Clone()
        {
            BrowseFilters clone = (BrowseFilters)MemberwiseClone();

            clone.PropertyIDs = (PropertyID[])((PropertyIDs != null)?PropertyIDs.Clone():null);
            return(clone);
        }
Exemplo n.º 2
0
 public void Add(PropertyIDs propertyID, UInt32 propertyValue)
 {
     ShapeProperty prop = new ShapeProperty();
     prop.PropertyID = propertyID;
     prop.PropertyValue = propertyValue;
     prop.IsBlipID = propertyID == PropertyIDs.BlipId;
     Properties.Add(prop);
 }
Exemplo n.º 3
0
        public void Add(PropertyIDs propertyID, UInt32 propertyValue)
        {
            ShapeProperty prop = new ShapeProperty();

            prop.PropertyID    = propertyID;
            prop.PropertyValue = propertyValue;
            prop.IsBlipID      = propertyID == PropertyIDs.BlipId;
            Properties.Add(prop);
        }
Exemplo n.º 4
0
        public void Add(PropertyIDs propertyID, uint propertyValue)
        {
            ShapeProperty shapeProperty = new ShapeProperty();

            shapeProperty.PropertyID    = propertyID;
            shapeProperty.PropertyValue = propertyValue;
            shapeProperty.IsBlipID      = (propertyID == PropertyIDs.BlipId);
            this.Properties.Add(shapeProperty);
        }
Exemplo n.º 5
0
        /// <summary>
        /// Returns a strongly typed property by PropertyID using the specified COM object.
        /// </summary>
        /// <typeparam name="T">The type of the property to return.</typeparam>
        /// <param name="comObject"></param>
        /// <param name="id">The PropertyID of the property to retrieve.</param>
        /// <returns></returns>
        public static T GetPropertyValue <T>(object comObject, PropertyIDs id)
        {
            if (Marshal.IsComObject(comObject) == false)
            {
                throw new InvalidComObjectException();
            }

            var type  = comObject.GetType();
            var value = type.InvokeMember(Enum.GetName(typeof(PropertyIDs), id), System.Reflection.BindingFlags.GetProperty, null, comObject, null);

            return((T)value);
        }
Exemplo n.º 6
0
 static void InitPropertyIDs()
 {
     _properyIDs                  = new PropertyIDs();
     _properyIDs._ClipBox         = Shader.PropertyToID("_ClipBox");
     _properyIDs._ClipSoftness    = Shader.PropertyToID("_ClipSoftness");
     _properyIDs._AlphaTex        = Shader.PropertyToID("_AlphaTex");
     _properyIDs._StencilComp     = Shader.PropertyToID("_StencilComp");
     _properyIDs._Stencil         = Shader.PropertyToID("_Stencil");
     _properyIDs._StencilOp       = Shader.PropertyToID("_StencilOp");
     _properyIDs._StencilReadMask = Shader.PropertyToID("_StencilReadMask");
     _properyIDs._ColorMask       = Shader.PropertyToID("_ColorMask");
     _properyIDs._ColorMatrix     = Shader.PropertyToID("_ColorMatrix");
     _properyIDs._ColorOffset     = Shader.PropertyToID("_ColorOffset");
     _properyIDs._BlendSrcFactor  = Shader.PropertyToID("_BlendSrcFactor");
     _properyIDs._BlendDstFactor  = Shader.PropertyToID("_BlendDstFactor");
     _properyIDs._ColorOption     = Shader.PropertyToID("_ColorOption");
 }
Exemplo n.º 7
0
        public void QueryAvailableProperties(string tagName)
        {
            int count = 0;

            Array PropertyIDs;
            Array Descriptions;
            Array DataTypes;

            try{
                mServer.QueryAvailableProperties(tagName, out count, out PropertyIDs, out Descriptions, out DataTypes);
                if ((count == 0) || (count > 10000))
                {
                    return;
                }

                for (int i = 1; i <= count; i++)
                {
                    Console.WriteLine("in QueryAvailableProperties, tagName is : " + tagName + ": " + PropertyIDs.GetValue(i) + ", " + Descriptions.GetValue(i) + ", " + DataTypes.GetValue(i) + " ==>");
                }
            } catch (Exception ex)
            {
            }
        }