コード例 #1
0
ファイル: MsiPropertyInfo.cs プロジェクト: sscctech/lessmsi
        private MsiPropertyInfo(int id, object value)
        {
            ID    = id;
            Value = value;

            MsiPropertyInfo prototype = GetPropertyInfoByID(id);

            if (prototype != null)
            {
                Name               = prototype.Name;
                _propertyType      = prototype._propertyType;
                Description        = prototype.Description;
                _valueFormatString = prototype._valueFormatString;
                switch (_propertyType)
                {
                case VT.FILETIME:
                    //everything is coming from wix as a string, need to submit patch to wix:
                    // _value = DateTime.FromFileTime((long)_value);
                    break;

                case VT.I2:
                case VT.I4:
                    if (Value is string && Value != null && ((string)Value).Length > 0)
                    {
                        try
                        {
                            Value = Int32.Parse((string)Value);
                        }
                        catch (FormatException)
                        {}
                    }
                    break;
                }
            }
            else
            {
                Name          = "non-standard";
                _propertyType = VT.EMPTY;
                Description   = "Unknown.";
            }
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: zippy1981/lessmsi
 public void SetPropertyGridDataSource(MsiPropertyInfo[] props)
 {
     msiPropertyGrid.DataSource = props;
 }