├── .gitignore
├── DownloadProgressReporter
├── DownloadProgressBar.Designer.cs
├── DownloadProgressBar.cs
├── DownloadProgressBar.resx
├── DownloadProgressReporter.csproj
├── Icon.ico
└── Properties
│ └── AssemblyInfo.cs
├── Preview
└── 0.jpg
├── README.md
├── SteamDepotDownloader-GUI.sln
└── SteamDepotDownloader-GUI
├── AdvancedInput.Designer.cs
├── AdvancedInput.cs
├── AdvancedInput.resx
├── App.config
├── AppmanifestGenerator.Designer.cs
├── AppmanifestGenerator.cs
├── AppmanifestGenerator.resx
├── AppmanifestGenerator.zh.resx
├── AutoLogin.Designer.cs
├── AutoLogin.cs
├── AutoLogin.resx
├── AutoLogin.zh.resx
├── CDNClientPool.cs
├── Config.cs
├── ConfigStore.cs
├── ContentDownloader.cs
├── FileSelector.Designer.cs
├── FileSelector.cs
├── FileSelector.resx
├── FileSelector.zh.resx
├── Icon.ico
├── Log.Designer.cs
├── Log.cs
├── Log.resx
├── Logger.cs
├── Login.Designer.cs
├── Login.cs
├── Login.resx
├── Login.zh.resx
├── Program.cs
├── Properties
├── AssemblyInfo.cs
├── Resources.Designer.cs
├── Resources.resx
├── Resources.zh.resx
├── Settings.Designer.cs
└── Settings.settings
├── ProtoManifest.cs
├── Resources.zh.resx
├── Resources
├── Icon.png
├── Steam.png
└── SteamGray.png
├── Settings.Designer.cs
├── Settings.cs
├── Settings.resx
├── Settings.zh.resx
├── Steam3Session.cs
├── SteamDepotDownloader-GUI.csproj
├── SteamDepotDownloaderForm.Designer.cs
├── SteamDepotDownloaderForm.cs
├── SteamDepotDownloaderForm.resx
├── SteamDepotDownloaderForm.zh.resx
├── Util.cs
├── Waiting.Designer.cs
├── Waiting.cs
├── Waiting.resx
└── packages.config
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.suo
8 | *.user
9 | *.userosscache
10 | *.sln.docstates
11 |
12 | # User-specific files (MonoDevelop/Xamarin Studio)
13 | *.userprefs
14 |
15 | # Build results
16 | [Dd]ebug/
17 | [Dd]ebugPublic/
18 | [Rr]elease/
19 | [Rr]eleases/
20 | x64/
21 | x86/
22 | bld/
23 | [Bb]in/
24 | [Oo]bj/
25 | [Ll]og/
26 |
27 | # Visual Studio 2015/2017 cache/options directory
28 | .vs/
29 | # Uncomment if you have tasks that create the project's static files in wwwroot
30 | #wwwroot/
31 |
32 | # Visual Studio 2017 auto generated files
33 | Generated\ Files/
34 |
35 | # MSTest test Results
36 | [Tt]est[Rr]esult*/
37 | [Bb]uild[Ll]og.*
38 |
39 | # NUNIT
40 | *.VisualState.xml
41 | TestResult.xml
42 |
43 | # Build Results of an ATL Project
44 | [Dd]ebugPS/
45 | [Rr]eleasePS/
46 | dlldata.c
47 |
48 | # Benchmark Results
49 | BenchmarkDotNet.Artifacts/
50 |
51 | # .NET Core
52 | project.lock.json
53 | project.fragment.lock.json
54 | artifacts/
55 | **/Properties/launchSettings.json
56 |
57 | # StyleCop
58 | StyleCopReport.xml
59 |
60 | # Files built by Visual Studio
61 | *_i.c
62 | *_p.c
63 | *_i.h
64 | *.ilk
65 | *.meta
66 | *.obj
67 | *.iobj
68 | *.pch
69 | *.pdb
70 | *.ipdb
71 | *.pgc
72 | *.pgd
73 | *.rsp
74 | *.sbr
75 | *.tlb
76 | *.tli
77 | *.tlh
78 | *.tmp
79 | *.tmp_proj
80 | *.log
81 | *.vspscc
82 | *.vssscc
83 | .builds
84 | *.pidb
85 | *.svclog
86 | *.scc
87 |
88 | # Chutzpah Test files
89 | _Chutzpah*
90 |
91 | # Visual C++ cache files
92 | ipch/
93 | *.aps
94 | *.ncb
95 | *.opendb
96 | *.opensdf
97 | *.sdf
98 | *.cachefile
99 | *.VC.db
100 | *.VC.VC.opendb
101 |
102 | # Visual Studio profiler
103 | *.psess
104 | *.vsp
105 | *.vspx
106 | *.sap
107 |
108 | # Visual Studio Trace Files
109 | *.e2e
110 |
111 | # TFS 2012 Local Workspace
112 | $tf/
113 |
114 | # Guidance Automation Toolkit
115 | *.gpState
116 |
117 | # ReSharper is a .NET coding add-in
118 | _ReSharper*/
119 | *.[Rr]e[Ss]harper
120 | *.DotSettings.user
121 |
122 | # JustCode is a .NET coding add-in
123 | .JustCode
124 |
125 | # TeamCity is a build add-in
126 | _TeamCity*
127 |
128 | # DotCover is a Code Coverage Tool
129 | *.dotCover
130 |
131 | # AxoCover is a Code Coverage Tool
132 | .axoCover/*
133 | !.axoCover/settings.json
134 |
135 | # Visual Studio code coverage results
136 | *.coverage
137 | *.coveragexml
138 |
139 | # NCrunch
140 | _NCrunch_*
141 | .*crunch*.local.xml
142 | nCrunchTemp_*
143 |
144 | # MightyMoose
145 | *.mm.*
146 | AutoTest.Net/
147 |
148 | # Web workbench (sass)
149 | .sass-cache/
150 |
151 | # Installshield output folder
152 | [Ee]xpress/
153 |
154 | # DocProject is a documentation generator add-in
155 | DocProject/buildhelp/
156 | DocProject/Help/*.HxT
157 | DocProject/Help/*.HxC
158 | DocProject/Help/*.hhc
159 | DocProject/Help/*.hhk
160 | DocProject/Help/*.hhp
161 | DocProject/Help/Html2
162 | DocProject/Help/html
163 |
164 | # Click-Once directory
165 | publish/
166 |
167 | # Publish Web Output
168 | *.[Pp]ublish.xml
169 | *.azurePubxml
170 | # Note: Comment the next line if you want to checkin your web deploy settings,
171 | # but database connection strings (with potential passwords) will be unencrypted
172 | *.pubxml
173 | *.publishproj
174 |
175 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
176 | # checkin your Azure Web App publish settings, but sensitive information contained
177 | # in these scripts will be unencrypted
178 | PublishScripts/
179 |
180 | # NuGet Packages
181 | *.nupkg
182 | # The packages folder can be ignored because of Package Restore
183 | **/[Pp]ackages/*
184 | # except build/, which is used as an MSBuild target.
185 | !**/[Pp]ackages/build/
186 | # Uncomment if necessary however generally it will be regenerated when needed
187 | #!**/[Pp]ackages/repositories.config
188 | # NuGet v3's project.json files produces more ignorable files
189 | *.nuget.props
190 | *.nuget.targets
191 |
192 | # Microsoft Azure Build Output
193 | csx/
194 | *.build.csdef
195 |
196 | # Microsoft Azure Emulator
197 | ecf/
198 | rcf/
199 |
200 | # Windows Store app package directories and files
201 | AppPackages/
202 | BundleArtifacts/
203 | Package.StoreAssociation.xml
204 | _pkginfo.txt
205 | *.appx
206 |
207 | # Visual Studio cache files
208 | # files ending in .cache can be ignored
209 | *.[Cc]ache
210 | # but keep track of directories ending in .cache
211 | !*.[Cc]ache/
212 |
213 | # Others
214 | ClientBin/
215 | ~$*
216 | *~
217 | *.dbmdl
218 | *.dbproj.schemaview
219 | *.jfm
220 | *.pfx
221 | *.publishsettings
222 | orleans.codegen.cs
223 |
224 | # Including strong name files can present a security risk
225 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
226 | #*.snk
227 |
228 | # Since there are multiple workflows, uncomment next line to ignore bower_components
229 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
230 | #bower_components/
231 |
232 | # RIA/Silverlight projects
233 | Generated_Code/
234 |
235 | # Backup & report files from converting an old project file
236 | # to a newer Visual Studio version. Backup files are not needed,
237 | # because we have git ;-)
238 | _UpgradeReport_Files/
239 | Backup*/
240 | UpgradeLog*.XML
241 | UpgradeLog*.htm
242 | ServiceFabricBackup/
243 | *.rptproj.bak
244 |
245 | # SQL Server files
246 | *.mdf
247 | *.ldf
248 | *.ndf
249 |
250 | # Business Intelligence projects
251 | *.rdl.data
252 | *.bim.layout
253 | *.bim_*.settings
254 | *.rptproj.rsuser
255 |
256 | # Microsoft Fakes
257 | FakesAssemblies/
258 |
259 | # GhostDoc plugin setting file
260 | *.GhostDoc.xml
261 |
262 | # Node.js Tools for Visual Studio
263 | .ntvs_analysis.dat
264 | node_modules/
265 |
266 | # Visual Studio 6 build log
267 | *.plg
268 |
269 | # Visual Studio 6 workspace options file
270 | *.opt
271 |
272 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
273 | *.vbw
274 |
275 | # Visual Studio LightSwitch build output
276 | **/*.HTMLClient/GeneratedArtifacts
277 | **/*.DesktopClient/GeneratedArtifacts
278 | **/*.DesktopClient/ModelManifest.xml
279 | **/*.Server/GeneratedArtifacts
280 | **/*.Server/ModelManifest.xml
281 | _Pvt_Extensions
282 |
283 | # Paket dependency manager
284 | .paket/paket.exe
285 | paket-files/
286 |
287 | # FAKE - F# Make
288 | .fake/
289 |
290 | # JetBrains Rider
291 | .idea/
292 | *.sln.iml
293 |
294 | # CodeRush
295 | .cr/
296 |
297 | # Python Tools for Visual Studio (PTVS)
298 | __pycache__/
299 | *.pyc
300 |
301 | # Cake - Uncomment if you are using it
302 | # tools/**
303 | # !tools/packages.config
304 |
305 | # Tabs Studio
306 | *.tss
307 |
308 | # Telerik's JustMock configuration file
309 | *.jmconfig
310 |
311 | # BizTalk build output
312 | *.btp.cs
313 | *.btm.cs
314 | *.odx.cs
315 | *.xsd.cs
316 |
317 | # OpenCover UI analysis results
318 | OpenCover/
319 |
320 | # Azure Stream Analytics local run output
321 | ASALocalRun/
322 |
323 | # MSBuild Binary and Structured Log
324 | *.binlog
325 |
326 | # NVidia Nsight GPU debugger configuration file
327 | *.nvuser
328 |
329 | # MFractors (Xamarin productivity tool) working folder
330 | .mfractor/
331 |
--------------------------------------------------------------------------------
/DownloadProgressReporter/DownloadProgressBar.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace SteamDepotDownloader_GUI
2 | {
3 | partial class DownloadProgressBar
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 Component 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.components = new System.ComponentModel.Container();
32 | this.progressBar1 = new System.Windows.Forms.ProgressBar();
33 | this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
34 | this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
35 | this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
36 | this.labelDepotName = new System.Windows.Forms.Label();
37 | this.label1 = new System.Windows.Forms.Label();
38 | this.contextMenuStrip1.SuspendLayout();
39 | this.SuspendLayout();
40 | //
41 | // progressBar1
42 | //
43 | this.progressBar1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
44 | | System.Windows.Forms.AnchorStyles.Right)));
45 | this.progressBar1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
46 | this.progressBar1.ContextMenuStrip = this.contextMenuStrip1;
47 | this.progressBar1.Location = new System.Drawing.Point(0, 32);
48 | this.progressBar1.Name = "progressBar1";
49 | this.progressBar1.Size = new System.Drawing.Size(198, 10);
50 | this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
51 | this.progressBar1.TabIndex = 0;
52 | this.progressBar1.Value = 1;
53 | //
54 | // contextMenuStrip1
55 | //
56 | this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
57 | this.toolStripMenuItem1,
58 | this.toolStripMenuItem2});
59 | this.contextMenuStrip1.Name = "contextMenuStrip1";
60 | this.contextMenuStrip1.Size = new System.Drawing.Size(115, 48);
61 | //
62 | // toolStripMenuItem1
63 | //
64 | this.toolStripMenuItem1.Name = "toolStripMenuItem1";
65 | this.toolStripMenuItem1.Size = new System.Drawing.Size(114, 22);
66 | this.toolStripMenuItem1.Text = "Pause";
67 | this.toolStripMenuItem1.Click += new System.EventHandler(this.toolStripMenuItem1_Click);
68 | //
69 | // toolStripMenuItem2
70 | //
71 | this.toolStripMenuItem2.Name = "toolStripMenuItem2";
72 | this.toolStripMenuItem2.Size = new System.Drawing.Size(114, 22);
73 | this.toolStripMenuItem2.Text = "Cancel";
74 | this.toolStripMenuItem2.Click += new System.EventHandler(this.toolStripMenuItem2_Click);
75 | //
76 | // labelDepotName
77 | //
78 | this.labelDepotName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
79 | | System.Windows.Forms.AnchorStyles.Right)));
80 | this.labelDepotName.BackColor = System.Drawing.Color.Transparent;
81 | this.labelDepotName.ContextMenuStrip = this.contextMenuStrip1;
82 | this.labelDepotName.Location = new System.Drawing.Point(0, 0);
83 | this.labelDepotName.Name = "labelDepotName";
84 | this.labelDepotName.Size = new System.Drawing.Size(195, 12);
85 | this.labelDepotName.TabIndex = 1;
86 | this.labelDepotName.Text = "DepotID:DepotName";
87 | this.labelDepotName.TextAlign = System.Drawing.ContentAlignment.TopCenter;
88 | //
89 | // label1
90 | //
91 | this.label1.AutoSize = true;
92 | this.label1.Location = new System.Drawing.Point(3, 17);
93 | this.label1.Name = "label1";
94 | this.label1.Size = new System.Drawing.Size(0, 12);
95 | this.label1.TabIndex = 2;
96 | //
97 | // DownloadProgressBar
98 | //
99 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
100 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
101 | this.ContextMenuStrip = this.contextMenuStrip1;
102 | this.Controls.Add(this.label1);
103 | this.Controls.Add(this.progressBar1);
104 | this.Controls.Add(this.labelDepotName);
105 | this.Name = "DownloadProgressBar";
106 | this.Size = new System.Drawing.Size(198, 42);
107 | this.contextMenuStrip1.ResumeLayout(false);
108 | this.ResumeLayout(false);
109 | this.PerformLayout();
110 |
111 | }
112 |
113 | #endregion
114 |
115 | private System.Windows.Forms.ProgressBar progressBar1;
116 | private System.Windows.Forms.Label labelDepotName;
117 | private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
118 | private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
119 | private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2;
120 | private System.Windows.Forms.Label label1;
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/DownloadProgressReporter/DownloadProgressBar.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Drawing;
5 | using System.Data;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace SteamDepotDownloader_GUI
12 | {
13 | public partial class DownloadProgressBar : UserControl
14 | {
15 | public Action OnDownloadFinishedReport;
16 | public Action StopDownload;
17 | public Action RestartDownload;
18 | public Action CancelDownload; //AppID,DepotID,Branch
19 | uint AppId, DepotId;
20 | string Branch;
21 | public bool Downloading = true;
22 | public bool IsDownloadFinished { get; private set; }
23 | public delegate void OnDownloadProgressDelegate(float Percent, string Filename);
24 | OnDownloadProgressDelegate OdPDelegate;
25 | public delegate void OnDownloadFinishedDelegate(bool IsSuccessful, string ErrorMsg);
26 | OnDownloadFinishedDelegate OdFDelegate;
27 | public delegate void OnStateChangedDelegate(bool mIsDownloading);
28 | OnStateChangedDelegate OSCDelegate;
29 | public DownloadProgressBar()
30 | {
31 | InitializeComponent();
32 | OdPDelegate = new OnDownloadProgressDelegate(OnDownloadProgressView);
33 | OdFDelegate = new OnDownloadFinishedDelegate(OnDownloadFinishedView);
34 | OSCDelegate = new OnStateChangedDelegate(OnStateChangedView);
35 | }
36 |
37 | public void InitDownloading(string DownloadName,uint AppID,uint DepotID,string mBranch)
38 | {
39 | this.labelDepotName.Text = DownloadName;
40 | this.progressBar1.Maximum = 100;
41 | this.progressBar1.Minimum = 0;
42 | this.progressBar1.Value = 0;
43 | AppId = AppID;
44 | DepotId = DepotID;
45 | Branch = mBranch;
46 | if (Downloading)
47 | this.toolStripMenuItem1.Text = "Stop";
48 | else
49 | this.toolStripMenuItem1.Text = "Restart";
50 | }
51 |
52 | public void OnDownloadProgressView(float Percent, string Filename)
53 | {
54 | this.progressBar1.Value = (int)(Percent * 100);
55 | this.label1.Text = string.Format("{0}%:{1}", (Percent*100).ToString("#00.00"), Filename);
56 | }
57 | public void OnDownloadProgress(float Percent,string Filename)
58 | {
59 | this.Invoke(OdPDelegate, Percent,Filename);
60 | }
61 |
62 | public void OnDownloadFinished(bool IsSuccessful,string ErrorMsg)
63 | {
64 | this.Invoke(OdFDelegate, IsSuccessful, ErrorMsg);
65 | }
66 |
67 | private void toolStripMenuItem1_Click(object sender, EventArgs e)
68 | {
69 | if (Downloading)
70 | {
71 | toolStripMenuItem1.Text = "Restart";
72 | StopDownload.Invoke();
73 | }
74 | else
75 | {
76 | toolStripMenuItem1.Text = "Stop";
77 | RestartDownload.Invoke();
78 | this.label1.Text = "Stopping...";
79 | }
80 | toolStripMenuItem1.Enabled = false;
81 | }
82 |
83 | private void toolStripMenuItem2_Click(object sender, EventArgs e)
84 | {
85 | CancelDownload.Invoke(AppId, DepotId, Branch,this);
86 | }
87 |
88 | public void OnDownloadFinishedView(bool IsSuccessful,string ErrorMsg)
89 | {
90 | IsDownloadFinished = true;
91 | this.Invoke(OnDownloadFinishedReport, this.labelDepotName.Text, AppId, DepotId, Branch, IsSuccessful, ErrorMsg);
92 | }
93 |
94 | public void OnStateChanged(bool mIsDownloading)
95 | {
96 | this.Invoke(OSCDelegate, mIsDownloading);
97 | }
98 |
99 | public void OnStateChangedView(bool mIsDownloading)
100 | {
101 | Downloading = mIsDownloading;
102 | toolStripMenuItem1.Enabled = true;
103 | if (mIsDownloading)
104 | this.label1.Text = "Download Started.";
105 | else
106 | this.label1.Text = "Download Stopped.";
107 | }
108 | }
109 | }
110 |
--------------------------------------------------------------------------------
/DownloadProgressReporter/DownloadProgressBar.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 |
121 | 17, 17
122 |
123 |
--------------------------------------------------------------------------------
/DownloadProgressReporter/DownloadProgressReporter.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {CD9F9441-933C-4FAE-8895-2099D3F96A9D}
8 | Library
9 | DownloadProgressReporter
10 | DownloadProgressReporter
11 | v4.7.2
12 | 512
13 | true
14 |
15 |
16 | true
17 | full
18 | false
19 | bin\Debug\
20 | DEBUG;TRACE
21 | prompt
22 | 4
23 |
24 |
25 | pdbonly
26 | true
27 | bin\Release\
28 | TRACE
29 | prompt
30 | 4
31 |
32 |
33 | Icon.ico
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | UserControl
50 |
51 |
52 | DownloadProgressBar.cs
53 |
54 |
55 |
56 |
57 |
58 |
59 | DownloadProgressBar.cs
60 |
61 |
62 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/DownloadProgressReporter/Icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jack-Myth/SteamDepotDownloader-GUI/69f469862404ce4df2efda846375e38f892f4500/DownloadProgressReporter/Icon.ico
--------------------------------------------------------------------------------
/DownloadProgressReporter/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("DownloadProgressReporter")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("DownloadProgressReporter")]
13 | [assembly: AssemblyCopyright("Copyright © 2019")]
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("cd9f9441-933c-4fae-8895-2099d3f96a9d")]
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 |
--------------------------------------------------------------------------------
/Preview/0.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jack-Myth/SteamDepotDownloader-GUI/69f469862404ce4df2efda846375e38f892f4500/Preview/0.jpg
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # SteamDepotDownloader-GUI
2 | A useful tool based on [DepotDownloader](https://github.com/SteamRE/DepotDownloader) with GUI to download depot from steam.
3 | You can use it to download old version game or download OST, Artbook without the game.
4 |
5 | 
6 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.29209.62
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SteamDepotDownloader-GUI", "SteamDepotDownloader-GUI\SteamDepotDownloader-GUI.csproj", "{0CC5B832-B605-463B-BD2C-521EDC7D9264}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DownloadProgressReporter", "DownloadProgressReporter\DownloadProgressReporter.csproj", "{CD9F9441-933C-4FAE-8895-2099D3F96A9D}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Release|Any CPU = Release|Any CPU
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {0CC5B832-B605-463B-BD2C-521EDC7D9264}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17 | {0CC5B832-B605-463B-BD2C-521EDC7D9264}.Debug|Any CPU.Build.0 = Debug|Any CPU
18 | {0CC5B832-B605-463B-BD2C-521EDC7D9264}.Release|Any CPU.ActiveCfg = Release|Any CPU
19 | {0CC5B832-B605-463B-BD2C-521EDC7D9264}.Release|Any CPU.Build.0 = Release|Any CPU
20 | {CD9F9441-933C-4FAE-8895-2099D3F96A9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21 | {CD9F9441-933C-4FAE-8895-2099D3F96A9D}.Debug|Any CPU.Build.0 = Debug|Any CPU
22 | {CD9F9441-933C-4FAE-8895-2099D3F96A9D}.Release|Any CPU.ActiveCfg = Release|Any CPU
23 | {CD9F9441-933C-4FAE-8895-2099D3F96A9D}.Release|Any CPU.Build.0 = Release|Any CPU
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {6564B4CE-FE0D-4A7F-B35F-071AF6569035}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/AdvancedInput.cs:
--------------------------------------------------------------------------------
1 | using DepotDownloader;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.ComponentModel;
5 | using System.Data;
6 | using System.Drawing;
7 | using System.IO;
8 | using System.Linq;
9 | using System.Text;
10 | using System.Text.RegularExpressions;
11 | using System.Threading.Tasks;
12 | using System.Windows.Forms;
13 |
14 | namespace SteamDepotDownloader_GUI
15 | {
16 | public partial class AdvancedInput : Form
17 | {
18 | DepotDownloader.DownloadConfig Dc=new DownloadConfig();
19 | public AdvancedInput()
20 | {
21 | InitializeComponent();
22 | Dc.InstallDirectory = "./Download";
23 | this.comboBoxOS.SelectedIndex = 0;
24 | }
25 |
26 | private void button1_Click(object sender, EventArgs e)
27 | {
28 | if (this.openFileDialog1.ShowDialog() != DialogResult.OK)
29 | return;
30 | string fileListData = File.ReadAllText(this.openFileDialog1.FileName);
31 | var files = fileListData.Split(new char[] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries);
32 |
33 | Dc.UsingFileList = true;
34 | Dc.FilesToDownload = new List();
35 | Dc.FilesToDownloadRegex = new List();
36 |
37 | foreach (var fileEntry in files)
38 | {
39 | try
40 | {
41 | Regex rgx = new Regex(fileEntry, RegexOptions.Compiled | RegexOptions.IgnoreCase);
42 | Dc.FilesToDownloadRegex.Add(rgx);
43 | }
44 | catch
45 | {
46 | Dc.FilesToDownload.Add(fileEntry);
47 | continue;
48 | }
49 | }
50 |
51 | this.button1.Text = Properties.Resources.FileListLoaded;
52 | }
53 |
54 | private void button1_MouseClick(object sender, MouseEventArgs e)
55 | {
56 | if(e.Button==MouseButtons.Right)
57 | {
58 | if(MessageBox.Show(Properties.Resources.ClearFileListQuestion, "Advanced Input", MessageBoxButtons.YesNo, MessageBoxIcon.Question)==DialogResult.Yes)
59 | {
60 | Dc.UsingFileList = false;
61 | Dc.FilesToDownload = null;
62 | Dc.FilesToDownloadRegex = null;
63 | }
64 | }
65 | }
66 |
67 | private void buttonInstallDir_Click(object sender, EventArgs e)
68 | {
69 | if (this.folderBrowserDialog1.ShowDialog() != DialogResult.OK)
70 | return;
71 | Dc.InstallDirectory = this.folderBrowserDialog1.SelectedPath;
72 | this.toolTip1.SetToolTip(this.buttonInstallDir, Dc.InstallDirectory);
73 | }
74 |
75 | private uint LoadParamter(string Str,uint Default)
76 | {
77 | if (Str != "")
78 | return uint.Parse(Str);
79 | else
80 | return Default;
81 | }
82 |
83 | private int LoadParamter(string Str, int Default)
84 | {
85 | if (Str != "")
86 | return int.Parse(Str);
87 | else
88 | return Default;
89 | }
90 |
91 | private string LoadParamter(string Str, string Default)
92 | {
93 | return Str == "" ? Default : Str;
94 | }
95 |
96 | private void buttonDownload_Click(object sender, EventArgs e)
97 | {
98 | try
99 | {
100 | Dc.AppID = LoadParamter(this.textBoxAppID.Text,ContentDownloader.INVALID_APP_ID);
101 | Dc.DepotID = LoadParamter(this.textBoxDepotID.Text, ContentDownloader.INVALID_DEPOT_ID);
102 | ulong tmpManifestID;
103 | if (ulong.TryParse(this.textBoxManifest.Text, out tmpManifestID))
104 | Dc.ManifestId = tmpManifestID;
105 | else
106 | Dc.ManifestId = ContentDownloader.INVALID_MANIFEST_ID;
107 | if (Dc.DepotID != ContentDownloader.INVALID_DEPOT_ID)
108 | Dc.ForceDepot = true;
109 | else
110 | Dc.ForceDepot = false;
111 | Program.UsrConfig.CellID = LoadParamter(this.textBoxCellID.Text, Program.UsrConfig.CellID);
112 | Dc.OS = this.comboBoxOS.Text.ToLowerInvariant();
113 | Dc.Branch = LoadParamter(this.textBoxBranch.Text, "public");
114 | Dc.BetaPassword = LoadParamter(this.textBoxBetaPassword.Text, "");
115 | Dc.MaxDownloads = LoadParamter(this.textBoxMaxDownloads.Text, Dc.MaxDownloads);
116 | Dc.MaxServers = LoadParamter(this.textBoxMaxServers.Text, Dc.MaxServers);
117 | Dc.DownloadAllPlatforms = this.checkBoxAllPlatforms.Checked;
118 | Dc.DownloadManifestOnly = this.checkBoxManifestOnly.Checked;
119 | Program.MainWindowForm.CreateDownloadTask(this.textBoxDownloadName.Text,Dc,true,false);
120 | Close();
121 | }
122 | catch
123 | {
124 | MessageBox.Show(Properties.Resources.ParamterError, "Advanced Input", MessageBoxButtons.OK, MessageBoxIcon.Error);
125 | }
126 |
127 | }
128 | }
129 | }
130 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/AdvancedInput.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 |
121 | 345, 17
122 |
123 |
124 | 17, 17
125 |
126 |
127 | 165, 17
128 |
129 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/AppmanifestGenerator.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace SteamDepotDownloader_GUI
2 | {
3 | partial class AppmanifestGenerator
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 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AppmanifestGenerator));
32 | this.panel1 = new System.Windows.Forms.Panel();
33 | this.textBoxInstallDir = new System.Windows.Forms.TextBox();
34 | this.label2 = new System.Windows.Forms.Label();
35 | this.textBoxName = new System.Windows.Forms.TextBox();
36 | this.label1 = new System.Windows.Forms.Label();
37 | this.labelAppID = new System.Windows.Forms.Label();
38 | this.groupBox1 = new System.Windows.Forms.GroupBox();
39 | this.groupBox3 = new System.Windows.Forms.GroupBox();
40 | this.checkedListBoxDepots = new System.Windows.Forms.CheckedListBox();
41 | this.buttonGen = new System.Windows.Forms.Button();
42 | this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
43 | this.panel1.SuspendLayout();
44 | this.groupBox1.SuspendLayout();
45 | this.groupBox3.SuspendLayout();
46 | this.SuspendLayout();
47 | //
48 | // panel1
49 | //
50 | resources.ApplyResources(this.panel1, "panel1");
51 | this.panel1.Controls.Add(this.textBoxInstallDir);
52 | this.panel1.Controls.Add(this.label2);
53 | this.panel1.Controls.Add(this.textBoxName);
54 | this.panel1.Controls.Add(this.label1);
55 | this.panel1.Controls.Add(this.labelAppID);
56 | this.panel1.Name = "panel1";
57 | //
58 | // textBoxInstallDir
59 | //
60 | resources.ApplyResources(this.textBoxInstallDir, "textBoxInstallDir");
61 | this.textBoxInstallDir.Name = "textBoxInstallDir";
62 | //
63 | // label2
64 | //
65 | resources.ApplyResources(this.label2, "label2");
66 | this.label2.Name = "label2";
67 | //
68 | // textBoxName
69 | //
70 | resources.ApplyResources(this.textBoxName, "textBoxName");
71 | this.textBoxName.Name = "textBoxName";
72 | this.textBoxName.ReadOnly = true;
73 | //
74 | // label1
75 | //
76 | resources.ApplyResources(this.label1, "label1");
77 | this.label1.Name = "label1";
78 | //
79 | // labelAppID
80 | //
81 | resources.ApplyResources(this.labelAppID, "labelAppID");
82 | this.labelAppID.Name = "labelAppID";
83 | //
84 | // groupBox1
85 | //
86 | this.groupBox1.Controls.Add(this.panel1);
87 | resources.ApplyResources(this.groupBox1, "groupBox1");
88 | this.groupBox1.Name = "groupBox1";
89 | this.groupBox1.TabStop = false;
90 | //
91 | // groupBox3
92 | //
93 | this.groupBox3.Controls.Add(this.checkedListBoxDepots);
94 | resources.ApplyResources(this.groupBox3, "groupBox3");
95 | this.groupBox3.Name = "groupBox3";
96 | this.groupBox3.TabStop = false;
97 | //
98 | // checkedListBoxDepots
99 | //
100 | resources.ApplyResources(this.checkedListBoxDepots, "checkedListBoxDepots");
101 | this.checkedListBoxDepots.FormattingEnabled = true;
102 | this.checkedListBoxDepots.Name = "checkedListBoxDepots";
103 | //
104 | // buttonGen
105 | //
106 | resources.ApplyResources(this.buttonGen, "buttonGen");
107 | this.buttonGen.Name = "buttonGen";
108 | this.buttonGen.UseVisualStyleBackColor = true;
109 | this.buttonGen.Click += new System.EventHandler(this.ButtonGen_Click);
110 | //
111 | // AppmanifestGenerator
112 | //
113 | resources.ApplyResources(this, "$this");
114 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
115 | this.Controls.Add(this.buttonGen);
116 | this.Controls.Add(this.groupBox3);
117 | this.Controls.Add(this.groupBox1);
118 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
119 | this.MaximizeBox = false;
120 | this.MinimizeBox = false;
121 | this.Name = "AppmanifestGenerator";
122 | this.panel1.ResumeLayout(false);
123 | this.panel1.PerformLayout();
124 | this.groupBox1.ResumeLayout(false);
125 | this.groupBox3.ResumeLayout(false);
126 | this.ResumeLayout(false);
127 |
128 | }
129 |
130 | #endregion
131 |
132 | private System.Windows.Forms.Panel panel1;
133 | private System.Windows.Forms.Label labelAppID;
134 | private System.Windows.Forms.GroupBox groupBox1;
135 | private System.Windows.Forms.Label label1;
136 | private System.Windows.Forms.TextBox textBoxInstallDir;
137 | private System.Windows.Forms.Label label2;
138 | private System.Windows.Forms.TextBox textBoxName;
139 | private System.Windows.Forms.GroupBox groupBox3;
140 | private System.Windows.Forms.CheckedListBox checkedListBoxDepots;
141 | private System.Windows.Forms.Button buttonGen;
142 | private System.Windows.Forms.SaveFileDialog saveFileDialog1;
143 | }
144 | }
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/AppmanifestGenerator.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 | using System.Windows.Forms.VisualStyles;
12 | using DepotDownloader;
13 |
14 | namespace SteamDepotDownloader_GUI
15 | {
16 | public partial class AppmanifestGenerator : Form
17 | {
18 | private uint mAppID;
19 | private List DepotList;
20 | public AppmanifestGenerator(uint AppID)
21 | {
22 | InitializeComponent();
23 | mAppID = AppID;
24 | this.labelAppID.Text = "AppID:" + AppID.ToString();
25 | this.textBoxName.Text = Program.MainWindowForm.GetSelectedAppName();
26 | this.textBoxInstallDir.Text = Program.MainWindowForm.GetSelectedAppName();
27 | DepotList = Program.MainWindowForm.GetDepotsByAppID(AppID);
28 | for (int i = 0; i < DepotList.Count; i++)
29 | {
30 | string DepotName = Program.MainWindowForm.GetDepotValue(AppID,DepotList[i])["name"].AsString();
31 | this.checkedListBoxDepots.Items.Add(DepotName);
32 | }
33 | }
34 | public static long ConvertDateTimeInt(System.DateTime time)
35 | {
36 | System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1));
37 | return (long)(time - startTime).TotalSeconds;
38 | }
39 |
40 | private void ButtonGen_Click(object sender, EventArgs e)
41 | {
42 | string PendingExportStr="";
43 | PendingExportStr = "\"AppState\"\n{\n";
44 | PendingExportStr += "\t\"appid\"\t\t\"" + this.mAppID.ToString() + "\"\n";
45 | PendingExportStr += "\t\"Universe\"\t\t\"1\"\n";
46 | PendingExportStr += "\t\"StateFlags\"\t\t\"4\"\n";
47 | PendingExportStr += "\t\"installdir\"\t\t\"" + this.textBoxInstallDir.Text + "\"\n";
48 | PendingExportStr += "\t\"LastUpdated\"\t\t\"" + ConvertDateTimeInt(DateTime.Now).ToString()+ "\"\n";
49 | PendingExportStr += "\t\"UpdateResult\"\t\t\"0\"\n";
50 | PendingExportStr += "\t\"SizeOnDisk\"\t\t\"1\"\n";
51 | PendingExportStr += "\t\"buildid\"\t\t\"1\"\n";
52 | PendingExportStr += "\t\"BytesToDownload\"\t\t\"1\"\n";
53 | PendingExportStr += "\t\"BytesDownloaded\"\t\t\"1\"\n";
54 | PendingExportStr += "\t\"AutoUpdateBehavior\"\t\t\"1\"\n";
55 | PendingExportStr += "\t\"AllowOtherDownloadsWhileRunning\"\t\t\"0\"\n";
56 | PendingExportStr += "\t\"ScheduledAutoUpdate\"\t\t\"0\"\n";
57 | PendingExportStr += "\t\"InstalledDepots\"\n\t{\n";
58 | for (int i = 0; i < this.checkedListBoxDepots.Items.Count; i++)
59 | {
60 | if (this.checkedListBoxDepots.GetItemChecked(i))
61 | {
62 | string Password = "";
63 | PendingExportStr += "\t\t\"" + DepotList[i].ToString() + "\"\n\t\t{\n";
64 | PendingExportStr+="\t\t\t\"manifest\"\t\t\""+
65 | ContentDownloader.GetSteam3DepotManifestStatic(DepotList[i], mAppID, "public", ref Password)+"\"\n\t\t}\n";
66 | }
67 | }
68 | PendingExportStr += "\t}\n\t\"MountedDepots\"\n\t{\n";
69 | for (int i = 0; i < this.checkedListBoxDepots.Items.Count; i++)
70 | {
71 | if (this.checkedListBoxDepots.GetItemChecked(i))
72 | {
73 | string Password = "";
74 | PendingExportStr += "\t\t\"" + DepotList[i].ToString() + "\"";
75 | PendingExportStr += "\t\t\"" +
76 | ContentDownloader.GetSteam3DepotManifestStatic(DepotList[i], mAppID, "public", ref Password) + "\"\n";
77 | }
78 | }
79 |
80 | PendingExportStr += "\t}\n}";
81 | this.saveFileDialog1.FileName = "appmanifest_" + mAppID.ToString() + ".acf";
82 | if (this.saveFileDialog1.ShowDialog()==DialogResult.OK)
83 | System.IO.File.WriteAllText(this.saveFileDialog1.FileName, PendingExportStr);
84 | }
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/AppmanifestGenerator.zh.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 |
121 |
122 | 77, 12
123 |
124 |
125 | 安装文件夹:
126 |
127 |
128 | 41, 12
129 |
130 |
131 | 名称:
132 |
133 |
134 | 基本信息
135 |
136 |
137 | 已安装的Depot
138 |
139 |
140 | 生成
141 |
142 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/AutoLogin.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace SteamDepotDownloader_GUI
2 | {
3 | partial class AutoLogin
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 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AutoLogin));
32 | this.comboBoxAccount = new System.Windows.Forms.ComboBox();
33 | this.buttonLogin = new System.Windows.Forms.Button();
34 | this.SuspendLayout();
35 | //
36 | // comboBoxAccount
37 | //
38 | resources.ApplyResources(this.comboBoxAccount, "comboBoxAccount");
39 | this.comboBoxAccount.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
40 | this.comboBoxAccount.FormattingEnabled = true;
41 | this.comboBoxAccount.Name = "comboBoxAccount";
42 | //
43 | // buttonLogin
44 | //
45 | resources.ApplyResources(this.buttonLogin, "buttonLogin");
46 | this.buttonLogin.Name = "buttonLogin";
47 | this.buttonLogin.UseVisualStyleBackColor = true;
48 | this.buttonLogin.Click += new System.EventHandler(this.buttonLogin_Click);
49 | //
50 | // AutoLogin
51 | //
52 | resources.ApplyResources(this, "$this");
53 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
54 | this.Controls.Add(this.buttonLogin);
55 | this.Controls.Add(this.comboBoxAccount);
56 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
57 | this.Name = "AutoLogin";
58 | this.ResumeLayout(false);
59 |
60 | }
61 |
62 | #endregion
63 |
64 | private System.Windows.Forms.ComboBox comboBoxAccount;
65 | private System.Windows.Forms.Button buttonLogin;
66 | }
67 | }
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/AutoLogin.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace SteamDepotDownloader_GUI
12 | {
13 | public partial class AutoLogin : Form
14 | {
15 | public AutoLogin(List mAccountList)
16 | {
17 | InitializeComponent();
18 | foreach(string Account in mAccountList)
19 | {
20 | this.comboBoxAccount.Items.Add(Account);
21 | }
22 | this.comboBoxAccount.SelectedIndex = 0;
23 | }
24 |
25 | private void buttonLogin_Click(object sender, EventArgs e)
26 | {
27 | Program.UsrConfig = new DepotDownloader.UserConfig();
28 | Program.UsrConfig.Username = this.comboBoxAccount.Text;
29 | Program.UsrConfig.RememberPassword = true;
30 | if(DepotDownloader.ContentDownloader.InitializeSteam3(Program.UsrConfig)&&DepotDownloader.ContentDownloader.Steam3.IsConnected)
31 | SteamDepotDownloader_GUI.Program.MainWindowForm.RefreshAppList();
32 | else
33 | MessageBox.Show(Properties.Resources.AutoLoginFailed, "SteamDepotDownloader-GUI", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
34 | Close();
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/AutoLogin.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 |
121 | 0
122 |
123 |
124 |
125 | 212, 20
126 |
127 |
128 |
129 | 0
130 |
131 |
132 | 236, 75
133 |
134 |
135 | System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
136 |
137 |
138 | $this
139 |
140 |
141 | System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
142 |
143 |
144 | 12, 38
145 |
146 |
147 | 1
148 |
149 |
150 | AutoLogin
151 |
152 |
153 | 6, 12
154 |
155 |
156 | 12, 12
157 |
158 |
159 | $this
160 |
161 |
162 | Login
163 |
164 |
165 | buttonLogin
166 |
167 |
168 | 1
169 |
170 |
171 | AutoLogin
172 |
173 |
174 | comboBoxAccount
175 |
176 |
177 | 212, 25
178 |
179 |
180 | System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
181 |
182 |
183 | True
184 |
185 |
186 | zh
187 |
188 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/AutoLogin.zh.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 |
121 | 登陆
122 |
123 |
124 | 自动登录
125 |
126 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/Config.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text.RegularExpressions;
4 |
5 | namespace DepotDownloader
6 | {
7 | public class DownloadConfig
8 | {
9 | public bool DownloadAllPlatforms { get; set; }
10 | public bool DownloadManifestOnly { get; set; }
11 | public string InstallDirectory { get; set; }
12 |
13 | public bool UsingFileList { get; set; } = false;
14 | public List FilesToDownload { get; set; } = new List();
15 | public List FilesToDownloadRegex { get; set; } = new List();
16 |
17 |
18 | public string BetaPassword { get; set; }
19 |
20 | public ulong ManifestId { get; set; } = ContentDownloader.INVALID_MANIFEST_ID;
21 |
22 | public bool VerifyAll { get; set; }
23 |
24 | public int MaxServers { get; set; } = 8;
25 | public int MaxDownloads { get; set; } = 4;
26 |
27 | public uint AppID { get; set; } = ContentDownloader.INVALID_APP_ID;
28 | public string Branch { get; set; } = "public";
29 | public string OS { get; set; } = null;
30 |
31 | public bool ForceDepot { get; set; } = false;
32 | public uint DepotID { get; set; } = ContentDownloader.INVALID_DEPOT_ID;
33 |
34 | ///
35 | /// Call when downloading progress changed
36 | ///
37 | public event Action OnReportProgressEvent;
38 |
39 | public event Action OnStateChangedEvent;
40 |
41 | public event Action OnDownloadFinishedEvent;
42 |
43 | ///
44 | /// 1 - type (log, warning, error, exception)
45 | /// 2 - message (exception - Exception object, in other string)
46 | ///
47 | public event Action OnMessageEvent;
48 |
49 | ///
50 | /// 1 - install directory
51 | /// 2 - full path
52 | ///
53 | public Func SavePathProcessor;
54 |
55 | internal void FireReportProgressEvent(float Percent,string CurrentFileName)
56 | {
57 | OnReportProgressEvent?.Invoke(Percent,CurrentFileName);
58 | }
59 |
60 | internal void FireOnStateChangedEvent(bool IsDownloading)
61 | {
62 | OnStateChangedEvent?.Invoke(IsDownloading);
63 | }
64 |
65 | internal void FireOnDownloadFinishedEvent(bool IsSuccessful, string ErrorMsg)
66 | {
67 | OnDownloadFinishedEvent?.Invoke(IsSuccessful, ErrorMsg);
68 | }
69 |
70 | internal void FireOnMessageEvent(string type, object message)
71 | {
72 | OnMessageEvent?.Invoke(type, message);
73 | }
74 | }
75 |
76 | public class UserConfig
77 | {
78 | public int CellID { get; set; }
79 | public string Username { get; set; } = null;
80 | public string Password { get; set; } = null;
81 | public string SuppliedPassword { get; set; }
82 | public string TwoFactorAuthCode { get; set; } = null;
83 | public bool RememberPassword { get; set; } = false;
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/ConfigStore.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using ProtoBuf;
4 | using System.IO;
5 | using System.IO.Compression;
6 |
7 | namespace DepotDownloader
8 | {
9 | [ProtoContract]
10 | struct DownloadRecord
11 | {
12 | [ProtoMember(1)]
13 | public string DownloadName;
14 | [ProtoMember(2)]
15 | public uint AppID;
16 | [ProtoMember(3)]
17 | public uint DepotID;
18 | [ProtoMember(4)]
19 | public string BranchName;
20 | [ProtoMember(5)]
21 | public string InstallDir;
22 | [ProtoMember(6, IsRequired = false)]
23 | public string BetaPassword;
24 | [ProtoMember(7, IsRequired = false)]
25 | public List FileRegex;
26 | [ProtoMember(8, IsRequired = false)]
27 | public List FileToDownload;
28 | [ProtoMember(9, IsRequired = false)]
29 | public bool NoForceDepot;
30 | [ProtoMember(10, IsRequired = false)]
31 | public int MaxServer;
32 | [ProtoMember(11, IsRequired = false)]
33 | public int MaxDownload;
34 | [ProtoMember(12, IsRequired = false)]
35 | public bool AllPlatforms;
36 | [ProtoMember(13, IsRequired = false)]
37 | public ulong ManifestID;
38 | [ProtoMember(14, IsRequired = false)]
39 | public bool AdvancedConfig;
40 | }
41 |
42 | [ProtoContract]
43 | internal class ConfigStore
44 | {
45 | [ProtoMember(1)]
46 | public List DownloadRecord { get; set; }
47 |
48 | [ProtoMember(3, IsRequired=false)]
49 | public Dictionary SentryData { get; private set; }
50 |
51 | [ProtoMember(4, IsRequired = false)]
52 | public System.Collections.Concurrent.ConcurrentDictionary ContentServerPenalty { get; private set; }
53 |
54 | [ProtoMember(5, IsRequired = false)]
55 | public Dictionary LoginKeys { get; private set; }
56 |
57 | [ProtoMember(6)]
58 | public Dictionary LastManifests { get; set; }
59 |
60 | [ProtoMember(7, IsRequired = false)]
61 | public int MaxServer = 8;
62 | [ProtoMember(8, IsRequired = false)]
63 | public int MaxDownload = 4;
64 |
65 | [ProtoMember(9, IsRequired = false)]
66 | public bool MinimizeToTray = false;
67 |
68 | [ProtoMember(10, IsRequired = false)]
69 | public Dictionary StoredCookies { get; set; }
70 |
71 |
72 | string FileName = null;
73 |
74 | ConfigStore()
75 | {
76 | DownloadRecord = new List();
77 | SentryData = new Dictionary();
78 | ContentServerPenalty = new System.Collections.Concurrent.ConcurrentDictionary();
79 | LoginKeys = new Dictionary();
80 | LastManifests = new Dictionary();
81 | StoredCookies = new Dictionary();
82 | }
83 |
84 | static bool Loaded
85 | {
86 | get { return TheConfig != null; }
87 | }
88 |
89 | public static ConfigStore TheConfig;
90 |
91 | public static void LoadFromFile(string filename)
92 | {
93 | if (Loaded)
94 | throw new Exception("Config already loaded");
95 |
96 | if (File.Exists(filename))
97 | {
98 | using (FileStream fs = File.Open(filename, FileMode.Open))
99 | using (DeflateStream ds = new DeflateStream(fs, CompressionMode.Decompress))
100 | TheConfig = ProtoBuf.Serializer.Deserialize(ds);
101 | }
102 | else
103 | {
104 | TheConfig = new ConfigStore();
105 | }
106 |
107 | TheConfig.FileName = filename;
108 | }
109 |
110 | public static void Save()
111 | {
112 | if (!Loaded)
113 | throw new Exception("Saved config before loading");
114 |
115 | using (FileStream fs = File.Open(TheConfig.FileName, FileMode.Create))
116 | using (DeflateStream ds = new DeflateStream(fs, CompressionMode.Compress))
117 | ProtoBuf.Serializer.Serialize(ds, TheConfig);
118 | }
119 | }
120 | }
121 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/FileSelector.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace SteamDepotDownloader_GUI
2 | {
3 | partial class FileSelector
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 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FileSelector));
32 | this.label1 = new System.Windows.Forms.Label();
33 | this.checkSelectAll = new System.Windows.Forms.CheckBox();
34 | this.labelSize = new System.Windows.Forms.Label();
35 | this.buttonOK = new System.Windows.Forms.Button();
36 | this.buttonCancel = new System.Windows.Forms.Button();
37 | this.treeViewFileList = new System.Windows.Forms.TreeView();
38 | this.labelManifestID = new System.Windows.Forms.Label();
39 | this.SuspendLayout();
40 | //
41 | // label1
42 | //
43 | resources.ApplyResources(this.label1, "label1");
44 | this.label1.Name = "label1";
45 | //
46 | // checkSelectAll
47 | //
48 | resources.ApplyResources(this.checkSelectAll, "checkSelectAll");
49 | this.checkSelectAll.Name = "checkSelectAll";
50 | this.checkSelectAll.UseVisualStyleBackColor = true;
51 | this.checkSelectAll.CheckedChanged += new System.EventHandler(this.checkSelectAll_CheckedChanged);
52 | //
53 | // labelSize
54 | //
55 | resources.ApplyResources(this.labelSize, "labelSize");
56 | this.labelSize.Name = "labelSize";
57 | //
58 | // buttonOK
59 | //
60 | resources.ApplyResources(this.buttonOK, "buttonOK");
61 | this.buttonOK.Name = "buttonOK";
62 | this.buttonOK.UseVisualStyleBackColor = true;
63 | this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
64 | //
65 | // buttonCancel
66 | //
67 | resources.ApplyResources(this.buttonCancel, "buttonCancel");
68 | this.buttonCancel.Name = "buttonCancel";
69 | this.buttonCancel.UseVisualStyleBackColor = true;
70 | this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
71 | //
72 | // treeViewFileList
73 | //
74 | resources.ApplyResources(this.treeViewFileList, "treeViewFileList");
75 | this.treeViewFileList.CheckBoxes = true;
76 | this.treeViewFileList.Name = "treeViewFileList";
77 | this.treeViewFileList.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.treeViewFileList_AfterCheck);
78 | //
79 | // labelManifestID
80 | //
81 | resources.ApplyResources(this.labelManifestID, "labelManifestID");
82 | this.labelManifestID.Name = "labelManifestID";
83 | //
84 | // FileSelector
85 | //
86 | resources.ApplyResources(this, "$this");
87 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
88 | this.Controls.Add(this.labelManifestID);
89 | this.Controls.Add(this.treeViewFileList);
90 | this.Controls.Add(this.buttonCancel);
91 | this.Controls.Add(this.buttonOK);
92 | this.Controls.Add(this.labelSize);
93 | this.Controls.Add(this.checkSelectAll);
94 | this.Controls.Add(this.label1);
95 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
96 | this.Name = "FileSelector";
97 | this.Load += new System.EventHandler(this.FileSelector_LoadAsync);
98 | this.ResumeLayout(false);
99 | this.PerformLayout();
100 |
101 | }
102 |
103 | #endregion
104 | private System.Windows.Forms.Label label1;
105 | private System.Windows.Forms.CheckBox checkSelectAll;
106 | private System.Windows.Forms.Label labelSize;
107 | private System.Windows.Forms.Button buttonOK;
108 | private System.Windows.Forms.Button buttonCancel;
109 | private System.Windows.Forms.TreeView treeViewFileList;
110 | private System.Windows.Forms.Label labelManifestID;
111 | }
112 | }
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/FileSelector.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 | using DepotDownloader;
11 |
12 | namespace SteamDepotDownloader_GUI
13 | {
14 | public partial class FileSelector : Form
15 | {
16 | public const string CachedDir = "./CachedDir";
17 | ulong ManifestID = ContentDownloader.INVALID_MANIFEST_ID;
18 | uint AppID;
19 | uint DepotID;
20 | string Branch;
21 | DepotDownloader.ProtoManifest depotManifest;
22 | ulong DepotMaxSize=0;
23 | float SizeDivisor = 1024f;
24 | string UnitStr = "KB";
25 |
26 | public FileSelector(uint appId,uint depotId,string branch,ulong m_ManifestID)
27 | {
28 | InitializeComponent();
29 | this.ControlBox = false;
30 | AppID = appId;
31 | DepotID = depotId;
32 | Branch = branch;
33 | ManifestID = m_ManifestID;
34 | }
35 |
36 | private async void FileSelector_LoadAsync(object sender, EventArgs e)
37 | {
38 | string Title = this.Text;
39 | string Password = "";
40 | if(ManifestID==ContentDownloader.INVALID_MANIFEST_ID)
41 | ManifestID = ContentDownloader.GetSteam3DepotManifestStatic(DepotID, AppID, Branch,ref Password);
42 | if (ManifestID == ContentDownloader.INVALID_MANIFEST_ID)
43 | {
44 | MessageBox.Show(Properties.Resources.NoManifestID, "FileSelector", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
45 | return;
46 | }
47 | this.labelManifestID.Text = "ManifestID:" + ManifestID.ToString();
48 | System.IO.Directory.CreateDirectory(Program.CacheDir);
49 | var localProtoManifest = DepotDownloader.ProtoManifest.LoadFromFile(string.Format("{0}/{1}.bin",Program.CacheDir, ManifestID));
50 | if (localProtoManifest!=null)
51 | {
52 | depotManifest = localProtoManifest;
53 | }
54 | else
55 | {
56 | this.Text = "Downloading File List...";
57 | this.Refresh();
58 | ContentDownloader.Steam3.RequestDepotKey(DepotID,AppID);
59 | if(!ContentDownloader.Steam3.DepotKeys.ContainsKey(DepotID))
60 | {
61 | MessageBox.Show(Properties.Resources.NoDepotKey, "FileSelector",MessageBoxButtons.OK,MessageBoxIcon.Exclamation);
62 | //return;
63 | //User may still need to use FileRegex
64 | Close();
65 | return;
66 | }
67 | byte[] depotKey = ContentDownloader.Steam3.DepotKeys[DepotID];
68 | //ContentDownloader.Steam3.RequestAppTicket(AppID);
69 | ContentDownloader.Steam3.RequestAppTicket(DepotID);
70 | var client = await DepotDownloader.ContentDownloader.GlobalCDNPool.GetConnectionForDepotAsync(AppID, DepotID, depotKey, System.Threading.CancellationToken.None).ConfigureAwait(true);
71 | var SteamKitdepotManifest = await client.DownloadManifestAsync(DepotID, ManifestID).ConfigureAwait(true);
72 | if (SteamKitdepotManifest != null)
73 | {
74 | localProtoManifest = new ProtoManifest(SteamKitdepotManifest, ManifestID);
75 | localProtoManifest.SaveToFile(string.Format("{0}/{1}.bin", Program.CacheDir, ManifestID));
76 | depotManifest = localProtoManifest;
77 | }
78 | }
79 | if(depotManifest!=null)
80 | {
81 | foreach (var file in localProtoManifest.Files)
82 | {
83 | //Process Dir
84 | var FilePathSplited = file.FileName.Split('\\');
85 | List FilePathList = new List(FilePathSplited);
86 | TreeNode LastNode=null;
87 | TreeNodeCollection FileNodes = this.treeViewFileList.Nodes;
88 | while (FilePathList.Count != 0)
89 | {
90 | TreeNode TargetNode = null;
91 | foreach (TreeNode Tn in FileNodes)
92 | {
93 | if (Tn.Text == FilePathList[0])
94 | {
95 | TargetNode = Tn;
96 | break;
97 | }
98 | }
99 | if (TargetNode == null)
100 | {
101 | LastNode = FileNodes.Add(FilePathList[0]);
102 | FileNodes = LastNode.Nodes;
103 | }
104 | else
105 | {
106 | FileNodes = TargetNode.Nodes;
107 | }
108 | FilePathList.RemoveAt(0);
109 | }
110 | if(file.Flags!=SteamKit2.EDepotFileFlag.Directory)
111 | {
112 | DepotMaxSize += file.TotalSize;
113 | //if(LastNode!=null)
114 | LastNode.Tag = file.TotalSize;
115 | }
116 | }
117 | float TargetSize = DepotMaxSize / 1024f;
118 | if(TargetSize<1024)
119 | {
120 | SizeDivisor = 1024f;
121 | UnitStr = "KB";
122 | }
123 | else if(TargetSize/1024f<1024)
124 | {
125 | SizeDivisor = 1024 * 1024f;
126 | UnitStr = "MB";
127 | }
128 | else
129 | {
130 | SizeDivisor = 1024 * 1024 * 1024f;
131 | UnitStr = "GB";
132 | }
133 | this.labelSize.Text = string.Format("{0}{1}/{2}{1}", 0.ToString("#0.00"), UnitStr, (DepotMaxSize / SizeDivisor).ToString("#0.00"));
134 | }
135 | this.Text = Title;
136 | }
137 |
138 | private void buttonCancel_Click(object sender, EventArgs e)
139 | {
140 | Program.MainWindowForm.checkBox1.Checked = false;
141 | Close();
142 | }
143 |
144 | private void ApplyFileList(TreeNode Tn)
145 | {
146 | if(Tn.Nodes.Count==0)
147 | {
148 | //This is a file.
149 | if(Tn.Checked)
150 | Program.MainWindowForm.AllowFileList.Add(Tn.FullPath);
151 | }
152 | else
153 | {
154 | //This is a Dir
155 | foreach (TreeNode TnChild in Tn.Nodes)
156 | {
157 | ApplyFileList(TnChild);
158 | }
159 | }
160 | }
161 |
162 | private void buttonOK_Click(object sender, EventArgs e)
163 | {
164 | foreach(TreeNode Tn in this.treeViewFileList.Nodes)
165 | {
166 | ApplyFileList(Tn);
167 | }
168 | Close();
169 | }
170 |
171 | ///
172 | /// 设置所有父节点的选中状态
173 | ///
174 | ///
175 | ///
176 | private void setParentNodeCheckedState(TreeNode currNode, bool state)
177 | {
178 | TreeNode parentNode = currNode.Parent;
179 |
180 | parentNode.Checked = state;
181 | if (currNode.Parent.Parent != null)
182 | {
183 | setParentNodeCheckedState(currNode.Parent, state);
184 | }
185 | }
186 |
187 | private void updateParentNodeCheckedState(TreeNode currNode)
188 | {
189 | TreeNode parentNode = currNode.Parent;
190 | if (parentNode == null)
191 | return;
192 | foreach(TreeNode Tn in parentNode.Nodes)
193 | {
194 | if (Tn.Checked)
195 | {
196 | parentNode.Checked = true;
197 | return;
198 | }
199 | }
200 | parentNode.Checked = false;
201 | }
202 |
203 | private ulong UpdateFileSize(TreeNode Tn)
204 | {
205 | if (Tn.Nodes!=null&&Tn.Nodes.Count == 0)
206 | {
207 | return Tn.Checked ? (ulong)Tn.Tag : 0;
208 | }
209 | else
210 | {
211 | ulong FolderSize=0;
212 | //This is a Dir
213 | foreach (TreeNode TnChild in Tn.Nodes)
214 | {
215 | FolderSize+=UpdateFileSize(TnChild);
216 | }
217 | return FolderSize;
218 | }
219 | }
220 |
221 | ///
222 | /// 设置所有子节点的选中状态
223 | ///
224 | ///
225 | ///
226 | private void setChildNodeCheckedState(TreeNode currNode, bool state)
227 | {
228 | TreeNodeCollection nodes = currNode.Nodes;
229 | if (nodes!=null&&nodes.Count > 0)
230 | foreach (TreeNode tn in nodes)
231 | {
232 | tn.Checked = state;
233 | setChildNodeCheckedState(tn, state);
234 | }
235 | }
236 |
237 | private void treeViewFileList_AfterCheck(object sender, TreeViewEventArgs e)
238 | {
239 | if (e.Action == TreeViewAction.ByMouse)
240 | {
241 | if (e.Node.Checked)
242 | {
243 | //节点选中后,选中所有子节点
244 | setChildNodeCheckedState(e.Node, true);
245 |
246 | //节点选中之后,选中所有父节点
247 | if (e.Node.Parent != null)
248 | {
249 | setParentNodeCheckedState(e.Node, true);
250 | }
251 | }
252 | else
253 | {
254 | //取消节点选中后,取消所有子节点的选中状态
255 | setChildNodeCheckedState(e.Node, false);
256 | updateParentNodeCheckedState(e.Node);
257 | }
258 | }
259 | {
260 | //Update FileSize
261 | ulong TotalSize = 0;
262 | foreach (TreeNode Tn in this.treeViewFileList.Nodes)
263 | TotalSize += UpdateFileSize(Tn);
264 | this.labelSize.Text = string.Format("{0}{1}/{2}{1}", (TotalSize / SizeDivisor).ToString("#0.00"), UnitStr, (DepotMaxSize / SizeDivisor).ToString("#0.00"));
265 | }
266 | }
267 |
268 | private void checkSelectAll_CheckedChanged(object sender, EventArgs e)
269 | {
270 | foreach (TreeNode Tn in this.treeViewFileList.Nodes)
271 | {
272 | if (Tn.Nodes != null && Tn.Nodes.Count > 0)
273 | {
274 | setChildNodeCheckedState(Tn, this.checkSelectAll.Checked);
275 | Tn.Checked = this.checkSelectAll.Checked;
276 | }
277 | else
278 | Tn.Checked = this.checkSelectAll.Checked;
279 | }
280 | }
281 | }
282 | }
283 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/FileSelector.zh.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 |
121 | 文件列表:
122 |
123 |
124 |
125 | 278, 8
126 |
127 |
128 | 48, 16
129 |
130 |
131 | 全选
132 |
133 |
134 | 确定
135 |
136 |
137 | 取消
138 |
139 |
140 | 选择文件
141 |
142 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/Icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jack-Myth/SteamDepotDownloader-GUI/69f469862404ce4df2efda846375e38f892f4500/SteamDepotDownloader-GUI/Icon.ico
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/Log.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace SteamDepotDownloader_GUI
2 | {
3 | partial class Log
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.components = new System.ComponentModel.Container();
32 | this.textBoxLog = new System.Windows.Forms.TextBox();
33 | this.timer1 = new System.Windows.Forms.Timer(this.components);
34 | this.SuspendLayout();
35 | //
36 | // textBoxLog
37 | //
38 | this.textBoxLog.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
39 | | System.Windows.Forms.AnchorStyles.Left)
40 | | System.Windows.Forms.AnchorStyles.Right)));
41 | this.textBoxLog.Location = new System.Drawing.Point(12, 12);
42 | this.textBoxLog.Multiline = true;
43 | this.textBoxLog.Name = "textBoxLog";
44 | this.textBoxLog.Size = new System.Drawing.Size(485, 200);
45 | this.textBoxLog.TabIndex = 0;
46 | //
47 | // timer1
48 | //
49 | this.timer1.Enabled = true;
50 | this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
51 | //
52 | // Log
53 | //
54 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
55 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
56 | this.ClientSize = new System.Drawing.Size(509, 224);
57 | this.Controls.Add(this.textBoxLog);
58 | this.Name = "Log";
59 | this.Text = "Log";
60 | this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Log_FormClosing);
61 | this.VisibleChanged += new System.EventHandler(this.Log_VisibleChanged);
62 | this.ResumeLayout(false);
63 | this.PerformLayout();
64 |
65 | }
66 |
67 | #endregion
68 |
69 | private System.Windows.Forms.TextBox textBoxLog;
70 | private System.Windows.Forms.Timer timer1;
71 | }
72 | }
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/Log.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace SteamDepotDownloader_GUI
12 | {
13 | public partial class Log : Form
14 | {
15 | StringBuilder LogBuilder=new StringBuilder();
16 | public Log()
17 | {
18 | InitializeComponent();
19 | }
20 |
21 | private void Log_FormClosing(object sender, FormClosingEventArgs e)
22 | {
23 | e.Cancel = true;
24 | Hide();
25 | }
26 |
27 | public static void Logx(string LogStr)
28 | {
29 | Program.LogForm.LogBuilder.AppendLine(LogStr);
30 | }
31 |
32 | private void timer1_Tick(object sender, EventArgs e)
33 | {
34 | if (LogBuilder.Length > 0)
35 | {
36 | textBoxLog.AppendText(LogBuilder.ToString());
37 | LogBuilder.Clear();
38 | textBoxLog.ScrollToCaret();//滚动到光标处
39 | if (textBoxLog.Text.Length > 10240)
40 | {
41 | textBoxLog.Text = Program.LogForm.textBoxLog.Text.Substring(9000);
42 | textBoxLog.Select(Program.LogForm.textBoxLog.TextLength, 0);
43 | textBoxLog.ScrollToCaret();
44 | }
45 | }
46 | }
47 |
48 | private void Log_VisibleChanged(object sender, EventArgs e)
49 | {
50 | textBoxLog.Select(Program.LogForm.textBoxLog.TextLength, 0);
51 | textBoxLog.ScrollToCaret();
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/Log.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 |
121 | 17, 17
122 |
123 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/Logger.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Text;
3 |
4 | namespace DepotDownloader
5 | {
6 | internal static class Logger
7 | {
8 | static StringBuilder _sBuilder = new StringBuilder(128);
9 | public static void Info(string line, params object[] args)
10 | {
11 | //_Config.FireOnMessageEvent("log", Format(line, args));
12 | Console.WriteLine("Info:"+Format(line,args));
13 | SteamDepotDownloader_GUI.Log.Logx("Info:" + Format(line, args));
14 | }
15 |
16 | public static void Warning(string line, params object[] args)
17 | {
18 | //_Config.FireOnMessageEvent("warning", Format(line, args));
19 | Console.WriteLine("Warning:" + Format(line, args));
20 | SteamDepotDownloader_GUI.Log.Logx("Warning:" + Format(line, args));
21 | }
22 |
23 | public static void Error(string line, params object[] args)
24 | {
25 | //_Config.FireOnMessageEvent("error", Format(line, args));
26 | Console.WriteLine("Error:" + Format(line, args));
27 | SteamDepotDownloader_GUI.Log.Logx("Error:" + Format(line, args));
28 | }
29 |
30 | public static void Exception(Exception exception)
31 | {
32 | //_Config.FireOnMessageEvent("exception", exception);
33 | Console.WriteLine("Exception:" + exception.Message+"\n"+exception.StackTrace);
34 | SteamDepotDownloader_GUI.Log.Logx("Exception:" + exception.Message + "\n" + exception.StackTrace);
35 | }
36 |
37 | public static string Format(string line, params object[] args)
38 | {
39 | _sBuilder.Append(line);
40 | for (var i = 0; i < args.Length; i++)
41 | {
42 | _sBuilder.Replace($"{{{i}}}", $"{args[i]}");
43 | }
44 |
45 | line = _sBuilder.ToString();
46 | _sBuilder.Clear();
47 | return line;
48 | }
49 | }
50 | }
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/Login.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace SteamDepotDownloader_GUI
2 | {
3 | partial class Login
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 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Login));
32 | this.label1 = new System.Windows.Forms.Label();
33 | this.label2 = new System.Windows.Forms.Label();
34 | this.textBoxAccountName = new System.Windows.Forms.TextBox();
35 | this.textBoxPassword = new System.Windows.Forms.TextBox();
36 | this.label3 = new System.Windows.Forms.Label();
37 | this.textBoxTwoFractorAuthCode = new System.Windows.Forms.TextBox();
38 | this.label4 = new System.Windows.Forms.Label();
39 | this.buttonLogin = new System.Windows.Forms.Button();
40 | this.checkBoxRememberPass = new System.Windows.Forms.CheckBox();
41 | this.SuspendLayout();
42 | //
43 | // label1
44 | //
45 | resources.ApplyResources(this.label1, "label1");
46 | this.label1.Name = "label1";
47 | //
48 | // label2
49 | //
50 | resources.ApplyResources(this.label2, "label2");
51 | this.label2.Name = "label2";
52 | //
53 | // textBoxAccountName
54 | //
55 | resources.ApplyResources(this.textBoxAccountName, "textBoxAccountName");
56 | this.textBoxAccountName.Name = "textBoxAccountName";
57 | //
58 | // textBoxPassword
59 | //
60 | resources.ApplyResources(this.textBoxPassword, "textBoxPassword");
61 | this.textBoxPassword.Name = "textBoxPassword";
62 | //
63 | // label3
64 | //
65 | resources.ApplyResources(this.label3, "label3");
66 | this.label3.Name = "label3";
67 | //
68 | // textBoxTwoFractorAuthCode
69 | //
70 | resources.ApplyResources(this.textBoxTwoFractorAuthCode, "textBoxTwoFractorAuthCode");
71 | this.textBoxTwoFractorAuthCode.Name = "textBoxTwoFractorAuthCode";
72 | //
73 | // label4
74 | //
75 | resources.ApplyResources(this.label4, "label4");
76 | this.label4.Name = "label4";
77 | //
78 | // buttonLogin
79 | //
80 | resources.ApplyResources(this.buttonLogin, "buttonLogin");
81 | this.buttonLogin.Name = "buttonLogin";
82 | this.buttonLogin.UseVisualStyleBackColor = true;
83 | this.buttonLogin.Click += new System.EventHandler(this.buttonLogin_Click);
84 | //
85 | // checkBoxRememberPass
86 | //
87 | resources.ApplyResources(this.checkBoxRememberPass, "checkBoxRememberPass");
88 | this.checkBoxRememberPass.Name = "checkBoxRememberPass";
89 | this.checkBoxRememberPass.UseVisualStyleBackColor = true;
90 | //
91 | // Login
92 | //
93 | resources.ApplyResources(this, "$this");
94 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
95 | this.Controls.Add(this.checkBoxRememberPass);
96 | this.Controls.Add(this.buttonLogin);
97 | this.Controls.Add(this.label4);
98 | this.Controls.Add(this.textBoxTwoFractorAuthCode);
99 | this.Controls.Add(this.label3);
100 | this.Controls.Add(this.textBoxPassword);
101 | this.Controls.Add(this.textBoxAccountName);
102 | this.Controls.Add(this.label2);
103 | this.Controls.Add(this.label1);
104 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
105 | this.MaximizeBox = false;
106 | this.MinimizeBox = false;
107 | this.Name = "Login";
108 | this.ResumeLayout(false);
109 | this.PerformLayout();
110 |
111 | }
112 |
113 | #endregion
114 |
115 | private System.Windows.Forms.Label label1;
116 | private System.Windows.Forms.Label label2;
117 | private System.Windows.Forms.TextBox textBoxAccountName;
118 | private System.Windows.Forms.TextBox textBoxPassword;
119 | private System.Windows.Forms.Label label3;
120 | private System.Windows.Forms.TextBox textBoxTwoFractorAuthCode;
121 | private System.Windows.Forms.Label label4;
122 | private System.Windows.Forms.Button buttonLogin;
123 | private System.Windows.Forms.CheckBox checkBoxRememberPass;
124 | }
125 | }
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/Login.cs:
--------------------------------------------------------------------------------
1 | using DepotDownloader;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.ComponentModel;
5 | using System.Data;
6 | using System.Drawing;
7 | using System.Linq;
8 | using System.Text;
9 | using System.Threading.Tasks;
10 | using System.Windows.Forms;
11 |
12 | namespace SteamDepotDownloader_GUI
13 | {
14 | public partial class Login : Form
15 | {
16 | public Login()
17 | {
18 | InitializeComponent();
19 | }
20 |
21 | private void buttonLogin_Click(object sender, EventArgs e)
22 | {
23 | Program.UsrConfig = new UserConfig();
24 | Program.UsrConfig.Username = this.textBoxAccountName.Text;
25 | Program.UsrConfig.Password = this.textBoxPassword.Text;
26 | Program.UsrConfig.RememberPassword = this.checkBoxRememberPass.Checked;
27 | Program.UsrConfig.TwoFactorAuthCode = this.textBoxTwoFractorAuthCode.Text;
28 | if (DepotDownloader.ContentDownloader.InitializeSteam3(Program.UsrConfig)&&DepotDownloader.ContentDownloader.Steam3.IsConnected)
29 | {
30 | Close();
31 | SteamDepotDownloader_GUI.Program.MainWindowForm.RefreshAppList();
32 | }
33 | else
34 | MessageBox.Show(Properties.Resources.LoginFailed, "SteamDepotDownloader-GUI", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Threading.Tasks;
6 | using System.Windows.Forms;
7 |
8 | namespace SteamDepotDownloader_GUI
9 | {
10 |
11 | public struct ManifestHistoryRecord
12 | {
13 | public struct ManifestHistoryRecordSingle
14 | {
15 | public string Date;
16 | public string RelativeDate;
17 | public ulong ManifestID;
18 | }
19 | public string DepotID;
20 | public string BuildID;
21 | public string ManifestID;
22 | public string DepotName;
23 | public string LastUpdate;
24 | public List HistoryCollection;
25 | }
26 |
27 | static class Program
28 | {
29 | ///
30 | /// The main entry point for the application.
31 | ///
32 | ///
33 |
34 | public static DepotDownloader.UserConfig UsrConfig;
35 | public static SteamDepotDownloaderForm MainWindowForm;
36 | public static Log LogForm;
37 | public const string CacheDir = "./Cache";
38 |
39 | public static Dictionary ManifestHistoryCache = new Dictionary();
40 |
41 | public static List DownloaderInstances=new List();
42 | [STAThread]
43 | static void Main()
44 | {
45 | Application.EnableVisualStyles();
46 | Application.SetCompatibleTextRenderingDefault(false);
47 | DepotDownloader.ConfigStore.LoadFromFile(Path.Combine(Directory.GetCurrentDirectory(), "DepotDownloader.config"));
48 | LogForm = new Log();
49 | MainWindowForm = new SteamDepotDownloaderForm();
50 | Application.Run(MainWindowForm);
51 | Application.Exit();
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/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("SteamDepotDownloader-GUI")]
9 | [assembly: AssemblyDescription("Download Depots from steam with GUI")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("SteamDepotDownloader-GUI")]
13 | [assembly: AssemblyCopyright("Copyright © JackMyth 2019")]
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("0cc5b832-b605-463b-bd2c-521edc7d9264")]
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.3.5.0")]
36 | [assembly: AssemblyFileVersion("1.3.5.0")]
37 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/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 |
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 |
121 | File List Loaded
122 |
123 |
124 | Clear File List?
125 |
126 |
127 |
128 | ..\Resources\Steam.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
129 |
130 |
131 | Choose Install Directory
132 |
133 |
134 | Invalid Paramter!
135 |
136 |
137 | Couldn't find any depots to download for app {0}
138 |
139 |
140 | {0} Apps
141 |
142 |
143 | ..\Resources\SteamGray.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
144 |
145 |
146 | Depot {0} not listed for app {1} or not available on this platform
147 |
148 |
149 | Downloading File List...
150 |
151 |
152 | Already Login,Do you want to logout?
153 |
154 |
155 | Depot {0} Download Successful!
156 |
157 |
158 | There already have a same task.
159 |
160 |
161 | The depot need Password.
162 |
163 |
164 | Updating App List...
165 |
166 |
167 | Auto login failed.Use password and try again.
168 |
169 |
170 | Steam login failed!Try check your account and password.
171 |
172 |
173 | No valid Manifest ID
174 |
175 |
176 | Cache Cleared
177 |
178 |
179 | App {0} ({1}) is not available from this account.
180 |
181 |
182 | No valid depot key.
183 |
184 |
185 | Depot {0} Download Failed!
186 |
187 |
188 | ..\Resources\Icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
189 |
190 |
191 | Build ID:{0}
192 |
193 |
194 | Depot ID:{0}
195 |
196 |
197 | Depot Name:{0}
198 |
199 |
200 | Last Update:{0}
201 |
202 |
203 | Manifest ID:{0}
204 |
205 |
206 | Getting Manifest History...
207 |
208 |
209 | Failed To Get Manifest History!
210 |
211 |
212 | Current ManifestID:
213 | {0}
214 |
215 |
216 | SteamDB only have Manifest History for public branch
217 | To use ManifestID for other branch, try Advanced Input
218 |
219 |
220 | (Default)
221 |
222 |
223 | Connection to SteamDB out of time
224 |
225 |
226 | Please Input the Cookies for SteamDB(__cfduid and cf_clearance)
227 |
228 |
229 | Invalid Cookies
230 |
231 |
232 | It may caused by invalid cookies,do you want to input new cookies?
233 |
234 |
235 | SteamDB doesn't have the infomation of this Depot
236 |
237 |
238 | Need Login!
239 |
240 |
241 | Input ManifesID
242 |
243 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/Properties/Resources.zh.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 |
121 |
122 | ..\Resources\Steam.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
123 |
124 |
125 | {0} Apps
126 |
127 |
128 | 正在更新App列表
129 |
130 |
131 | 正在下载文件列表...
132 |
133 |
134 | 已登陆,你要注销吗?
135 |
136 |
137 | Depot {0} 下载成功!
138 |
139 |
140 | 已有一个相同的任务了。
141 |
142 |
143 | Depot需要密码
144 |
145 |
146 | 选择安装位置
147 |
148 |
149 | 自动登陆失败,请用密码再试一次
150 |
151 |
152 | Steam登陆失败,请检查用户名和密码
153 |
154 |
155 | 没有有效的 Manifest ID
156 |
157 |
158 | 没有有效的 depot 密钥.
159 |
160 |
161 | Depot {0} 下载失败!
162 |
163 |
164 | ..\Resources\SteamGray.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
165 |
166 |
167 | 清除文件列表?
168 |
169 |
170 | 文件列表已加载
171 |
172 |
173 | 无效参数!
174 |
175 |
176 | 缓存已清空
177 |
178 |
179 | Depot {0} 未在App {1} 中列出,或不支持该平台
180 |
181 |
182 | 在 {0} 找不到任何可下载的Depot
183 |
184 |
185 | App {0} ({1}) 在此账户上不可用.
186 |
187 |
188 | Build ID:{0}
189 |
190 |
191 | Depot ID:{0}
192 |
193 |
194 | Depot 名称:{0}
195 |
196 |
197 | 最后一次更新:{0}
198 |
199 |
200 | Manifest ID:{0}
201 |
202 |
203 | 获取Manifest历史失败!
204 |
205 |
206 | 正在获取Manifest历史记录...
207 |
208 |
209 | SteamDB 只有public分支的Manifest历史
210 | 若需要指定其他分支的Manifest,请使用高级输入
211 |
212 |
213 | 当前ManifestID:
214 | {0}
215 |
216 |
217 | (默认)
218 |
219 |
220 | 连接SteamDB超时
221 |
222 |
223 | 请输入SteamDB的Cookies(__cfduid 和 cf_clearance)
224 |
225 |
226 | 无效的Cookies
227 |
228 |
229 | 这可能是由于过期的Cookies引起的,你想要重新输入Cookies吗?
230 |
231 |
232 | SteamDB 没有这个Depot的信息
233 |
234 |
235 | 需要登陆!
236 |
237 |
238 | 请输入ManifestID
239 |
240 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/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 SteamDepotDownloader_GUI.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 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/ProtoManifest.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.IO;
3 | using System.IO.Compression;
4 |
5 | using ProtoBuf;
6 | using SteamKit2;
7 |
8 | namespace DepotDownloader
9 | {
10 | [ProtoContract()]
11 | internal class ProtoManifest
12 | {
13 | // Proto ctor
14 | private ProtoManifest()
15 | {
16 | Files = new List();
17 | }
18 |
19 | public ProtoManifest(DepotManifest sourceManifest, ulong id) : this()
20 | {
21 | sourceManifest.Files.ForEach(f => Files.Add(new FileData(f)));
22 | ID = id;
23 | }
24 |
25 | [ProtoContract()]
26 | public class FileData
27 | {
28 | // Proto ctor
29 | private FileData()
30 | {
31 | Chunks = new List();
32 | }
33 |
34 | public FileData(DepotManifest.FileData sourceData) : this()
35 | {
36 | FileName = sourceData.FileName;
37 | sourceData.Chunks.ForEach(c => Chunks.Add(new ChunkData(c)));
38 | Flags = sourceData.Flags;
39 | TotalSize = sourceData.TotalSize;
40 | FileHash = sourceData.FileHash;
41 | }
42 |
43 | [ProtoMember(1)]
44 | public string FileName { get; internal set; }
45 |
46 | ///
47 | /// Gets the chunks that this file is composed of.
48 | ///
49 | [ProtoMember(2)]
50 | public List Chunks { get; private set; }
51 |
52 | ///
53 | /// Gets the file flags
54 | ///
55 | [ProtoMember(3)]
56 | public EDepotFileFlag Flags { get; private set; }
57 |
58 | ///
59 | /// Gets the total size of this file.
60 | ///
61 | [ProtoMember(4)]
62 | public ulong TotalSize { get; private set; }
63 |
64 | ///
65 | /// Gets the hash of this file.
66 | ///
67 | [ProtoMember(5)]
68 | public byte[] FileHash { get; private set; }
69 | }
70 |
71 | [ProtoContract(SkipConstructor = true)]
72 | public class ChunkData
73 | {
74 | public ChunkData(DepotManifest.ChunkData sourceChunk)
75 | {
76 | ChunkID = sourceChunk.ChunkID;
77 | Checksum = sourceChunk.Checksum;
78 | Offset = sourceChunk.Offset;
79 | CompressedLength = sourceChunk.CompressedLength;
80 | UncompressedLength = sourceChunk.UncompressedLength;
81 | }
82 |
83 | ///
84 | /// Gets the SHA-1 hash chunk id.
85 | ///
86 | [ProtoMember(1)]
87 | public byte[] ChunkID { get; private set; }
88 |
89 | ///
90 | /// Gets the expected Adler32 checksum of this chunk.
91 | ///
92 | [ProtoMember(2)]
93 | public byte[] Checksum { get; private set; }
94 |
95 | ///
96 | /// Gets the chunk offset.
97 | ///
98 | [ProtoMember(3)]
99 | public ulong Offset { get; private set; }
100 |
101 | ///
102 | /// Gets the compressed length of this chunk.
103 | ///
104 | [ProtoMember(4)]
105 | public uint CompressedLength { get; private set; }
106 |
107 | ///
108 | /// Gets the decompressed length of this chunk.
109 | ///
110 | [ProtoMember(5)]
111 | public uint UncompressedLength { get; private set; }
112 | }
113 |
114 | [ProtoMember(1)]
115 | public List Files { get; private set; }
116 |
117 | [ProtoMember(2)]
118 | public ulong ID { get; private set; }
119 |
120 | public static ProtoManifest LoadFromFile(string filename)
121 | {
122 | if (!File.Exists(filename))
123 | return null;
124 |
125 | using (FileStream fs = File.Open(filename, FileMode.Open))
126 | using (DeflateStream ds = new DeflateStream(fs, CompressionMode.Decompress))
127 | return ProtoBuf.Serializer.Deserialize(ds);
128 | }
129 |
130 | public void SaveToFile(string filename)
131 | {
132 | using (FileStream fs = File.Open(filename, FileMode.Create))
133 | using (DeflateStream ds = new DeflateStream(fs, CompressionMode.Compress))
134 | ProtoBuf.Serializer.Serialize(ds, this);
135 | }
136 | }
137 | }
138 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/Resources.zh.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 |
121 |
122 | ..\Resources\Steam.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
123 |
124 |
125 | {0} Apps
126 |
127 |
128 | 正在更新App列表
129 |
130 |
131 | 正在下载文件列表...
132 |
133 |
134 | 已登陆,你要注销吗?
135 |
136 |
137 | Depot {0} 下载成功!
138 |
139 |
140 | 已有一个相同的任务了。
141 |
142 |
143 | Depot需要密码
144 |
145 |
146 | 选择安装位置
147 |
148 |
149 | 自动登陆失败,请用密码再试一次
150 |
151 |
152 | Steam登陆失败,请检查用户名和密码
153 |
154 |
155 | 没有有效的 Manifest ID
156 |
157 |
158 | 没有有效的 depot 密钥.
159 |
160 |
161 | Depot {0} 下载失败!
162 |
163 |
164 | ..\Resources\SteamGray.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
165 |
166 |
167 | 清除文件列表?
168 |
169 |
170 | 文件列表已加载
171 |
172 |
173 | 无效参数!
174 |
175 |
176 | 缓存已清空
177 |
178 |
179 | Depot {0} 未在App {1} 中列出,或不支持该平台
180 |
181 |
182 | 在 {0} 找不到任何可下载的Depot
183 |
184 |
185 | App {0} ({1}) 在此账户上不可用.
186 |
187 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/Resources/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jack-Myth/SteamDepotDownloader-GUI/69f469862404ce4df2efda846375e38f892f4500/SteamDepotDownloader-GUI/Resources/Icon.png
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/Resources/Steam.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jack-Myth/SteamDepotDownloader-GUI/69f469862404ce4df2efda846375e38f892f4500/SteamDepotDownloader-GUI/Resources/Steam.png
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/Resources/SteamGray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Jack-Myth/SteamDepotDownloader-GUI/69f469862404ce4df2efda846375e38f892f4500/SteamDepotDownloader-GUI/Resources/SteamGray.png
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace SteamDepotDownloader_GUI
2 | {
3 | partial class Settings
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 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Settings));
32 | this.buttonClearCache = new System.Windows.Forms.Button();
33 | this.button1 = new System.Windows.Forms.Button();
34 | this.button2 = new System.Windows.Forms.Button();
35 | this.LabelVersion = new System.Windows.Forms.Label();
36 | this.comboBoxMaxServer = new System.Windows.Forms.ComboBox();
37 | this.label1 = new System.Windows.Forms.Label();
38 | this.label2 = new System.Windows.Forms.Label();
39 | this.comboBoxMaxDownload = new System.Windows.Forms.ComboBox();
40 | this.checkBoxNotify = new System.Windows.Forms.CheckBox();
41 | this.pictureBox1 = new System.Windows.Forms.PictureBox();
42 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
43 | this.SuspendLayout();
44 | //
45 | // buttonClearCache
46 | //
47 | resources.ApplyResources(this.buttonClearCache, "buttonClearCache");
48 | this.buttonClearCache.Name = "buttonClearCache";
49 | this.buttonClearCache.UseVisualStyleBackColor = true;
50 | this.buttonClearCache.Click += new System.EventHandler(this.buttonClearCache_Click);
51 | //
52 | // button1
53 | //
54 | resources.ApplyResources(this.button1, "button1");
55 | this.button1.Name = "button1";
56 | this.button1.UseVisualStyleBackColor = true;
57 | this.button1.Click += new System.EventHandler(this.button1_Click);
58 | //
59 | // button2
60 | //
61 | resources.ApplyResources(this.button2, "button2");
62 | this.button2.Name = "button2";
63 | this.button2.UseVisualStyleBackColor = true;
64 | this.button2.Click += new System.EventHandler(this.button2_Click);
65 | //
66 | // LabelVersion
67 | //
68 | resources.ApplyResources(this.LabelVersion, "LabelVersion");
69 | this.LabelVersion.Name = "LabelVersion";
70 | //
71 | // comboBoxMaxServer
72 | //
73 | this.comboBoxMaxServer.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
74 | this.comboBoxMaxServer.FormattingEnabled = true;
75 | this.comboBoxMaxServer.Items.AddRange(new object[] {
76 | resources.GetString("comboBoxMaxServer.Items"),
77 | resources.GetString("comboBoxMaxServer.Items1"),
78 | resources.GetString("comboBoxMaxServer.Items2"),
79 | resources.GetString("comboBoxMaxServer.Items3"),
80 | resources.GetString("comboBoxMaxServer.Items4"),
81 | resources.GetString("comboBoxMaxServer.Items5"),
82 | resources.GetString("comboBoxMaxServer.Items6"),
83 | resources.GetString("comboBoxMaxServer.Items7"),
84 | resources.GetString("comboBoxMaxServer.Items8"),
85 | resources.GetString("comboBoxMaxServer.Items9"),
86 | resources.GetString("comboBoxMaxServer.Items10"),
87 | resources.GetString("comboBoxMaxServer.Items11"),
88 | resources.GetString("comboBoxMaxServer.Items12"),
89 | resources.GetString("comboBoxMaxServer.Items13"),
90 | resources.GetString("comboBoxMaxServer.Items14"),
91 | resources.GetString("comboBoxMaxServer.Items15"),
92 | resources.GetString("comboBoxMaxServer.Items16"),
93 | resources.GetString("comboBoxMaxServer.Items17"),
94 | resources.GetString("comboBoxMaxServer.Items18"),
95 | resources.GetString("comboBoxMaxServer.Items19")});
96 | resources.ApplyResources(this.comboBoxMaxServer, "comboBoxMaxServer");
97 | this.comboBoxMaxServer.Name = "comboBoxMaxServer";
98 | this.comboBoxMaxServer.SelectedIndexChanged += new System.EventHandler(this.comboBoxMaxServer_SelectedIndexChanged);
99 | //
100 | // label1
101 | //
102 | resources.ApplyResources(this.label1, "label1");
103 | this.label1.Name = "label1";
104 | //
105 | // label2
106 | //
107 | resources.ApplyResources(this.label2, "label2");
108 | this.label2.Name = "label2";
109 | //
110 | // comboBoxMaxDownload
111 | //
112 | this.comboBoxMaxDownload.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
113 | this.comboBoxMaxDownload.FormattingEnabled = true;
114 | this.comboBoxMaxDownload.Items.AddRange(new object[] {
115 | resources.GetString("comboBoxMaxDownload.Items"),
116 | resources.GetString("comboBoxMaxDownload.Items1"),
117 | resources.GetString("comboBoxMaxDownload.Items2"),
118 | resources.GetString("comboBoxMaxDownload.Items3"),
119 | resources.GetString("comboBoxMaxDownload.Items4"),
120 | resources.GetString("comboBoxMaxDownload.Items5"),
121 | resources.GetString("comboBoxMaxDownload.Items6"),
122 | resources.GetString("comboBoxMaxDownload.Items7"),
123 | resources.GetString("comboBoxMaxDownload.Items8"),
124 | resources.GetString("comboBoxMaxDownload.Items9"),
125 | resources.GetString("comboBoxMaxDownload.Items10"),
126 | resources.GetString("comboBoxMaxDownload.Items11"),
127 | resources.GetString("comboBoxMaxDownload.Items12"),
128 | resources.GetString("comboBoxMaxDownload.Items13"),
129 | resources.GetString("comboBoxMaxDownload.Items14"),
130 | resources.GetString("comboBoxMaxDownload.Items15"),
131 | resources.GetString("comboBoxMaxDownload.Items16"),
132 | resources.GetString("comboBoxMaxDownload.Items17"),
133 | resources.GetString("comboBoxMaxDownload.Items18"),
134 | resources.GetString("comboBoxMaxDownload.Items19")});
135 | resources.ApplyResources(this.comboBoxMaxDownload, "comboBoxMaxDownload");
136 | this.comboBoxMaxDownload.Name = "comboBoxMaxDownload";
137 | this.comboBoxMaxDownload.SelectedIndexChanged += new System.EventHandler(this.comboBoxMaxDownload_SelectedIndexChanged);
138 | //
139 | // checkBoxNotify
140 | //
141 | resources.ApplyResources(this.checkBoxNotify, "checkBoxNotify");
142 | this.checkBoxNotify.Name = "checkBoxNotify";
143 | this.checkBoxNotify.UseVisualStyleBackColor = true;
144 | this.checkBoxNotify.CheckedChanged += new System.EventHandler(this.checkBoxNotify_CheckedChanged);
145 | //
146 | // pictureBox1
147 | //
148 | resources.ApplyResources(this.pictureBox1, "pictureBox1");
149 | this.pictureBox1.Image = global::SteamDepotDownloader_GUI.Properties.Resources.Icon;
150 | this.pictureBox1.Name = "pictureBox1";
151 | this.pictureBox1.TabStop = false;
152 | //
153 | // Settings
154 | //
155 | resources.ApplyResources(this, "$this");
156 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
157 | this.Controls.Add(this.pictureBox1);
158 | this.Controls.Add(this.checkBoxNotify);
159 | this.Controls.Add(this.label2);
160 | this.Controls.Add(this.comboBoxMaxDownload);
161 | this.Controls.Add(this.label1);
162 | this.Controls.Add(this.comboBoxMaxServer);
163 | this.Controls.Add(this.LabelVersion);
164 | this.Controls.Add(this.button2);
165 | this.Controls.Add(this.button1);
166 | this.Controls.Add(this.buttonClearCache);
167 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
168 | this.MaximizeBox = false;
169 | this.MinimizeBox = false;
170 | this.Name = "Settings";
171 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
172 | this.ResumeLayout(false);
173 | this.PerformLayout();
174 |
175 | }
176 |
177 | #endregion
178 |
179 | private System.Windows.Forms.Button buttonClearCache;
180 | private System.Windows.Forms.Button button1;
181 | private System.Windows.Forms.Button button2;
182 | private System.Windows.Forms.Label LabelVersion;
183 | private System.Windows.Forms.ComboBox comboBoxMaxServer;
184 | private System.Windows.Forms.Label label1;
185 | private System.Windows.Forms.Label label2;
186 | private System.Windows.Forms.ComboBox comboBoxMaxDownload;
187 | private System.Windows.Forms.CheckBox checkBoxNotify;
188 | private System.Windows.Forms.PictureBox pictureBox1;
189 | }
190 | }
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/Settings.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace SteamDepotDownloader_GUI
12 | {
13 | public partial class Settings : Form
14 | {
15 | int MaxDownload;
16 | int MaxServer;
17 | bool MinimizeToTray;
18 | public int Clamp(int A,int B,int V)
19 | {
20 | return Math.Min(Math.Max(V, A), B);
21 | }
22 | public Settings()
23 | {
24 | InitializeComponent();
25 | this.LabelVersion.Text = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
26 | MaxDownload = DepotDownloader.ConfigStore.TheConfig.MaxDownload;
27 | MaxServer = DepotDownloader.ConfigStore.TheConfig.MaxServer;
28 | MinimizeToTray = DepotDownloader.ConfigStore.TheConfig.MinimizeToTray;
29 | this.comboBoxMaxDownload.SelectedIndex = Clamp(0, 19, MaxDownload-1);
30 | this.comboBoxMaxServer.SelectedIndex = Clamp(0, 19, MaxServer-1);
31 | this.checkBoxNotify.Checked = MinimizeToTray;
32 | }
33 |
34 | private void buttonClearCache_Click(object sender, EventArgs e)
35 | {
36 | if (System.IO.Directory.Exists(Program.CacheDir))
37 | {
38 | var FileList = System.IO.Directory.GetFiles(Program.CacheDir);
39 | foreach (string FileName in FileList)
40 | {
41 | try
42 | {
43 | System.IO.File.Delete(FileName);
44 | }
45 | catch { };
46 | }
47 | }
48 | DepotDownloader.ConfigStore.TheConfig.LoginKeys.Clear();
49 | DepotDownloader.ConfigStore.TheConfig.LastManifests.Clear();
50 | DepotDownloader.ConfigStore.TheConfig.StoredCookies.Clear();
51 | DepotDownloader.ConfigStore.Save();
52 | MessageBox.Show(Properties.Resources.CacheCleared, "Settings", MessageBoxButtons.OK, MessageBoxIcon.Information);
53 | }
54 |
55 | private void comboBoxMaxServer_SelectedIndexChanged(object sender, EventArgs e)
56 | {
57 | try
58 | {
59 | int MaxServertmp = int.Parse(comboBoxMaxServer.SelectedItem.ToString());
60 | if (MaxServer != MaxServertmp)
61 | {
62 | MaxServer = MaxServertmp;
63 | DepotDownloader.ConfigStore.TheConfig.MaxServer = MaxServer;
64 | DepotDownloader.ConfigStore.Save();
65 | }
66 | }
67 | catch { };
68 | }
69 |
70 | private void comboBoxMaxDownload_SelectedIndexChanged(object sender, EventArgs e)
71 | {
72 | try
73 | {
74 | int MaxDownloadtmp = int.Parse(comboBoxMaxDownload.SelectedItem.ToString());
75 | if (MaxDownload != MaxDownloadtmp)
76 | {
77 | MaxDownload = MaxDownloadtmp;
78 | DepotDownloader.ConfigStore.TheConfig.MaxDownload = MaxDownloadtmp;
79 | DepotDownloader.ConfigStore.Save();
80 | }
81 | }
82 | catch { };
83 | }
84 |
85 | private void button2_Click(object sender, EventArgs e)
86 | {
87 | System.Diagnostics.Process.Start("https://github.com/Jack-Myth/SteamDepotDownloader-GUI/releases");
88 | }
89 |
90 | private void button1_Click(object sender, EventArgs e)
91 | {
92 | System.Diagnostics.Process.Start("https://github.com/Jack-Myth/SteamDepotDownloader-GUI");
93 | }
94 |
95 | private void checkBoxNotify_CheckedChanged(object sender, EventArgs e)
96 | {
97 | if(this.checkBoxNotify.Checked!=MinimizeToTray)
98 | {
99 | MinimizeToTray = this.checkBoxNotify.Checked;
100 | DepotDownloader.ConfigStore.TheConfig.MinimizeToTray = this.checkBoxNotify.Checked;
101 | DepotDownloader.ConfigStore.Save();
102 | }
103 | }
104 | }
105 | }
106 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/SteamDepotDownloader-GUI.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {0CC5B832-B605-463B-BD2C-521EDC7D9264}
8 | WinExe
9 | SteamDepotDownloader_GUI
10 | SteamDepotDownloader-GUI
11 | v4.7.2
12 | 512
13 | true
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 | true
28 |
29 |
30 | AnyCPU
31 | pdbonly
32 | true
33 | bin\Release\
34 | TRACE
35 | prompt
36 | 4
37 |
38 |
39 | Icon.ico
40 |
41 |
42 | false
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | ..\packages\HtmlAgilityPack.1.11.12\lib\Net45\HtmlAgilityPack.dll
51 |
52 |
53 | ..\packages\Microsoft.Win32.Registry.4.4.0\lib\net461\Microsoft.Win32.Registry.dll
54 |
55 |
56 |
57 |
58 | ..\packages\protobuf-net.2.4.0\lib\net40\protobuf-net.dll
59 |
60 |
61 | ..\packages\SteamKit2.2.2.0\lib\netstandard2.0\SteamKit2.dll
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | ..\packages\System.Security.AccessControl.4.4.0\lib\net461\System.Security.AccessControl.dll
71 |
72 |
73 | ..\packages\System.Security.Principal.Windows.4.4.0\lib\net461\System.Security.Principal.Windows.dll
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 | Form
92 |
93 |
94 | AdvancedInput.cs
95 |
96 |
97 | Form
98 |
99 |
100 | AppmanifestGenerator.cs
101 |
102 |
103 | Form
104 |
105 |
106 | AutoLogin.cs
107 |
108 |
109 |
110 |
111 |
112 |
113 | Form
114 |
115 |
116 | FileSelector.cs
117 |
118 |
119 | Form
120 |
121 |
122 | Log.cs
123 |
124 |
125 | Form
126 |
127 |
128 | Login.cs
129 |
130 |
131 | Form
132 |
133 |
134 | Settings.cs
135 |
136 |
137 | Form
138 |
139 |
140 | SteamDepotDownloaderForm.cs
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 | Form
150 |
151 |
152 | Waiting.cs
153 |
154 |
155 | AdvancedInput.cs
156 |
157 |
158 | AppmanifestGenerator.cs
159 |
160 |
161 | AppmanifestGenerator.cs
162 |
163 |
164 | AutoLogin.cs
165 |
166 |
167 | AutoLogin.cs
168 |
169 |
170 | FileSelector.cs
171 |
172 |
173 | FileSelector.cs
174 |
175 |
176 | Log.cs
177 |
178 |
179 | Login.cs
180 |
181 |
182 | Login.cs
183 |
184 |
185 |
186 | Settings.cs
187 |
188 |
189 | Settings.cs
190 |
191 |
192 | SteamDepotDownloaderForm.cs
193 |
194 |
195 | ResXFileCodeGenerator
196 | Resources.Designer.cs
197 | Designer
198 |
199 |
200 | True
201 | Resources.resx
202 | True
203 |
204 |
205 | SteamDepotDownloaderForm.cs
206 |
207 |
208 | Waiting.cs
209 |
210 |
211 |
212 | SettingsSingleFileGenerator
213 | Settings.Designer.cs
214 |
215 |
216 | True
217 | Settings.settings
218 | True
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 | {CD9F9441-933C-4FAE-8895-2099D3F96A9D}
227 | DownloadProgressReporter
228 | False
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/Util.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices;
6 | using System.Security.Cryptography;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using System.Drawing;
10 |
11 | namespace DepotDownloader
12 | {
13 | internal static class Util
14 | {
15 | public static string GetSteamOS()
16 | {
17 | if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
18 | {
19 | return "windows";
20 | }
21 | else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
22 | {
23 | return "macos";
24 | }
25 | else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
26 | {
27 | return "linux";
28 | }
29 |
30 | return "unknown";
31 | }
32 |
33 | public static string ReadPassword()
34 | {
35 | ConsoleKeyInfo keyInfo;
36 | StringBuilder password = new StringBuilder();
37 |
38 | do
39 | {
40 | keyInfo = Console.ReadKey( true );
41 |
42 | if ( keyInfo.Key == ConsoleKey.Backspace )
43 | {
44 | if ( password.Length > 0 )
45 | password.Remove( password.Length - 1, 1 );
46 | continue;
47 | }
48 |
49 | /* Printable ASCII characters only */
50 | char c = keyInfo.KeyChar;
51 | if ( c >= ' ' && c <= '~' )
52 | password.Append( c );
53 | } while ( keyInfo.Key != ConsoleKey.Enter );
54 |
55 | return password.ToString();
56 | }
57 |
58 | // Validate a file against Steam3 Chunk data
59 | public static List ValidateSteam3FileChecksums(FileStream fs, ProtoManifest.ChunkData[] chunkdata)
60 | {
61 | var neededChunks = new List();
62 | int read;
63 |
64 | foreach (var data in chunkdata)
65 | {
66 | byte[] chunk = new byte[data.UncompressedLength];
67 | fs.Seek((long)data.Offset, SeekOrigin.Begin);
68 | read = fs.Read(chunk, 0, (int)data.UncompressedLength);
69 |
70 | byte[] tempchunk;
71 | if (read < data.UncompressedLength)
72 | {
73 | tempchunk = new byte[read];
74 | Array.Copy(chunk, 0, tempchunk, 0, read);
75 | }
76 | else
77 | {
78 | tempchunk = chunk;
79 | }
80 |
81 | byte[] adler = AdlerHash(tempchunk);
82 | if (!adler.SequenceEqual(data.Checksum))
83 | {
84 | neededChunks.Add(data);
85 | }
86 | }
87 |
88 | return neededChunks;
89 | }
90 |
91 | public static byte[] AdlerHash(byte[] input)
92 | {
93 | uint a = 0, b = 0;
94 | for (int i = 0; i < input.Length; i++)
95 | {
96 | a = (a + input[i]) % 65521;
97 | b = (b + a) % 65521;
98 | }
99 | return BitConverter.GetBytes(a | (b << 16));
100 | }
101 |
102 | public static byte[] SHAHash( byte[] input )
103 | {
104 | using (var sha = SHA1.Create())
105 | {
106 | var output = sha.ComputeHash( input );
107 |
108 | return output;
109 | }
110 | }
111 |
112 | public static byte[] DecodeHexString( string hex )
113 | {
114 | if ( hex == null )
115 | return null;
116 |
117 | int chars = hex.Length;
118 | byte[] bytes = new byte[ chars / 2 ];
119 |
120 | for ( int i = 0 ; i < chars ; i += 2 )
121 | bytes[ i / 2 ] = Convert.ToByte( hex.Substring( i, 2 ), 16 );
122 |
123 | return bytes;
124 | }
125 |
126 | public static string EncodeHexString( byte[] input )
127 | {
128 | return input.Aggregate( new StringBuilder(),
129 | ( sb, v ) => sb.Append( v.ToString( "x2" ) )
130 | ).ToString();
131 | }
132 |
133 | public static DialogResult InputBox(string title, string promptText, ref string value)
134 | {
135 | Form form = new Form();
136 | Label label = new Label();
137 | TextBox textBox = new TextBox();
138 | Button buttonOk = new Button();
139 | Button buttonCancel = new Button();
140 |
141 | form.Text = title;
142 | label.Text = promptText;
143 | textBox.Text = value;
144 |
145 | buttonOk.Text = "OK";
146 | buttonCancel.Text = "Cancel";
147 | buttonOk.DialogResult = DialogResult.OK;
148 | buttonCancel.DialogResult = DialogResult.Cancel;
149 |
150 | label.SetBounds(9, 20, 372, 13);
151 | textBox.SetBounds(12, 36, 372, 20);
152 | buttonOk.SetBounds(228, 72, 75, 23);
153 | buttonCancel.SetBounds(309, 72, 75, 23);
154 |
155 | label.AutoSize = true;
156 | textBox.Anchor = textBox.Anchor | AnchorStyles.Right;
157 | buttonOk.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
158 | buttonCancel.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
159 |
160 | form.ClientSize = new Size(396, 107);
161 | form.Controls.AddRange(new Control[] { label, textBox, buttonOk, buttonCancel });
162 | form.ClientSize = new Size(Math.Max(300, label.Right + 10), form.ClientSize.Height);
163 | form.FormBorderStyle = FormBorderStyle.FixedDialog;
164 | form.StartPosition = FormStartPosition.CenterScreen;
165 | form.MinimizeBox = false;
166 | form.MaximizeBox = false;
167 | form.AcceptButton = buttonOk;
168 | form.CancelButton = buttonCancel;
169 |
170 | DialogResult dialogResult = form.ShowDialog();
171 | value = textBox.Text;
172 | return dialogResult;
173 | }
174 |
175 | }
176 | }
177 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/Waiting.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace SteamDepotDownloader_GUI
2 | {
3 | partial class Waiting
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.WaitingMsg = new System.Windows.Forms.Label();
32 | this.SuspendLayout();
33 | //
34 | // WaitingMsg
35 | //
36 | this.WaitingMsg.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
37 | | System.Windows.Forms.AnchorStyles.Left)
38 | | System.Windows.Forms.AnchorStyles.Right)));
39 | this.WaitingMsg.Font = new System.Drawing.Font("SimSun", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
40 | this.WaitingMsg.Location = new System.Drawing.Point(13, 13);
41 | this.WaitingMsg.Name = "WaitingMsg";
42 | this.WaitingMsg.Size = new System.Drawing.Size(357, 23);
43 | this.WaitingMsg.TabIndex = 0;
44 | this.WaitingMsg.Text = "Updating App List...";
45 | this.WaitingMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
46 | //
47 | // Waiting
48 | //
49 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
50 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
51 | this.ClientSize = new System.Drawing.Size(382, 46);
52 | this.Controls.Add(this.WaitingMsg);
53 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
54 | this.Name = "Waiting";
55 | this.ShowInTaskbar = false;
56 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
57 | this.Text = "请稍候...";
58 | this.ResumeLayout(false);
59 |
60 | }
61 |
62 | #endregion
63 |
64 | private System.Windows.Forms.Label WaitingMsg;
65 | }
66 | }
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/Waiting.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace SteamDepotDownloader_GUI
12 | {
13 | public partial class Waiting : Form
14 | {
15 | public static Waiting ShowWaiting(string Message)
16 | {
17 | Waiting WaitingForm = new Waiting();
18 | WaitingForm.WaitingMsg.Text = Message;
19 | WaitingForm.Show();
20 | return WaitingForm;
21 | }
22 | public Waiting()
23 | {
24 | InitializeComponent();
25 | this.ControlBox = false;
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/Waiting.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 |
--------------------------------------------------------------------------------
/SteamDepotDownloader-GUI/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------