Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Diagnostics;
- using System.IO;
- using System.Linq;
- using System.Reflection;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace HL2_Cinematic_Mod_Launcher
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- public void Form1_Load(object sender, EventArgs e)
- {
- }
- void InitializeComponents()
- {
- this.button1 = (new System.Windows.Forms.Button());
- this.button2 = (new System.Windows.Forms.Button());
- this.button3 = (new System.Windows.Forms.Button());
- this.button4 = (new System.Windows.Forms.Button());
- this.SuspendLayout();
- ///
- /// FORM
- ///
- this.Controls.Add(this.button1);
- this.Controls.Add(this.button2);
- this.Controls.Add(this.button3);
- this.Controls.Add(this.button4);
- this.Name = "Form1";
- this.Text = "Launcher";
- this.Load += new System.EventHandler(Form1_Load);
- this.ResumeLayout(false);
- this.PerformLayout();
- ///
- /// BUTTON 1
- ///
- this.button1.Text = "Configurator";
- this.button1.UseVisualStyleBackColor = false;
- this.button1.Click += new System.EventHandler(button1_Click);
- ///
- /// BUTTON 2
- ///
- this.button2.Text = "Half-Life 2";
- this.button2.UseVisualStyleBackColor = false;
- this.button2.Click += new System.EventHandler(button2_Click);
- ///
- /// BUTTON 3
- ///
- this.button3.Text = "Half-Life 2: Episode One";
- this.button3.UseVisualStyleBackColor = false;
- this.button3.Click += new System.EventHandler(button3_Click);
- ///
- /// BUTTON 4
- ///
- this.button4.Text = "Half-Life 2: Episode Two";
- this.button4.UseVisualStyleBackColor = false;
- this.button4.Click += new System.EventHandler(button4_Click);
- }
- private void button1_Click(object sender, EventArgs e)
- {
- string myDir = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
- string gameDir = Path.Combine(myDir, "E:\\Steam Games\\SteamApps\\common\\CM2013");
- string gameExe = Path.Combine(gameDir, "Configurator.EXE");
- Process proc1 = new Process();
- proc1.StartInfo.FileName = gameExe;
- proc1.StartInfo.WorkingDirectory = gameDir;
- proc1.SynchronizingObject = this;
- proc1.EnableRaisingEvents = true;
- proc1.Start();
- }
- private void button2_Click(object sender, EventArgs e)
- {
- string myDir = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
- string gameDir = Path.Combine(myDir, "E:\\Steam Games\\SteamApps\\common\\CM2013");
- string gameExe = Path.Combine(gameDir, "Launcher_EP0.exe");
- Process proc2 = new Process();
- proc2.StartInfo.FileName = gameExe;
- proc2.StartInfo.WorkingDirectory = gameDir;
- proc2.SynchronizingObject = this;
- proc2.EnableRaisingEvents = true;
- proc2.Start();
- }
- private void button3_Click(object sender, EventArgs e)
- {
- string myDir = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
- string gameDir = Path.Combine(myDir, "E:\\Steam Games\\SteamApps\\common\\CM2013");
- string gameExe = Path.Combine(gameDir, "launcher_EP1.exe");
- Process proc3 = new Process();
- proc3.StartInfo.FileName = gameExe;
- proc3.StartInfo.WorkingDirectory = gameDir;
- proc3.SynchronizingObject = this;
- proc3.EnableRaisingEvents = true;
- proc3.Start();
- }
- private void button4_Click(object sender, EventArgs e)
- {
- string myDir = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
- string gameDir = Path.Combine(myDir, "E:\\Steam Games\\SteamApps\\common\\CM2013");
- string gameExe = Path.Combine(gameDir, "Launcher_EP2.exe");
- Process proc4 = new Process();
- proc4.StartInfo.FileName = gameExe;
- proc4.StartInfo.WorkingDirectory = gameDir;
- proc4.SynchronizingObject = this;
- proc4.EnableRaisingEvents = true;
- proc4.Start();
- }
- private void exitToolStripMenuItem_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement