Skip to content

Commit

Permalink
PUSH
Browse files Browse the repository at this point in the history
-> Moved forms into a own folder
-> Code cleanup
-> Moved handlers to handlers folder
  • Loading branch information
NaysKutzu committed Oct 1, 2023
1 parent 02bc813 commit f62e331
Show file tree
Hide file tree
Showing 35 changed files with 7,391 additions and 355 deletions.
325 changes: 325 additions & 0 deletions Forms/FrmAddSession.Designer.cs

Large diffs are not rendered by default.

60 changes: 60 additions & 0 deletions Forms/FrmAddSession.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
using PteroController.Handlers;

namespace PteroController
{
public partial class FrmAddSession : Form
{
public FrmAddSession()
{
InitializeComponent();
}

private async void btnaddsession_Click(object sender, EventArgs e)
{
if (txtpanelurl.Text == "" || txtpanelapikey.Text == "" || txtpanelname.Text == "" || txtpanelpwd.Text == "")
{
Program.Alert("Please fill in all required information", FrmAlert.enmType.Error);
}
else
{
try
{
await Pterodactyl.User.Info.Get(txtpanelurl.Text, txtpanelapikey.Text, txtpanelpwd.Text);
if (Pterodactyl.User.Info.panel_username != null &&
Pterodactyl.User.Info.panel_email != null &&
Pterodactyl.User.Info.panel_id != null)
{
RegistryHandler rh = new RegistryHandler();
rh.CreateAccountData(txtpanelname.Text, txtpanelurl.Text, txtpanelpwd.Text, txtpanelapikey.Text);
FrmSessions x = new FrmSessions();
x.Show();
this.Hide();
}
else
{
Program.Alert("Failed to login", FrmAlert.enmType.Error);
}
}
catch (Exception ex)
{
Program.Alert($"An error occurred: {ex.Message}", FrmAlert.enmType.Error);
}
}
}

private void lblexit_Click(object sender, EventArgs e)
{
Application.Exit();
}

private void lblminimize_Click(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Minimized;
}

private void FrmAddSession_Load(object sender, EventArgs e)
{

}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion FrmInstallTools.cs → Forms/FrmInstallTools.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System.IO.Compression;
using System.IO;
using System.IO.Compression;
using System.Net.Http;

namespace PteroController
{
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions FrmServerSelector.cs → Forms/FrmServerSelector.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Newtonsoft.Json;
using System.Net.Http;

namespace PteroController;

Expand Down
File renamed without changes.
File renamed without changes.
5 changes: 3 additions & 2 deletions FrmSessions.cs → Forms/FrmSessions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using PteroController.Pterodactyl;
using PteroController.Handlers;
using PteroController.Pterodactyl;
#pragma warning disable
namespace PteroController
{
Expand Down Expand Up @@ -27,7 +28,7 @@ private void PopulateListBoxWithSessions()
}
private void FrmSessions_Load(object sender, EventArgs e)
{
RPC discordRPC = new RPC();
RPCHandler discordRPC = new RPCHandler();
discordRPC.InitializeRPC();
}

Expand Down
6,978 changes: 6,978 additions & 0 deletions Forms/FrmSessions.resx

Large diffs are not rendered by default.

154 changes: 0 additions & 154 deletions FrmAddSession.Designer.cs

This file was deleted.

62 changes: 0 additions & 62 deletions FrmAddSession.cs

This file was deleted.

Loading

0 comments on commit f62e331

Please sign in to comment.