Skip to content

Commit

Permalink
Update Form1.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
efxndyben committed Jun 4, 2023
1 parent 4a12189 commit a18e66b
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion AlorianLauncher/Form1.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,44 @@
using DiscordRPC;
using DiscordRPC.Logging;
using DiscordRPC.Events;


namespace AlorianLauncher
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
Initialize();
}

public DiscordRpcClient client { get; private set; }

//Called when your application first starts.
//For example, just before your main loop, on OnEnable for unity.
void Initialize()
{
client = new DiscordRpcClient("1114618806275416198");
client.Initialize();

client.SetPresence(new RichPresence()
{
Details = "play.alorianmc.net",
State = "Başlatılıyor",
Assets = new Assets()
{
LargeImageKey = "alrcraft",
LargeImageText = "AlorianMC",
SmallImageKey = "alrcraft_transparent",
SmallImageText = "play.alorianmc.net"
}
});
}

void Deinitialize()
{
client.Dispose();
}

private void pictureBox1_Click(object sender, EventArgs e)
Expand All @@ -26,8 +60,9 @@ private void timer_Tick(object sender, EventArgs e)
LoginPage lg = new LoginPage();
lg.Show();
this.Hide();
Deinitialize();

}
}
}
}
}

0 comments on commit a18e66b

Please sign in to comment.