├── zlib.net.dll
├── SGOMPK
├── SG0.ico
├── SGOMPK.csproj.user
├── App.config
├── Properties
│ ├── Settings.settings
│ ├── Settings.Designer.cs
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── packages.config
├── Program.cs
├── MpkFileEntry.cs
├── MpkDetailedEntry.cs
├── ListFiles.Designer.cs
├── ListFiles.cs
├── MpkReader.cs
├── ListFiles.resx
├── Form1.resx
├── SGOMPK.csproj
├── MpkWriter.cs
├── Form1.cs
└── Form1.Designer.cs
├── packages
├── zlib.net.1.0.4.0
│ ├── .signature.p7s
│ ├── lib
│ │ └── zlib.net.dll
│ └── zlib.net.1.0.4.0.nupkg
├── SharpZipLib.1.1.0
│ ├── .signature.p7s
│ ├── SharpZipLib.1.1.0.nupkg
│ └── lib
│ │ ├── net45
│ │ ├── ICSharpCode.SharpZipLib.dll
│ │ └── ICSharpCode.SharpZipLib.pdb
│ │ └── netstandard2.0
│ │ ├── ICSharpCode.SharpZipLib.dll
│ │ └── ICSharpCode.SharpZipLib.pdb
├── MetroModernUI.1.4.0.0
│ ├── lib
│ │ └── net
│ │ │ ├── MetroFramework.dll
│ │ │ ├── MetroFramework.Design.dll
│ │ │ └── MetroFramework.Fonts.dll
│ └── MetroModernUI.1.4.0.0.nupkg
├── Microsoft.WindowsAPICodePack-Core.1.1.0.2
│ ├── lib
│ │ ├── Microsoft.WindowsAPICodePack.dll
│ │ └── Microsoft.WindowsAPICodePack.pdb
│ └── Microsoft.WindowsAPICodePack-Core.1.1.0.2.nupkg
└── Microsoft.WindowsAPICodePack-Shell.1.1.0.0
│ ├── lib
│ ├── Microsoft.WindowsAPICodePack.Shell.dll
│ ├── Microsoft.WindowsAPICodePack.Shell.pdb
│ ├── Microsoft.WindowsAPICodePack.ShellExtensions.dll
│ ├── Microsoft.WindowsAPICodePack.ShellExtensions.pdb
│ └── Microsoft.WindowsAPICodePack.ShellExtensions.XML
│ └── Microsoft.WindowsAPICodePack-Shell.1.1.0.0.nupkg
├── SGOMPK.sln
└── README.md
/zlib.net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanOl98/MagesPack/HEAD/zlib.net.dll
--------------------------------------------------------------------------------
/SGOMPK/SG0.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanOl98/MagesPack/HEAD/SGOMPK/SG0.ico
--------------------------------------------------------------------------------
/packages/zlib.net.1.0.4.0/.signature.p7s:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanOl98/MagesPack/HEAD/packages/zlib.net.1.0.4.0/.signature.p7s
--------------------------------------------------------------------------------
/packages/SharpZipLib.1.1.0/.signature.p7s:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanOl98/MagesPack/HEAD/packages/SharpZipLib.1.1.0/.signature.p7s
--------------------------------------------------------------------------------
/packages/zlib.net.1.0.4.0/lib/zlib.net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanOl98/MagesPack/HEAD/packages/zlib.net.1.0.4.0/lib/zlib.net.dll
--------------------------------------------------------------------------------
/packages/SharpZipLib.1.1.0/SharpZipLib.1.1.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanOl98/MagesPack/HEAD/packages/SharpZipLib.1.1.0/SharpZipLib.1.1.0.nupkg
--------------------------------------------------------------------------------
/packages/zlib.net.1.0.4.0/zlib.net.1.0.4.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanOl98/MagesPack/HEAD/packages/zlib.net.1.0.4.0/zlib.net.1.0.4.0.nupkg
--------------------------------------------------------------------------------
/packages/MetroModernUI.1.4.0.0/lib/net/MetroFramework.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanOl98/MagesPack/HEAD/packages/MetroModernUI.1.4.0.0/lib/net/MetroFramework.dll
--------------------------------------------------------------------------------
/packages/MetroModernUI.1.4.0.0/MetroModernUI.1.4.0.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanOl98/MagesPack/HEAD/packages/MetroModernUI.1.4.0.0/MetroModernUI.1.4.0.0.nupkg
--------------------------------------------------------------------------------
/SGOMPK/SGOMPK.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/packages/MetroModernUI.1.4.0.0/lib/net/MetroFramework.Design.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanOl98/MagesPack/HEAD/packages/MetroModernUI.1.4.0.0/lib/net/MetroFramework.Design.dll
--------------------------------------------------------------------------------
/packages/MetroModernUI.1.4.0.0/lib/net/MetroFramework.Fonts.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanOl98/MagesPack/HEAD/packages/MetroModernUI.1.4.0.0/lib/net/MetroFramework.Fonts.dll
--------------------------------------------------------------------------------
/packages/SharpZipLib.1.1.0/lib/net45/ICSharpCode.SharpZipLib.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanOl98/MagesPack/HEAD/packages/SharpZipLib.1.1.0/lib/net45/ICSharpCode.SharpZipLib.dll
--------------------------------------------------------------------------------
/packages/SharpZipLib.1.1.0/lib/net45/ICSharpCode.SharpZipLib.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanOl98/MagesPack/HEAD/packages/SharpZipLib.1.1.0/lib/net45/ICSharpCode.SharpZipLib.pdb
--------------------------------------------------------------------------------
/packages/SharpZipLib.1.1.0/lib/netstandard2.0/ICSharpCode.SharpZipLib.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanOl98/MagesPack/HEAD/packages/SharpZipLib.1.1.0/lib/netstandard2.0/ICSharpCode.SharpZipLib.dll
--------------------------------------------------------------------------------
/packages/SharpZipLib.1.1.0/lib/netstandard2.0/ICSharpCode.SharpZipLib.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanOl98/MagesPack/HEAD/packages/SharpZipLib.1.1.0/lib/netstandard2.0/ICSharpCode.SharpZipLib.pdb
--------------------------------------------------------------------------------
/SGOMPK/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/packages/Microsoft.WindowsAPICodePack-Core.1.1.0.2/lib/Microsoft.WindowsAPICodePack.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanOl98/MagesPack/HEAD/packages/Microsoft.WindowsAPICodePack-Core.1.1.0.2/lib/Microsoft.WindowsAPICodePack.dll
--------------------------------------------------------------------------------
/packages/Microsoft.WindowsAPICodePack-Core.1.1.0.2/lib/Microsoft.WindowsAPICodePack.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanOl98/MagesPack/HEAD/packages/Microsoft.WindowsAPICodePack-Core.1.1.0.2/lib/Microsoft.WindowsAPICodePack.pdb
--------------------------------------------------------------------------------
/packages/Microsoft.WindowsAPICodePack-Shell.1.1.0.0/lib/Microsoft.WindowsAPICodePack.Shell.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanOl98/MagesPack/HEAD/packages/Microsoft.WindowsAPICodePack-Shell.1.1.0.0/lib/Microsoft.WindowsAPICodePack.Shell.dll
--------------------------------------------------------------------------------
/packages/Microsoft.WindowsAPICodePack-Shell.1.1.0.0/lib/Microsoft.WindowsAPICodePack.Shell.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanOl98/MagesPack/HEAD/packages/Microsoft.WindowsAPICodePack-Shell.1.1.0.0/lib/Microsoft.WindowsAPICodePack.Shell.pdb
--------------------------------------------------------------------------------
/packages/Microsoft.WindowsAPICodePack-Core.1.1.0.2/Microsoft.WindowsAPICodePack-Core.1.1.0.2.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanOl98/MagesPack/HEAD/packages/Microsoft.WindowsAPICodePack-Core.1.1.0.2/Microsoft.WindowsAPICodePack-Core.1.1.0.2.nupkg
--------------------------------------------------------------------------------
/packages/Microsoft.WindowsAPICodePack-Shell.1.1.0.0/Microsoft.WindowsAPICodePack-Shell.1.1.0.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanOl98/MagesPack/HEAD/packages/Microsoft.WindowsAPICodePack-Shell.1.1.0.0/Microsoft.WindowsAPICodePack-Shell.1.1.0.0.nupkg
--------------------------------------------------------------------------------
/packages/Microsoft.WindowsAPICodePack-Shell.1.1.0.0/lib/Microsoft.WindowsAPICodePack.ShellExtensions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanOl98/MagesPack/HEAD/packages/Microsoft.WindowsAPICodePack-Shell.1.1.0.0/lib/Microsoft.WindowsAPICodePack.ShellExtensions.dll
--------------------------------------------------------------------------------
/packages/Microsoft.WindowsAPICodePack-Shell.1.1.0.0/lib/Microsoft.WindowsAPICodePack.ShellExtensions.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DanOl98/MagesPack/HEAD/packages/Microsoft.WindowsAPICodePack-Shell.1.1.0.0/lib/Microsoft.WindowsAPICodePack.ShellExtensions.pdb
--------------------------------------------------------------------------------
/SGOMPK/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/SGOMPK/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/SGOMPK/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace SGOMPK
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// The main entry point for the application.
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Form1());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/SGOMPK.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25420.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SGOMPK", "SGOMPK\SGOMPK.csproj", "{950CA0CA-C469-4C4A-BFD0-4F999C432815}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {950CA0CA-C469-4C4A-BFD0-4F999C432815}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {950CA0CA-C469-4C4A-BFD0-4F999C432815}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {950CA0CA-C469-4C4A-BFD0-4F999C432815}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {950CA0CA-C469-4C4A-BFD0-4F999C432815}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # MagesPack
2 | Mages Engine (Steins;Gate Steam, Steins;Gate 0, Steins;Gate Elite, Chaos;Child etc.) MPK UnPack & RePack. Fixed mpk creation with correct mpk structure.
3 | # Structure
4 |
5 | ## Header
6 | ##### Total 8 bytes
7 | The header of the MPK is
8 |
9 | Name | Size | Values |
10 | --- | --- | ---
11 | **IDENT** | 4 bytes | "MPK"\0
12 | Null Bytes | 2 bytes | \0\0
13 | Two | 2 bytes | 0x2
14 |
15 | ## File count
16 | ##### Total 56 bytes
17 | Name | Size |
18 | --- | ---
19 | File count | 8 bytes
20 | Null Bytes | 6 * 8 bytes
21 |
22 | ## File information
23 | ##### Total 256 bytes(each)
24 | Repeat this `File count` times
25 |
26 | Name | Size |
27 | --- | ---
28 | isCompressed | 4 bytes
29 | Index | 4 bytes
30 | Position | 8 bytes
31 | Size in File | 8 bytes
32 | Uncompressed Size (if not compressed it's the same as Size) | 8 bytes
33 | Null terminated file name | 224 bytes
34 |
35 | ## Raw data
36 | ##### Total n bytes(each)
37 | Repeat this `File count` times
38 |
39 | Name | Size |
40 | --- | ---
41 | Raw data | `Size` bytes from respective info structure
42 |
--------------------------------------------------------------------------------
/SGOMPK/MpkFileEntry.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using System.Runtime.CompilerServices;
3 |
4 | namespace SGOMPK
5 | {
6 | internal sealed class MpkFileEntry
7 | {
8 | public MpkFileEntry(int id, FileInfo fileInfo)
9 | {
10 | Id = id;
11 | FileInfo = fileInfo;
12 | }
13 |
14 | public int Id
15 | {
16 | [CompilerGenerated]
17 | get
18 | {
19 | return _Id;
20 | }
21 | set
22 | {
23 | _Id = value;
24 | }
25 | }
26 |
27 | public FileInfo FileInfo
28 | {
29 | [CompilerGenerated]
30 | get
31 | {
32 | return _FileInfo;
33 | }
34 | set
35 | {
36 | _FileInfo = value;
37 | }
38 | }
39 |
40 | [CompilerGenerated]
41 | private int _Id;
42 | [CompilerGenerated]
43 | private FileInfo _FileInfo;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/SGOMPK/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace SGOMPK.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/SGOMPK/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("SGOMPK")]
9 | [assembly: AssemblyDescription("Steins Gate 0 MPK UnPack & RePack")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("SKunio")]
12 | [assembly: AssemblyProduct("SKunio")]
13 | [assembly: AssemblyCopyright("SKunio © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("950ca0ca-c469-4c4a-bfd0-4f999c432815")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/SGOMPK/MpkDetailedEntry.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using System.Runtime.CompilerServices;
3 |
4 | namespace SGOMPK
5 | {
6 | internal sealed class MpkDetailedEntry
7 | {
8 | public MpkDetailedEntry()
9 | {
10 | }
11 |
12 | public int Id
13 | {
14 | [CompilerGenerated]
15 | get
16 | {
17 | return _Id;
18 | }
19 | set
20 | {
21 | _Id = value;
22 | }
23 | }
24 | public long size
25 | {
26 | [CompilerGenerated]
27 | get
28 | {
29 | return _Size;
30 | }
31 | set
32 | {
33 | _Size = value;
34 | }
35 | }
36 | public long actualSize
37 | {
38 | [CompilerGenerated]
39 | get
40 | {
41 | return _ActualSize;
42 | }
43 | set
44 | {
45 | _ActualSize = value;
46 | }
47 | }
48 | public string fileName
49 | {
50 | [CompilerGenerated]
51 | get
52 | {
53 | return _FileName;
54 | }
55 | set
56 | {
57 | _FileName = value;
58 | }
59 | }
60 | public bool isCompressed
61 | {
62 | [CompilerGenerated]
63 | get
64 | {
65 | return _isCompressed;
66 | }
67 | set
68 | {
69 | _isCompressed = value;
70 | }
71 | }
72 | public FileInfo FileInfo
73 | {
74 | [CompilerGenerated]
75 | get
76 | {
77 | return _FileInfo;
78 | }
79 | set
80 | {
81 | _FileInfo = value;
82 | }
83 | }
84 |
85 | [CompilerGenerated]
86 | private int _Id;
87 | private bool _isCompressed;
88 | private long _ActualSize;
89 | private long _Size;
90 | private string _FileName;
91 | [CompilerGenerated]
92 | private FileInfo _FileInfo;
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/SGOMPK/ListFiles.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace SGOMPK
2 | {
3 | partial class ListFiles
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.listView1 = new System.Windows.Forms.ListView();
32 | this.SuspendLayout();
33 | //
34 | // listView1
35 | //
36 | this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
37 | this.listView1.Location = new System.Drawing.Point(0, 0);
38 | this.listView1.Name = "listView1";
39 | this.listView1.Size = new System.Drawing.Size(684, 311);
40 | this.listView1.TabIndex = 1;
41 | this.listView1.UseCompatibleStateImageBehavior = false;
42 | //
43 | // ListFiles
44 | //
45 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
46 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
47 | this.ClientSize = new System.Drawing.Size(684, 311);
48 | this.Controls.Add(this.listView1);
49 | this.Name = "ListFiles";
50 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
51 | this.Text = "ListFiles";
52 | this.Load += new System.EventHandler(this.ListFiles_Load);
53 | this.Shown += new System.EventHandler(this.ListFiles_Shown);
54 | this.ResumeLayout(false);
55 |
56 | }
57 |
58 | #endregion
59 |
60 | private System.Windows.Forms.ListView listView1;
61 | }
62 | }
--------------------------------------------------------------------------------
/SGOMPK/ListFiles.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.IO;
7 | using System.Linq;
8 | using System.Text;
9 | using System.Threading.Tasks;
10 | using System.Windows.Forms;
11 |
12 | namespace SGOMPK
13 | {
14 | public partial class ListFiles : Form
15 | {
16 | MpkDetailedEntry[] entries;
17 | public ListFiles()
18 | {
19 | InitializeComponent();
20 | }
21 |
22 | private void ListFiles_Load(object sender, EventArgs e)
23 | {
24 | }
25 | public void addStream(FileStream fileStream)
26 | {
27 | ReadArchive(fileStream);
28 |
29 | }
30 | public void ReadArchive(Stream input)
31 | {
32 | using (BinaryReader binaryreader = new BinaryReader(input))
33 | {
34 | input.Position = 8;
35 | long count = binaryreader.ReadInt64();
36 | entries = new MpkDetailedEntry[count];
37 | for (int i = 0; i
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace SGOMPK.Properties
12 | {
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// Returns the cached ResourceManager instance used by this class.
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SGOMPK.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// Overrides the current thread's CurrentUICulture property for all
56 | /// resource lookups using this strongly typed resource class.
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/SGOMPK/MpkReader.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.IO;
3 | using System.Text;
4 | using System.Windows.Forms;
5 | using zlib;
6 |
7 | namespace SGOMPK
8 | {
9 | internal static class MpkReader
10 | {
11 | public static void ReaderArchive(Stream input, string save, ListBox lb)
12 | {
13 | using (BinaryReader binaryreader = new BinaryReader(input))
14 | {
15 | input.Position = 8;
16 | long count = binaryreader.ReadInt64();
17 | MpkDetailedEntry[] entries = new MpkDetailedEntry[count];
18 | lb.Invoke((MethodInvoker)delegate {
19 | // Running on the UI thread
20 | lb.Items.Clear();
21 | });
22 | for (int i = 0; i < count; i++)
23 | {
24 | entries[i] = new MpkDetailedEntry();
25 | long fileEntryPos = 64 + i * 256;
26 | input.Position = fileEntryPos;
27 | entries[i].isCompressed = binaryreader.ReadInt32() == 1;
28 | entries[i].Id = binaryreader.ReadInt32();
29 | long fileDataPos = binaryreader.ReadInt64();
30 | entries[i].size = binaryreader.ReadInt64();
31 | entries[i].actualSize = binaryreader.ReadInt64();
32 | byte[] buffer = new byte[224];
33 | input.Read(buffer, 0, buffer.Length);
34 | entries[i].fileName = Encoding.UTF8.GetString(buffer).Replace("\0", "");
35 | input.Position = fileDataPos;
36 | long fileDataMaxRange = fileDataPos + entries[i].size;
37 |
38 | lb.Invoke((MethodInvoker)delegate {
39 | // Running on the UI thread
40 | lb.Items.Add("Extracting " + entries[i].fileName);
41 | lb.Refresh();
42 | lb.TopIndex = lb.Items.Count - 1;
43 | });
44 | using (FileStream fileStream = File.Create(Path.Combine(save, entries[i].fileName)))using( MemoryStream memOutput = new MemoryStream()) using(MemoryStream memOutput2 = new MemoryStream())
45 | {
46 | int blockSize = 2048;
47 | while (input.Position != fileDataMaxRange)
48 | {
49 | if (blockSize < entries[i].size)
50 | {
51 | buffer = new byte[entries[i].size];
52 | }
53 | else
54 | {
55 | buffer = new byte[entries[i].size];
56 | }
57 | input.Read(buffer, 0, buffer.Length);
58 | if (entries[i].isCompressed) {
59 | memOutput.Write(buffer, 0, buffer.Length);
60 | memOutput.Flush();
61 |
62 | } else
63 | {
64 | fileStream.Write(buffer, 0, buffer.Length);
65 | fileStream.Flush();
66 | }
67 |
68 | }
69 | if (entries[i].isCompressed)
70 | {
71 |
72 | ZOutputStream zipOut = new ZOutputStream(memOutput2);
73 | zipOut.Write(memOutput.ToArray(), 0, memOutput.ToArray().Length);
74 | zipOut.finish();
75 | memOutput2.Seek(0, SeekOrigin.Begin);
76 | byte[] result = memOutput2.ToArray();
77 | fileStream.Write(result, 0, result.Length);
78 | fileStream.Flush();
79 | }
80 | fileStream.Close();
81 | }
82 | }
83 | System.GC.Collect();
84 | }
85 | }
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/SGOMPK/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/SGOMPK/ListFiles.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/SGOMPK/Form1.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/SGOMPK/SGOMPK.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {950CA0CA-C469-4C4A-BFD0-4F999C432815}
8 | WinExe
9 | Properties
10 | SGOMPK
11 | SGOMPK
12 | v4.6.1
13 | 512
14 | true
15 |
16 |
17 |
18 |
19 | AnyCPU
20 | true
21 | full
22 | false
23 | bin\Debug\
24 | DEBUG;TRACE
25 | prompt
26 | 4
27 |
28 |
29 | AnyCPU
30 | pdbonly
31 | true
32 | bin\Release\
33 | TRACE
34 | prompt
35 | 4
36 |
37 |
38 | SG0.ico
39 |
40 |
41 |
42 | ..\packages\MetroModernUI.1.4.0.0\lib\net\MetroFramework.dll
43 | True
44 |
45 |
46 | ..\packages\MetroModernUI.1.4.0.0\lib\net\MetroFramework.Design.dll
47 | True
48 |
49 |
50 | ..\packages\MetroModernUI.1.4.0.0\lib\net\MetroFramework.Fonts.dll
51 | True
52 |
53 |
54 | ..\packages\Microsoft.WindowsAPICodePack-Core.1.1.0.2\lib\Microsoft.WindowsAPICodePack.dll
55 | True
56 |
57 |
58 | ..\packages\Microsoft.WindowsAPICodePack-Shell.1.1.0.0\lib\Microsoft.WindowsAPICodePack.Shell.dll
59 | True
60 |
61 |
62 | ..\packages\Microsoft.WindowsAPICodePack-Shell.1.1.0.0\lib\Microsoft.WindowsAPICodePack.ShellExtensions.dll
63 | True
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 | ..\TestModules.dll
78 |
79 |
80 | ..\packages\zlib.net.1.0.4.0\lib\zlib.net.dll
81 |
82 |
83 |
84 |
85 | Form
86 |
87 |
88 | Form1.cs
89 |
90 |
91 | Form
92 |
93 |
94 | ListFiles.cs
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 | Form1.cs
104 |
105 |
106 | ListFiles.cs
107 |
108 |
109 | ResXFileCodeGenerator
110 | Resources.Designer.cs
111 | Designer
112 |
113 |
114 | True
115 | Resources.resx
116 |
117 |
118 |
119 | SettingsSingleFileGenerator
120 | Settings.Designer.cs
121 |
122 |
123 | True
124 | Settings.settings
125 | True
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
142 |
--------------------------------------------------------------------------------
/SGOMPK/MpkWriter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Runtime.InteropServices;
5 | using System.Text;
6 | using zlib;
7 |
8 | namespace SGOMPK
9 | {
10 | internal class MpkWriter
11 | {
12 | private IList fileentries;
13 | MpkDetailedEntry[] MPKEntries;
14 | public void WriteArchive(IList en, Stream output, bool compress, bool copyheader, string headerdirectory)
15 | {
16 | fileentries = en;
17 | MPKEntries = new MpkDetailedEntry[fileentries.Count];
18 | string folder = Convert.ToString(fileentries[0].FileInfo.Directory);
19 | for (int i = 0; i < fileentries.Count; i++)
20 | {
21 | MPKEntries[i] = new MpkDetailedEntry();
22 | }
23 | using (BinaryWriter binaryWriter = new BinaryWriter(output))
24 | {
25 | if (copyheader)
26 | {
27 | using (FileStream fileStream = File.Open(Path.Combine(headerdirectory), FileMode.Open, FileAccess.Read))
28 | {
29 | ReadArchive(fileStream);
30 | }
31 | }
32 | else
33 | {
34 | for (int i = 0; i < MPKEntries.Length; i++)
35 | {
36 | MPKEntries[i].isCompressed = compress;
37 | MPKEntries[i].fileName = fileentries[i].FileInfo.Name;
38 | MPKEntries[i].Id = i;
39 | }
40 | }
41 | binaryWriter.Write(Encoding.UTF8.GetBytes(MpkSignature));
42 | binaryWriter.Write(VersionMinor);
43 | binaryWriter.Write(VersionMajor);
44 | binaryWriter.Write((long)MPKEntries.Length);
45 | int num = FirstEntryOffset - (int)output.Position;
46 | binaryWriter.Write(new byte[num]);
47 | int num2 = FileHeaderLength * MPKEntries.Length;
48 | if (num2 % 2048L != 0L || num2 < 2048L)
49 | {
50 | int n = (int)((num2 / 2048L + 1L) * 2048L) - (num2 + FirstEntryOffset);
51 | binaryWriter.Write(new byte[n]);
52 | }
53 | binaryWriter.Write(new byte[num2]);
54 | for (int i = 0; i < MPKEntries.Length; i++)
55 | {
56 | long position = output.Position;
57 | using (FileStream fileStream = File.OpenRead(folder + "\\" + MPKEntries[i].fileName))
58 | {
59 | MPKEntries[i].actualSize = fileStream.Length;
60 | if (MPKEntries[i].isCompressed)
61 | {
62 | byte[] buffer = File.ReadAllBytes(folder + "\\" + MPKEntries[i].fileName);
63 | MemoryStream memOutput = new MemoryStream();
64 | ZOutputStream zipOut = new ZOutputStream(memOutput, zlibConst.Z_DEFAULT_COMPRESSION);
65 | zipOut.Write(buffer, 0, buffer.Length);
66 | zipOut.finish();
67 | memOutput.Seek(0, SeekOrigin.Begin);
68 | byte[] result = memOutput.ToArray();
69 | binaryWriter.Write(result);
70 | MPKEntries[i].size = (long)result.Length;
71 | }
72 | else
73 | {
74 | byte[] buffer = new byte[4096];
75 | int count;
76 | while ((count = fileStream.Read(buffer, 0, 4096)) != 0)
77 | {
78 | binaryWriter.Write(buffer, 0, count);
79 | }
80 | MPKEntries[i].size = MPKEntries[i].actualSize;
81 | }
82 | }
83 | if (MPKEntries[i].size % 2048L != 0L || MPKEntries[i].size < 2048L)
84 | {
85 | num = (int)((MPKEntries[i].size / 2048L + 1L) * 2048L) - (int)MPKEntries[i].size;
86 | if (i < MPKEntries.Length - 1)
87 | {
88 | binaryWriter.Write(new byte[num]);
89 | }
90 | }
91 | long position2 = output.Position;
92 | output.Position = (long)(FirstEntryOffset + i * 256);
93 | binaryWriter.Write((int)(MPKEntries[i].isCompressed ? 1 : 0));
94 | binaryWriter.Write(MPKEntries[i].Id);
95 | binaryWriter.Write(position);
96 | binaryWriter.Write(MPKEntries[i].size);
97 | binaryWriter.Write(MPKEntries[i].actualSize);
98 | binaryWriter.Write(Encoding.UTF8.GetBytes(MPKEntries[i].fileName));
99 | int ls = Encoding.UTF8.GetBytes(MPKEntries[i].fileName).Length;
100 | if (ls < 224)
101 | {
102 | binaryWriter.Write(new byte[224 - ls]);
103 | }
104 | output.Position = position2;
105 | }
106 | }
107 | }
108 |
109 | private const string MpkSignature = "MPK\0";
110 | private const short VersionMajor = 2;
111 | private const short VersionMinor = 0;
112 | private const int FileHeaderLength = 256;
113 | private const int FirstEntryOffset = 64;
114 | public void ReadArchive(Stream input)
115 | {
116 | using (BinaryReader binaryreader = new BinaryReader(input))
117 | {
118 | input.Position = 8;
119 | long count = binaryreader.ReadInt64();
120 | for (int i = 0; i < count; i++)
121 | {
122 | long fileEntryPos = 64 + i * 256;
123 | input.Position = fileEntryPos;
124 | bool isCompressed = binaryreader.ReadInt32() == 1;
125 | int Id = binaryreader.ReadInt32();
126 | long fileDataPos = binaryreader.ReadInt64();
127 | long size = binaryreader.ReadInt64();
128 | long actualSize = binaryreader.ReadInt64();
129 | byte[] buffer = new byte[224];
130 | input.Read(buffer, 0, buffer.Length);
131 | string fileName = Encoding.UTF8.GetString(buffer).Replace("\0", "").Trim();
132 | try
133 | {
134 | MPKEntries[i].Id = Id;
135 | MPKEntries[i].fileName = fileName;
136 | MPKEntries[i].isCompressed = isCompressed;
137 | }
138 | catch (Exception e)
139 | {
140 | Console.WriteLine(e);
141 | throw;
142 | }
143 | }
144 | }
145 | }
146 | }
147 |
148 | }
149 |
--------------------------------------------------------------------------------
/SGOMPK/Form1.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Data;
4 | using System.Linq;
5 | using System.IO;
6 | using MetroFramework.Forms;
7 | using Microsoft.WindowsAPICodePack.Dialogs;
8 | using System.Runtime.CompilerServices;
9 | using System.Threading.Tasks;
10 |
11 | namespace SGOMPK
12 | {
13 | public partial class Form1 : MetroForm
14 | {
15 | private MpkWriter writer;
16 | public Form1()
17 | {
18 | InitializeComponent();
19 | }
20 |
21 | private void Form1_Load(object sender, EventArgs e)
22 | {
23 | writer = new MpkWriter();
24 | }
25 |
26 | private void button1_Click(object sender, EventArgs e)
27 | {
28 | using (CommonOpenFileDialog open = new CommonOpenFileDialog())
29 | {
30 | open.IsFolderPicker = true;
31 | if (open.ShowDialog() == CommonFileDialogResult.Ok)
32 | {
33 | txtDirectoryDataRe.Text = open.FileName;
34 | }
35 | }
36 | }
37 |
38 | private void button2_Click(object sender, EventArgs e)
39 | {
40 | using (CommonOpenFileDialog save = new CommonOpenFileDialog())
41 | {
42 | save.IsFolderPicker = true;
43 | if (save.ShowDialog() == CommonFileDialogResult.Ok)
44 | {
45 | txtDirectorySaveRe.Text = save.FileName;
46 | }
47 | }
48 | }
49 |
50 | private async void btnRePack_Click(object sender, EventArgs e)
51 | {
52 | try
53 | {
54 | lbTextRe.Text = "Loading...";
55 | await Task.Run(delegate
56 | {
57 | Pack();
58 | });
59 | lbTextRe.Text = "OK";
60 | }
61 | catch
62 | {
63 | lbTextRe.Text = "Err...";
64 | }
65 | }
66 |
67 | private void button5_Click(object sender, EventArgs e)
68 | {
69 | using (CommonOpenFileDialog open = new CommonOpenFileDialog())
70 | {
71 | if (open.ShowDialog() == CommonFileDialogResult.Ok)
72 | {
73 | txtDirectoryDataUn.Text = open.FileName;
74 | }
75 | }
76 | }
77 |
78 | private void button4_Click(object sender, EventArgs e)
79 | {
80 | using (CommonOpenFileDialog save = new CommonOpenFileDialog())
81 | {
82 | save.IsFolderPicker = true;
83 | if (save.ShowDialog() == CommonFileDialogResult.Ok)
84 | {
85 | txtDirectorySaveUn.Text = save.FileName;
86 | }
87 | }
88 | }
89 |
90 | private async void BtnUnPack_Click(object sender, EventArgs e)
91 | {
92 | try
93 | {
94 | lbTextUn.Text = "Loading...";
95 | await Task.Run(delegate
96 | {
97 | UnPack();
98 | });
99 | lbTextUn.Text = "OK";
100 | }
101 | catch
102 | {
103 | lbTextUn.Text = "Err";
104 | }
105 | }
106 |
107 |
108 | private void Pack()
109 | {
110 | using (FileStream fileStream = File.Create(Path.Combine(txtDirectorySaveRe.Text, txtNameRe.Text)))
111 | {
112 | IEnumerable ListFileData1 = new DirectoryInfo(txtDirectoryDataRe.Text).GetFiles();
113 | Func FileInfoName;
114 | if ((FileInfoName = a.FileinfoName) == null)
115 | {
116 | FileInfoName = (a.FileinfoName = new Func(a.install.PackName));
117 | }
118 | IEnumerable ListFileData2;
119 | if (radioButton2.Checked)
120 | ListFileData2 = ListFileData1.OrderBy(FileInfoName).OrderBy(p => p.CreationTime);
121 | else
122 | ListFileData2 = ListFileData1.OrderBy(FileInfoName);
123 | Func FileInfo;
124 | if ((FileInfo = a.Fileinfo) == null)
125 | {
126 | FileInfo = (a.Fileinfo = new Func(a.install.PackFileInfo));
127 | }
128 |
129 | bool copy = header.Checked;
130 | bool compress = compressbox.Checked;
131 | IList entries = ListFileData2.Select(FileInfo).ToList();
132 | writer.WriteArchive(entries, fileStream, compress, copy, Path.Combine(txtmpkcopy.Text));
133 | }
134 | }
135 |
136 | private void UnPack()
137 | {
138 | using (FileStream fileStream = File.Open(Path.Combine(txtDirectoryDataUn.Text), FileMode.Open, FileAccess.Read))
139 | {
140 | MpkReader.ReaderArchive(fileStream, txtDirectorySaveUn.Text, listboxfiles);
141 | }
142 | }
143 |
144 | [CompilerGenerated]
145 | [Serializable]
146 | private sealed class a
147 | {
148 | public a()
149 | {
150 | }
151 | static a()
152 | {
153 | a.install = new a();
154 | }
155 |
156 | internal string PackName(FileInfo x)
157 | {
158 | return x.Name;
159 | }
160 |
161 | internal MpkFileEntry PackFileInfo(FileInfo x, int id)
162 | {
163 | return new MpkFileEntry(id, x);
164 | }
165 |
166 | public static readonly a install = new a();
167 | public static Func FileinfoName;
168 | public static Func Fileinfo;
169 | }
170 |
171 | private void button3_Click(object sender, EventArgs e)
172 | {
173 | using (CommonOpenFileDialog open = new CommonOpenFileDialog())
174 | {
175 | if (open.ShowDialog() == CommonFileDialogResult.Ok)
176 | {
177 | txtmpkcopy.Text = open.FileName;
178 | }
179 | }
180 | }
181 |
182 | private void header_CheckedChanged(object sender, EventArgs e)
183 | {
184 | compressbox.Checked = false;
185 | compressbox.Enabled = !header.Checked;
186 | button3.Enabled = header.Checked;
187 | txtmpkcopy.Enabled = header.Checked;
188 | }
189 |
190 | private void listfiles_Click(object sender, EventArgs e)
191 | {
192 | using (FileStream fileStream = File.Open(Path.Combine(txtDirectoryDataUn.Text), FileMode.Open, FileAccess.Read))
193 | {
194 | ListFiles list = new ListFiles();
195 | list.addStream(fileStream);
196 | list.Show();
197 | }
198 | }
199 | }
200 | }
201 |
--------------------------------------------------------------------------------
/SGOMPK/Form1.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace SGOMPK
2 | {
3 | partial class Form1
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.tabControl1 = new System.Windows.Forms.TabControl();
32 | this.tabPage1 = new System.Windows.Forms.TabPage();
33 | this.label6 = new System.Windows.Forms.Label();
34 | this.button3 = new System.Windows.Forms.Button();
35 | this.txtmpkcopy = new System.Windows.Forms.TextBox();
36 | this.header = new System.Windows.Forms.CheckBox();
37 | this.compressbox = new System.Windows.Forms.CheckBox();
38 | this.groupBox1 = new System.Windows.Forms.GroupBox();
39 | this.radioButton2 = new System.Windows.Forms.RadioButton();
40 | this.radioButton1 = new System.Windows.Forms.RadioButton();
41 | this.label4 = new System.Windows.Forms.Label();
42 | this.lbTextRe = new System.Windows.Forms.Label();
43 | this.label3 = new System.Windows.Forms.Label();
44 | this.txtNameRe = new System.Windows.Forms.TextBox();
45 | this.btnRePack = new System.Windows.Forms.Button();
46 | this.button2 = new System.Windows.Forms.Button();
47 | this.label2 = new System.Windows.Forms.Label();
48 | this.txtDirectorySaveRe = new System.Windows.Forms.TextBox();
49 | this.label1 = new System.Windows.Forms.Label();
50 | this.button1 = new System.Windows.Forms.Button();
51 | this.txtDirectoryDataRe = new System.Windows.Forms.TextBox();
52 | this.tabPage2 = new System.Windows.Forms.TabPage();
53 | this.BtnUnPack = new System.Windows.Forms.Button();
54 | this.label5 = new System.Windows.Forms.Label();
55 | this.lbTextUn = new System.Windows.Forms.Label();
56 | this.button4 = new System.Windows.Forms.Button();
57 | this.label8 = new System.Windows.Forms.Label();
58 | this.txtDirectorySaveUn = new System.Windows.Forms.TextBox();
59 | this.label9 = new System.Windows.Forms.Label();
60 | this.button5 = new System.Windows.Forms.Button();
61 | this.txtDirectoryDataUn = new System.Windows.Forms.TextBox();
62 | this.listfiles = new System.Windows.Forms.Button();
63 | this.listboxfiles = new System.Windows.Forms.ListBox();
64 | this.tabControl1.SuspendLayout();
65 | this.tabPage1.SuspendLayout();
66 | this.groupBox1.SuspendLayout();
67 | this.tabPage2.SuspendLayout();
68 | this.SuspendLayout();
69 | //
70 | // tabControl1
71 | //
72 | this.tabControl1.Controls.Add(this.tabPage1);
73 | this.tabControl1.Controls.Add(this.tabPage2);
74 | this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
75 | this.tabControl1.Location = new System.Drawing.Point(20, 60);
76 | this.tabControl1.Name = "tabControl1";
77 | this.tabControl1.SelectedIndex = 0;
78 | this.tabControl1.Size = new System.Drawing.Size(505, 308);
79 | this.tabControl1.TabIndex = 12;
80 | //
81 | // tabPage1
82 | //
83 | this.tabPage1.Controls.Add(this.label6);
84 | this.tabPage1.Controls.Add(this.button3);
85 | this.tabPage1.Controls.Add(this.txtmpkcopy);
86 | this.tabPage1.Controls.Add(this.header);
87 | this.tabPage1.Controls.Add(this.compressbox);
88 | this.tabPage1.Controls.Add(this.groupBox1);
89 | this.tabPage1.Controls.Add(this.label4);
90 | this.tabPage1.Controls.Add(this.lbTextRe);
91 | this.tabPage1.Controls.Add(this.label3);
92 | this.tabPage1.Controls.Add(this.txtNameRe);
93 | this.tabPage1.Controls.Add(this.btnRePack);
94 | this.tabPage1.Controls.Add(this.button2);
95 | this.tabPage1.Controls.Add(this.label2);
96 | this.tabPage1.Controls.Add(this.txtDirectorySaveRe);
97 | this.tabPage1.Controls.Add(this.label1);
98 | this.tabPage1.Controls.Add(this.button1);
99 | this.tabPage1.Controls.Add(this.txtDirectoryDataRe);
100 | this.tabPage1.Location = new System.Drawing.Point(4, 22);
101 | this.tabPage1.Name = "tabPage1";
102 | this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
103 | this.tabPage1.Size = new System.Drawing.Size(497, 282);
104 | this.tabPage1.TabIndex = 0;
105 | this.tabPage1.Text = "RePack";
106 | this.tabPage1.UseVisualStyleBackColor = true;
107 | //
108 | // label6
109 | //
110 | this.label6.AutoSize = true;
111 | this.label6.Location = new System.Drawing.Point(41, 92);
112 | this.label6.Name = "label6";
113 | this.label6.Size = new System.Drawing.Size(90, 13);
114 | this.label6.TabIndex = 27;
115 | this.label6.Text = "MPK File to copy:";
116 | //
117 | // button3
118 | //
119 | this.button3.Enabled = false;
120 | this.button3.Location = new System.Drawing.Point(412, 87);
121 | this.button3.Name = "button3";
122 | this.button3.Size = new System.Drawing.Size(75, 23);
123 | this.button3.TabIndex = 26;
124 | this.button3.Text = "Open";
125 | this.button3.UseVisualStyleBackColor = true;
126 | this.button3.Click += new System.EventHandler(this.button3_Click);
127 | //
128 | // txtmpkcopy
129 | //
130 | this.txtmpkcopy.Enabled = false;
131 | this.txtmpkcopy.Location = new System.Drawing.Point(137, 88);
132 | this.txtmpkcopy.Name = "txtmpkcopy";
133 | this.txtmpkcopy.Size = new System.Drawing.Size(269, 20);
134 | this.txtmpkcopy.TabIndex = 25;
135 | //
136 | // header
137 | //
138 | this.header.AutoSize = true;
139 | this.header.Location = new System.Drawing.Point(137, 113);
140 | this.header.Margin = new System.Windows.Forms.Padding(2);
141 | this.header.Name = "header";
142 | this.header.Size = new System.Drawing.Size(211, 17);
143 | this.header.TabIndex = 23;
144 | this.header.Text = "Copy Header (Order, IDs, Compression)";
145 | this.header.UseVisualStyleBackColor = true;
146 | this.header.CheckedChanged += new System.EventHandler(this.header_CheckedChanged);
147 | //
148 | // compressbox
149 | //
150 | this.compressbox.AutoSize = true;
151 | this.compressbox.Location = new System.Drawing.Point(363, 113);
152 | this.compressbox.Margin = new System.Windows.Forms.Padding(2);
153 | this.compressbox.Name = "compressbox";
154 | this.compressbox.Size = new System.Drawing.Size(96, 17);
155 | this.compressbox.TabIndex = 23;
156 | this.compressbox.Text = "Compress Files";
157 | this.compressbox.UseVisualStyleBackColor = true;
158 | //
159 | // groupBox1
160 | //
161 | this.groupBox1.Controls.Add(this.radioButton2);
162 | this.groupBox1.Controls.Add(this.radioButton1);
163 | this.groupBox1.Location = new System.Drawing.Point(137, 181);
164 | this.groupBox1.Name = "groupBox1";
165 | this.groupBox1.Size = new System.Drawing.Size(268, 53);
166 | this.groupBox1.TabIndex = 22;
167 | this.groupBox1.TabStop = false;
168 | this.groupBox1.Text = "Sort By";
169 | //
170 | // radioButton2
171 | //
172 | this.radioButton2.AutoSize = true;
173 | this.radioButton2.Location = new System.Drawing.Point(146, 19);
174 | this.radioButton2.Name = "radioButton2";
175 | this.radioButton2.Size = new System.Drawing.Size(91, 17);
176 | this.radioButton2.TabIndex = 1;
177 | this.radioButton2.Text = "Date Modified";
178 | this.radioButton2.UseVisualStyleBackColor = true;
179 | //
180 | // radioButton1
181 | //
182 | this.radioButton1.AutoSize = true;
183 | this.radioButton1.Checked = true;
184 | this.radioButton1.Location = new System.Drawing.Point(8, 19);
185 | this.radioButton1.Name = "radioButton1";
186 | this.radioButton1.Size = new System.Drawing.Size(53, 17);
187 | this.radioButton1.TabIndex = 0;
188 | this.radioButton1.TabStop = true;
189 | this.radioButton1.Text = "Name";
190 | this.radioButton1.UseVisualStyleBackColor = true;
191 | //
192 | // label4
193 | //
194 | this.label4.AutoSize = true;
195 | this.label4.Location = new System.Drawing.Point(41, 258);
196 | this.label4.Name = "label4";
197 | this.label4.Size = new System.Drawing.Size(43, 13);
198 | this.label4.TabIndex = 21;
199 | this.label4.Text = "Status :";
200 | //
201 | // lbTextRe
202 | //
203 | this.lbTextRe.AutoSize = true;
204 | this.lbTextRe.Location = new System.Drawing.Point(88, 258);
205 | this.lbTextRe.Name = "lbTextRe";
206 | this.lbTextRe.Size = new System.Drawing.Size(0, 13);
207 | this.lbTextRe.TabIndex = 20;
208 | //
209 | // label3
210 | //
211 | this.label3.AutoSize = true;
212 | this.label3.Location = new System.Drawing.Point(90, 67);
213 | this.label3.Name = "label3";
214 | this.label3.Size = new System.Drawing.Size(41, 13);
215 | this.label3.TabIndex = 19;
216 | this.label3.Text = "Name :";
217 | //
218 | // txtNameRe
219 | //
220 | this.txtNameRe.Location = new System.Drawing.Point(137, 62);
221 | this.txtNameRe.Name = "txtNameRe";
222 | this.txtNameRe.Size = new System.Drawing.Size(269, 20);
223 | this.txtNameRe.TabIndex = 18;
224 | this.txtNameRe.Text = "file.mpk";
225 | //
226 | // btnRePack
227 | //
228 | this.btnRePack.Location = new System.Drawing.Point(191, 136);
229 | this.btnRePack.Name = "btnRePack";
230 | this.btnRePack.Size = new System.Drawing.Size(104, 39);
231 | this.btnRePack.TabIndex = 17;
232 | this.btnRePack.Text = "RePack";
233 | this.btnRePack.UseVisualStyleBackColor = true;
234 | this.btnRePack.Click += new System.EventHandler(this.btnRePack_Click);
235 | //
236 | // button2
237 | //
238 | this.button2.Location = new System.Drawing.Point(412, 34);
239 | this.button2.Name = "button2";
240 | this.button2.Size = new System.Drawing.Size(75, 23);
241 | this.button2.TabIndex = 16;
242 | this.button2.Text = "Save";
243 | this.button2.UseVisualStyleBackColor = true;
244 | this.button2.Click += new System.EventHandler(this.button2_Click);
245 | //
246 | // label2
247 | //
248 | this.label2.AutoSize = true;
249 | this.label2.Location = new System.Drawing.Point(93, 39);
250 | this.label2.Name = "label2";
251 | this.label2.Size = new System.Drawing.Size(38, 13);
252 | this.label2.TabIndex = 15;
253 | this.label2.Text = "Save :";
254 | //
255 | // txtDirectorySaveRe
256 | //
257 | this.txtDirectorySaveRe.Location = new System.Drawing.Point(137, 36);
258 | this.txtDirectorySaveRe.Name = "txtDirectorySaveRe";
259 | this.txtDirectorySaveRe.Size = new System.Drawing.Size(269, 20);
260 | this.txtDirectorySaveRe.TabIndex = 14;
261 | //
262 | // label1
263 | //
264 | this.label1.AutoSize = true;
265 | this.label1.Location = new System.Drawing.Point(50, 12);
266 | this.label1.Name = "label1";
267 | this.label1.Size = new System.Drawing.Size(81, 13);
268 | this.label1.TabIndex = 13;
269 | this.label1.Text = "Directory Data :";
270 | //
271 | // button1
272 | //
273 | this.button1.Location = new System.Drawing.Point(412, 8);
274 | this.button1.Name = "button1";
275 | this.button1.Size = new System.Drawing.Size(75, 23);
276 | this.button1.TabIndex = 12;
277 | this.button1.Text = "Open";
278 | this.button1.UseVisualStyleBackColor = true;
279 | this.button1.Click += new System.EventHandler(this.button1_Click);
280 | //
281 | // txtDirectoryDataRe
282 | //
283 | this.txtDirectoryDataRe.Location = new System.Drawing.Point(137, 10);
284 | this.txtDirectoryDataRe.Name = "txtDirectoryDataRe";
285 | this.txtDirectoryDataRe.Size = new System.Drawing.Size(269, 20);
286 | this.txtDirectoryDataRe.TabIndex = 11;
287 | //
288 | // tabPage2
289 | //
290 | this.tabPage2.Controls.Add(this.listboxfiles);
291 | this.tabPage2.Controls.Add(this.listfiles);
292 | this.tabPage2.Controls.Add(this.BtnUnPack);
293 | this.tabPage2.Controls.Add(this.label5);
294 | this.tabPage2.Controls.Add(this.lbTextUn);
295 | this.tabPage2.Controls.Add(this.button4);
296 | this.tabPage2.Controls.Add(this.label8);
297 | this.tabPage2.Controls.Add(this.txtDirectorySaveUn);
298 | this.tabPage2.Controls.Add(this.label9);
299 | this.tabPage2.Controls.Add(this.button5);
300 | this.tabPage2.Controls.Add(this.txtDirectoryDataUn);
301 | this.tabPage2.Location = new System.Drawing.Point(4, 22);
302 | this.tabPage2.Name = "tabPage2";
303 | this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
304 | this.tabPage2.Size = new System.Drawing.Size(497, 282);
305 | this.tabPage2.TabIndex = 1;
306 | this.tabPage2.Text = "UnPack and List";
307 | this.tabPage2.UseVisualStyleBackColor = true;
308 | //
309 | // BtnUnPack
310 | //
311 | this.BtnUnPack.Location = new System.Drawing.Point(177, 189);
312 | this.BtnUnPack.Name = "BtnUnPack";
313 | this.BtnUnPack.Size = new System.Drawing.Size(129, 47);
314 | this.BtnUnPack.TabIndex = 33;
315 | this.BtnUnPack.Text = "UnPack";
316 | this.BtnUnPack.UseVisualStyleBackColor = true;
317 | this.BtnUnPack.Click += new System.EventHandler(this.BtnUnPack_Click);
318 | //
319 | // label5
320 | //
321 | this.label5.AutoSize = true;
322 | this.label5.Location = new System.Drawing.Point(43, 64);
323 | this.label5.Name = "label5";
324 | this.label5.Size = new System.Drawing.Size(43, 13);
325 | this.label5.TabIndex = 32;
326 | this.label5.Text = "Status :";
327 | //
328 | // lbTextUn
329 | //
330 | this.lbTextUn.AutoSize = true;
331 | this.lbTextUn.Location = new System.Drawing.Point(95, 64);
332 | this.lbTextUn.Name = "lbTextUn";
333 | this.lbTextUn.Size = new System.Drawing.Size(0, 13);
334 | this.lbTextUn.TabIndex = 31;
335 | //
336 | // button4
337 | //
338 | this.button4.Location = new System.Drawing.Point(416, 34);
339 | this.button4.Name = "button4";
340 | this.button4.Size = new System.Drawing.Size(75, 23);
341 | this.button4.TabIndex = 27;
342 | this.button4.Text = "Save";
343 | this.button4.UseVisualStyleBackColor = true;
344 | this.button4.Click += new System.EventHandler(this.button4_Click);
345 | //
346 | // label8
347 | //
348 | this.label8.AutoSize = true;
349 | this.label8.Location = new System.Drawing.Point(51, 37);
350 | this.label8.Name = "label8";
351 | this.label8.Size = new System.Drawing.Size(38, 13);
352 | this.label8.TabIndex = 26;
353 | this.label8.Text = "Save :";
354 | //
355 | // txtDirectorySaveUn
356 | //
357 | this.txtDirectorySaveUn.Location = new System.Drawing.Point(95, 35);
358 | this.txtDirectorySaveUn.Name = "txtDirectorySaveUn";
359 | this.txtDirectorySaveUn.Size = new System.Drawing.Size(315, 20);
360 | this.txtDirectorySaveUn.TabIndex = 25;
361 | //
362 | // label9
363 | //
364 | this.label9.AutoSize = true;
365 | this.label9.Location = new System.Drawing.Point(40, 12);
366 | this.label9.Name = "label9";
367 | this.label9.Size = new System.Drawing.Size(55, 13);
368 | this.label9.TabIndex = 24;
369 | this.label9.Text = "MPK File :";
370 | //
371 | // button5
372 | //
373 | this.button5.Location = new System.Drawing.Point(416, 7);
374 | this.button5.Name = "button5";
375 | this.button5.Size = new System.Drawing.Size(75, 23);
376 | this.button5.TabIndex = 23;
377 | this.button5.Text = "Open";
378 | this.button5.UseVisualStyleBackColor = true;
379 | this.button5.Click += new System.EventHandler(this.button5_Click);
380 | //
381 | // txtDirectoryDataUn
382 | //
383 | this.txtDirectoryDataUn.Location = new System.Drawing.Point(95, 9);
384 | this.txtDirectoryDataUn.Name = "txtDirectoryDataUn";
385 | this.txtDirectoryDataUn.Size = new System.Drawing.Size(315, 20);
386 | this.txtDirectoryDataUn.TabIndex = 22;
387 | //
388 | // listfiles
389 | //
390 | this.listfiles.Location = new System.Drawing.Point(205, 252);
391 | this.listfiles.Name = "listfiles";
392 | this.listfiles.Size = new System.Drawing.Size(75, 23);
393 | this.listfiles.TabIndex = 34;
394 | this.listfiles.Text = "List Files";
395 | this.listfiles.UseVisualStyleBackColor = true;
396 | this.listfiles.Click += new System.EventHandler(this.listfiles_Click);
397 | //
398 | // listboxfiles
399 | //
400 | this.listboxfiles.FormattingEnabled = true;
401 | this.listboxfiles.Location = new System.Drawing.Point(7, 88);
402 | this.listboxfiles.Name = "listboxfiles";
403 | this.listboxfiles.Size = new System.Drawing.Size(484, 95);
404 | this.listboxfiles.TabIndex = 35;
405 | //
406 | // Form1
407 | //
408 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
409 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
410 | this.ClientSize = new System.Drawing.Size(545, 388);
411 | this.Controls.Add(this.tabControl1);
412 | this.MaximizeBox = false;
413 | this.Name = "Form1";
414 | this.Resizable = false;
415 | this.Text = "SGO MPK";
416 | this.Load += new System.EventHandler(this.Form1_Load);
417 | this.tabControl1.ResumeLayout(false);
418 | this.tabPage1.ResumeLayout(false);
419 | this.tabPage1.PerformLayout();
420 | this.groupBox1.ResumeLayout(false);
421 | this.groupBox1.PerformLayout();
422 | this.tabPage2.ResumeLayout(false);
423 | this.tabPage2.PerformLayout();
424 | this.ResumeLayout(false);
425 |
426 | }
427 |
428 | #endregion
429 |
430 | private System.Windows.Forms.TabControl tabControl1;
431 | private System.Windows.Forms.TabPage tabPage1;
432 | private System.Windows.Forms.Label label4;
433 | private System.Windows.Forms.Label lbTextRe;
434 | private System.Windows.Forms.Label label3;
435 | private System.Windows.Forms.TextBox txtNameRe;
436 | private System.Windows.Forms.Button btnRePack;
437 | private System.Windows.Forms.Button button2;
438 | private System.Windows.Forms.Label label2;
439 | private System.Windows.Forms.TextBox txtDirectorySaveRe;
440 | private System.Windows.Forms.Label label1;
441 | private System.Windows.Forms.Button button1;
442 | private System.Windows.Forms.TextBox txtDirectoryDataRe;
443 | private System.Windows.Forms.TabPage tabPage2;
444 | private System.Windows.Forms.Button BtnUnPack;
445 | private System.Windows.Forms.Label label5;
446 | private System.Windows.Forms.Label lbTextUn;
447 | private System.Windows.Forms.Button button4;
448 | private System.Windows.Forms.Label label8;
449 | private System.Windows.Forms.TextBox txtDirectorySaveUn;
450 | private System.Windows.Forms.Label label9;
451 | private System.Windows.Forms.Button button5;
452 | private System.Windows.Forms.TextBox txtDirectoryDataUn;
453 | private System.Windows.Forms.GroupBox groupBox1;
454 | private System.Windows.Forms.RadioButton radioButton2;
455 | private System.Windows.Forms.RadioButton radioButton1;
456 | private System.Windows.Forms.CheckBox compressbox;
457 | private System.Windows.Forms.CheckBox header;
458 | private System.Windows.Forms.Label label6;
459 | private System.Windows.Forms.Button button3;
460 | private System.Windows.Forms.TextBox txtmpkcopy;
461 | private System.Windows.Forms.Button listfiles;
462 | private System.Windows.Forms.ListBox listboxfiles;
463 | }
464 | }
465 |
466 |
--------------------------------------------------------------------------------
/packages/Microsoft.WindowsAPICodePack-Shell.1.1.0.0/lib/Microsoft.WindowsAPICodePack.ShellExtensions.XML:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Microsoft.WindowsAPICodePack.ShellExtensions
5 |
6 |
7 |
8 |
9 | This interface exposes the function for initializing the
10 | Preview Handler with a .
11 | This interface can be used in conjunction with the other intialization interfaces,
12 | but only 1 will be accessed according to the priorities preset by the Windows Shell:
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | Provides the to the item from which a preview should be created.
21 |
22 | Stream to the previewed file, this stream is only available in the scope of this method.
23 |
24 |
25 |
26 | This interface exposes the function for initializing the
27 | Preview Handler with a .
28 | This interface can be used in conjunction with the other intialization interfaces,
29 | but only 1 will be accessed according to the priorities preset by the Windows Shell:
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | Provides the to the item from which a preview should be created.
38 |
39 | File information to the previewed file.
40 |
41 |
42 |
43 | This interface exposes the function for initializing the
44 | Preview Handler with a .
45 | This interface can be used in conjunction with the other intialization interfaces,
46 | but only 1 will be accessed according to the priorities preset by the Windows Shell:
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | Provides the from which a preview should be created.
55 |
56 | ShellObject for the previewed file, this ShellObject is only available in the scope of this method.
57 |
58 |
59 |
60 | This is the base class for all preview handlers and provides their basic functionality.
61 | To create a custom preview handler a class must derive from this, use the ,
62 | and implement 1 or more of the following interfaces:
63 | ,
64 | ,
65 | .
66 |
67 |
68 |
69 |
70 | Provides means by which to initialize with a stream.
71 |
72 |
73 |
74 |
75 | Initializes with a stream.
76 |
77 |
78 |
79 |
80 |
81 |
82 | Provides means by which to initialize with a ShellObject
83 |
84 |
85 |
86 |
87 | Initializes with ShellItem
88 |
89 |
90 |
91 |
92 |
93 |
94 | Provides means by which to initialize with a file.
95 |
96 |
97 |
98 |
99 | Initializes with a file.
100 |
101 |
102 |
103 |
104 |
105 |
106 | Called immediately before the preview is to be shown.
107 |
108 |
109 |
110 |
111 | Called when the preview is no longer shown.
112 |
113 |
114 |
115 |
116 | Called to update the bounds and position of the preview control
117 |
118 |
119 |
120 |
121 |
122 | Called when an exception occurs during the initialization of the control
123 |
124 |
125 |
126 |
127 |
128 | Called when the preview control obtains focus.
129 |
130 |
131 |
132 |
133 | Called when a request is received to set or change the background color according to the user's preferences.
134 |
135 | An int representing the ARGB color
136 |
137 |
138 |
139 | Called when a request is received to set or change the foreground color according to the user's preferences.
140 |
141 | An int representing the ARGB color
142 |
143 |
144 |
145 | Called to set the font of the preview control according to the user's preferences.
146 |
147 |
148 |
149 |
150 |
151 | Called to set the parent of the preview control.
152 |
153 |
154 |
155 |
156 |
157 | Called when the assembly is registered via RegAsm.
158 |
159 | Type to register.
160 |
161 |
162 |
163 | Called when the assembly is Unregistered via RegAsm.
164 |
165 | Type to unregister
166 |
167 |
168 |
169 | Gets whether the preview is currently showing
170 |
171 |
172 |
173 |
174 | This should return the window handle to be displayed in the Preview.
175 |
176 |
177 |
178 |
179 | This class attribute is applied to a Preview Handler to specify registration parameters.
180 |
181 |
182 |
183 |
184 | Creates a new instance of the attribute.
185 |
186 | Name of the Handler
187 | Semi-colon-separated list of file extensions supported by the handler.
188 | A unique guid used for process isolation.
189 |
190 |
191 |
192 | Gets the name of the handler.
193 |
194 |
195 |
196 |
197 | Gets the semi-colon-separated list of extensions supported by the preview handler.
198 |
199 |
200 |
201 |
202 | Gets the AppId associated with the handler for use with the surrogate host process.
203 |
204 |
205 |
206 |
207 | Disables low integrity-level process isolation.
208 | This should be avoided as it could be a security risk.
209 |
210 |
211 |
212 |
213 | This is the base class for all WinForms-based preview handlers and provides their basic functionality.
214 | To create a custom preview handler that contains a WinForms user control,
215 | a class must derive from this, use the ,
216 | and implement 1 or more of the following interfaces:
217 | ,
218 | ,
219 | .
220 |
221 |
222 |
223 |
224 | Called when an exception is thrown during itialization of the preview control.
225 |
226 |
227 |
228 |
229 |
230 | This control must be populated by the deriving class before the preview is shown.
231 |
232 |
233 |
234 |
235 | This is the base class for all WPF-based preview handlers and provides their basic functionality.
236 | To create a custom preview handler that contains a WPF user control,
237 | a class must derive from this, use the ,
238 | and implement 1 or more of the following interfaces:
239 | ,
240 | ,
241 | .
242 |
243 |
244 |
245 |
246 | Throws an exception if the Control property has not been populated.
247 |
248 |
249 |
250 |
251 | Updates the placement of the Control.
252 |
253 |
254 |
255 |
256 | Preview handler control finalizer
257 |
258 |
259 |
260 |
261 | Disposes the control
262 |
263 |
264 |
265 |
266 | Provides means to dispose the object.
267 | When overriden, it is imperative that base.Dispose(true) is called within the implementation.
268 |
269 |
270 |
271 |
272 |
273 | This control must be populated by the deriving class before the preview is shown.
274 |
275 |
276 |
277 |
278 | ComVisible interface for native IThumbnailProvider
279 |
280 |
281 |
282 |
283 | Gets a pointer to a bitmap to display as a thumbnail
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 | Class for marshaling to native LogFont struct
292 |
293 |
294 |
295 |
296 | Font height
297 |
298 |
299 |
300 |
301 | Font width
302 |
303 |
304 |
305 |
306 | Font escapement
307 |
308 |
309 |
310 |
311 | Font orientation
312 |
313 |
314 |
315 |
316 | Font weight
317 |
318 |
319 |
320 |
321 | Font italic
322 |
323 |
324 |
325 |
326 | Font underline
327 |
328 |
329 |
330 |
331 | Font strikeout
332 |
333 |
334 |
335 |
336 | Font character set
337 |
338 |
339 |
340 |
341 | Font out precision
342 |
343 |
344 |
345 |
346 | Font clip precision
347 |
348 |
349 |
350 |
351 | Font quality
352 |
353 |
354 |
355 |
356 | Font pitch and family
357 |
358 |
359 |
360 |
361 | Font face name
362 |
363 |
364 |
365 |
366 | A strongly-typed resource class, for looking up localized strings, etc.
367 |
368 |
369 |
370 |
371 | Returns the cached ResourceManager instance used by this class.
372 |
373 |
374 |
375 |
376 | Overrides the current thread's CurrentUICulture property for all
377 | resource lookups using this strongly typed resource class.
378 |
379 |
380 |
381 |
382 | Looks up a localized string similar to Control has not yet been assigned. Methods requiring it cannot be called..
383 |
384 |
385 |
386 |
387 | Looks up a localized string similar to {0} must implement one or more of IPreviewFromStream, IPreviewFromShellObject or IPreviewFromFile..
388 |
389 |
390 |
391 |
392 | Looks up a localized string similar to PreviewHandler '{0}' must have exactly one PreviewHandler attribute..
393 |
394 |
395 |
396 |
397 | Looks up a localized string similar to Unable to call interface {0} because it is not supported on this object..
398 |
399 |
400 |
401 |
402 | Looks up a localized string similar to The sum of offset and count must be less than or equal to the size of the buffer..
403 |
404 |
405 |
406 |
407 | Looks up a localized string similar to Count must be greater than or equal to zero..
408 |
409 |
410 |
411 |
412 | Looks up a localized string similar to The stream was initialized as read-only..
413 |
414 |
415 |
416 |
417 | Looks up a localized string similar to Offset must be greater than or equal to zero..
418 |
419 |
420 |
421 |
422 | Looks up a localized string similar to {0} does not implement IThumbnailFromStream and so requires DisableProcessIsolation set to true..
423 |
424 |
425 |
426 |
427 | Looks up a localized string similar to {0} must implement one or more of IThumbnailFromStream, IThumbnailFromShellObject or IThumbnailFromFile..
428 |
429 |
430 |
431 |
432 | Looks up a localized string similar to Cannot retrieve handle because proxy window has not been created..
433 |
434 |
435 |
436 |
437 | A wrapper for the native IStream object.
438 |
439 |
440 |
441 |
442 | Reads a single byte from the stream, moving the current position ahead by 1.
443 |
444 | A single byte from the stream, -1 if end of stream.
445 |
446 |
447 |
448 | Writes a single byte to the stream
449 |
450 | Byte to write to stream
451 |
452 |
453 |
454 | Reads a buffer worth of bytes from the stream.
455 |
456 | Buffer to fill
457 | Offset to start filling in the buffer
458 | Number of bytes to read from the stream
459 |
460 |
461 |
462 |
463 | Writes a buffer to the stream if able to do so.
464 |
465 | Buffer to write
466 | Offset in buffer to start writing
467 | Number of bytes to write to the stream
468 |
469 |
470 |
471 | Seeks within the underlying IStream.
472 |
473 | Offset
474 | Where to start seeking
475 |
476 |
477 |
478 |
479 | Sets the length of the stream
480 |
481 |
482 |
483 |
484 |
485 | Commits data to be written to the stream if it is being cached.
486 |
487 |
488 |
489 |
490 | Disposes the stream.
491 |
492 | True if called from Dispose(), false if called from finalizer.
493 |
494 |
495 |
496 | Gets whether the stream can be read from.
497 |
498 |
499 |
500 |
501 | Gets whether seeking is supported by the stream.
502 |
503 |
504 |
505 |
506 | Gets whether the stream can be written to.
507 | Always false.
508 |
509 |
510 |
511 |
512 | Gets the length of the IStream
513 |
514 |
515 |
516 |
517 | Gets or sets the current position within the underlying IStream.
518 |
519 |
520 |
521 |
522 | Options for commiting (flushing) an IStream storage stream
523 |
524 |
525 |
526 |
527 | Uses default options
528 |
529 |
530 |
531 |
532 | Overwrite option
533 |
534 |
535 |
536 |
537 | Only if current
538 |
539 |
540 |
541 |
542 | Commits to disk cache dangerously
543 |
544 |
545 |
546 |
547 | Consolidate
548 |
549 |
550 |
551 |
552 | This interface exposes the function for initializing the
553 | Thumbnail Provider with a .
554 | If this interfaces is not used, then the handler must opt out of process isolation.
555 | This interface can be used in conjunction with the other intialization interfaces,
556 | but only 1 will be accessed according to the priorities preset by the Windows Shell:
557 |
558 |
559 |
560 |
561 |
562 |
563 |
564 | Provides the to the item from which a thumbnail should be created.
565 | Only 32bpp bitmaps support adornments.
566 | While 24bpp bitmaps will be displayed they will not display adornments.
567 | Additional guidelines for developing thumbnails can be found at http://msdn.microsoft.com/en-us/library/cc144115(v=VS.85).aspx
568 |
569 |
570 | Stream to initialize the thumbnail
571 | Square side dimension in which the thumbnail should fit; the thumbnail will be scaled otherwise.
572 |
573 |
574 |
575 |
576 | This interface exposes the function for initializing the
577 | Thumbnail Provider with a .
578 | This interface can be used in conjunction with the other intialization interfaces,
579 | but only 1 will be accessed according to the priorities preset by the Windows Shell:
580 |
581 |
582 |
583 |
584 |
585 |
586 |
587 | Provides the to the item from which a thumbnail should be created.
588 | Only 32bpp bitmaps support adornments.
589 | While 24bpp bitmaps will be displayed they will not display adornments.
590 | Additional guidelines for developing thumbnails can be found at http://msdn.microsoft.com/en-us/library/cc144115(v=VS.85).aspx
591 |
592 |
593 | ShellObject to initialize the thumbnail
594 | Square side dimension in which the thumbnail should fit; the thumbnail will be scaled otherwise.
595 | Generated thumbnail
596 |
597 |
598 |
599 | This interface exposes the function for initializing the
600 | Thumbnail Provider with file information.
601 | This interface can be used in conjunction with the other intialization interfaces,
602 | but only 1 will be accessed according to the priorities preset by the Windows Shell:
603 |
604 |
605 |
606 |
607 |
608 |
609 |
610 | Provides the to the item from which a thumbnail should be created.
611 | Only 32bpp bitmaps support adornments.
612 | While 24bpp bitmaps will be displayed they will not display adornments.
613 | Additional guidelines for developing thumbnails can be found at http://msdn.microsoft.com/en-us/library/cc144115(v=VS.85).aspx
614 |
615 |
616 | FileInfo to initialize the thumbnail
617 | Square side dimension in which the thumbnail should fit; the thumbnail will be scaled otherwise.
618 | Generated thumbnail
619 |
620 |
621 |
622 | This is the base class for all thumbnail providers and provides their basic functionality.
623 | To create a custom thumbnail provider a class must derive from this, use the ,
624 | and implement 1 or more of the following interfaces:
625 | , , .
626 |
627 |
628 |
629 |
630 | Sets the AlphaType of the generated thumbnail.
631 | Override this method in a derived class to change the thumbnails AlphaType, default is Unknown.
632 |
633 | ThumnbailAlphaType
634 |
635 |
636 |
637 | Called when the assembly is registered via RegAsm.
638 |
639 | Type to be registered.
640 |
641 |
642 |
643 | Called when the assembly is registered via RegAsm.
644 |
645 | Type to register.
646 |
647 |
648 |
649 | Finalizer for the thumbnail provider.
650 |
651 |
652 |
653 |
654 | Disposes the thumbnail provider.
655 |
656 |
657 |
658 |
659 | Disploses the thumbnail provider.
660 |
661 |
662 |
663 |
664 |
665 | This class attribute is applied to a Thumbnail Provider to specify registration parameters
666 | and aesthetic attributes.
667 |
668 |
669 |
670 |
671 | Creates a new instance of the attribute.
672 |
673 | Name of the provider
674 | Semi-colon-separated list of extensions supported by this provider.
675 |
676 |
677 |
678 | Gets the name of the provider
679 |
680 |
681 |
682 |
683 | Gets the semi-colon-separated list of extensions supported by the provider.
684 |
685 |
686 |
687 |
688 | Opts-out of running within the surrogate process DllHost.exe.
689 | This will reduce robustness and security.
690 | This value should be true if the provider does not implement .
691 |
692 |
693 |
694 |
695 | Below this size thumbnail images will not be generated - file icons will be used instead.
696 |
697 |
698 |
699 |
700 | A resource reference string pointing to the icon to be used as an overlay on the bottom right of the thumbnail.
701 | ex. ISVComponent.dll@,-155
702 | ex. C:\Windows\System32\SampleIcon.ico
703 | If an empty string is provided, no overlay will be used.
704 | If the property is set to null, the default icon for the associated icon will be used as an overlay.
705 |
706 |
707 |
708 |
709 | Specifies the for the thumbnail.
710 |
711 | Only 32bpp bitmaps support adornments.
712 | While 24bpp bitmaps will be displayed, their adornments will not.
713 | If an adornment is specified by the file-type's associated application,
714 | the applications adornment will override the value specified in this registration.
715 |
716 |
717 |
718 |
719 | Defines the minimum thumbnail size for which thumbnails will be generated.
720 |
721 |
722 |
723 |
724 | Default size of 20x20
725 |
726 |
727 |
728 |
729 | Size of 32x32
730 |
731 |
732 |
733 |
734 | Size of 16x16
735 |
736 |
737 |
738 |
739 | Size of 48x48
740 |
741 |
742 |
743 |
744 | Size of 16x16. An alternative to Square16.
745 |
746 |
747 |
748 |
749 | Adornment applied to thumbnails.
750 |
751 |
752 |
753 |
754 | This will use the associated application's default icon as the adornment.
755 |
756 |
757 |
758 |
759 | No adornment
760 |
761 |
762 |
763 |
764 | Drop shadow adornment
765 |
766 |
767 |
768 |
769 | Photo border adornment
770 |
771 |
772 |
773 |
774 | Video sprocket adornment
775 |
776 |
777 |
778 |
779 |
--------------------------------------------------------------------------------