Add support for game validation
This commit is contained in:
parent
675daf1935
commit
e80e3d9870
2 changed files with 31 additions and 2 deletions
21
GCMM/MainForm.Designer.cs
generated
21
GCMM/MainForm.Designer.cs
generated
|
@ -50,6 +50,7 @@
|
||||||
this.unpatched = new System.Windows.Forms.CheckBox();
|
this.unpatched = new System.Windows.Forms.CheckBox();
|
||||||
this.modinfobox = new System.Windows.Forms.RichTextBox();
|
this.modinfobox = new System.Windows.Forms.RichTextBox();
|
||||||
this.refreshbtn = new System.Windows.Forms.Button();
|
this.refreshbtn = new System.Windows.Forms.Button();
|
||||||
|
this.validatebtn = new System.Windows.Forms.Button();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// modlist
|
// modlist
|
||||||
|
@ -226,21 +227,36 @@
|
||||||
this.refreshbtn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Green;
|
this.refreshbtn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Green;
|
||||||
this.refreshbtn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(40)))), ((int)(((byte)(0)))));
|
this.refreshbtn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(40)))), ((int)(((byte)(0)))));
|
||||||
this.refreshbtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
this.refreshbtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
this.refreshbtn.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
this.refreshbtn.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
this.refreshbtn.Location = new System.Drawing.Point(12, 12);
|
this.refreshbtn.Location = new System.Drawing.Point(12, 12);
|
||||||
this.refreshbtn.Name = "refreshbtn";
|
this.refreshbtn.Name = "refreshbtn";
|
||||||
this.refreshbtn.Size = new System.Drawing.Size(81, 29);
|
this.refreshbtn.Size = new System.Drawing.Size(105, 29);
|
||||||
this.refreshbtn.TabIndex = 10;
|
this.refreshbtn.TabIndex = 10;
|
||||||
this.refreshbtn.Text = "Refresh";
|
this.refreshbtn.Text = "Refresh";
|
||||||
this.refreshbtn.UseVisualStyleBackColor = true;
|
this.refreshbtn.UseVisualStyleBackColor = true;
|
||||||
this.refreshbtn.Click += new System.EventHandler(this.refreshbtn_Click);
|
this.refreshbtn.Click += new System.EventHandler(this.refreshbtn_Click);
|
||||||
//
|
//
|
||||||
|
// validatebtn
|
||||||
|
//
|
||||||
|
this.validatebtn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Green;
|
||||||
|
this.validatebtn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(40)))), ((int)(((byte)(0)))));
|
||||||
|
this.validatebtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
|
this.validatebtn.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
|
this.validatebtn.Location = new System.Drawing.Point(398, 12);
|
||||||
|
this.validatebtn.Name = "validatebtn";
|
||||||
|
this.validatebtn.Size = new System.Drawing.Size(105, 29);
|
||||||
|
this.validatebtn.TabIndex = 11;
|
||||||
|
this.validatebtn.Text = "Validate game";
|
||||||
|
this.validatebtn.UseVisualStyleBackColor = true;
|
||||||
|
this.validatebtn.Click += new System.EventHandler(this.validatebtn_Click);
|
||||||
|
//
|
||||||
// MainForm
|
// MainForm
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.BackColor = System.Drawing.Color.Black;
|
this.BackColor = System.Drawing.Color.Black;
|
||||||
this.ClientSize = new System.Drawing.Size(784, 561);
|
this.ClientSize = new System.Drawing.Size(784, 561);
|
||||||
|
this.Controls.Add(this.validatebtn);
|
||||||
this.Controls.Add(this.refreshbtn);
|
this.Controls.Add(this.refreshbtn);
|
||||||
this.Controls.Add(this.modinfobox);
|
this.Controls.Add(this.modinfobox);
|
||||||
this.Controls.Add(this.unpatched);
|
this.Controls.Add(this.unpatched);
|
||||||
|
@ -277,6 +293,7 @@
|
||||||
private System.Windows.Forms.CheckBox unpatched;
|
private System.Windows.Forms.CheckBox unpatched;
|
||||||
private System.Windows.Forms.RichTextBox modinfobox;
|
private System.Windows.Forms.RichTextBox modinfobox;
|
||||||
private System.Windows.Forms.Button refreshbtn;
|
private System.Windows.Forms.Button refreshbtn;
|
||||||
|
private System.Windows.Forms.Button validatebtn;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -241,5 +241,17 @@ You may also want to verify the game's files by right clicking the game in Steam
|
||||||
GetAvailableMods();
|
GetAvailableMods();
|
||||||
CheckUninstalledMods(mods);
|
CheckUninstalledMods(mods);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void validatebtn_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (CheckNoExe())
|
||||||
|
return;
|
||||||
|
if (MessageBox.Show("Validating the game's files is useful if the game doesn't start even without mods. Make sure to click Refresh once Steam finished verifying the game. The Steam window that shows the progress might open in the background. Note that you will need to patch the game again using the Play button in order to use mods.\n\nContinue?", "Verify game files", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
|
||||||
|
return;
|
||||||
|
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
|
||||||
|
Process.Start("steam://validate/1078000/");
|
||||||
|
else
|
||||||
|
Process.Start("xdg-open", "steam://validate/1078000/");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue