Beispiel #1
0
        public void SetPropertyValue(PropertyStoreProperty property, uint value)
        {
            if (_propertyStore != null)
            {
                using (var propertyValue = new NativeMethods.PROPVARIANT())
                {
                    propertyValue.SetValue(value);

                    _propertyStore.SetValue(NativeMethods.GetPkey(property), propertyValue);
                }
            }
        }
Beispiel #2
0
        public uint?GetPropertyUInt32Value(PropertyStoreProperty property)
        {
            if (_propertyStore == null)
            {
                return(null);
            }

            using (var propertyValue = new NativeMethods.PROPVARIANT())
            {
                _propertyStore.GetValue(NativeMethods.GetPkey(property), propertyValue);

                return(propertyValue.GetUInt32());
            }
        }
Beispiel #3
0
        public bool?GetPropertyBoolValue(PropertyStoreProperty property)
        {
            if (_propertyStore == null)
            {
                return(null);
            }

            using (var propertyValue = new NativeMethods.PROPVARIANT())
            {
                _propertyStore.GetValue(NativeMethods.GetPkey(property), propertyValue);

                return(propertyValue.GetBool());
            }
        }
Beispiel #4
0
        public void SetPropertyValue(PropertyStoreProperty property, uint value)
        {
            if (_propertyStore != null)
            {
                using (var propertyValue = new NativeMethods.PROPVARIANT())
                {
                    propertyValue.SetValue(value);

                    _propertyStore.SetValue(NativeMethods.GetPkey(property), propertyValue);
                }
            }
        }
Beispiel #5
0
        public uint? GetPropertyUInt32Value(PropertyStoreProperty property)
        {
            if (_propertyStore == null)
                return null;

            using (var propertyValue = new NativeMethods.PROPVARIANT())
            {
                _propertyStore.GetValue(NativeMethods.GetPkey(property), propertyValue);

                return propertyValue.GetUInt32();
            }
        }
Beispiel #6
0
        public bool? GetPropertyBoolValue(PropertyStoreProperty property)
        {
            if (_propertyStore == null)
                return null;

            using (var propertyValue = new NativeMethods.PROPVARIANT())
            {
                _propertyStore.GetValue(NativeMethods.GetPkey(property), propertyValue);

                return propertyValue.GetBool();
            }
        }