Skip to content

Commit bbb104b

Browse files
author
Tudi20
committed
Allows resizeability.
1 parent b9e8f94 commit bbb104b

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

Universal THCRAP Launcher/Form1.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Universal THCRAP Launcher/Form1.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Diagnostics;
4+
using System.Drawing;
45
using System.IO;
56
using System.Linq;
67
using System.Windows.Forms;
@@ -86,6 +87,7 @@ private void Form1_Load(object sender, EventArgs e)
8687
}
8788

8889
UpdateConfigFile();
90+
Debug.WriteLine("Form1 Loaded");
8991
}
9092

9193
private void UpdateConfigFile()
@@ -94,6 +96,7 @@ private void UpdateConfigFile()
9496
Configuration1.UthcraplLastGame = (string) listBox2.SelectedItem;
9597
string output = JsonConvert.SerializeObject(Configuration1, Formatting.Indented);
9698
File.WriteAllText("config.js", output);
99+
Debug.WriteLine("Config file Updated!");
97100
}
98101

99102
private void StartThcrap()
@@ -105,6 +108,7 @@ private void StartThcrap()
105108
//MessageBox.Show(args);
106109
Process process = new Process {StartInfo = {FileName = "thcrap_loader.exe", Arguments = s}};
107110
process.Start();
111+
Debug.WriteLine("Starting thcrap with {0}", s);
108112
if (checkBox1.Checked)
109113
Application.Exit();
110114
}
@@ -131,6 +135,15 @@ private void button1_MouseLeave(object sender, EventArgs e)
131135
{
132136
button1.BackgroundImage = Resources.Shinmera_Banner_5_mini_size;
133137
}
138+
139+
private void Form1_Resize(object sender, EventArgs e)
140+
{
141+
checkBox1.Location = new Point(checkBox1.Location.X, Size.Height - 66);
142+
button1.Size = new Size(Size.Width - 43, button1.Size.Height);
143+
splitContainer1.Size = new Size(Size.Width - 38, Size.Height - 132);
144+
listBox1.Size = new Size(splitContainer1.Panel1.Width - 1, splitContainer1.Panel1.Height - 1);
145+
listBox2.Size = new Size(splitContainer1.Panel2.Width - 1, splitContainer1.Panel2.Height - 1);
146+
}
134147
}
135148

136149
#pragma warning disable IDE1006 // Naming Styles

0 commit comments

Comments
 (0)