├── .gitattributes ├── .gitignore ├── DoW Mod Manager.sln ├── DoW Mod Manager ├── AboutForm.Designer.cs ├── AboutForm.cs ├── AboutForm.resx ├── App.config ├── DialogueForm.Designer.cs ├── DialogueForm.cs ├── DialogueForm.resx ├── DoW Mod Manager.csproj ├── DownloadHelper.cs ├── Engine │ └── Locale │ │ └── English │ │ └── data │ │ ├── art │ │ └── ui │ │ │ └── swf │ │ │ ├── font_glyphs.gfx │ │ │ ├── fontaux.gfx │ │ │ ├── fontbody.gfx │ │ │ ├── fontdecor.gfx │ │ │ └── fonthead.gfx │ │ └── font │ │ ├── albertus extra bold12.fnt │ │ ├── albertus extra bold14.fnt │ │ ├── albertus extra bold16.fnt │ │ ├── ansnb___.ttf │ │ ├── engo.ttf │ │ ├── engravers old english mt30.fnt │ │ ├── gil_____.ttf │ │ ├── gillsans_11.fnt │ │ ├── gillsans_11b.fnt │ │ ├── gillsans_16.fnt │ │ ├── gillsans_bold_16.fnt │ │ ├── quorum medium bold13.fnt │ │ └── quorum medium bold16.fnt ├── Extensions.cs ├── FogRemover.cs ├── FontsManagerForm.Designer.cs ├── FontsManagerForm.cs ├── FontsManagerForm.resx ├── LatestStable │ ├── CopyExecutableHere.cmd │ ├── DoW Mod Manager.exe │ ├── How it works.txt │ └── version ├── MODenizer.ico ├── MessageForm.Designer.cs ├── MessageForm.cs ├── MessageForm.resx ├── MiniBrowser.Designer.cs ├── MiniBrowser.cs ├── MiniBrowser.resx ├── ModDownloaderForm.Designer.cs ├── ModDownloaderForm.cs ├── ModDownloaderForm.resx ├── ModList │ ├── DoW Mod Manager Download Mods.list │ └── version ├── ModManagerForm.Designer.cs ├── ModManagerForm.cs ├── ModManagerForm.resx ├── ModMergerForm.Designer.cs ├── ModMergerForm.cs ├── ModMergerForm.resx ├── NTStatus.cs ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── Resources │ ├── arrow_down.png │ ├── arrow_down_disabled.png │ ├── arrow_up.png │ ├── arrow_up_disabled.png │ ├── checkmark.png │ ├── checkmark_disabled.png │ ├── cross.png │ ├── cross_disabled.png │ ├── minus.png │ ├── minus_disabled.png │ ├── plus.png │ └── plus_disabled.png ├── SettingsManagerForm.Designer.cs ├── SettingsManagerForm.cs ├── SettingsManagerForm.resx ├── SystemPerformanceManagerForm.Designer.cs ├── SystemPerformanceManagerForm.cs ├── SystemPerformanceManagerForm.resx └── WinApiCalls.cs ├── LICENSE ├── README.md └── changelog.txt /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | [Xx]64/ 19 | [Xx]86/ 20 | [Bb]uild/ 21 | bld/ 22 | [Bb]in/ 23 | [Oo]bj/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | # Uncomment if you have tasks that create the project's static files in wwwroot 28 | #wwwroot/ 29 | 30 | # MSTest test Results 31 | [Tt]est[Rr]esult*/ 32 | [Bb]uild[Ll]og.* 33 | 34 | # NUNIT 35 | *.VisualState.xml 36 | TestResult.xml 37 | 38 | # Build Results of an ATL Project 39 | [Dd]ebugPS/ 40 | [Rr]eleasePS/ 41 | dlldata.c 42 | 43 | # DNX 44 | project.lock.json 45 | artifacts/ 46 | 47 | *_i.c 48 | *_p.c 49 | *_i.h 50 | *.ilk 51 | *.meta 52 | *.obj 53 | *.pch 54 | *.pdb 55 | *.pgc 56 | *.pgd 57 | *.rsp 58 | *.sbr 59 | *.tlb 60 | *.tli 61 | *.tlh 62 | *.tmp 63 | *.tmp_proj 64 | *.log 65 | *.vspscc 66 | *.vssscc 67 | .builds 68 | *.pidb 69 | *.svclog 70 | *.scc 71 | 72 | # Chutzpah Test files 73 | _Chutzpah* 74 | 75 | # Visual C++ cache files 76 | ipch/ 77 | *.aps 78 | *.ncb 79 | *.opendb 80 | *.opensdf 81 | *.sdf 82 | *.cachefile 83 | *.VC.db 84 | 85 | # Visual Studio profiler 86 | *.psess 87 | *.vsp 88 | *.vspx 89 | *.sap 90 | 91 | # TFS 2012 Local Workspace 92 | $tf/ 93 | 94 | # Guidance Automation Toolkit 95 | *.gpState 96 | 97 | # ReSharper is a .NET coding add-in 98 | _ReSharper*/ 99 | *.[Rr]e[Ss]harper 100 | *.DotSettings.user 101 | 102 | # JustCode is a .NET coding add-in 103 | .JustCode 104 | 105 | # TeamCity is a build add-in 106 | _TeamCity* 107 | 108 | # DotCover is a Code Coverage Tool 109 | *.dotCover 110 | 111 | # NCrunch 112 | _NCrunch_* 113 | .*crunch*.local.xml 114 | nCrunchTemp_* 115 | 116 | # MightyMoose 117 | *.mm.* 118 | AutoTest.Net/ 119 | 120 | # Web workbench (sass) 121 | .sass-cache/ 122 | 123 | # Installshield output folder 124 | [Ee]xpress/ 125 | 126 | # DocProject is a documentation generator add-in 127 | DocProject/buildhelp/ 128 | DocProject/Help/*.HxT 129 | DocProject/Help/*.HxC 130 | DocProject/Help/*.hhc 131 | DocProject/Help/*.hhk 132 | DocProject/Help/*.hhp 133 | DocProject/Help/Html2 134 | DocProject/Help/html 135 | 136 | # Click-Once directory 137 | publish/ 138 | 139 | # Publish Web Output 140 | *.[Pp]ublish.xml 141 | *.azurePubxml 142 | 143 | # TODO: Un-comment the next line if you do not want to checkin 144 | # your web deploy settings because they may include unencrypted 145 | # passwords 146 | #*.pubxml 147 | *.publishproj 148 | 149 | # NuGet Packages 150 | *.nupkg 151 | # The packages folder can be ignored because of Package Restore 152 | **/packages/* 153 | # except build/, which is used as an MSBuild target. 154 | !**/packages/build/ 155 | # Uncomment if necessary however generally it will be regenerated when needed 156 | #!**/packages/repositories.config 157 | # NuGet v3's project.json files produces more ignoreable files 158 | *.nuget.props 159 | *.nuget.targets 160 | 161 | # Microsoft Azure Build Output 162 | csx/ 163 | *.build.csdef 164 | 165 | # Microsoft Azure Emulator 166 | ecf/ 167 | rcf/ 168 | 169 | # Microsoft Azure ApplicationInsights config file 170 | ApplicationInsights.config 171 | 172 | # Windows Store app package directory 173 | AppPackages/ 174 | BundleArtifacts/ 175 | 176 | # Visual Studio cache files 177 | # files ending in .cache can be ignored 178 | *.[Cc]ache 179 | # but keep track of directories ending in .cache 180 | !*.[Cc]ache/ 181 | 182 | # Others 183 | ClientBin/ 184 | [Ss]tyle[Cc]op.* 185 | ~$* 186 | *~ 187 | *.dbmdl 188 | *.dbproj.schemaview 189 | *.pfx 190 | *.publishsettings 191 | node_modules/ 192 | orleans.codegen.cs 193 | 194 | # RIA/Silverlight projects 195 | Generated_Code/ 196 | 197 | # Backup & report files from converting an old project file 198 | # to a newer Visual Studio version. Backup files are not needed, 199 | # because we have git ;-) 200 | _UpgradeReport_Files/ 201 | Backup*/ 202 | UpgradeLog*.XML 203 | UpgradeLog*.htm 204 | 205 | # SQL Server files 206 | *.mdf 207 | *.ldf 208 | 209 | # Business Intelligence projects 210 | *.rdl.data 211 | *.bim.layout 212 | *.bim_*.settings 213 | 214 | # Microsoft Fakes 215 | FakesAssemblies/ 216 | 217 | # GhostDoc plugin setting file 218 | *.GhostDoc.xml 219 | 220 | # Node.js Tools for Visual Studio 221 | .ntvs_analysis.dat 222 | 223 | # Visual Studio 6 build log 224 | *.plg 225 | 226 | # Visual Studio 6 workspace options file 227 | *.opt 228 | 229 | # Visual Studio LightSwitch build output 230 | **/*.HTMLClient/GeneratedArtifacts 231 | **/*.DesktopClient/GeneratedArtifacts 232 | **/*.DesktopClient/ModelManifest.xml 233 | **/*.Server/GeneratedArtifacts 234 | **/*.Server/ModelManifest.xml 235 | _Pvt_Extensions 236 | 237 | # LightSwitch generated files 238 | GeneratedArtifacts/ 239 | ModelManifest.xml 240 | 241 | # Paket dependency manager 242 | .paket/paket.exe 243 | 244 | # FAKE - F# Make 245 | .fake/ 246 | 247 | #JIT Profiles 248 | *.JITProfile 249 | 250 | #Merge stuff 251 | *.orig 252 | -------------------------------------------------------------------------------- /DoW Mod Manager.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30011.22 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DoW Mod Manager", "DoW Mod Manager\DoW Mod Manager.csproj", "{071DFF9E-1A7F-4F94-A1CE-4B5CB931D8EE}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {071DFF9E-1A7F-4F94-A1CE-4B5CB931D8EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {071DFF9E-1A7F-4F94-A1CE-4B5CB931D8EE}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {071DFF9E-1A7F-4F94-A1CE-4B5CB931D8EE}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {071DFF9E-1A7F-4F94-A1CE-4B5CB931D8EE}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {444B1719-F0CD-4134-83B8-125793760B5E} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /DoW Mod Manager/AboutForm.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | using System.Drawing; 3 | using System; 4 | using System.Windows.Forms; 5 | 6 | namespace DoW_Mod_Manager 7 | { 8 | public partial class AboutForm : Form 9 | { 10 | private readonly ModManagerForm modManager; 11 | 12 | public AboutForm(ModManagerForm form) 13 | { 14 | InitializeComponent(); 15 | 16 | modManager = form; 17 | 18 | // Use the same icon as executable 19 | Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath); 20 | 21 | pictureBox.Image = Icon.ToBitmap(); 22 | 23 | // Get values from ModManagerForm 24 | autoupdateCheckBox.Checked = modManager.GetSetting(ModManagerForm.AUTOUPDATE) == 1; 25 | if (modManager.GetSetting(ModManagerForm.AOT_COMPILATION) == 1) 26 | AOTCompilationRadioButton.Checked = true; 27 | else if (modManager.GetSetting(ModManagerForm.MULTITHREADED_JIT) == 1) 28 | multithreadedJITCompilationRadioButton.Checked = true; 29 | else 30 | singlethreadedJITCompilationRadioButton.Checked = true; 31 | 32 | // We have to add those methods to the EventHandler here so we could avoid accidental firing of those methods after we would change the state of the CheckBox 33 | autoupdateCheckBox.CheckedChanged += new EventHandler(AutoupdateCheckBox_CheckedChanged); 34 | singlethreadedJITCompilationRadioButton.CheckedChanged += new EventHandler(SinglethreadedJITCompilationRadioButton_CheckedChanged); 35 | multithreadedJITCompilationRadioButton.CheckedChanged += new EventHandler(MultithreadedJITCompilationRadioButton_CheckedChanged); 36 | AOTCompilationRadioButton.CheckedChanged += new EventHandler(AOTCompilationRadioButton_CheckedChanged); 37 | } 38 | 39 | private void HomePageButton_Click(object sender, EventArgs e) 40 | { 41 | Process.Start("https://github.com/Fragjacker/DoW-Mod-Manager"); 42 | } 43 | 44 | private void OKButton_Click(object sender, EventArgs e) 45 | { 46 | Close(); 47 | } 48 | 49 | private void UpdateButton_Click(object sender, EventArgs e) 50 | { 51 | DialogResult result = DownloadHelper.CheckForUpdates(silently: false); 52 | 53 | if (result == DialogResult.OK && modManager.GetSetting(ModManagerForm.AOT_COMPILATION) == 1) 54 | modManager.ChangeSetting(ModManagerForm.ACTION_STATE, (int)ModManagerForm.Action.CreateNativeImage); 55 | } 56 | 57 | private void SpecialThanks1LinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) 58 | { 59 | Process.Start("https://stackoverflow.com"); 60 | } 61 | 62 | private void SpecialThanks2LinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) 63 | { 64 | Process.Start("https://github.com/tebjan/TimerTool"); 65 | } 66 | 67 | private void SpecialThanks3LinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) 68 | { 69 | Process.Start("https://github.com/zayenCh/DownloadFile"); 70 | } 71 | 72 | private void AutoupdateCheckBox_CheckedChanged(object sender, EventArgs e) 73 | { 74 | if (autoupdateCheckBox.Checked) 75 | modManager.ChangeSetting(ModManagerForm.AUTOUPDATE, 1); 76 | else 77 | modManager.ChangeSetting(ModManagerForm.AUTOUPDATE, 0); 78 | } 79 | 80 | private void SinglethreadedJITCompilationRadioButton_CheckedChanged(object sender, EventArgs e) 81 | { 82 | if (singlethreadedJITCompilationRadioButton.Checked) 83 | { 84 | modManager.ChangeSetting(ModManagerForm.MULTITHREADED_JIT, 0); 85 | modManager.ChangeSetting(ModManagerForm.AOT_COMPILATION, 0); 86 | 87 | modManager.ChangeSetting(ModManagerForm.ACTION_STATE, (int)ModManagerForm.Action.DeleteJITProfileAndNativeImage); 88 | } 89 | } 90 | 91 | private void MultithreadedJITCompilationRadioButton_CheckedChanged(object sender, EventArgs e) 92 | { 93 | if (multithreadedJITCompilationRadioButton.Checked) 94 | { 95 | modManager.ChangeSetting(ModManagerForm.MULTITHREADED_JIT, 1); 96 | modManager.ChangeSetting(ModManagerForm.AOT_COMPILATION, 0); 97 | 98 | modManager.ChangeSetting(ModManagerForm.ACTION_STATE, (int)ModManagerForm.Action.DeleteNativeImage); 99 | } 100 | } 101 | 102 | private void AOTCompilationRadioButton_CheckedChanged(object sender, EventArgs e) 103 | { 104 | if (AOTCompilationRadioButton.Checked) 105 | { 106 | modManager.ChangeSetting(ModManagerForm.MULTITHREADED_JIT, 0); 107 | modManager.ChangeSetting(ModManagerForm.AOT_COMPILATION, 1); 108 | 109 | modManager.ChangeSetting(ModManagerForm.ACTION_STATE, (int)ModManagerForm.Action.CreateNativeImageAndDeleteJITProfile); 110 | } 111 | } 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /DoW Mod Manager/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /DoW Mod Manager/DialogueForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace DoW_Mod_Manager 2 | { 3 | partial class DialogueForm 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.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); 32 | this.OKButton = new System.Windows.Forms.Button(); 33 | this.cancelButton = new System.Windows.Forms.Button(); 34 | this.dmessageLabel = new System.Windows.Forms.Label(); 35 | this.tableLayoutPanel1.SuspendLayout(); 36 | this.SuspendLayout(); 37 | // 38 | // tableLayoutPanel1 39 | // 40 | this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 41 | | System.Windows.Forms.AnchorStyles.Right))); 42 | this.tableLayoutPanel1.AutoSize = true; 43 | this.tableLayoutPanel1.ColumnCount = 2; 44 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); 45 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 157F)); 46 | this.tableLayoutPanel1.Controls.Add(this.OKButton, 0, 0); 47 | this.tableLayoutPanel1.Controls.Add(this.cancelButton, 1, 0); 48 | this.tableLayoutPanel1.GrowStyle = System.Windows.Forms.TableLayoutPanelGrowStyle.AddColumns; 49 | this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 65); 50 | this.tableLayoutPanel1.Name = "tableLayoutPanel1"; 51 | this.tableLayoutPanel1.RowCount = 1; 52 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); 53 | this.tableLayoutPanel1.Size = new System.Drawing.Size(314, 56); 54 | this.tableLayoutPanel1.TabIndex = 5; 55 | // 56 | // OKButton 57 | // 58 | this.OKButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 59 | | System.Windows.Forms.AnchorStyles.Right))); 60 | this.OKButton.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); 61 | this.OKButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 62 | this.OKButton.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200))))); 63 | this.OKButton.Location = new System.Drawing.Point(10, 10); 64 | this.OKButton.Margin = new System.Windows.Forms.Padding(10, 10, 10, 14); 65 | this.OKButton.Name = "OKButton"; 66 | this.OKButton.Size = new System.Drawing.Size(137, 32); 67 | this.OKButton.TabIndex = 3; 68 | this.OKButton.Text = "Update"; 69 | this.OKButton.UseVisualStyleBackColor = false; 70 | this.OKButton.Click += new System.EventHandler(this.OKButton_Click); 71 | // 72 | // cancelButton 73 | // 74 | this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 75 | | System.Windows.Forms.AnchorStyles.Right))); 76 | this.cancelButton.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); 77 | this.cancelButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 78 | this.cancelButton.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200))))); 79 | this.cancelButton.Location = new System.Drawing.Point(167, 10); 80 | this.cancelButton.Margin = new System.Windows.Forms.Padding(10, 10, 10, 14); 81 | this.cancelButton.Name = "cancelButton"; 82 | this.cancelButton.Size = new System.Drawing.Size(137, 32); 83 | this.cancelButton.TabIndex = 4; 84 | this.cancelButton.Text = "Ignore"; 85 | this.cancelButton.UseVisualStyleBackColor = false; 86 | this.cancelButton.Click += new System.EventHandler(this.CancelButton_Click); 87 | // 88 | // dmessageLabel 89 | // 90 | this.dmessageLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 91 | | System.Windows.Forms.AnchorStyles.Left) 92 | | System.Windows.Forms.AnchorStyles.Right))); 93 | this.dmessageLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); 94 | this.dmessageLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200))))); 95 | this.dmessageLabel.Location = new System.Drawing.Point(19, 11); 96 | this.dmessageLabel.Margin = new System.Windows.Forms.Padding(10, 20, 10, 10); 97 | this.dmessageLabel.Name = "dmessageLabel"; 98 | this.dmessageLabel.Size = new System.Drawing.Size(276, 44); 99 | this.dmessageLabel.TabIndex = 6; 100 | this.dmessageLabel.Text = "Text"; 101 | // 102 | // DialogueForm 103 | // 104 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 105 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 106 | this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60))))); 107 | this.ClientSize = new System.Drawing.Size(314, 121); 108 | this.ControlBox = false; 109 | this.Controls.Add(this.dmessageLabel); 110 | this.Controls.Add(this.tableLayoutPanel1); 111 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; 112 | this.Name = "DialogueForm"; 113 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 114 | this.tableLayoutPanel1.ResumeLayout(false); 115 | this.ResumeLayout(false); 116 | this.PerformLayout(); 117 | 118 | } 119 | 120 | #endregion 121 | 122 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; 123 | private System.Windows.Forms.Button OKButton; 124 | private System.Windows.Forms.Button cancelButton; 125 | private System.Windows.Forms.Label dmessageLabel; 126 | } 127 | } -------------------------------------------------------------------------------- /DoW Mod Manager/DialogueForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | 4 | namespace DoW_Mod_Manager 5 | { 6 | public partial class DialogueForm : Form 7 | { 8 | readonly string exeORmods; 9 | 10 | public DialogueForm(string message, string title, string exeORmods) 11 | { 12 | InitializeComponent(); 13 | 14 | this.exeORmods = exeORmods; 15 | 16 | dmessageLabel.Text = message; 17 | Text = title; 18 | } 19 | 20 | private void OKButton_Click(object sender, EventArgs e) 21 | { 22 | if (exeORmods == "exe") 23 | DownloadHelper.DownloadUpdate(); 24 | else if (exeORmods == "mods") 25 | DownloadHelper.DownloadModlist(); 26 | 27 | Close(); 28 | } 29 | 30 | private void CancelButton_Click(object sender, EventArgs e) 31 | { 32 | Close(); 33 | } 34 | } 35 | 36 | /// 37 | /// A custom DialogueBox helper. 38 | /// 39 | public static class ThemedDialogueBox 40 | { 41 | public static DialogResult Show(string message, string title = " ", string exeORmods = "exe") 42 | { 43 | // "using" construct ensures the resources are freed when form is closed 44 | using (DialogueForm form = new DialogueForm(message, title, exeORmods)) 45 | { 46 | return form.ShowDialog(); 47 | } 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /DoW Mod Manager/DialogueForm.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 | -------------------------------------------------------------------------------- /DoW Mod Manager/DoW Mod Manager.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {071DFF9E-1A7F-4F94-A1CE-4B5CB931D8EE} 8 | WinExe 9 | DoW_Mod_Manager 10 | DoW Mod Manager v2.3.2.2 11 | v4.8 12 | 512 13 | true 14 | true 15 | 16 | 17 | 18 | AnyCPU 19 | true 20 | full 21 | false 22 | bin\Debug\ 23 | DEBUG;TRACE 24 | prompt 25 | 4 26 | 27 | 28 | AnyCPU 29 | pdbonly 30 | true 31 | bin\Release\ 32 | TRACE 33 | prompt 34 | 4 35 | 36 | 37 | MODenizer.ico 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | Form 58 | 59 | 60 | AboutForm.cs 61 | 62 | 63 | 64 | 65 | Form 66 | 67 | 68 | DialogueForm.cs 69 | 70 | 71 | 72 | Form 73 | 74 | 75 | FontsManagerForm.cs 76 | 77 | 78 | Form 79 | 80 | 81 | MessageForm.cs 82 | 83 | 84 | Form 85 | 86 | 87 | MiniBrowser.cs 88 | 89 | 90 | Form 91 | 92 | 93 | ModDownloaderForm.cs 94 | 95 | 96 | Form 97 | 98 | 99 | ModManagerForm.cs 100 | 101 | 102 | Form 103 | 104 | 105 | ModMergerForm.cs 106 | 107 | 108 | 109 | 110 | 111 | Form 112 | 113 | 114 | SettingsManagerForm.cs 115 | 116 | 117 | Form 118 | 119 | 120 | SystemPerformanceManagerForm.cs 121 | 122 | 123 | 124 | AboutForm.cs 125 | Designer 126 | 127 | 128 | DialogueForm.cs 129 | 130 | 131 | FontsManagerForm.cs 132 | 133 | 134 | MessageForm.cs 135 | 136 | 137 | MiniBrowser.cs 138 | 139 | 140 | ModDownloaderForm.cs 141 | 142 | 143 | ModManagerForm.cs 144 | 145 | 146 | ModMergerForm.cs 147 | 148 | 149 | ResXFileCodeGenerator 150 | Resources.Designer.cs 151 | Designer 152 | 153 | 154 | True 155 | Resources.resx 156 | True 157 | 158 | 159 | SettingsManagerForm.cs 160 | 161 | 162 | SystemPerformanceManagerForm.cs 163 | 164 | 165 | SettingsSingleFileGenerator 166 | Settings.Designer.cs 167 | 168 | 169 | True 170 | Settings.settings 171 | True 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | {F935DC20-1CF0-11D0-ADB9-00C04FD58A0B} 195 | 1 196 | 0 197 | 0 198 | tlbimp 199 | False 200 | True 201 | 202 | 203 | 204 | -------------------------------------------------------------------------------- /DoW Mod Manager/DownloadHelper.cs: -------------------------------------------------------------------------------- 1 | using IWshRuntimeLibrary; 2 | using System; 3 | using System.ComponentModel; 4 | using System.Diagnostics; 5 | using System.IO; 6 | using System.Net; 7 | using System.Reflection; 8 | using System.Runtime.CompilerServices; 9 | using System.Threading; 10 | using System.Windows.Forms; 11 | 12 | namespace DoW_Mod_Manager 13 | { 14 | static class DownloadHelper 15 | { 16 | private const string EXE_VERSION_TEXT_URL = "https://raw.githubusercontent.com/Fragjacker/DoW-Mod-Manager/master/DoW%20Mod%20Manager/LatestStable/version"; 17 | private const string EXECUTABLE_URL = "https://github.com/Fragjacker/DoW-Mod-Manager/raw/master/DoW%20Mod%20Manager/LatestStable/DoW%20Mod%20Manager.exe"; 18 | 19 | private const string MODLIST_VERSION_TEXT_URL = "https://raw.githubusercontent.com/IgorTheLight/DoW-Mod-Manager/master/DoW%20Mod%20Manager/ModList/version"; 20 | private const string MODLIST_URL = "https://github.com/IgorTheLight/DoW-Mod-Manager/raw/master/DoW%20Mod%20Manager/ModList/DoW%20Mod%20Manager%20Download%20Mods.list"; 21 | 22 | private static readonly string currentDir = Directory.GetCurrentDirectory(); 23 | private static string latestStringVersion = ""; 24 | private static readonly Version currentVersion = Assembly.GetExecutingAssembly().GetName().Version; 25 | 26 | private static bool closeAndDelete; 27 | 28 | public static DialogResult CheckForUpdates(bool silently) 29 | { 30 | // That fixes problem in Windows 7 31 | ServicePointManager.Expect100Continue = true; 32 | ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; 33 | 34 | // Checking version mentioned in "version" file on GitHub 35 | latestStringVersion = DownloadString(EXE_VERSION_TEXT_URL); 36 | 37 | Version latestVersion; 38 | bool showMessageBox; 39 | string message; 40 | string title; 41 | DialogResult result; 42 | 43 | if (latestStringVersion.Length == 0) 44 | { 45 | showMessageBox = true; 46 | message = "There is no data in \"version\" file on GitHub!"; 47 | title = "Warning!"; 48 | result = DialogResult.Abort; 49 | goto SHOW_MESSAGEBOX; 50 | } 51 | 52 | try 53 | { 54 | latestVersion = new Version(latestStringVersion); 55 | } 56 | catch (Exception ex) 57 | { 58 | showMessageBox = true; 59 | message = "There is something wrong with version number in \"version\" file on GitHub!\n" + ex.Message; 60 | title = "Warning!"; 61 | result = DialogResult.Abort; 62 | goto SHOW_MESSAGEBOX; 63 | } 64 | 65 | if (currentVersion < latestVersion) 66 | { 67 | return ThemedDialogueBox.Show($"The new DoW Mod Manager v{latestStringVersion} is available. Do you wish to update now?", "New update available", exeORmods: "exe"); 68 | } 69 | else 70 | { 71 | showMessageBox = true; 72 | message = "You have the latest version!"; 73 | title = "Good news!"; 74 | result = DialogResult.Cancel; 75 | } 76 | 77 | SHOW_MESSAGEBOX: 78 | 79 | if (!silently) 80 | { 81 | if (showMessageBox) 82 | ThemedMessageBox.Show(message, title); 83 | } 84 | 85 | return result; 86 | } 87 | 88 | // TODO: It looks very similar to CheckForUpdates() 89 | public static DialogResult CheckForNewModlist(bool silently) 90 | { 91 | // That fixes problem in Windows 7 92 | ServicePointManager.Expect100Continue = true; 93 | ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; 94 | 95 | // Checking version mentioned in "version" file on GitHub 96 | latestStringVersion = DownloadString(MODLIST_VERSION_TEXT_URL); 97 | 98 | int latestModlistVersion; 99 | bool showMessageBox; 100 | string message; 101 | string title; 102 | DialogResult result; 103 | 104 | if (latestStringVersion.Length == 0) 105 | { 106 | showMessageBox = true; 107 | message = "There is no data in \"version\" file on GitHub!"; 108 | title = "Warning!"; 109 | result = DialogResult.Abort; 110 | goto SHOW_MESSAGEBOX; 111 | } 112 | 113 | try 114 | { 115 | latestModlistVersion = Convert.ToInt32(latestStringVersion.Replace(".", "")); 116 | } 117 | catch (Exception ex) 118 | { 119 | showMessageBox = true; 120 | message = "There is something wrong with version number in \"version\" file on GitHub!\n" + ex.Message; 121 | title = "Warning!"; 122 | result = DialogResult.Abort; 123 | goto SHOW_MESSAGEBOX; 124 | } 125 | 126 | // Check for version string in Modlist file 127 | int modlistVersion = 0; 128 | using (StreamReader file = new StreamReader(currentDir + "\\" + ModDownloaderForm.MODLIST_FILE)) 129 | { 130 | string line; 131 | 132 | if ((line = file.ReadLine()) != null) 133 | { 134 | try 135 | { 136 | modlistVersion = Convert.ToInt32(line.Replace(".", "")); 137 | } 138 | catch (Exception ex) 139 | { 140 | showMessageBox = true; 141 | message = $"There is something wrong with version number in {ModDownloaderForm.MODLIST_FILE}\n" + ex.Message; 142 | title = "Warning!"; 143 | result = DialogResult.Abort; 144 | goto SHOW_MESSAGEBOX; 145 | } 146 | } 147 | } 148 | 149 | if (modlistVersion < latestModlistVersion) 150 | { 151 | return ThemedDialogueBox.Show($"The new Modlist v{latestStringVersion} is available. Do you wish to update now?", "New update available", exeORmods: "mods"); 152 | } 153 | else 154 | { 155 | showMessageBox = true; 156 | message = "You have the latest version!"; 157 | title = "Good news!"; 158 | result = DialogResult.Cancel; 159 | } 160 | 161 | SHOW_MESSAGEBOX: 162 | 163 | if (!silently) 164 | { 165 | if (showMessageBox) 166 | ThemedMessageBox.Show(message, title); 167 | } 168 | 169 | return result; 170 | } 171 | 172 | // Request the inlining of this method 173 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 174 | public static void DownloadUpdate() 175 | { 176 | DownloadFile(EXECUTABLE_URL, currentDir + $"\\DoW Mod Manager v{latestStringVersion}.exe", closeAndDeleteApplication: true); 177 | } 178 | 179 | // Request the inlining of this method 180 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 181 | public static void DownloadModlist() 182 | { 183 | DownloadFile(MODLIST_URL, currentDir + $"\\{ModDownloaderForm.MODLIST_FILE}", closeAndDeleteApplication: false); 184 | } 185 | 186 | // Request the inlining of this method 187 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 188 | private static string DownloadString(string address) 189 | { 190 | string str = ""; 191 | 192 | using (WebClient webClient = new WebClient()) 193 | { 194 | try 195 | { 196 | str = webClient.DownloadString(address); 197 | } 198 | catch (Exception ex) 199 | { 200 | ThemedMessageBox.Show(ex.Message, "Download Error:"); 201 | } 202 | } 203 | return str; 204 | } 205 | 206 | // Request the inlining of this method 207 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 208 | private static void DownloadFile(string address, string downloadPath, bool closeAndDeleteApplication) 209 | { 210 | // Start a new thread for the download part only. 211 | new Thread(() => 212 | { 213 | // WebClient is more high level than HttpClient 214 | using (WebClient webClient = new WebClient()) 215 | { 216 | ServicePointManager.ServerCertificateValidationCallback = delegate { return true; }; 217 | //webClient.DownloadProgressChanged += new DownloadProgressChangedEventHandler(ProgressChanged); 218 | webClient.DownloadFileCompleted += new AsyncCompletedEventHandler(Completed); 219 | 220 | try 221 | { 222 | webClient.DownloadFileAsync(new Uri(address), downloadPath); 223 | while (webClient.IsBusy) { Application.DoEvents(); } 224 | closeAndDelete = closeAndDeleteApplication; 225 | } 226 | catch (Exception ex) 227 | { 228 | ThemedMessageBox.Show(ex.Message, "Download Error:"); 229 | } 230 | } 231 | }).Start(); 232 | } 233 | 234 | //private void ProgressChanged(object sender, DownloadProgressChangedEventArgs e) 235 | //{ 236 | // ThemedMessageBox.Show(e.ProgressPercentage + "%"); 237 | //} 238 | 239 | private static void Completed(object sender, AsyncCompletedEventArgs e) 240 | { 241 | if (closeAndDelete) 242 | { 243 | ThemedMessageBox.Show("Download completed!\nApplication will restart to take effect", "Good news!"); 244 | CleanupAndStartApp(); 245 | } 246 | } 247 | 248 | /// 249 | /// This method terminates the original program, deletes the old executable, starts the new app 250 | /// and creates a new shortcut on the desktop for it. 251 | /// Delete code was taken from https://www.codeproject.com/articles/31454/how-to-make-your-application-delete-itself-immedia. 252 | /// 253 | // Request the inlining of this method 254 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 255 | private static void CleanupAndStartApp() 256 | { 257 | string oldExecutablePath = currentDir + "\\" + AppDomain.CurrentDomain.FriendlyName; 258 | string newExecutablePath = currentDir + $"\\DoW Mod Manager v{latestStringVersion}.exe"; 259 | 260 | // Start new downloaded exectuable 261 | Process.Start(newExecutablePath); 262 | // Delete the old executable after 3 seconds have passed using cmd! 263 | Process.Start("cmd.exe", "/C choice /C Y /N /D Y /T 1 & Del \"" + oldExecutablePath + "\""); 264 | CreateShortcut($"DoW Mod Manager v{latestStringVersion}", newExecutablePath); 265 | Program.TerminateApp(); 266 | } 267 | 268 | /// 269 | /// This method creates a new shortcut of a newly created Mod Manager file! 270 | /// 271 | /// 272 | // Request the inlining of this method 273 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 274 | private static void CreateShortcut(string shortcutName, string targetPath) 275 | { 276 | string shortcutLocation = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), shortcutName + ".lnk"); 277 | WshShell shell = new WshShell(); 278 | IWshShortcut shortcut = (IWshShortcut)shell.CreateShortcut(shortcutLocation); 279 | 280 | shortcut.Description = $"The latest DoW Mod Manager v{latestStringVersion}"; 281 | shortcut.TargetPath = targetPath; 282 | shortcut.WorkingDirectory = currentDir; 283 | shortcut.Save(); 284 | } 285 | } 286 | } 287 | -------------------------------------------------------------------------------- /DoW Mod Manager/Engine/Locale/English/data/art/ui/swf/font_glyphs.gfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fragjacker/DoW-Mod-Manager/276258ce684dbb1ef095852207e03f62325e7888/DoW Mod Manager/Engine/Locale/English/data/art/ui/swf/font_glyphs.gfx -------------------------------------------------------------------------------- /DoW Mod Manager/Engine/Locale/English/data/art/ui/swf/fontaux.gfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fragjacker/DoW-Mod-Manager/276258ce684dbb1ef095852207e03f62325e7888/DoW Mod Manager/Engine/Locale/English/data/art/ui/swf/fontaux.gfx -------------------------------------------------------------------------------- /DoW Mod Manager/Engine/Locale/English/data/art/ui/swf/fontbody.gfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fragjacker/DoW-Mod-Manager/276258ce684dbb1ef095852207e03f62325e7888/DoW Mod Manager/Engine/Locale/English/data/art/ui/swf/fontbody.gfx -------------------------------------------------------------------------------- /DoW Mod Manager/Engine/Locale/English/data/art/ui/swf/fontdecor.gfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fragjacker/DoW-Mod-Manager/276258ce684dbb1ef095852207e03f62325e7888/DoW Mod Manager/Engine/Locale/English/data/art/ui/swf/fontdecor.gfx -------------------------------------------------------------------------------- /DoW Mod Manager/Engine/Locale/English/data/art/ui/swf/fonthead.gfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fragjacker/DoW-Mod-Manager/276258ce684dbb1ef095852207e03f62325e7888/DoW Mod Manager/Engine/Locale/English/data/art/ui/swf/fonthead.gfx -------------------------------------------------------------------------------- /DoW Mod Manager/Engine/Locale/English/data/font/albertus extra bold12.fnt: -------------------------------------------------------------------------------- 1 | font = 2 | { 3 | type = "FreeType2"; 4 | name = "Andale Sans Bold"; 5 | file = "ANSNB___.TTF"; 6 | 7 | sizeDefault = 28; 8 | size640 = 9; 9 | size800 = 12; 10 | size1024 = 14; 11 | size1280 = 18; 12 | size1366 = 21; 13 | size1600 = 24; 14 | size1920 = 28; 15 | size2560 = 34; 16 | size4096 = 56; 17 | 18 | spaceChar = " "; 19 | missingChar = "?"; 20 | } 21 | -------------------------------------------------------------------------------- /DoW Mod Manager/Engine/Locale/English/data/font/albertus extra bold14.fnt: -------------------------------------------------------------------------------- 1 | font = 2 | { 3 | type = "FreeType2"; 4 | name = "Andale Sans Bold"; 5 | file = "ANSNB___.TTF"; 6 | 7 | sizeDefault = 34; 8 | size640 = 12; 9 | size800 = 15; 10 | size1024 = 22; 11 | size1280 = 25; 12 | size1366 = 27; 13 | size1600 = 30; 14 | size1920 = 34; 15 | size2560 = 44; 16 | size4096 = 68; 17 | 18 | spaceChar = " "; 19 | missingChar = "?"; 20 | } 21 | -------------------------------------------------------------------------------- /DoW Mod Manager/Engine/Locale/English/data/font/albertus extra bold16.fnt: -------------------------------------------------------------------------------- 1 | font = 2 | { 3 | type = "FreeType2"; 4 | name = "Andale Sans Bold"; 5 | file = "ANSNB___.TTF"; 6 | 7 | sizeDefault = 38; 8 | size640 = 13; 9 | size800 = 17; 10 | size1024 = 24; 11 | size1280 = 27; 12 | size1366 = 29; 13 | size1600 = 33; 14 | size1920 = 38; 15 | size2560 = 48; 16 | size4096 = 72; 17 | 18 | spaceChar = " "; 19 | missingChar = "?"; 20 | } 21 | -------------------------------------------------------------------------------- /DoW Mod Manager/Engine/Locale/English/data/font/ansnb___.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fragjacker/DoW-Mod-Manager/276258ce684dbb1ef095852207e03f62325e7888/DoW Mod Manager/Engine/Locale/English/data/font/ansnb___.ttf -------------------------------------------------------------------------------- /DoW Mod Manager/Engine/Locale/English/data/font/engo.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fragjacker/DoW-Mod-Manager/276258ce684dbb1ef095852207e03f62325e7888/DoW Mod Manager/Engine/Locale/English/data/font/engo.ttf -------------------------------------------------------------------------------- /DoW Mod Manager/Engine/Locale/English/data/font/engravers old english mt30.fnt: -------------------------------------------------------------------------------- 1 | font = 2 | { 3 | type = "FreeType2"; 4 | name = "Engravers Old English"; 5 | file = "ENGO.ttf"; 6 | 7 | sizeDefault = 50; 8 | size640 = 16; 9 | size800 = 22; 10 | size1024 = 30; 11 | size1280 = 32; 12 | size1366 = 36; 13 | size1600 = 44; 14 | size1920 = 50; 15 | size2560 = 64; 16 | size4096 = 100; 17 | 18 | spaceChar = " "; 19 | missingChar = "?"; 20 | } 21 | -------------------------------------------------------------------------------- /DoW Mod Manager/Engine/Locale/English/data/font/gil_____.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fragjacker/DoW-Mod-Manager/276258ce684dbb1ef095852207e03f62325e7888/DoW Mod Manager/Engine/Locale/English/data/font/gil_____.ttf -------------------------------------------------------------------------------- /DoW Mod Manager/Engine/Locale/English/data/font/gillsans_11.fnt: -------------------------------------------------------------------------------- 1 | font = 2 | { 3 | type = "FreeType2"; 4 | name = "GillSans_"; 5 | file = "gil_____.ttf"; 6 | 7 | sizeDefault = 30; 8 | size640 = 10; 9 | size800 = 12; 10 | size1024 = 14; 11 | size1280 = 20; 12 | size1366 = 20; 13 | size1600 = 24; 14 | size1920 = 30; 15 | size2560 = 34; 16 | size4096 = 56; 17 | 18 | spaceChar = " "; 19 | missingChar = "?"; 20 | } 21 | -------------------------------------------------------------------------------- /DoW Mod Manager/Engine/Locale/English/data/font/gillsans_11b.fnt: -------------------------------------------------------------------------------- 1 | font = 2 | { 3 | type = "FreeType2"; 4 | name = "GillSans_"; 5 | file = "gil_____.ttf"; 6 | bold = true; 7 | 8 | sizeDefault = 30; 9 | size640 = 10; 10 | size800 = 12; 11 | size1024 = 14; 12 | size1280 = 20; 13 | size1366 = 20; 14 | size1600 = 24; 15 | size1920 = 30; 16 | size2560 = 34; 17 | size4096 = 56; 18 | 19 | spaceChar = " "; 20 | missingChar = "?"; 21 | } 22 | -------------------------------------------------------------------------------- /DoW Mod Manager/Engine/Locale/English/data/font/gillsans_16.fnt: -------------------------------------------------------------------------------- 1 | font = 2 | { 3 | type = "FreeType2"; 4 | name = "Gill Sans"; 5 | file = "gil_____.ttf"; 6 | 7 | sizeDefault = 38; 8 | size640 = 13; 9 | size800 = 17; 10 | size1024 = 24; 11 | size1280 = 27; 12 | size1366 = 29; 13 | size1600 = 33; 14 | size1920 = 38; 15 | size2560 = 48; 16 | size4096 = 72; 17 | 18 | spaceChar = " "; 19 | missingChar = "?"; 20 | } 21 | -------------------------------------------------------------------------------- /DoW Mod Manager/Engine/Locale/English/data/font/gillsans_bold_16.fnt: -------------------------------------------------------------------------------- 1 | font = 2 | { 3 | type = "FreeType2"; 4 | name = "Andale Sans Bold"; 5 | file = "ANSNB___.TTF"; 6 | 7 | sizeDefault = 38; 8 | size640 = 13; 9 | size800 = 17; 10 | size1024 = 24; 11 | size1280 = 27; 12 | size1366 = 29; 13 | size1600 = 33; 14 | size1920 = 38; 15 | size2560 = 48; 16 | size4096 = 72; 17 | 18 | spaceChar = " "; 19 | missingChar = "?"; 20 | } 21 | -------------------------------------------------------------------------------- /DoW Mod Manager/Engine/Locale/English/data/font/quorum medium bold13.fnt: -------------------------------------------------------------------------------- 1 | font = 2 | { 3 | type = "FreeType2"; 4 | name = "Andale Sans Bold"; 5 | file = "ANSNB___.TTF"; 6 | 7 | sizeDefault = 32; 8 | size640 = 11; 9 | size800 = 14; 10 | size1024 = 21; 11 | size1280 = 23; 12 | size1366 = 25; 13 | size1600 = 28; 14 | size1920 = 32; 15 | size2560 = 42; 16 | size4096 = 64; 17 | 18 | spaceChar = " "; 19 | missingChar = "?"; 20 | } 21 | -------------------------------------------------------------------------------- /DoW Mod Manager/Engine/Locale/English/data/font/quorum medium bold16.fnt: -------------------------------------------------------------------------------- 1 | font = 2 | { 3 | type = "FreeType2"; 4 | name = "Andale Sans Bold"; 5 | file = "ANSNB___.TTF"; 6 | 7 | sizeDefault = 38; 8 | size640 = 13; 9 | size800 = 17; 10 | size1024 = 24; 11 | size1280 = 27; 12 | size1366 = 29; 13 | size1600 = 33; 14 | size1920 = 38; 15 | size2560 = 48; 16 | size4096 = 72; 17 | 18 | spaceChar = " "; 19 | missingChar = "?"; 20 | } 21 | -------------------------------------------------------------------------------- /DoW Mod Manager/Extensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace DoW_Mod_Manager 4 | { 5 | public static class Extensions 6 | { 7 | /// 8 | /// This method gets a value from a line of text 9 | /// 10 | /// 11 | /// string 12 | public static string GetValueFromLine(this string line, bool deleteModule) 13 | { 14 | int indexOfEqualSigh = line.IndexOf('='); 15 | 16 | if (indexOfEqualSigh > 0) 17 | { 18 | // Deleting all chars before equal sigh 19 | line = line.Substring(indexOfEqualSigh + 1, line.Length - indexOfEqualSigh - 1); 20 | 21 | if (deleteModule) 22 | return line.Replace(" ", "").Replace(".module", ""); 23 | else 24 | return line.Replace(" ", ""); 25 | } 26 | else 27 | return ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /DoW Mod Manager/FogRemover.cs: -------------------------------------------------------------------------------- 1 | // Decompiled with JetBrains decompiler 2 | // Type: SSNoFog.FogRemover 3 | // Assembly: SSNoFog, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 4 | // MVID: ABA6371C-50C2-412D-8152-53D605E42626 5 | // Assembly location: D:\THQ\Dawn of War - Soulstorm\SSNoFog.exe 6 | // This was decompiled from the "SSNoFog.exe" made by the russian DoW modding community. 7 | // And later this file was changed by IgorTheLight to be more human-friendly 8 | // And then it was further improved by BlueAmulet 9 | 10 | using System; 11 | using System.Diagnostics; 12 | using System.Linq; 13 | using System.Runtime.InteropServices; 14 | 15 | namespace DoW_Mod_Manager 16 | { 17 | public static class FogRemover 18 | { 19 | private static readonly byte[] getZero = new byte[6] { 217, 238, 15, 31, 64, 0 }; 20 | private static readonly byte[] setNothing = new byte[6] { 221, 216, 15, 31, 64, 0 }; 21 | private static readonly byte[] float512 = new byte[4] { 0, 0, 0, 68 }; 22 | private static readonly byte[] float96 = new byte[4] { 0, 0, 192, 66 }; 23 | private static readonly byte[] getFog = new byte[6] { 217, 129, 96, 12, 0, 0 }; 24 | private static readonly byte[] setMapSkyDistance = new byte[6] { 217, 155, 112, 12, 0, 0 }; 25 | 26 | private const int PAGE_EXECUTE_READWRITE = 0x40; 27 | 28 | private const int fogAddress12 = 0x745570; 29 | private const int float512Address12 = 0x863B18; 30 | private const int mapSkyDistanceAddress12 = 0x7470CA; 31 | 32 | private const int fogAddressSteam = 0x8282F0; 33 | private const int float512AddressSteam = 0xAF54C8; 34 | private const int mapSkyDistanceAddressSteam = 0x82A33A; 35 | 36 | [DllImport("kernel32.dll")] 37 | private static extern IntPtr OpenProcess(int dwDesiredAccess, bool bInheritHandle, int dwProcessId); 38 | 39 | [DllImport("kernel32.dll")] 40 | private static extern bool ReadProcessMemory(IntPtr hProcess, int lpBaseAddress, byte[] lpBuffer, int dwSize, out int lpNumberOfBytesRead); 41 | 42 | [DllImport("kernel32.dll", SetLastError = true)] 43 | private static extern bool WriteProcessMemory(IntPtr hProcess, int lpBaseAddress, byte[] lpBuffer, int dwSize, out int lpNumberOfBytesWritten); 44 | 45 | [DllImport("kernel32.dll")] 46 | public static extern bool CloseHandle(IntPtr handle); 47 | 48 | [DllImport("kernel32.dll")] 49 | private static extern bool VirtualProtectEx(IntPtr hProcess, int lpAddress, int dwSize, int flNewProtect, out int lpflOldProtect); 50 | 51 | public static void DisableFog(Process process) 52 | { 53 | ActuallyDisableFog(process, fogAddress12, float512Address12, mapSkyDistanceAddress12); 54 | ActuallyDisableFog(process, fogAddressSteam, float512AddressSteam, mapSkyDistanceAddressSteam); 55 | } 56 | 57 | private static void ActuallyDisableFog(Process process, int fogAddress, int float512Address, int mapSkyDistanceAddress) 58 | { 59 | IntPtr pHandle = OpenProcess(56, false, process.Id); 60 | try 61 | { 62 | CheckToggleMemory(fogAddress, getFog, getZero, pHandle); 63 | CheckToggleMemory(float512Address, float96, float512, pHandle); 64 | CheckToggleMemory(mapSkyDistanceAddress, setMapSkyDistance, setNothing, pHandle); 65 | } 66 | finally 67 | { 68 | CloseHandle(pHandle); 69 | } 70 | } 71 | 72 | private static bool CheckToggleMemory(int addr, byte[] checkVal, byte[] setVal, IntPtr pHandle) 73 | { 74 | byte[] lpBuffer = new byte[checkVal.Length]; 75 | 76 | if (!ReadProcessMemory(pHandle, addr, lpBuffer, lpBuffer.Length, out int lpNumberOfBytesRead) 77 | || lpNumberOfBytesRead != lpBuffer.Length 78 | || !lpBuffer.SequenceEqual(checkVal)) 79 | return false; 80 | 81 | VirtualProtectEx(pHandle, addr, setVal.Length, PAGE_EXECUTE_READWRITE, out int lpflOldProtect); 82 | int returnCode = WriteProcessMemory(pHandle, addr, setVal, setVal.Length, out _) ? 1 : 0; 83 | 84 | VirtualProtectEx(pHandle, addr, setVal.Length, lpflOldProtect, out _); 85 | return returnCode != 0; 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /DoW Mod Manager/FontsManagerForm.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 | -------------------------------------------------------------------------------- /DoW Mod Manager/LatestStable/CopyExecutableHere.cmd: -------------------------------------------------------------------------------- 1 | del *.exe 2 | PUSHD .. 3 | copy bin\Release\*.exe LatestStable\ 4 | POPD 5 | rename *.exe "DoW Mod Manager.exe" 6 | notepad version -------------------------------------------------------------------------------- /DoW Mod Manager/LatestStable/DoW Mod Manager.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fragjacker/DoW-Mod-Manager/276258ce684dbb1ef095852207e03f62325e7888/DoW Mod Manager/LatestStable/DoW Mod Manager.exe -------------------------------------------------------------------------------- /DoW Mod Manager/LatestStable/How it works.txt: -------------------------------------------------------------------------------- 1 | To use autoupdates you have to: 2 | * Run "CopyExecutableHere.cmd" 3 | * Change version in "version" file (this file would open automatically with a Notepad) -------------------------------------------------------------------------------- /DoW Mod Manager/LatestStable/version: -------------------------------------------------------------------------------- 1 | 2.3.2.2 -------------------------------------------------------------------------------- /DoW Mod Manager/MODenizer.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fragjacker/DoW-Mod-Manager/276258ce684dbb1ef095852207e03f62325e7888/DoW Mod Manager/MODenizer.ico -------------------------------------------------------------------------------- /DoW Mod Manager/MessageForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace DoW_Mod_Manager 2 | { 3 | internal partial class MessageForm 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.messageLabel = new System.Windows.Forms.Label(); 32 | this.OKButton = new System.Windows.Forms.Button(); 33 | this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); 34 | this.tableLayoutPanel1.SuspendLayout(); 35 | this.SuspendLayout(); 36 | // 37 | // messageLabel 38 | // 39 | this.messageLabel.AutoSize = true; 40 | this.messageLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); 41 | this.messageLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200))))); 42 | this.messageLabel.Location = new System.Drawing.Point(10, 20); 43 | this.messageLabel.Margin = new System.Windows.Forms.Padding(10, 20, 10, 10); 44 | this.messageLabel.Name = "messageLabel"; 45 | this.messageLabel.Size = new System.Drawing.Size(28, 13); 46 | this.messageLabel.TabIndex = 0; 47 | this.messageLabel.Text = "Text"; 48 | // 49 | // OKButton 50 | // 51 | this.OKButton.Anchor = System.Windows.Forms.AnchorStyles.Bottom; 52 | this.OKButton.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); 53 | this.OKButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 54 | this.OKButton.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200))))); 55 | this.OKButton.Location = new System.Drawing.Point(43, 91); 56 | this.OKButton.Margin = new System.Windows.Forms.Padding(10, 10, 10, 14); 57 | this.OKButton.Name = "OKButton"; 58 | this.OKButton.Size = new System.Drawing.Size(106, 38); 59 | this.OKButton.TabIndex = 2; 60 | this.OKButton.Text = "OK"; 61 | this.OKButton.UseVisualStyleBackColor = false; 62 | this.OKButton.Click += new System.EventHandler(this.OKButton_Click); 63 | // 64 | // tableLayoutPanel1 65 | // 66 | this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 67 | | System.Windows.Forms.AnchorStyles.Left) 68 | | System.Windows.Forms.AnchorStyles.Right))); 69 | this.tableLayoutPanel1.AutoSize = true; 70 | this.tableLayoutPanel1.ColumnCount = 1; 71 | this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); 72 | this.tableLayoutPanel1.Controls.Add(this.OKButton, 0, 1); 73 | this.tableLayoutPanel1.Controls.Add(this.messageLabel, 0, 0); 74 | this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); 75 | this.tableLayoutPanel1.Name = "tableLayoutPanel1"; 76 | this.tableLayoutPanel1.RowCount = 2; 77 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); 78 | this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); 79 | this.tableLayoutPanel1.Size = new System.Drawing.Size(193, 143); 80 | this.tableLayoutPanel1.TabIndex = 3; 81 | // 82 | // MessageForm 83 | // 84 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 85 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 86 | this.AutoSize = true; 87 | this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60))))); 88 | this.ClientSize = new System.Drawing.Size(193, 142); 89 | this.ControlBox = false; 90 | this.Controls.Add(this.tableLayoutPanel1); 91 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; 92 | this.MinimumSize = new System.Drawing.Size(199, 148); 93 | this.Name = "MessageForm"; 94 | this.ShowIcon = false; 95 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 96 | this.tableLayoutPanel1.ResumeLayout(false); 97 | this.tableLayoutPanel1.PerformLayout(); 98 | this.ResumeLayout(false); 99 | this.PerformLayout(); 100 | 101 | } 102 | 103 | #endregion 104 | 105 | private System.Windows.Forms.Label messageLabel; 106 | private System.Windows.Forms.Button OKButton; 107 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; 108 | } 109 | } -------------------------------------------------------------------------------- /DoW Mod Manager/MessageForm.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Forms; 2 | 3 | namespace DoW_Mod_Manager 4 | { 5 | internal partial class MessageForm : Form 6 | { 7 | public MessageForm(string message, string title) 8 | { 9 | InitializeComponent(); 10 | 11 | messageLabel.Text = message; 12 | Text = title; 13 | } 14 | 15 | private void OKButton_Click(object sender, System.EventArgs e) 16 | { 17 | Close(); 18 | } 19 | } 20 | 21 | /// 22 | /// Your custom message box helper. 23 | /// 24 | public static class ThemedMessageBox 25 | { 26 | // If we would pass the empty string as title - it will just disappear! 27 | public static void Show(string message, string title = " ") 28 | { 29 | // "using" construct ensures the resources are freed when form is closed 30 | using (MessageForm form = new MessageForm(message, title)) 31 | { 32 | form.ShowDialog(); 33 | } 34 | 35 | // TODO: this way may be faster - tesing required! 36 | //MessageForm form = new MessageForm(message, title); 37 | //form.ShowDialog(); 38 | //form.Dispose(); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /DoW Mod Manager/MessageForm.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 | -------------------------------------------------------------------------------- /DoW Mod Manager/MiniBrowser.Designer.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace DoW_Mod_Manager 3 | { 4 | partial class MiniBrowser 5 | { 6 | /// 7 | /// Required designer variable. 8 | /// 9 | private System.ComponentModel.IContainer components = null; 10 | 11 | /// 12 | /// Clean up any resources being used. 13 | /// 14 | /// true if managed resources should be disposed; otherwise, false. 15 | protected override void Dispose(bool disposing) 16 | { 17 | if (disposing && (components != null)) 18 | { 19 | components.Dispose(); 20 | } 21 | base.Dispose(disposing); 22 | } 23 | 24 | #region Windows Form Designer generated code 25 | 26 | /// 27 | /// Required method for Designer support - do not modify 28 | /// the contents of this method with the code editor. 29 | /// 30 | private void InitializeComponent() 31 | { 32 | this.webBrowser1 = new System.Windows.Forms.WebBrowser(); 33 | this.pictureBox = new System.Windows.Forms.PictureBox(); 34 | this.SuspendLayout(); 35 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit(); 36 | // 37 | // webBrowser1 38 | // 39 | this.webBrowser1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 40 | | System.Windows.Forms.AnchorStyles.Left) 41 | | System.Windows.Forms.AnchorStyles.Right))); 42 | this.webBrowser1.Location = new System.Drawing.Point(0, 3); 43 | this.webBrowser1.Margin = new System.Windows.Forms.Padding(2); 44 | this.webBrowser1.MinimumSize = new System.Drawing.Size(15, 16); 45 | this.webBrowser1.Name = "webBrowser1"; 46 | this.webBrowser1.Size = new System.Drawing.Size(954, 589); 47 | this.webBrowser1.TabIndex = 0; 48 | // 49 | // MiniBrowser 50 | // 51 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 52 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 53 | this.ClientSize = new System.Drawing.Size(954, 593); 54 | this.Controls.Add(this.webBrowser1); 55 | this.Margin = new System.Windows.Forms.Padding(2); 56 | this.MinimumSize = new System.Drawing.Size(970, 632); 57 | this.Name = "MiniBrowser"; 58 | this.Text = "MiniBrowser"; 59 | this.ResumeLayout(false); 60 | // 61 | // pictureBox 62 | // 63 | this.pictureBox.Location = new System.Drawing.Point(20, 16); 64 | this.pictureBox.Name = "pictureBox"; 65 | this.pictureBox.Size = new System.Drawing.Size(50, 50); 66 | this.pictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; 67 | this.pictureBox.TabIndex = 3; 68 | this.pictureBox.TabStop = false; 69 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit(); 70 | } 71 | 72 | #endregion 73 | 74 | private System.Windows.Forms.WebBrowser webBrowser1; 75 | private System.Windows.Forms.PictureBox pictureBox; 76 | } 77 | } 78 | 79 | -------------------------------------------------------------------------------- /DoW Mod Manager/MiniBrowser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | using System.Drawing; 4 | 5 | namespace DoW_Mod_Manager 6 | { 7 | public partial class MiniBrowser : Form 8 | { 9 | public MiniBrowser(string URL) 10 | { 11 | InitializeComponent(); 12 | 13 | webBrowser1.ScriptErrorsSuppressed = true; 14 | 15 | // Use the same icon as executable 16 | Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath); 17 | 18 | pictureBox.Image = Icon.ToBitmap(); 19 | 20 | try 21 | { 22 | webBrowser1.Navigate(new Uri(URL)); 23 | } 24 | catch (Exception) 25 | { 26 | ThemedMessageBox.Show("Something wrong with this URL:\n" + URL); 27 | } 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /DoW Mod Manager/MiniBrowser.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 | -------------------------------------------------------------------------------- /DoW Mod Manager/ModDownloaderForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace DoW_Mod_Manager 2 | { 3 | partial class ModDownloaderForm 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.searchTextBox = new System.Windows.Forms.TextBox(); 32 | this.popularModsLabel = new System.Windows.Forms.Label(); 33 | this.modListBox = new System.Windows.Forms.ListBox(); 34 | this.openModDBButton = new System.Windows.Forms.Button(); 35 | this.openModPageButton = new System.Windows.Forms.Button(); 36 | this.downloadModDefaultButton = new System.Windows.Forms.Button(); 37 | this.downloadModIEButton = new System.Windows.Forms.Button(); 38 | this.SuspendLayout(); 39 | // 40 | // searchTextBox 41 | // 42 | this.searchTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 43 | | System.Windows.Forms.AnchorStyles.Right))); 44 | this.searchTextBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); 45 | this.searchTextBox.ForeColor = System.Drawing.Color.Gray; 46 | this.searchTextBox.Location = new System.Drawing.Point(16, 30); 47 | this.searchTextBox.Name = "searchTextBox"; 48 | this.searchTextBox.Size = new System.Drawing.Size(448, 20); 49 | this.searchTextBox.TabIndex = 5; 50 | this.searchTextBox.Text = "Search..."; 51 | this.searchTextBox.TextChanged += new System.EventHandler(this.SearchTextBox_TextChanged); 52 | this.searchTextBox.Enter += new System.EventHandler(this.SearchTextBox_Enter); 53 | this.searchTextBox.Leave += new System.EventHandler(this.SearchTextBox_Leave); 54 | // 55 | // popularModsLabel 56 | // 57 | this.popularModsLabel.AutoSize = true; 58 | this.popularModsLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200))))); 59 | this.popularModsLabel.Location = new System.Drawing.Point(13, 13); 60 | this.popularModsLabel.Name = "popularModsLabel"; 61 | this.popularModsLabel.Size = new System.Drawing.Size(89, 13); 62 | this.popularModsLabel.TabIndex = 0; 63 | this.popularModsLabel.Text = "Popular mods for "; 64 | // 65 | // modListBox 66 | // 67 | this.modListBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 68 | | System.Windows.Forms.AnchorStyles.Left) 69 | | System.Windows.Forms.AnchorStyles.Right))); 70 | this.modListBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40))))); 71 | this.modListBox.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200))))); 72 | this.modListBox.FormattingEnabled = true; 73 | this.modListBox.Location = new System.Drawing.Point(16, 56); 74 | this.modListBox.Name = "modListBox"; 75 | this.modListBox.ScrollAlwaysVisible = true; 76 | this.modListBox.Size = new System.Drawing.Size(448, 420); 77 | this.modListBox.TabIndex = 1; 78 | // 79 | // openModDBButton 80 | // 81 | this.openModDBButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 82 | this.openModDBButton.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); 83 | this.openModDBButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 84 | this.openModDBButton.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200))))); 85 | this.openModDBButton.Location = new System.Drawing.Point(484, 30); 86 | this.openModDBButton.Name = "openModDBButton"; 87 | this.openModDBButton.Size = new System.Drawing.Size(117, 38); 88 | this.openModDBButton.TabIndex = 2; 89 | this.openModDBButton.Text = "Open ModDB.com"; 90 | this.openModDBButton.UseVisualStyleBackColor = false; 91 | this.openModDBButton.Click += new System.EventHandler(this.OpenModDBButton_Click); 92 | // 93 | // openModPageButton 94 | // 95 | this.openModPageButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 96 | this.openModPageButton.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); 97 | this.openModPageButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 98 | this.openModPageButton.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200))))); 99 | this.openModPageButton.Location = new System.Drawing.Point(484, 74); 100 | this.openModPageButton.Name = "openModPageButton"; 101 | this.openModPageButton.Size = new System.Drawing.Size(117, 38); 102 | this.openModPageButton.TabIndex = 4; 103 | this.openModPageButton.Text = "Open mod page"; 104 | this.openModPageButton.UseVisualStyleBackColor = false; 105 | this.openModPageButton.Click += new System.EventHandler(this.OpenModPageButton_Click); 106 | // 107 | // downloadModDefaultButton 108 | // 109 | this.downloadModDefaultButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 110 | this.downloadModDefaultButton.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); 111 | this.downloadModDefaultButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 112 | this.downloadModDefaultButton.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200))))); 113 | this.downloadModDefaultButton.Location = new System.Drawing.Point(484, 162); 114 | this.downloadModDefaultButton.Name = "downloadModDefaultButton"; 115 | this.downloadModDefaultButton.Size = new System.Drawing.Size(117, 38); 116 | this.downloadModDefaultButton.TabIndex = 3; 117 | this.downloadModDefaultButton.Text = "Download mod using default browser"; 118 | this.downloadModDefaultButton.UseVisualStyleBackColor = false; 119 | this.downloadModDefaultButton.Click += new System.EventHandler(this.DownloadModDefaultButton_Click); 120 | // 121 | // downloadModIEButton 122 | // 123 | this.downloadModIEButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 124 | this.downloadModIEButton.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90))))); 125 | this.downloadModIEButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 126 | this.downloadModIEButton.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200))))); 127 | this.downloadModIEButton.Location = new System.Drawing.Point(484, 118); 128 | this.downloadModIEButton.Name = "downloadModIEButton"; 129 | this.downloadModIEButton.Size = new System.Drawing.Size(117, 38); 130 | this.downloadModIEButton.TabIndex = 6; 131 | this.downloadModIEButton.Text = "Download mod using mini-browser"; 132 | this.downloadModIEButton.UseVisualStyleBackColor = false; 133 | this.downloadModIEButton.Click += new System.EventHandler(this.DownloadModIEButton_Click); 134 | // 135 | // ModDownloaderForm 136 | // 137 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 138 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 139 | this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(60)))), ((int)(((byte)(60))))); 140 | this.ClientSize = new System.Drawing.Size(634, 491); 141 | this.Controls.Add(this.downloadModIEButton); 142 | this.Controls.Add(this.searchTextBox); 143 | this.Controls.Add(this.openModPageButton); 144 | this.Controls.Add(this.openModDBButton); 145 | this.Controls.Add(this.downloadModDefaultButton); 146 | this.Controls.Add(this.modListBox); 147 | this.Controls.Add(this.popularModsLabel); 148 | this.MinimumSize = new System.Drawing.Size(650, 530); 149 | this.Name = "ModDownloaderForm"; 150 | this.Text = "Mod Downloader"; 151 | this.ResumeLayout(false); 152 | this.PerformLayout(); 153 | 154 | } 155 | 156 | #endregion 157 | 158 | private System.Windows.Forms.TextBox searchTextBox; 159 | private System.Windows.Forms.Label popularModsLabel; 160 | private System.Windows.Forms.ListBox modListBox; 161 | private System.Windows.Forms.Button openModDBButton; 162 | private System.Windows.Forms.Button openModPageButton; 163 | private System.Windows.Forms.Button downloadModIEButton; 164 | private System.Windows.Forms.Button downloadModDefaultButton; 165 | } 166 | } -------------------------------------------------------------------------------- /DoW Mod Manager/ModDownloaderForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Drawing; 5 | using System.IO; 6 | using System.Runtime.CompilerServices; 7 | using System.Threading; 8 | using System.Windows.Forms; 9 | 10 | namespace DoW_Mod_Manager 11 | { 12 | public partial class ModDownloaderForm : Form 13 | { 14 | public sealed class Mod 15 | { 16 | public string ModName; 17 | public string ModuleFileName; 18 | public string SiteLink; 19 | public string DownloadLink; 20 | public string PatchLink; 21 | 22 | public Mod(string modName, string moduleFileName, string siteLink, string modDownloadLink, string patchDwonloadLink) 23 | { 24 | ModName = modName; 25 | ModuleFileName = moduleFileName; 26 | SiteLink = siteLink; 27 | DownloadLink = modDownloadLink; 28 | PatchLink = patchDwonloadLink; 29 | } 30 | } 31 | 32 | public const string MODLIST_FILE = "DoW Mod Manager Download Mods.list"; 33 | private const string SEARCH_TEXT = "Search..."; 34 | private readonly List modlist; 35 | 36 | private bool findByModuleName = true; 37 | 38 | private readonly ModManagerForm modManager; 39 | 40 | /// 41 | /// Creates the Form of the Mod Downloader Window 42 | /// 43 | /// 44 | /// 45 | public ModDownloaderForm(ModManagerForm form, string moduleFileName = "") 46 | { 47 | InitializeComponent(); 48 | 49 | modManager = form; 50 | 51 | // Use the same icon as executable 52 | Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath); 53 | 54 | // Add mods to the modlist based on what version of Dawn of War was detected 55 | // DO NOT extract this as a method - it will be x2 times slower! Even with "AggressiveInlining" 56 | modlist = new List(); 57 | 58 | if (modManager.CurrentGameEXE == ModManagerForm.GameExecutable.SOULSTORM) 59 | { 60 | popularModsLabel.Text += "Soulstorm:"; 61 | 62 | ReadModsFromFile("[SS]"); 63 | } 64 | else if (modManager.CurrentGameEXE == ModManagerForm.GameExecutable.DARK_CRUSADE) 65 | { 66 | popularModsLabel.Text += "Dark Crusade:"; 67 | 68 | ReadModsFromFile("[DC]"); 69 | } 70 | else if (modManager.CurrentGameEXE == ModManagerForm.GameExecutable.WINTER_ASSAULT) 71 | { 72 | popularModsLabel.Text += "Winter Assault:"; 73 | 74 | ReadModsFromFile("[WA]"); 75 | } 76 | else if (modManager.CurrentGameEXE == ModManagerForm.GameExecutable.ORIGINAL) 77 | { 78 | popularModsLabel.Text += "Original:"; 79 | 80 | modlist = new List() 81 | { 82 | new Mod("First I have to find a few mods for Original :-)", 83 | "", 84 | "", 85 | "", 86 | "") 87 | }; 88 | 89 | openModPageButton.Enabled = false; 90 | downloadModDefaultButton.Enabled = false; 91 | } 92 | 93 | // If we want to search by the *.module file name - we don't have to populate modListBox.Items 94 | if (moduleFileName.Length > 0) 95 | { 96 | searchTextBox.Text = moduleFileName; 97 | return; 98 | } 99 | 100 | for (int i = 0; i < modlist.Count; i++) 101 | { 102 | modListBox.Items.Add(modlist[i].ModName); 103 | } 104 | 105 | findByModuleName = false; 106 | modListBox.Select(); 107 | 108 | // AddRange(new Mod()) 3.5 ms 109 | // Add(new Mod()) 2.87 ms 110 | // { new Mod() } 2.7 ms 111 | // AddRange() is the slowest? NANI? BAKANA! :-) 112 | } 113 | 114 | /// 115 | /// This method reds mods from a modlist file 116 | /// 117 | /// 118 | // Request the inlining of this method 119 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 120 | private void ReadModsFromFile(string parameter) 121 | { 122 | if (File.Exists(MODLIST_FILE)) 123 | DownloadHelper.CheckForNewModlist(silently: true); 124 | else 125 | DownloadHelper.DownloadModlist(); 126 | 127 | // Wait 2 seconds for Modlist to download 128 | int counter = 0; 129 | while (!IsFileReady(MODLIST_FILE) && counter < 200) 130 | { 131 | Thread.Sleep(10); 132 | counter++; 133 | } 134 | 135 | using (StreamReader file = new StreamReader(MODLIST_FILE)) 136 | { 137 | string line; 138 | 139 | while ((line = file.ReadLine()) != null) 140 | { 141 | if (line.StartsWith(parameter)) 142 | { 143 | // Skipping an empty line 144 | file.ReadLine(); 145 | 146 | // Read lines untill we will found mods for the different version 147 | while (!(Convert.ToChar(file.Peek()) == '[')) 148 | { 149 | // Reading 5 lines and creating a Mod instance 150 | string[] modProperties = new string[5]; 151 | 152 | for (int i = 0; i < 5; i++) 153 | { 154 | if ((line = file.ReadLine()) != null) 155 | { 156 | if (line.StartsWith("-")) 157 | line = ""; 158 | 159 | modProperties[i] = line; 160 | } 161 | else 162 | modProperties[i] = ""; // There is no line to read - we have to add something to a Mod instance! 163 | } 164 | 165 | modlist.Add(new Mod(modProperties[0], modProperties[1], modProperties[2], modProperties[3], modProperties[4])); 166 | 167 | // Skipping an empty line 168 | file.ReadLine(); 169 | } 170 | 171 | // We found all mods for current DoW version 172 | break; 173 | } 174 | } 175 | } 176 | } 177 | 178 | /// 179 | /// This method reads mods from a modlist file 180 | /// 181 | /// 182 | private static bool IsFileReady(string filename) 183 | { 184 | // If the file can be opened for exclusive access it means that the file 185 | // is no longer locked by another process. 186 | try 187 | { 188 | using (FileStream fs = File.Open(filename, FileMode.Open, FileAccess.Read, FileShare.None)) 189 | { 190 | return fs.Length > 0; 191 | } 192 | } 193 | catch (Exception) 194 | { 195 | return false; 196 | } 197 | } 198 | 199 | /// 200 | /// This method opens the ModDB.com web page 201 | /// 202 | private void OpenModDBButton_Click(object sender, EventArgs e) 203 | { 204 | Process.Start("https://www.moddb.com/games/dawn-of-war/mods?sort=rating-desc"); 205 | } 206 | 207 | /// 208 | /// This method opens selected mod web page 209 | /// 210 | private void OpenModPageButton_Click(object sender, EventArgs e) 211 | { 212 | if (modListBox.SelectedItem == null) 213 | return; 214 | 215 | string siteAddress = ""; 216 | 217 | for (int i = 0; i < modlist.Count; i++) 218 | { 219 | if (modListBox.SelectedItem.ToString() == modlist[i].ModName) 220 | siteAddress = modlist[i].SiteLink; 221 | } 222 | 223 | if (siteAddress.Length > 0) 224 | Process.Start(siteAddress); 225 | } 226 | 227 | /// 228 | /// This method downloads selected mod using Internet Explorer's 11 engine 229 | /// 230 | private void DownloadModIEButton_Click(object sender, EventArgs e) 231 | { 232 | DownloadMod(false); 233 | } 234 | 235 | /// 236 | /// This method downloads selected mod using external browser 237 | /// 238 | private void DownloadModDefaultButton_Click(object sender, EventArgs e) 239 | { 240 | DownloadMod(true); 241 | } 242 | 243 | // Request the inlining of this method 244 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 245 | private void DownloadMod(bool isExternalBrowser) 246 | { 247 | if (modListBox.SelectedItem == null) 248 | return; 249 | 250 | string modAddress = ""; 251 | string patchAddress = ""; 252 | 253 | for (int i = 0; i < modlist.Count; i++) 254 | { 255 | if (modListBox.SelectedItem.ToString() == modlist[i].ModName) 256 | modAddress = modlist[i].DownloadLink; 257 | 258 | if (modListBox.SelectedItem.ToString() == modlist[i].ModName) 259 | patchAddress = modlist[i].PatchLink; 260 | } 261 | 262 | if (modAddress.Length > 0) 263 | if (isExternalBrowser) 264 | Process.Start(modAddress); 265 | else 266 | new MiniBrowser(modAddress).Show(); 267 | 268 | if (patchAddress.Length > 0) 269 | { 270 | Thread.Sleep(250); // Some small delay before trying to download second file 271 | 272 | if (isExternalBrowser) 273 | Process.Start(patchAddress); 274 | else 275 | new MiniBrowser(patchAddress).Show(); 276 | } 277 | } 278 | 279 | /// 280 | /// This method reacts to changes in searchTextBox.Text 281 | /// 282 | private void SearchTextBox_TextChanged(object sender, EventArgs e) 283 | { 284 | modListBox.Items.Clear(); 285 | 286 | if (searchTextBox.Text.Length > 0 && searchTextBox.Text != SEARCH_TEXT) 287 | { 288 | if (findByModuleName) 289 | { 290 | for (int i = 0; i < modlist.Count; i++) 291 | { 292 | if (modlist[i].ModuleFileName.Contains(searchTextBox.Text)) 293 | modListBox.Items.Add(modlist[i].ModName); 294 | } 295 | 296 | findByModuleName = false; 297 | } 298 | else 299 | { 300 | for (int i = 0; i < modlist.Count; i++) 301 | { 302 | string modLowerCase = modlist[i].ModName.ToLower(); 303 | string searchLowerCase = searchTextBox.Text.ToLower(); 304 | 305 | if (modLowerCase.Contains(searchLowerCase)) 306 | modListBox.Items.Add(modlist[i].ModName); 307 | } 308 | } 309 | } 310 | else 311 | { 312 | for (int i = 0; i < modlist.Count; i++) 313 | { 314 | modListBox.Items.Add(modlist[i].ModName); 315 | } 316 | } 317 | } 318 | 319 | /// 320 | /// This method reacts to changes in searchTextBox.Focused 321 | /// 322 | private void SearchTextBox_Enter(object sender, EventArgs e) 323 | { 324 | if (searchTextBox.Text == SEARCH_TEXT) 325 | { 326 | searchTextBox.Text = ""; 327 | searchTextBox.ForeColor = Color.FromArgb(200, 200, 200); 328 | } 329 | } 330 | 331 | /// 332 | /// This method reacts to changes in searchTextBox.Focused 333 | /// 334 | private void SearchTextBox_Leave(object sender, EventArgs e) 335 | { 336 | if (searchTextBox.Text == "") 337 | { 338 | searchTextBox.Text = SEARCH_TEXT; 339 | searchTextBox.ForeColor = Color.Gray; 340 | } 341 | } 342 | } 343 | } -------------------------------------------------------------------------------- /DoW Mod Manager/ModDownloaderForm.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 | -------------------------------------------------------------------------------- /DoW Mod Manager/ModList/version: -------------------------------------------------------------------------------- 1 | 151 -------------------------------------------------------------------------------- /DoW Mod Manager/ModManagerForm.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 | -------------------------------------------------------------------------------- /DoW Mod Manager/ModMergerForm.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 | HOW-TO: Use the dropdown list to select a Mod that you want to have 122 | more mods loaded with. Then select and add the available Mods from the Lists below. 123 | Inactive Mods are ignored by the game and can be re-enabled any time. 124 | 125 | 126 | 393, 17 127 | 128 | 129 | 823, 17 130 | 131 | 132 | 531, 17 133 | 134 | 135 | 669, 17 136 | 137 | 138 | 17, 17 139 | 140 | 141 | 198, 17 142 | 143 | 144 | WARNING: This experimental tool was designed to add standalone race mods to any 145 | desired mod. Don't try to merge large mods together or it will crash. 146 | USE THIS TOOL AT YOUR OWN RISK AND ONLY IF YOU KNOW WHAT YOU ARE DOING! 147 | 148 | -------------------------------------------------------------------------------- /DoW Mod Manager/NTStatus.cs: -------------------------------------------------------------------------------- 1 | namespace DoW_Mod_Manager 2 | { 3 | /// 4 | /// A NT status value. 5 | /// 6 | public enum NtStatus : uint 7 | { 8 | // Success 9 | SuccessOrWait0 = 0x00000000, 10 | Wait1 = 0x00000001, 11 | Wait2 = 0x00000002, 12 | Wait3 = 0x00000003, 13 | Wait63 = 0x0000003f, 14 | Abandoned = 0x00000080, 15 | AbandonedWait0 = 0x00000080, 16 | AbandonedWait1 = 0x00000081, 17 | AbandonedWait2 = 0x00000082, 18 | AbandonedWait3 = 0x00000083, 19 | AbandonedWait63 = 0x000000bf, 20 | UserApc = 0x000000c0, 21 | KernelApc = 0x00000100, 22 | Alerted = 0x00000101, 23 | Timeout = 0x00000102, 24 | Pending = 0x00000103, 25 | Reparse = 0x00000104, 26 | MoreEntries = 0x00000105, 27 | NotAllAssigned = 0x00000106, 28 | SomeNotMapped = 0x00000107, 29 | OpLockBreakInProgress = 0x00000108, 30 | VolumeMounted = 0x00000109, 31 | RxActCommitted = 0x0000010a, 32 | NotifyCleanup = 0x0000010b, 33 | NotifyEnumDir = 0x0000010c, 34 | NoQuotasForAccount = 0x0000010d, 35 | PrimaryTransportConnectFailed = 0x0000010e, 36 | PageFaultTransition = 0x00000110, 37 | PageFaultDemandZero = 0x00000111, 38 | PageFaultCopyOnWrite = 0x00000112, 39 | PageFaultGuardPage = 0x00000113, 40 | PageFaultPagingFile = 0x00000114, 41 | CrashDump = 0x00000116, 42 | ReparseObject = 0x00000118, 43 | NothingToTerminate = 0x00000122, 44 | ProcessNotInJob = 0x00000123, 45 | ProcessInJob = 0x00000124, 46 | ProcessCloned = 0x00000129, 47 | FileLockedWithOnlyReaders = 0x0000012a, 48 | FileLockedWithWriters = 0x0000012b, 49 | 50 | // Informational 51 | Informational = 0x40000000, 52 | ObjectNameExists = 0x40000000, 53 | ThreadWasSuspended = 0x40000001, 54 | WorkingSetLimitRange = 0x40000002, 55 | ImageNotAtBase = 0x40000003, 56 | RegistryRecovered = 0x40000009, 57 | 58 | // Warning 59 | Warning = 0x80000000, 60 | GuardPageViolation = 0x80000001, 61 | DatatypeMisalignment = 0x80000002, 62 | Breakpoint = 0x80000003, 63 | SingleStep = 0x80000004, 64 | BufferOverflow = 0x80000005, 65 | NoMoreFiles = 0x80000006, 66 | HandlesClosed = 0x8000000a, 67 | PartialCopy = 0x8000000d, 68 | DeviceBusy = 0x80000011, 69 | InvalidEaName = 0x80000013, 70 | EaListInconsistent = 0x80000014, 71 | NoMoreEntries = 0x8000001a, 72 | LongJump = 0x80000026, 73 | DllMightBeInsecure = 0x8000002b, 74 | 75 | // Error 76 | Error = 0xc0000000, 77 | Unsuccessful = 0xc0000001, 78 | NotImplemented = 0xc0000002, 79 | InvalidInfoClass = 0xc0000003, 80 | InfoLengthMismatch = 0xc0000004, 81 | AccessViolation = 0xc0000005, 82 | InPageError = 0xc0000006, 83 | PagefileQuota = 0xc0000007, 84 | InvalidHandle = 0xc0000008, 85 | BadInitialStack = 0xc0000009, 86 | BadInitialPc = 0xc000000a, 87 | InvalidCid = 0xc000000b, 88 | TimerNotCanceled = 0xc000000c, 89 | InvalidParameter = 0xc000000d, 90 | NoSuchDevice = 0xc000000e, 91 | NoSuchFile = 0xc000000f, 92 | InvalidDeviceRequest = 0xc0000010, 93 | EndOfFile = 0xc0000011, 94 | WrongVolume = 0xc0000012, 95 | NoMediaInDevice = 0xc0000013, 96 | NoMemory = 0xc0000017, 97 | NotMappedView = 0xc0000019, 98 | UnableToFreeVm = 0xc000001a, 99 | UnableToDeleteSection = 0xc000001b, 100 | IllegalInstruction = 0xc000001d, 101 | AlreadyCommitted = 0xc0000021, 102 | AccessDenied = 0xc0000022, 103 | BufferTooSmall = 0xc0000023, 104 | ObjectTypeMismatch = 0xc0000024, 105 | NonContinuableException = 0xc0000025, 106 | BadStack = 0xc0000028, 107 | NotLocked = 0xc000002a, 108 | NotCommitted = 0xc000002d, 109 | InvalidParameterMix = 0xc0000030, 110 | ObjectNameInvalid = 0xc0000033, 111 | ObjectNameNotFound = 0xc0000034, 112 | ObjectNameCollision = 0xc0000035, 113 | ObjectPathInvalid = 0xc0000039, 114 | ObjectPathNotFound = 0xc000003a, 115 | ObjectPathSyntaxBad = 0xc000003b, 116 | DataOverrun = 0xc000003c, 117 | DataLate = 0xc000003d, 118 | DataError = 0xc000003e, 119 | CrcError = 0xc000003f, 120 | SectionTooBig = 0xc0000040, 121 | PortConnectionRefused = 0xc0000041, 122 | InvalidPortHandle = 0xc0000042, 123 | SharingViolation = 0xc0000043, 124 | QuotaExceeded = 0xc0000044, 125 | InvalidPageProtection = 0xc0000045, 126 | MutantNotOwned = 0xc0000046, 127 | SemaphoreLimitExceeded = 0xc0000047, 128 | PortAlreadySet = 0xc0000048, 129 | SectionNotImage = 0xc0000049, 130 | SuspendCountExceeded = 0xc000004a, 131 | ThreadIsTerminating = 0xc000004b, 132 | BadWorkingSetLimit = 0xc000004c, 133 | IncompatibleFileMap = 0xc000004d, 134 | SectionProtection = 0xc000004e, 135 | EasNotSupported = 0xc000004f, 136 | EaTooLarge = 0xc0000050, 137 | NonExistentEaEntry = 0xc0000051, 138 | NoEasOnFile = 0xc0000052, 139 | EaCorruptError = 0xc0000053, 140 | FileLockConflict = 0xc0000054, 141 | LockNotGranted = 0xc0000055, 142 | DeletePending = 0xc0000056, 143 | CtlFileNotSupported = 0xc0000057, 144 | UnknownRevision = 0xc0000058, 145 | RevisionMismatch = 0xc0000059, 146 | InvalidOwner = 0xc000005a, 147 | InvalidPrimaryGroup = 0xc000005b, 148 | NoImpersonationToken = 0xc000005c, 149 | CantDisableMandatory = 0xc000005d, 150 | NoLogonServers = 0xc000005e, 151 | NoSuchLogonSession = 0xc000005f, 152 | NoSuchPrivilege = 0xc0000060, 153 | PrivilegeNotHeld = 0xc0000061, 154 | InvalidAccountName = 0xc0000062, 155 | UserExists = 0xc0000063, 156 | NoSuchUser = 0xc0000064, 157 | GroupExists = 0xc0000065, 158 | NoSuchGroup = 0xc0000066, 159 | MemberInGroup = 0xc0000067, 160 | MemberNotInGroup = 0xc0000068, 161 | LastAdmin = 0xc0000069, 162 | WrongPassword = 0xc000006a, 163 | IllFormedPassword = 0xc000006b, 164 | PasswordRestriction = 0xc000006c, 165 | LogonFailure = 0xc000006d, 166 | AccountRestriction = 0xc000006e, 167 | InvalidLogonHours = 0xc000006f, 168 | InvalidWorkstation = 0xc0000070, 169 | PasswordExpired = 0xc0000071, 170 | AccountDisabled = 0xc0000072, 171 | NoneMapped = 0xc0000073, 172 | TooManyLuidsRequested = 0xc0000074, 173 | LuidsExhausted = 0xc0000075, 174 | InvalidSubAuthority = 0xc0000076, 175 | InvalidAcl = 0xc0000077, 176 | InvalidSid = 0xc0000078, 177 | InvalidSecurityDescr = 0xc0000079, 178 | ProcedureNotFound = 0xc000007a, 179 | InvalidImageFormat = 0xc000007b, 180 | NoToken = 0xc000007c, 181 | BadInheritanceAcl = 0xc000007d, 182 | RangeNotLocked = 0xc000007e, 183 | DiskFull = 0xc000007f, 184 | ServerDisabled = 0xc0000080, 185 | ServerNotDisabled = 0xc0000081, 186 | TooManyGuidsRequested = 0xc0000082, 187 | GuidsExhausted = 0xc0000083, 188 | InvalidIdAuthority = 0xc0000084, 189 | AgentsExhausted = 0xc0000085, 190 | InvalidVolumeLabel = 0xc0000086, 191 | SectionNotExtended = 0xc0000087, 192 | NotMappedData = 0xc0000088, 193 | ResourceDataNotFound = 0xc0000089, 194 | ResourceTypeNotFound = 0xc000008a, 195 | ResourceNameNotFound = 0xc000008b, 196 | ArrayBoundsExceeded = 0xc000008c, 197 | FloatDenormalOperand = 0xc000008d, 198 | FloatDivideByZero = 0xc000008e, 199 | FloatInexactResult = 0xc000008f, 200 | FloatInvalidOperation = 0xc0000090, 201 | FloatOverflow = 0xc0000091, 202 | FloatStackCheck = 0xc0000092, 203 | FloatUnderflow = 0xc0000093, 204 | IntegerDivideByZero = 0xc0000094, 205 | IntegerOverflow = 0xc0000095, 206 | PrivilegedInstruction = 0xc0000096, 207 | TooManyPagingFiles = 0xc0000097, 208 | FileInvalid = 0xc0000098, 209 | InstanceNotAvailable = 0xc00000ab, 210 | PipeNotAvailable = 0xc00000ac, 211 | InvalidPipeState = 0xc00000ad, 212 | PipeBusy = 0xc00000ae, 213 | IllegalFunction = 0xc00000af, 214 | PipeDisconnected = 0xc00000b0, 215 | PipeClosing = 0xc00000b1, 216 | PipeConnected = 0xc00000b2, 217 | PipeListening = 0xc00000b3, 218 | InvalidReadMode = 0xc00000b4, 219 | IoTimeout = 0xc00000b5, 220 | FileForcedClosed = 0xc00000b6, 221 | ProfilingNotStarted = 0xc00000b7, 222 | ProfilingNotStopped = 0xc00000b8, 223 | NotSameDevice = 0xc00000d4, 224 | FileRenamed = 0xc00000d5, 225 | CantWait = 0xc00000d8, 226 | PipeEmpty = 0xc00000d9, 227 | CantTerminateSelf = 0xc00000db, 228 | InternalError = 0xc00000e5, 229 | InvalidParameter1 = 0xc00000ef, 230 | InvalidParameter2 = 0xc00000f0, 231 | InvalidParameter3 = 0xc00000f1, 232 | InvalidParameter4 = 0xc00000f2, 233 | InvalidParameter5 = 0xc00000f3, 234 | InvalidParameter6 = 0xc00000f4, 235 | InvalidParameter7 = 0xc00000f5, 236 | InvalidParameter8 = 0xc00000f6, 237 | InvalidParameter9 = 0xc00000f7, 238 | InvalidParameter10 = 0xc00000f8, 239 | InvalidParameter11 = 0xc00000f9, 240 | InvalidParameter12 = 0xc00000fa, 241 | MappedFileSizeZero = 0xc000011e, 242 | TooManyOpenedFiles = 0xc000011f, 243 | Cancelled = 0xc0000120, 244 | CannotDelete = 0xc0000121, 245 | InvalidComputerName = 0xc0000122, 246 | FileDeleted = 0xc0000123, 247 | SpecialAccount = 0xc0000124, 248 | SpecialGroup = 0xc0000125, 249 | SpecialUser = 0xc0000126, 250 | MembersPrimaryGroup = 0xc0000127, 251 | FileClosed = 0xc0000128, 252 | TooManyThreads = 0xc0000129, 253 | ThreadNotInProcess = 0xc000012a, 254 | TokenAlreadyInUse = 0xc000012b, 255 | PagefileQuotaExceeded = 0xc000012c, 256 | CommitmentLimit = 0xc000012d, 257 | InvalidImageLeFormat = 0xc000012e, 258 | InvalidImageNotMz = 0xc000012f, 259 | InvalidImageProtect = 0xc0000130, 260 | InvalidImageWin16 = 0xc0000131, 261 | LogonServer = 0xc0000132, 262 | DifferenceAtDc = 0xc0000133, 263 | SynchronizationRequired = 0xc0000134, 264 | DllNotFound = 0xc0000135, 265 | IoPrivilegeFailed = 0xc0000137, 266 | OrdinalNotFound = 0xc0000138, 267 | EntryPointNotFound = 0xc0000139, 268 | ControlCExit = 0xc000013a, 269 | PortNotSet = 0xc0000353, 270 | DebuggerInactive = 0xc0000354, 271 | CallbackBypass = 0xc0000503, 272 | PortClosed = 0xc0000700, 273 | MessageLost = 0xc0000701, 274 | InvalidMessage = 0xc0000702, 275 | RequestCanceled = 0xc0000703, 276 | RecursiveDispatch = 0xc0000704, 277 | LpcReceiveBufferExpected = 0xc0000705, 278 | LpcInvalidConnectionUsage = 0xc0000706, 279 | LpcRequestsNotAllowed = 0xc0000707, 280 | ResourceInUse = 0xc0000708, 281 | ProcessIsProtected = 0xc0000712, 282 | VolumeDirty = 0xc0000806, 283 | FileCheckedOut = 0xc0000901, 284 | CheckOutRequired = 0xc0000902, 285 | BadFileType = 0xc0000903, 286 | FileTooLarge = 0xc0000904, 287 | FormsAuthRequired = 0xc0000905, 288 | VirusInfected = 0xc0000906, 289 | VirusDeleted = 0xc0000907, 290 | TransactionalConflict = 0xc0190001, 291 | InvalidTransaction = 0xc0190002, 292 | TransactionNotActive = 0xc0190003, 293 | TmInitializationFailed = 0xc0190004, 294 | RmNotActive = 0xc0190005, 295 | RmMetadataCorrupt = 0xc0190006, 296 | TransactionNotJoined = 0xc0190007, 297 | DirectoryNotRm = 0xc0190008, 298 | CouldNotResizeLog = 0xc0190009, 299 | TransactionsUnsupportedRemote = 0xc019000a, 300 | LogResizeInvalidSize = 0xc019000b, 301 | RemoteFileVersionMismatch = 0xc019000c, 302 | CrmProtocolAlreadyExists = 0xc019000f, 303 | TransactionPropagationFailed = 0xc0190010, 304 | CrmProtocolNotFound = 0xc0190011, 305 | TransactionSuperiorExists = 0xc0190012, 306 | TransactionRequestNotValid = 0xc0190013, 307 | TransactionNotRequested = 0xc0190014, 308 | TransactionAlreadyAborted = 0xc0190015, 309 | TransactionAlreadyCommitted = 0xc0190016, 310 | TransactionInvalidMarshallBuffer = 0xc0190017, 311 | CurrentTransactionNotValid = 0xc0190018, 312 | LogGrowthFailed = 0xc0190019, 313 | ObjectNoLongerExists = 0xc0190021, 314 | StreamMiniversionNotFound = 0xc0190022, 315 | StreamMiniversionNotValid = 0xc0190023, 316 | MiniversionInaccessibleFromSpecifiedTransaction = 0xc0190024, 317 | CantOpenMiniversionWithModifyIntent = 0xc0190025, 318 | CantCreateMoreStreamMiniversions = 0xc0190026, 319 | HandleNoLongerValid = 0xc0190028, 320 | NoTxfMetadata = 0xc0190029, 321 | LogCorruptionDetected = 0xc0190030, 322 | CantRecoverWithHandleOpen = 0xc0190031, 323 | RmDisconnected = 0xc0190032, 324 | EnlistmentNotSuperior = 0xc0190033, 325 | RecoveryNotNeeded = 0xc0190034, 326 | RmAlreadyStarted = 0xc0190035, 327 | FileIdentityNotPersistent = 0xc0190036, 328 | CantBreakTransactionalDependency = 0xc0190037, 329 | CantCrossRmBoundary = 0xc0190038, 330 | TxfDirNotEmpty = 0xc0190039, 331 | IndoubtTransactionsExist = 0xc019003a, 332 | TmVolatile = 0xc019003b, 333 | RollbackTimerExpired = 0xc019003c, 334 | TxfAttributeCorrupt = 0xc019003d, 335 | EfsNotAllowedInTransaction = 0xc019003e, 336 | TransactionalOpenNotAllowed = 0xc019003f, 337 | TransactedMappingUnsupportedRemote = 0xc0190040, 338 | TxfMetadataAlreadyPresent = 0xc0190041, 339 | TransactionScopeCallbacksNotSet = 0xc0190042, 340 | TransactionRequiredPromotion = 0xc0190043, 341 | CannotExecuteFileInTransaction = 0xc0190044, 342 | TransactionsNotFrozen = 0xc0190045, 343 | 344 | MaximumNtStatus = 0xffffffff 345 | } 346 | } 347 | -------------------------------------------------------------------------------- /DoW Mod Manager/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | 4 | namespace DoW_Mod_Manager 5 | { 6 | static class Program 7 | { 8 | /// 9 | /// This method properly terminates the Application 10 | /// 11 | public static void TerminateApp() 12 | { 13 | if (Application.MessageLoop) 14 | { 15 | // it's an WinForms app 16 | Application.Exit(); 17 | } 18 | else 19 | { 20 | // It's a Console app 21 | Environment.Exit(1); 22 | } 23 | } 24 | 25 | /// 26 | /// The main entry point for the application. 27 | /// 28 | [STAThread] 29 | static void Main() 30 | { 31 | Application.EnableVisualStyles(); 32 | Application.SetCompatibleTextRenderingDefault(false); 33 | Application.Run(new ModManagerForm()); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /DoW Mod Manager/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("DoW Mod Manager")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("DoW Mod Manager")] 12 | [assembly: AssemblyCopyright("FragJacker © 2021-2023")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("071dff9e-1a7f-4f94-a1ce-4b5cb931d8ee")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("2.3.2.2")] 35 | [assembly: AssemblyFileVersion("2.3.2.2")] 36 | -------------------------------------------------------------------------------- /DoW Mod Manager/Properties/Resources.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 DoW_Mod_Manager.Properties 12 | { 13 | /// 14 | /// A strongly-typed resource class, for looking up localized strings, etc. 15 | /// 16 | // This class was auto-generated by the StronglyTypedResourceBuilder 17 | // class via a tool like ResGen or Visual Studio. 18 | // To add or remove a member, edit your .ResX file then rerun ResGen 19 | // with the /str option, or rebuild your VS project. 20 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] 21 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 22 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 23 | internal class Resources 24 | { 25 | private static global::System.Resources.ResourceManager resourceMan; 26 | private static global::System.Globalization.CultureInfo resourceCulture; 27 | 28 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 29 | internal Resources() 30 | { 31 | } 32 | 33 | /// 34 | /// Returns the cached ResourceManager instance used by this class. 35 | /// 36 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 37 | internal static global::System.Resources.ResourceManager ResourceManager 38 | { 39 | get 40 | { 41 | if (object.ReferenceEquals(resourceMan, null)) 42 | { 43 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DoW_Mod_Manager.Properties.Resources", typeof(Resources).Assembly); 44 | resourceMan = temp; 45 | } 46 | return resourceMan; 47 | } 48 | } 49 | 50 | /// 51 | /// Overrides the current thread's CurrentUICulture property for all 52 | /// resource lookups using this strongly typed resource class. 53 | /// 54 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 55 | internal static global::System.Globalization.CultureInfo Culture 56 | { 57 | get 58 | { 59 | return resourceCulture; 60 | } 61 | set 62 | { 63 | resourceCulture = value; 64 | } 65 | } 66 | 67 | /// 68 | /// Looks up a localized resource of type System.Drawing.Bitmap. 69 | /// 70 | internal static System.Drawing.Bitmap arrow_down 71 | { 72 | get 73 | { 74 | object obj = ResourceManager.GetObject("arrow_down", resourceCulture); 75 | return ((System.Drawing.Bitmap)(obj)); 76 | } 77 | } 78 | 79 | /// 80 | /// Looks up a localized resource of type System.Drawing.Bitmap. 81 | /// 82 | internal static System.Drawing.Bitmap arrow_down_disabled 83 | { 84 | get 85 | { 86 | object obj = ResourceManager.GetObject("arrow_down_disabled", resourceCulture); 87 | return ((System.Drawing.Bitmap)(obj)); 88 | } 89 | } 90 | 91 | /// 92 | /// Looks up a localized resource of type System.Drawing.Bitmap. 93 | /// 94 | internal static System.Drawing.Bitmap arrow_up 95 | { 96 | get 97 | { 98 | object obj = ResourceManager.GetObject("arrow_up", resourceCulture); 99 | return ((System.Drawing.Bitmap)(obj)); 100 | } 101 | } 102 | 103 | /// 104 | /// Looks up a localized resource of type System.Drawing.Bitmap. 105 | /// 106 | internal static System.Drawing.Bitmap arrow_up_disabled 107 | { 108 | get 109 | { 110 | object obj = ResourceManager.GetObject("arrow_up_disabled", resourceCulture); 111 | return ((System.Drawing.Bitmap)(obj)); 112 | } 113 | } 114 | 115 | /// 116 | /// Looks up a localized resource of type System.Drawing.Bitmap. 117 | /// 118 | internal static System.Drawing.Bitmap checkmark 119 | { 120 | get 121 | { 122 | object obj = ResourceManager.GetObject("checkmark", resourceCulture); 123 | return ((System.Drawing.Bitmap)(obj)); 124 | } 125 | } 126 | 127 | /// 128 | /// Looks up a localized resource of type System.Drawing.Bitmap. 129 | /// 130 | internal static System.Drawing.Bitmap checkmark_disabled 131 | { 132 | get 133 | { 134 | object obj = ResourceManager.GetObject("checkmark_disabled", resourceCulture); 135 | return ((System.Drawing.Bitmap)(obj)); 136 | } 137 | } 138 | 139 | /// 140 | /// Looks up a localized resource of type System.Drawing.Bitmap. 141 | /// 142 | internal static System.Drawing.Bitmap cross 143 | { 144 | get 145 | { 146 | object obj = ResourceManager.GetObject("cross", resourceCulture); 147 | return ((System.Drawing.Bitmap)(obj)); 148 | } 149 | } 150 | 151 | /// 152 | /// Looks up a localized resource of type System.Drawing.Bitmap. 153 | /// 154 | internal static System.Drawing.Bitmap cross_disabled 155 | { 156 | get 157 | { 158 | object obj = ResourceManager.GetObject("cross_disabled", resourceCulture); 159 | return ((System.Drawing.Bitmap)(obj)); 160 | } 161 | } 162 | 163 | /// 164 | /// Looks up a localized resource of type System.Drawing.Bitmap. 165 | /// 166 | internal static System.Drawing.Bitmap minus 167 | { 168 | get 169 | { 170 | object obj = ResourceManager.GetObject("minus", resourceCulture); 171 | return ((System.Drawing.Bitmap)(obj)); 172 | } 173 | } 174 | 175 | /// 176 | /// Looks up a localized resource of type System.Drawing.Bitmap. 177 | /// 178 | internal static System.Drawing.Bitmap minus_disabled 179 | { 180 | get 181 | { 182 | object obj = ResourceManager.GetObject("minus_disabled", resourceCulture); 183 | return ((System.Drawing.Bitmap)(obj)); 184 | } 185 | } 186 | 187 | /// 188 | /// Looks up a localized resource of type System.Drawing.Bitmap. 189 | /// 190 | internal static System.Drawing.Bitmap plus 191 | { 192 | get 193 | { 194 | object obj = ResourceManager.GetObject("plus", resourceCulture); 195 | return ((System.Drawing.Bitmap)(obj)); 196 | } 197 | } 198 | 199 | /// 200 | /// Looks up a localized resource of type System.Drawing.Bitmap. 201 | /// 202 | internal static System.Drawing.Bitmap plus_disabled 203 | { 204 | get 205 | { 206 | object obj = ResourceManager.GetObject("plus_disabled", resourceCulture); 207 | return ((System.Drawing.Bitmap)(obj)); 208 | } 209 | } 210 | } 211 | } 212 | -------------------------------------------------------------------------------- /DoW Mod Manager/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 | 122 | ..\Resources\arrow_down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 123 | 124 | 125 | ..\Resources\arrow_down_disabled.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 126 | 127 | 128 | ..\Resources\arrow_up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 129 | 130 | 131 | ..\Resources\arrow_up_disabled.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 132 | 133 | 134 | ..\Resources\checkmark.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 135 | 136 | 137 | ..\Resources\checkmark_disabled.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 138 | 139 | 140 | ..\Resources\cross.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 141 | 142 | 143 | ..\Resources\cross_disabled.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 144 | 145 | 146 | ..\Resources\minus.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 147 | 148 | 149 | ..\Resources\minus_disabled.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 150 | 151 | 152 | ..\Resources\plus.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 153 | 154 | 155 | ..\Resources\plus_disabled.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 156 | 157 | -------------------------------------------------------------------------------- /DoW Mod Manager/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 DoW_Mod_Manager.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.6.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /DoW Mod Manager/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /DoW Mod Manager/Resources/arrow_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fragjacker/DoW-Mod-Manager/276258ce684dbb1ef095852207e03f62325e7888/DoW Mod Manager/Resources/arrow_down.png -------------------------------------------------------------------------------- /DoW Mod Manager/Resources/arrow_down_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fragjacker/DoW-Mod-Manager/276258ce684dbb1ef095852207e03f62325e7888/DoW Mod Manager/Resources/arrow_down_disabled.png -------------------------------------------------------------------------------- /DoW Mod Manager/Resources/arrow_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fragjacker/DoW-Mod-Manager/276258ce684dbb1ef095852207e03f62325e7888/DoW Mod Manager/Resources/arrow_up.png -------------------------------------------------------------------------------- /DoW Mod Manager/Resources/arrow_up_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fragjacker/DoW-Mod-Manager/276258ce684dbb1ef095852207e03f62325e7888/DoW Mod Manager/Resources/arrow_up_disabled.png -------------------------------------------------------------------------------- /DoW Mod Manager/Resources/checkmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fragjacker/DoW-Mod-Manager/276258ce684dbb1ef095852207e03f62325e7888/DoW Mod Manager/Resources/checkmark.png -------------------------------------------------------------------------------- /DoW Mod Manager/Resources/checkmark_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fragjacker/DoW-Mod-Manager/276258ce684dbb1ef095852207e03f62325e7888/DoW Mod Manager/Resources/checkmark_disabled.png -------------------------------------------------------------------------------- /DoW Mod Manager/Resources/cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fragjacker/DoW-Mod-Manager/276258ce684dbb1ef095852207e03f62325e7888/DoW Mod Manager/Resources/cross.png -------------------------------------------------------------------------------- /DoW Mod Manager/Resources/cross_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fragjacker/DoW-Mod-Manager/276258ce684dbb1ef095852207e03f62325e7888/DoW Mod Manager/Resources/cross_disabled.png -------------------------------------------------------------------------------- /DoW Mod Manager/Resources/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fragjacker/DoW-Mod-Manager/276258ce684dbb1ef095852207e03f62325e7888/DoW Mod Manager/Resources/minus.png -------------------------------------------------------------------------------- /DoW Mod Manager/Resources/minus_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fragjacker/DoW-Mod-Manager/276258ce684dbb1ef095852207e03f62325e7888/DoW Mod Manager/Resources/minus_disabled.png -------------------------------------------------------------------------------- /DoW Mod Manager/Resources/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fragjacker/DoW-Mod-Manager/276258ce684dbb1ef095852207e03f62325e7888/DoW Mod Manager/Resources/plus.png -------------------------------------------------------------------------------- /DoW Mod Manager/Resources/plus_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fragjacker/DoW-Mod-Manager/276258ce684dbb1ef095852207e03f62325e7888/DoW Mod Manager/Resources/plus_disabled.png -------------------------------------------------------------------------------- /DoW Mod Manager/SettingsManagerForm.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 | -------------------------------------------------------------------------------- /DoW Mod Manager/SystemPerformanceManagerForm.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Win32; 2 | using System; 3 | using System.Diagnostics; 4 | using System.Drawing; 5 | using System.Windows.Forms; 6 | 7 | namespace DoW_Mod_Manager 8 | { 9 | public partial class SystemPerformanceManagerForm : Form 10 | { 11 | private const string REG_COMPATIBILITY_PATH = @"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"; 12 | private readonly string REG_DOW_PATH; 13 | 14 | private const string REG_VALUE_FULLSCREEN_OPTIMIZATIONS = "DISABLEDXMAXIMIZEDWINDOWEDMODE"; 15 | private const string REG_VALUE_RUN_AS_ADMIN = "RUNASADMIN"; 16 | private const string REG_VALUE_HDPI_AWARE = "HIGHDPIAWARE"; 17 | private const string REG_VALUE_COMPATIBILITY_WITH = "WINXPSP2"; 18 | 19 | private const string REG_POWER_SCHEMES_PATH = @"SYSTEM\CurrentControlSet\Control\Power\User\PowerSchemes"; 20 | 21 | private const string NAME_ULTIMATE_PERFORMANCE = "Ultimate Performance"; 22 | private const string GUID_ULTIMATE_PERFORMANCE = "e9a42b02-d5df-448d-aa00-03f14749eb61"; 23 | private const string GUID_ULTIMATE_PERFORMANCE_2 = "46742d2f-42d6-41df-a6ed-b49d182ee15d"; 24 | 25 | private const string NAME_MAX_PERFORMANCE = "High Performance"; 26 | private const string GUID_MAX_PERFORMANCE = "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c"; 27 | 28 | private const string NAME_BALANCED = "Balanced"; 29 | private const string GUID_BALANCED = "381b4222-f694-41f0-9685-ff5bb260df2e"; 30 | 31 | private const string NAME_POWER_SAVER = "Power Saver"; 32 | private const string GUID_POWER_SAVER = "a1841308-3541-4fab-bc81-f71556f20b4a"; 33 | 34 | private readonly ModManagerForm modManager; 35 | private readonly Timer timer; 36 | private bool modifyRegistry = false; 37 | private readonly int ultimatePerformanceGUIDIndex = 0; 38 | 39 | public SystemPerformanceManagerForm(ModManagerForm form) 40 | { 41 | InitializeComponent(); 42 | 43 | modManager = form; 44 | 45 | timer = new Timer() 46 | { 47 | Enabled = true, 48 | Interval = 1000 49 | }; 50 | timer.Tick += new EventHandler(TimerTick); 51 | 52 | // Use the same icon as executable 53 | Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath); 54 | 55 | TimerCaps caps = WinApiCalls.QueryTimerResolution(); 56 | minimumTimerResolutionTextBox.Text = caps.PeriodMax / 10000.0 + " ms"; 57 | maximumTimerResolutionTextBox.Text = caps.PeriodMin / 10000.0 + " ms"; 58 | currentTimerResolutionTextBox.Text = caps.PeriodCurrent / 10000.0 + " ms"; 59 | 60 | if (caps.PeriodCurrent / 10000.0 < 0.8) 61 | modManager.IsTimerResolutionLowered = true; 62 | 63 | REG_DOW_PATH = modManager.CurrentDir + "\\" + modManager.CurrentGameEXE; 64 | 65 | // We are checking for Compatibility settings in Registry 66 | using (RegistryKey key = Registry.CurrentUser.OpenSubKey(REG_COMPATIBILITY_PATH, false)) 67 | { 68 | if (key != null) 69 | { 70 | object valueObject = key.GetValue(REG_DOW_PATH); 71 | 72 | if (valueObject != null) 73 | { 74 | string value = valueObject.ToString(); 75 | 76 | if (value.Contains(REG_VALUE_FULLSCREEN_OPTIMIZATIONS)) 77 | fullscreenOptimizationsCheckBox.Checked = true; 78 | if (value.Contains(REG_VALUE_RUN_AS_ADMIN)) 79 | runAsAdministratorCheckBox.Checked = true; 80 | if (value.Contains(REG_VALUE_HDPI_AWARE)) 81 | HDPIiScalingCheckBox.Checked = true; 82 | if (value.Contains(REG_VALUE_COMPATIBILITY_WITH)) 83 | comatibilityModeCheckBox.Checked = true; 84 | } 85 | } 86 | } 87 | 88 | // We are checking for Power Settings in Registry 89 | using (RegistryKey key = Registry.LocalMachine.OpenSubKey(REG_POWER_SCHEMES_PATH + "\\" + GUID_ULTIMATE_PERFORMANCE_2, false)) 90 | { 91 | if (key != null) 92 | { 93 | powerPlanComboBox.Items.Add(NAME_ULTIMATE_PERFORMANCE); 94 | unlockUltimatePerformanceButton.Enabled = false; 95 | ultimatePerformanceGUIDIndex = 2; 96 | } 97 | } 98 | using (RegistryKey key = Registry.LocalMachine.OpenSubKey(REG_POWER_SCHEMES_PATH + "\\" + GUID_ULTIMATE_PERFORMANCE, false)) 99 | { 100 | if (key != null && ultimatePerformanceGUIDIndex == 0) 101 | { 102 | powerPlanComboBox.Items.Add(NAME_ULTIMATE_PERFORMANCE); 103 | unlockUltimatePerformanceButton.Enabled = false; 104 | ultimatePerformanceGUIDIndex = 1; 105 | } 106 | } 107 | using (RegistryKey key = Registry.LocalMachine.OpenSubKey(REG_POWER_SCHEMES_PATH + "\\" + GUID_MAX_PERFORMANCE, false)) 108 | { 109 | if (key != null) 110 | powerPlanComboBox.Items.Add(NAME_MAX_PERFORMANCE); 111 | } 112 | using (RegistryKey key = Registry.LocalMachine.OpenSubKey(REG_POWER_SCHEMES_PATH + "\\" + GUID_BALANCED, false)) 113 | { 114 | if (key != null) 115 | powerPlanComboBox.Items.Add(NAME_BALANCED); 116 | } 117 | using (RegistryKey key = Registry.LocalMachine.OpenSubKey(REG_POWER_SCHEMES_PATH + "\\" + GUID_POWER_SAVER, false)) 118 | { 119 | if (key != null) 120 | powerPlanComboBox.Items.Add(NAME_POWER_SAVER); 121 | } 122 | using (RegistryKey key = Registry.LocalMachine.OpenSubKey(REG_POWER_SCHEMES_PATH, false)) 123 | { 124 | if (key != null) 125 | { 126 | object valueObject = key.GetValue("ActivePowerScheme"); 127 | 128 | if (valueObject != null) 129 | { 130 | string value = valueObject.ToString(); 131 | 132 | switch (value) 133 | { 134 | case GUID_ULTIMATE_PERFORMANCE: 135 | case GUID_ULTIMATE_PERFORMANCE_2: 136 | powerPlanComboBox.SelectedItem = NAME_ULTIMATE_PERFORMANCE; 137 | break; 138 | case GUID_MAX_PERFORMANCE: 139 | powerPlanComboBox.SelectedItem = NAME_MAX_PERFORMANCE; 140 | break; 141 | case GUID_BALANCED: 142 | powerPlanComboBox.SelectedItem = NAME_BALANCED; 143 | break; 144 | case GUID_POWER_SAVER: 145 | powerPlanComboBox.SelectedItem = NAME_POWER_SAVER; 146 | break; 147 | } 148 | } 149 | } 150 | } 151 | 152 | // We have to add those methods to the EventHandler here so we could avoid accidental firing of those methods after we would change the state of the CheckBox 153 | runAsAdministratorCheckBox.CheckedChanged += new EventHandler(CheckBox_CheckedChanged); 154 | HDPIiScalingCheckBox.CheckedChanged += new EventHandler(CheckBox_CheckedChanged); 155 | comatibilityModeCheckBox.CheckedChanged += new EventHandler(CheckBox_CheckedChanged); 156 | fullscreenOptimizationsCheckBox.CheckedChanged += new EventHandler(CheckBox_CheckedChanged); 157 | 158 | powerPlanComboBox.SelectedIndexChanged += new EventHandler(PowerPlanComboBox_SelectedIndexChanged); 159 | } 160 | 161 | private void TimerTick(object sender, EventArgs e) 162 | { 163 | TimerCaps caps = WinApiCalls.QueryTimerResolution(); 164 | currentTimerResolutionTextBox.Text = caps.PeriodCurrent / 10000.0 + " ms"; 165 | } 166 | 167 | private void SetTimerResolutionButton_Click(object sender, EventArgs e) 168 | { 169 | WinApiCalls.SetTimerResolution((uint)(0.5 * 10000)); 170 | modManager.IsTimerResolutionLowered = true; 171 | } 172 | 173 | private void DefaultTimerResolutionButton_Click(object sender, EventArgs e) 174 | { 175 | WinApiCalls.SetTimerResolution(0, false); 176 | modManager.IsTimerResolutionLowered = false; 177 | } 178 | 179 | private void SetPropertiesButton_Click(object sender, EventArgs e) 180 | { 181 | if (modifyRegistry) 182 | { 183 | using (RegistryKey key = Registry.CurrentUser.OpenSubKey(REG_COMPATIBILITY_PATH, true)) 184 | { 185 | if (key != null) 186 | { 187 | string newValue = "~ "; 188 | 189 | if (fullscreenOptimizationsCheckBox.Checked) 190 | newValue += " " + REG_VALUE_FULLSCREEN_OPTIMIZATIONS; 191 | if (runAsAdministratorCheckBox.Checked) 192 | newValue += " " + REG_VALUE_RUN_AS_ADMIN; 193 | if (HDPIiScalingCheckBox.Checked) 194 | newValue += " " + REG_VALUE_HDPI_AWARE; 195 | if (comatibilityModeCheckBox.Checked) 196 | newValue += " " + REG_VALUE_COMPATIBILITY_WITH; 197 | 198 | key.SetValue(REG_DOW_PATH, newValue, RegistryValueKind.String); 199 | } 200 | } 201 | setPropertiesButton.Enabled = false; 202 | } 203 | } 204 | 205 | private void OpenDoWPropertiesButton_Click(object sender, EventArgs e) 206 | { 207 | WinApiCalls.ShowFileProperties(modManager.CurrentGameEXE); 208 | } 209 | 210 | private void CheckBox_CheckedChanged(object sender, EventArgs e) 211 | { 212 | modifyRegistry = true; 213 | setPropertiesButton.Enabled = true; 214 | } 215 | 216 | private void PowerPlanComboBox_SelectedIndexChanged(object sender, EventArgs e) 217 | { 218 | setPowerPlanButton.Enabled = true; 219 | } 220 | 221 | private void SetPowerPlanButton_Click(object sender, EventArgs e) 222 | { 223 | Guid powerPlanGUID = new Guid(GUID_BALANCED); 224 | 225 | switch (powerPlanComboBox.SelectedItem) 226 | { 227 | case NAME_ULTIMATE_PERFORMANCE: 228 | if (ultimatePerformanceGUIDIndex == 2) 229 | powerPlanGUID = new Guid(GUID_ULTIMATE_PERFORMANCE_2); 230 | else 231 | powerPlanGUID = new Guid(GUID_ULTIMATE_PERFORMANCE); 232 | break; 233 | case NAME_MAX_PERFORMANCE: 234 | powerPlanGUID = new Guid(GUID_MAX_PERFORMANCE); 235 | break; 236 | case NAME_BALANCED: 237 | powerPlanGUID = new Guid(GUID_BALANCED); 238 | break; 239 | case NAME_POWER_SAVER: 240 | powerPlanGUID = new Guid(GUID_POWER_SAVER); 241 | break; 242 | } 243 | 244 | WinApiCalls.PowerSetActiveScheme(IntPtr.Zero, ref powerPlanGUID); 245 | 246 | setPowerPlanButton.Enabled = false; 247 | } 248 | 249 | private void UnlockUltimatePerformanceButton_Click(object sender, EventArgs e) 250 | { 251 | Process.Start("powercfg.exe", "-duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61"); 252 | 253 | unlockUltimatePerformanceButton.Enabled = false; 254 | } 255 | 256 | private void PowerOptionsButton_Click(object sender, EventArgs e) 257 | { 258 | string root = Environment.GetEnvironmentVariable("SystemRoot"); 259 | Process.Start(root + "\\system32\\control.exe", "/name Microsoft.PowerOptions"); 260 | } 261 | } 262 | } 263 | -------------------------------------------------------------------------------- /DoW Mod Manager/SystemPerformanceManagerForm.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 | -------------------------------------------------------------------------------- /DoW Mod Manager/WinApiCalls.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace DoW_Mod_Manager 5 | { 6 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] 7 | public struct TimerCaps 8 | { 9 | public uint PeriodMin; 10 | public uint PeriodMax; 11 | public uint PeriodCurrent; 12 | }; 13 | 14 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] 15 | public struct SHELLEXECUTEINFO 16 | { 17 | public int cbSize; 18 | public uint fMask; 19 | public IntPtr hwnd; 20 | [MarshalAs(UnmanagedType.LPTStr)] 21 | public string lpVerb; 22 | [MarshalAs(UnmanagedType.LPTStr)] 23 | public string lpFile; 24 | [MarshalAs(UnmanagedType.LPTStr)] 25 | public string lpParameters; 26 | [MarshalAs(UnmanagedType.LPTStr)] 27 | public string lpDirectory; 28 | public int nShow; 29 | public IntPtr hInstApp; 30 | public IntPtr lpIDList; 31 | [MarshalAs(UnmanagedType.LPTStr)] 32 | public string lpClass; 33 | public IntPtr hkeyClass; 34 | public uint dwHotKey; 35 | public IntPtr hIcon; 36 | public IntPtr hProcess; 37 | } 38 | 39 | public static class WinApiCalls 40 | { 41 | [DllImport("ntdll.dll", SetLastError = true)] 42 | private static extern NtStatus NtQueryTimerResolution(out uint MinimumResolution, out uint MaximumResolution, out uint ActualResolution); 43 | 44 | [DllImport("ntdll.dll", SetLastError = true)] 45 | private static extern NtStatus NtSetTimerResolution(uint DesiredResolution, bool SetResolution, ref uint CurrentResolution); 46 | 47 | public static TimerCaps QueryTimerResolution() 48 | { 49 | TimerCaps caps = new TimerCaps(); 50 | _ = NtQueryTimerResolution(out caps.PeriodMin, out caps.PeriodMax, out caps.PeriodCurrent); 51 | return caps; 52 | } 53 | 54 | public static ulong SetTimerResolution(uint timerResolutionIn100nsUnits, bool doSet = true) 55 | { 56 | uint currentRes = 0; 57 | _ = NtSetTimerResolution(timerResolutionIn100nsUnits, doSet, ref currentRes); 58 | return currentRes; 59 | } 60 | 61 | [DllImport("winmm.dll", EntryPoint = "TimeBeginPeriod", SetLastError = true)] 62 | public static extern uint TimeBeginPeriod(uint uMilliseconds); 63 | 64 | [DllImport("winmm.dll", EntryPoint = "TimeEndPeriod", SetLastError = true)] 65 | public static extern uint TimeEndPeriod(uint uMilliseconds); 66 | 67 | [DllImport("powrprof.dll", EntryPoint = "PowerGetActiveScheme")] 68 | public static extern uint PowerGetActiveScheme(IntPtr UserRootPowerKey, ref IntPtr ActivePolicyGuid); 69 | 70 | [DllImport("powrprof.dll", EntryPoint = "PowerSetActiveScheme")] 71 | public static extern uint PowerSetActiveScheme(IntPtr UserRootPowerKey, ref Guid ActivePolicyGuid); 72 | 73 | [DllImport("powrprof.dll", EntryPoint = "PowerReadACValue")] 74 | public static extern uint PowerReadACValue(IntPtr RootPowerKey, ref Guid SchemeGuid, ref Guid SubGroupOfPowerSettingGuid, ref Guid PowerSettingGuid, ref int Type, ref int Buffer, ref uint BufferSize); 75 | 76 | [DllImport("powrprof.dll", EntryPoint = "PowerWriteACValueIndex")] 77 | public static extern uint PowerWriteACValueIndex(IntPtr RootPowerKey, [MarshalAs(UnmanagedType.LPStruct)] Guid SchemeGuid, [MarshalAs(UnmanagedType.LPStruct)] Guid SubGroupOfPowerSettingsGuid, [MarshalAs(UnmanagedType.LPStruct)] Guid PowerSettingGuid, int AcValueIndex); 78 | 79 | [DllImport("shell32.dll", CharSet = CharSet.Auto)] 80 | static extern bool ShellExecuteEx(ref SHELLEXECUTEINFO lpExecInfo); 81 | 82 | private const int SW_SHOW = 5; 83 | private const uint SEE_MASK_INVOKEIDLIST = 12; 84 | public static bool ShowFileProperties(string Filename) 85 | { 86 | SHELLEXECUTEINFO info = new SHELLEXECUTEINFO(); 87 | info.cbSize = Marshal.SizeOf(info); 88 | info.lpVerb = "properties"; 89 | info.lpFile = Filename; 90 | info.nShow = SW_SHOW; 91 | info.fMask = SEE_MASK_INVOKEIDLIST; 92 | return ShellExecuteEx(ref info); 93 | } 94 | } 95 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Fragjacker 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![image](https://user-images.githubusercontent.com/19975052/147577379-4ab095f3-e91a-42f2-8cae-fbbb50658130.png) 2 | 3 | # DoW Mod Manager v2.3.2.2 4 | 5 | This application allows for an easy launch of mods and management of large collections of mods for Warhammer 40K Dawn of War series. 6 | 7 | ## INSTALLATION: 8 | 9 | - In order to install the Mod Manager drop the "DoW Mod Manager v2.3.2.2.exe" into your primary game directory which is either: 10 | 11 | - "..\Dawn of War - Soulstorm\" 12 | or 13 | - "..\Dawn of War - Dark Crusade\" 14 | or 15 | - "..\Dawn of War - Winter Assault\" 16 | or even 17 | - "..\Dawn of War - Gold\" 18 | 19 | DO NOT put executable file into a subfolder or it won't work! 20 | 21 | ## MOD MANAGER USAGE: 22 | 23 | 1. Once everything is in place launch the "DoW Mod Manager v2.3.2.2.exe" by double-clicking on it (You may want to create a shortcut of the Mod Manager on your Desktop for convenience and faster access) 24 | 25 | 2. Select a Mod from the left listing and it will show if all necessary dependency Mods are installed and if that is given, lets you directly launch the desired Mod 26 | 27 | 3. You have the option to directly launch the un-modded vanilla Game by clicking the "START BASE GAME" button. 28 | 29 | ## MOD MANAGER FEATURE EXPLANATION: 30 | 31 | - **Install location**: Shows the current location of the active Mod Manager executable. You can have multiple Soulstorm installations with their own Mod Manager 32 | (Simply repeat the installation process inside the new Soulstorm install location) 33 | 34 | - **START BASE GAME**: Does what the name implies, starts a new Session of the unmodded Soulstorm base game. 35 | 36 | - **START MOD**: Starts the Game with the selected Advanced Start Options and the selected Mod if all dependency mods are installed. 37 | 38 | - **SETTINGS**: You could change game settings without launching the game. It also let's you change some HIDDEN game settings! From there you could also start System Performance Manager 39 | 40 | - **TOGGLE LAA**: This button allows for convenient activation and deactivation of the LAA flag for the Soulstorm.exe and GraphicsConfig.exe 41 | 42 | - **LAA Labels** : These two labels will show if both the Soulstorm.exe and GraphicsConfig.exe are LAA patched. Since the UA Mod and many other mods push the game engine really hard towards it's limits 43 | it's recommended to have the LAA(Large Address Awareness AKA. 4GB Patch) activated on both executables to reduce the chance for the game crashing when playing mods. Since most people use the LAA Patch in Online matches anyways you'd do yourself a favor applying the LAA patch on said Executables. The LAA patch can ba applied and removed at any time by pressing the TOGGLE LAA button. 44 | 45 | - **Download Mod...**: This button will open the new Download Manager window where you could download one (or how much you like) of popular mods. If mod has a patch - it will be downloaded too! Wait 5 seconds and mod will start downloading. 46 | 47 | - **Check for errors**: This button will start a search for any critical errors in warnings.log. All errors would be presented to user 48 | 49 | - **Fix MISSING**: This button will start a Mod Downloader and send it a missing module name so user could download it just in one click! 50 | 51 | - **About and Updates**: This will open "About" window so user could read some useful information (such as authors names, license and changelog). Also there is a "Update" button which makes updating DoW Mod Manager very easy! 52 | 53 | - **Advanced Start Options:** 54 | 55 | - **-dev** : Starts the game in developers mode that provides helpful debug tools and enables execution of scripts (such as the autoexec.lua) in skirmish games, which are not available in the base game. 56 | (WARNING: Don't use this in multiplayer as it will not work.) 57 | 58 | - **-nomovies** : Skips all movies and directly launches the game with the loading screen for a faster startup (Is checked by default for convenience) 59 | 60 | - **-forcehighpoly** : This option forces the game to display the higher resolution LOD of a Model at any given distance. (Hint : This may have a negative impact on your performance, use with caution.) 61 | 62 | - **/high /affinity 6** : This option sets your Daw of War game executable priority to "High" and set it's affinity (CPU thread usage) to utilize only threads 2 and 3. In theory it could help to improve performance. It WILL NOT work if you have less than 3 CPU cores! 63 | 64 | - **Disable Fog** : This option removes the brownish ambient fog from any map. This fog is particularly visible when zooming out really far or move the camera in a horizontal position, obstructing long distance view. 65 | 66 | ## MOD MERGER: (WARNING: This is an experimental feature that requires some user responsibility - use with caution.) 67 | 68 | 1. Pressing this button will open you another window where you have the opportunity to easily edit the Module file of any playable mod. 69 | 70 | 2. To use it you have to select the Mod first that you want to edit from the drop-down list. 71 | 72 | 3. Doing so will fill the upper Listbox with all the other Mods that your currently selected Mod will load upon launch. 73 | The bottom list displays the Mods that are not currently loaded by your selected mod but are installed inside your Soulstorm directory. 74 | 75 | 4. You can select Mods from the bottom list and add them using the "+" Button. The selected Mod will be added to the top list and be set as "Active". 76 | 77 | 5. Using the Green/Red arrows allows you to change the load order of the selected Mod by moving it Up/Down in the list. 78 | 79 | 6. The Red "X" Button allows you to set a Mod to "Inactive" which means the the Mod will not be loaded into the Mod anymore but remain inside the Module file for later Reactivation if desired. 80 | 81 | 7. With the "-" you can remove an "Active/Inactive" Mod from the list of loaded mods and move it back to the bottom list of available but not yet added mods. 82 | 83 | **HINT**: None of the operations so far remove or edit anything of the selected Mod. Reselecting the currently loaded Mod or any other from the top drop-down list will discard your changes. 84 | 85 | If you want to save your changes click the "SAVE" button. This will create a copy of your loaded Mod with your new layout and generates a valid and launch-able file. 86 | 87 | With the Mod Merger you can easily add, remove or change load orders of ANY desired Mod you want. You can quickly create large combiner Mods with many race mods merged into another Mod. 88 | 89 | **For Example**: 90 | 91 | Selecting *Unification_New_Races* from the drop-down list then adding any race Mod that you desire by selecting that race mod and hit "+" and then press "SAVE MERGE". This will create a new module file, with the exact same name as the original mod but with the postfix "MERGED" added to it. It will load your desired race into the Mod the next time you launch *Unification_New_Races_MERGED* from the Mod Manager now. 92 | 93 | To restore the previous layout (If you want to rollback) you simply press the "DELETE MERGE" button. No original files will be harmed in this process. 94 | 95 | ## DISCLAIMER: 96 | 97 | This application comes without guarantee! Developers tested it and could say that it's working as intended but it still may contain some... unexpected behaviors. So use it on your own risk! 98 | --------------------------------------------------------------------------------