Exemplo n.º 1
0
 /// <summary>
 ///     Write fixed file information to a binary stream.
 /// </summary>
 /// <param name="w">Binary stream.</param>
 public void Write(BinaryWriter w)
 {
     w.Write(ResourceUtil.GetBytes(_fixedfileinfo));
     ResourceUtil.PadToDWORD(w);
 }
Exemplo n.º 2
0
        /// <summary>
        ///     String representation of the fixed file info.
        /// </summary>
        /// <returns>String representation of the fixed file info.</returns>
        public override string ToString()
        {
            var sb = new StringBuilder();

            sb.AppendLine(string.Format("FILEVERSION {0},{1},{2},{3}", ResourceUtil.HiWord(_fixedfileinfo.dwFileVersionMS),
                                        ResourceUtil.LoWord(_fixedfileinfo.dwFileVersionMS), ResourceUtil.HiWord(_fixedfileinfo.dwFileVersionLS),
                                        ResourceUtil.LoWord(_fixedfileinfo.dwFileVersionLS)));
            sb.AppendLine(string.Format("PRODUCTVERSION {0},{1},{2},{3}", ResourceUtil.HiWord(_fixedfileinfo.dwProductVersionMS),
                                        ResourceUtil.LoWord(_fixedfileinfo.dwProductVersionMS), ResourceUtil.HiWord(_fixedfileinfo.dwProductVersionLS),
                                        ResourceUtil.LoWord(_fixedfileinfo.dwProductVersionLS)));
            if (_fixedfileinfo.dwFileFlagsMask == Winver.VS_FFI_FILEFLAGSMASK)
            {
                sb.AppendLine("FILEFLAGSMASK VS_FFI_FILEFLAGSMASK");
            }
            else
            {
                sb.AppendLine(string.Format("FILEFLAGSMASK 0x{0:x}", _fixedfileinfo.dwFileFlagsMask.ToString()));
            }
            sb.AppendLine(string.Format("FILEFLAGS {0}",
                                        _fixedfileinfo.dwFileFlags == 0 ? "0" : ResourceUtil.FlagsToString <Winver.FileFlags>(_fixedfileinfo.dwFileFlags)));
            sb.AppendLine(string.Format("FILEOS {0}", ResourceUtil.FlagsToString <Winver.FileOs>(_fixedfileinfo.dwFileFlags)));
            sb.AppendLine(string.Format("FILETYPE {0}", ResourceUtil.FlagsToString <Winver.FileType>(_fixedfileinfo.dwFileType)));
            sb.AppendLine(string.Format("FILESUBTYPE {0}", ResourceUtil.FlagsToString <Winver.FileSubType>(_fixedfileinfo.dwFileSubtype)));
            return(sb.ToString());
        }
Exemplo n.º 3
0
 /// <summary>
 ///     String representation of the accelerator.
 /// </summary>
 /// <returns>String representation of the accelerator.</returns>
 public override string ToString()
 {
     return(string.Format("{0}, {1}, {2}", Key, Command, ResourceUtil.FlagsToString <AcceleratorVirtualKey>(_accel.fVirt).Replace(" |", ",")));
 }