Implemented basic rpc setup
This commit is contained in:
parent
051b0713ee
commit
6a6a2e7c9a
|
@ -8,6 +8,7 @@ using Discord;
|
||||||
using Discord.WebSocket;
|
using Discord.WebSocket;
|
||||||
using DML.AppCore.Classes;
|
using DML.AppCore.Classes;
|
||||||
using DML.Application.Classes;
|
using DML.Application.Classes;
|
||||||
|
using DML.Application.Classes.RPC;
|
||||||
using DML.Client;
|
using DML.Client;
|
||||||
using static SweetLib.Utils.Logger.Logger;
|
using static SweetLib.Utils.Logger.Logger;
|
||||||
|
|
||||||
|
@ -23,6 +24,8 @@ namespace DML.Application
|
||||||
public partial class MainForm : Form
|
public partial class MainForm : Form
|
||||||
{
|
{
|
||||||
private bool IsInitialized { get; set; } = false;
|
private bool IsInitialized { get; set; } = false;
|
||||||
|
private DiscordRpc.RichPresence Presence { get; }
|
||||||
|
|
||||||
public MainForm()
|
public MainForm()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
@ -248,6 +251,15 @@ namespace DML.Application
|
||||||
pgbProgress.Value = progress;
|
pgbProgress.Value = progress;
|
||||||
|
|
||||||
lbProgress.Text = $"Scanned: {scanned} Downloaded: {done} Open: {totalAttachments - done}";
|
lbProgress.Text = $"Scanned: {scanned} Downloaded: {done} Open: {totalAttachments - done}";
|
||||||
|
|
||||||
|
Core.RpcPresence.details = "Downloading media files";
|
||||||
|
Core.RpcPresence.state = $"{done} / {totalAttachments} ({pgbProgress.Value}%)";
|
||||||
|
Core.RpcPresence.largeImageKey = "main";
|
||||||
|
Core.RpcPresence.largeImageText = "Visit discordmedialoader.net";
|
||||||
|
Core.RpcPresence.smallImageKey = "author";
|
||||||
|
Core.RpcPresence.smallImageText = "Made by Serraniel";
|
||||||
|
|
||||||
|
Core.RpcUpdatePresence();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void aboutToolStripMenuItem_Click(object sender, System.EventArgs e)
|
private void aboutToolStripMenuItem_Click(object sender, System.EventArgs e)
|
||||||
|
|
Loading…
Reference in a new issue