Skip to content

Commit

Permalink
Form now work
Browse files Browse the repository at this point in the history
  • Loading branch information
DartPower committed Jun 2, 2019
1 parent 405dcd6 commit 4ce80f3
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 17 deletions.
47 changes: 35 additions & 12 deletions LauncherForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 31 additions & 4 deletions LauncherForm.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.IO;
using System.Reflection;
using System.Windows.Forms;

Expand All @@ -13,19 +14,30 @@ public LauncherForm()

private void Form1_Load(object sender, EventArgs e)
{

DirectoryInfo IntancesDir = new DirectoryInfo(System.IO.Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) + @".\Instances");
foreach (var d in IntancesDir.GetDirectories())
{
listBox1.Items.Add(d.Name);
}
foreach (var d in IntancesDir.GetFiles())
{
listBox1.Items.Add(d.Name);
}
}

private void Button1_Click(object sender, EventArgs e)
{
String InstanceName = "";
InstanceName = textBox1.Text;
String UserName = "";
InstanceName = listBox1.Text;
UserName = textBox1.Text;
String ClientPath = @"\Instances\" + InstanceName + @"\";
String clientdir = System.IO.Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) + ClientPath;
String client = "DPT";
String user = "USSRNAME";
String client = InstanceName;
String user = UserName;
String uuid = Guid.NewGuid().ToString();
String session = "0";
this.Close();
Program.start(clientdir, client, user, uuid, session);
}

Expand All @@ -38,5 +50,20 @@ private void TextBox1_TextChanged(object sender, EventArgs e)
{

}

private void ListBox1_SelectedIndexChanged(object sender, EventArgs e)
{

}

private void TextBox1_TextChanged_1(object sender, EventArgs e)
{

}

private void Label1_Click(object sender, EventArgs e)
{

}
}
}
1 change: 0 additions & 1 deletion Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;
Expand Down

0 comments on commit 4ce80f3

Please sign in to comment.