-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b32f5fc
commit 9a410b4
Showing
171 changed files
with
1,986 additions
and
538 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file added
BIN
+104 KB
.vs/OfficeDRPC/FileContentIndex/5c8d999d-f977-4524-810f-47cbd3b3bbb9.vsidx
Binary file not shown.
Binary file removed
BIN
-107 KB
.vs/OfficeDRPC/FileContentIndex/b3e9238b-a5b6-4ccc-b959-5cbcf8aa109a.vsidx
Binary file not shown.
Binary file added
BIN
+16.9 KB
.vs/OfficeDRPC/FileContentIndex/d25a37dc-86b6-47fe-a1ff-af59a118d3bd.vsidx
Binary file not shown.
Binary file added
BIN
+14.5 KB
.vs/OfficeDRPC/FileContentIndex/de66b9ea-375b-4597-918b-3b3b470b14d2.vsidx
Binary file not shown.
Binary file added
BIN
+14.7 KB
.vs/OfficeDRPC/FileContentIndex/ffe1271f-8ab5-4f24-9f64-69aa430726d8.vsidx
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
Binary file not shown.
Binary file not shown.
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
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,101 @@ | ||
using AccessDRPC.DRPCCore; | ||
|
||
using System; | ||
|
||
namespace AccessDRPC.Core | ||
{ | ||
|
||
public class Presence : IDisposable | ||
{ | ||
private DiscordRpc.EventHandlers handlers = default; | ||
private DiscordRpc.RichPresence presence; | ||
|
||
|
||
/// <summary> | ||
/// Initializes the Rich Presence to the specified application ID. | ||
/// </summary> | ||
/// <param name="appId"></param> | ||
public void InitializePresence(string appId) | ||
{ | ||
DiscordRpc.Initialize(appId, ref handlers, true, null); | ||
presence = new DiscordRpc.RichPresence(); | ||
} | ||
|
||
|
||
/// <summary> | ||
/// Updates the Rich Presence instance. | ||
/// </summary> | ||
public void UpdatePresence() | ||
{ | ||
DiscordRpc.UpdatePresence(ref presence); | ||
} | ||
|
||
|
||
/// <summary> | ||
/// Updates the Large Image in the Rich Presence instance. | ||
/// </summary> | ||
/// <param name="largeImageKey">Large Image Key</param> | ||
/// <param name="largeImageText">Large Image Text</param> | ||
public void UpdateLargeImage(string largeImageKey, string largeImageText = "") | ||
{ | ||
presence.largeImageKey = largeImageKey; | ||
presence.largeImageText = largeImageText; | ||
|
||
UpdatePresence(); | ||
} | ||
|
||
|
||
/// <summary> | ||
/// Updates the Small Image in the Rich Presence instance. | ||
/// </summary> | ||
/// <param name="smallImageKey">Small Image Key</param> | ||
/// <param name="smallImageText">Small Image Text</param> | ||
public void UpdateSmallImage(string smallImageKey, string smallImageText = "") | ||
{ | ||
presence.smallImageKey = smallImageKey; | ||
presence.smallImageText = smallImageText; | ||
|
||
UpdatePresence(); | ||
} | ||
|
||
|
||
/// <summary> | ||
/// Updates the State in the Rich Presence instance. | ||
/// </summary> | ||
/// <param name="state">The new state</param> | ||
public void UpdateState(string state) | ||
{ | ||
presence.state = state; | ||
|
||
UpdatePresence(); | ||
} | ||
|
||
|
||
/// <summary> | ||
/// Updates the Details in the Rich Presence instance. | ||
/// </summary> | ||
/// <param name="details">The new details</param> | ||
public void UpdateDetails(string details) | ||
{ | ||
presence.details = details; | ||
|
||
UpdatePresence(); | ||
} | ||
|
||
|
||
/// <summary> | ||
/// Shuts down the Rich Presence instance. | ||
/// </summary> | ||
public void ShutDown() | ||
{ | ||
DiscordRpc.Shutdown(); | ||
} | ||
|
||
public void Dispose() | ||
{ | ||
DiscordRpc.Shutdown(); | ||
|
||
GC.SuppressFinalize(this); | ||
} | ||
} | ||
} |
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,104 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace AccessDRPC.DRPCCore | ||
{ | ||
|
||
public class DiscordRpc | ||
{ | ||
|
||
[DllImport("Access-discord-rpc.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "Discord_Initialize")] | ||
public static extern void Initialize(string applicationId, ref DiscordRpc.EventHandlers handlers, bool autoRegister, string optionalSteamId); | ||
|
||
|
||
[DllImport("Access-discord-rpc.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "Discord_RunCallbacks")] | ||
public static extern void RunCallbacks(); | ||
|
||
|
||
[DllImport("Access-discord-rpc.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "Discord_Shutdown")] | ||
public static extern void Shutdown(); | ||
|
||
|
||
[DllImport("Access-discord-rpc.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "Discord_UpdatePresence")] | ||
public static extern void UpdatePresence(ref DiscordRpc.RichPresence presence); | ||
|
||
internal static void Initialize(string v1, ref object handlers, bool v2, object p) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | ||
public delegate void DisconnectedCallback(int errorCode, string message); | ||
|
||
|
||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | ||
public delegate void ErrorCallback(int errorCode, string message); | ||
|
||
|
||
public struct EventHandlers | ||
{ | ||
|
||
public DiscordRpc.ReadyCallback readyCallback; | ||
|
||
|
||
public DiscordRpc.DisconnectedCallback disconnectedCallback; | ||
|
||
|
||
public DiscordRpc.ErrorCallback errorCallback; | ||
} | ||
|
||
|
||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] | ||
public delegate void ReadyCallback(); | ||
|
||
|
||
[Serializable] | ||
public struct RichPresence | ||
{ | ||
|
||
public string state; | ||
|
||
|
||
public string details; | ||
|
||
|
||
public long startTimestamp; | ||
|
||
|
||
public long endTimestamp; | ||
|
||
|
||
public string largeImageKey; | ||
|
||
|
||
public string largeImageText; | ||
|
||
|
||
public string smallImageKey; | ||
|
||
|
||
public string smallImageText; | ||
|
||
|
||
public string partyId; | ||
|
||
|
||
public int partySize; | ||
|
||
|
||
public int partyMax; | ||
|
||
|
||
public string matchSecret; | ||
|
||
|
||
public string joinSecret; | ||
|
||
|
||
public string spectateSecret; | ||
|
||
|
||
public bool instance; | ||
} | ||
} | ||
} |
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
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
AccessDRPC/obj/Debug/AccessDRPC.csproj.AssemblyReference.cache
Binary file not shown.
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 +1 @@ | ||
831009eac79026b661fe68c402772e66bce9f3974a58f05b2503be66ce5860d4 | ||
4a3b25d60ed521ac477465e38d9bb9048c975053ca9db614d3588f90c364ebc1 |
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+1.5 KB
(120%)
DRPCWorker/bin/Debug/net8.0-windows10.0.17763.0/AccessDRPC.exe
Binary file not shown.
Binary file modified
BIN
+8 KB
(130%)
DRPCWorker/bin/Debug/net8.0-windows10.0.17763.0/AccessDRPC.pdb
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
DRPCWorker/bin/Debug/net8.0-windows10.0.17763.0/DRPCWorker.dll
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
DRPCWorker/bin/Debug/net8.0-windows10.0.17763.0/DRPCWorker.exe
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
DRPCWorker/bin/Debug/net8.0-windows10.0.17763.0/DRPCWorker.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+2 KB
(130%)
DRPCWorker/bin/Debug/net8.0-windows10.0.17763.0/OfficeDRPC.exe
Binary file not shown.
Binary file modified
BIN
+8 KB
(130%)
DRPCWorker/bin/Debug/net8.0-windows10.0.17763.0/OfficeDRPC.pdb
Binary file not shown.
Binary file modified
BIN
+2 KB
(130%)
DRPCWorker/bin/Debug/net8.0-windows10.0.17763.0/OnedriveDRPC.exe
Binary file not shown.
Binary file modified
BIN
+6 KB
(120%)
DRPCWorker/bin/Debug/net8.0-windows10.0.17763.0/OnedriveDRPC.pdb
Binary file not shown.
Binary file modified
BIN
+2 KB
(130%)
DRPCWorker/bin/Debug/net8.0-windows10.0.17763.0/OutlookDRPC.exe
Binary file not shown.
Binary file modified
BIN
+6 KB
(120%)
DRPCWorker/bin/Debug/net8.0-windows10.0.17763.0/OutlookDRPC.pdb
Binary file not shown.
Binary file modified
BIN
+1.5 KB
(120%)
DRPCWorker/bin/Debug/net8.0-windows10.0.17763.0/PowerBiDRPC.exe
Binary file not shown.
Binary file modified
BIN
+8 KB
(130%)
DRPCWorker/bin/Debug/net8.0-windows10.0.17763.0/PowerBiDRPC.pdb
Binary file not shown.
Binary file modified
BIN
+2 KB
(130%)
DRPCWorker/bin/Debug/net8.0-windows10.0.17763.0/PowerPointDRPC.exe
Binary file not shown.
Binary file modified
BIN
+8 KB
(130%)
DRPCWorker/bin/Debug/net8.0-windows10.0.17763.0/PowerPointDRPC.pdb
Binary file not shown.
Binary file modified
BIN
+2 KB
(130%)
DRPCWorker/bin/Debug/net8.0-windows10.0.17763.0/PublisherDRPC.exe
Binary file not shown.
Binary file modified
BIN
+8 KB
(130%)
DRPCWorker/bin/Debug/net8.0-windows10.0.17763.0/PublisherDRPC.pdb
Binary file not shown.
Binary file modified
BIN
+2 KB
(130%)
DRPCWorker/bin/Debug/net8.0-windows10.0.17763.0/WhiteboardDRPC.exe
Binary file not shown.
Binary file modified
BIN
+6 KB
(120%)
DRPCWorker/bin/Debug/net8.0-windows10.0.17763.0/WhiteboardDRPC.pdb
Binary file not shown.
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
2 changes: 1 addition & 1 deletion
2
DRPCWorker/obj/Debug/net8.0-windows10.0.17763.0/DRPCWorker.AssemblyInfoInputs.cache
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 +1 @@ | ||
c21ad214fff60cddf0b64dabea0ec2f8267861f0e8fcdb46dbe8de2c2ba3719e | ||
73211cf8b82b87d063e125379118844910aa130a05a7b48cb5875022064addc3 |
Binary file modified
BIN
+0 Bytes
(100%)
DRPCWorker/obj/Debug/net8.0-windows10.0.17763.0/DRPCWorker.csproj.AssemblyReference.cache
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
DRPCWorker/obj/Debug/net8.0-windows10.0.17763.0/DRPCWorker.dll
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
DRPCWorker/obj/Debug/net8.0-windows10.0.17763.0/DRPCWorker.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion
2
DRPCWorker/obj/Debug/net8.0-windows10.0.17763.0/DRPCWorker.sourcelink.json
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 +1 @@ | ||
{"documents":{"C:\\Users\\MBARK.AzureAD\\source\\repos\\MbarkT3STO\\OfficeDRPC\\*":"https://raw.githubusercontent.com/MbarkT3STO/OfficeDRPC/4dc000bdfc5709e55f9f6b2f9d51636f34b81e0a/*"}} | ||
{"documents":{"C:\\Users\\MBARK.AzureAD\\source\\repos\\MbarkT3STO\\OfficeDRPC\\*":"https://raw.githubusercontent.com/MbarkT3STO/OfficeDRPC/b32f5fcd82ec1bedfdef56b988079069f4e68edf/*"}} |
Binary file modified
BIN
+0 Bytes
(100%)
DRPCWorker/obj/Debug/net8.0-windows10.0.17763.0/apphost.exe
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
DRPCWorker/obj/Debug/net8.0-windows10.0.17763.0/ref/DRPCWorker.dll
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
DRPCWorker/obj/Debug/net8.0-windows10.0.17763.0/refint/DRPCWorker.dll
Binary file not shown.
Oops, something went wrong.