-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-> Moved forms into a own folder -> Code cleanup -> Moved handlers to handlers folder
- Loading branch information
Showing
35 changed files
with
7,391 additions
and
355 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
using Newtonsoft.Json; | ||
using System.Net.Http; | ||
|
||
namespace PteroController; | ||
|
||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.