private void InitialiseDiscord() { DiscordRPC.DiscordEventHandlers handlers = new DiscordRPC.DiscordEventHandlers(); handlers.readyCallback = HandleReadyCallback; handlers.errorCallback = HandleErrorCallback; handlers.disconnectedCallback = HandleDisconnectedCallback; DiscordRPC.Initialize("381981355539693579", ref handlers, true, null); }
public static void Start() { DiscordRPC.EventHandlers eventHandler = default(DiscordRPC.EventHandlers); DiscordRPC.Initialize("702340191289081857", ref eventHandler, false, null); Started = true; }
private void InitialiseDiscord() { DiscordRPC.DiscordEventHandlers handlers = new DiscordRPC.DiscordEventHandlers(); handlers.readyCallback = HandleReadyCallback; handlers.errorCallback = HandleErrorCallback; handlers.disconnectedCallback = HandleDisconnectedCallback; // first parameter is the application id from discord dev apps DiscordRPC.Initialize("", ref handlers, true, null); }
private void InitialiseDiscord() { DiscordRPC.DiscordEventHandlers handlers = new DiscordRPC.DiscordEventHandlers(); handlers.readyCallback = HandleReadyCallback; handlers.errorCallback = HandleErrorCallback; handlers.disconnectedCallback = HandleDisconnectedCallback; // lampin's dev app client ID DiscordRPC.Initialize("794444362636328960", ref handlers, true, null); }
private void InitialiseDiscord() { DiscordRPC.DiscordEventHandlers handlers = new DiscordRPC.DiscordEventHandlers(); handlers.readyCallback = HandleReadyCallback; handlers.errorCallback = HandleErrorCallback; handlers.disconnectedCallback = HandleDisconnectedCallback; // Kuunikal's dev app client ID DiscordRPC.Initialize("432174690857910272", ref handlers, true, null); }
private void InitialiseDiscord() { var handlers = new DiscordRPC.DiscordEventHandlers { readyCallback = HandleReadyCallback, errorCallback = HandleErrorCallback, disconnectedCallback = HandleDisconnectedCallback }; DiscordRPC.Initialize(DiscordId, ref handlers, true, null); }
void Start() { // Load custom textures and audio clips { if (ResourceLoader.TryGetAsset("Custom/Textures/hud.png", out Texture2D hudTextures)) { GameObject backgroundGo = GameObject.Find("Background"); if (backgroundGo != null) { Material uiMat = backgroundGo.GetComponent <UISprite>().material; uiMat.mainTextureScale = hudTextures.GetScaleVector(2048, 2048); uiMat.mainTexture = hudTextures; } } StartCoroutine(CoWaitAndSetParticleTexture()); } GuiController = base.gameObject.AddComponent <Ui.GuiController>(); base.gameObject.AddComponent <MicEF>(); if (!IsFirstInit) { return; } IsFirstInit = false; // Load skin validation service SkinChecker.Init(); // Load name and guild (if possible) FengGameManagerMKII.NameField = PlayerPrefs.GetString("name", string.Empty); if (FengGameManagerMKII.NameField.StripNGUI().Length < 1) { FengGameManagerMKII.NameField = LoginFengKAI.Player.Name; } LoginFengKAI.Player.Guild = PlayerPrefs.GetString("guildname", string.Empty); // Load various features Commands.Load(); Gamemodes.Load(); Properties.Load(); // Load network validation service NetworkChecker.Init(); DiscordRPC.StartTime = GameHelper.CurrentTimeMillis(); DiscordRPC.Initialize(); // Check for an update StartCoroutine(CoCheckForUpdate()); }
private void App_OnStartup(object sender, StartupEventArgs e) { if (SingleApplicationDetector.IsRunning()) { if (MessageBox.Show( "TeknoParrot UI seems to already be running, want me to close it?", "Error", MessageBoxButton.YesNo, MessageBoxImage.Error) == MessageBoxResult.Yes) { TerminateProcesses(); } else { Application.Current.Shutdown(0); return; } } if (File.Exists("DumbJVSManager.exe")) { MessageBox.Show( "Seems you have extracted me to directory of old TeknoParrot, please extract me to a new directory instead!", "Error", MessageBoxButton.OK, MessageBoxImage.Error); Application.Current.Shutdown(0); return; } var parrotData = JoystickHelper.DeSerialize(); if (parrotData == null) { StartApp(); return; } if (parrotData.UseDiscordRPC && File.Exists("discord-rpc.dll")) { DiscordRPC.Initialize(APP_ID, IntPtr.Zero, false, null); } if (e.Args.Length != 0) { // Process command args if (HandleArgs(e.Args)) { // Args ok, let's do stuff TeknoParrotUi.Views.GameRunning g = new TeknoParrotUi.Views.GameRunning(_profile, _test, parrotData, _profile.TestMenuParameter, _profile.TestMenuIsExecutable, _profile.TestMenuExtraParameters, _emuOnly); g.Show(); return; } } StartApp(); }
public void StartDiscord() { if (GlobalVars.UserConfiguration.DiscordPresence) { handlers = new DiscordRPC.EventHandlers(); handlers.readyCallback = ReadyCallback; handlers.disconnectedCallback += DisconnectedCallback; handlers.errorCallback += ErrorCallback; handlers.joinCallback += JoinCallback; handlers.spectateCallback += SpectateCallback; handlers.requestCallback += RequestCallback; DiscordRPC.Initialize(GlobalVars.appid, ref handlers, true, ""); GlobalFuncs.UpdateRichPresence(GlobalVars.LauncherState.InLauncher, "", true); } }
public static void Start() { DiscordRPC.EventHandlers eventHandler = default(DiscordRPC.EventHandlers); new Thread(() => { DiscordRPC.Initialize(TShock_Presence.Utils.Configuration.applicationID, ref eventHandler, false, null); for (; ;) { Thread.Sleep(30000); Update(); } }) { IsBackground = true }.Start(); }
public static void Start() { new Thread(() => { DiscordRPC.EventHandlers eventHandler = default(DiscordRPC.EventHandlers); DiscordRPC.Initialize("639595027089063957", ref eventHandler, false, null); Console.WriteLine("DiscordRPC Started."); for (; ;) { Thread.Sleep(30000); CustomUpdate(); } }) { IsBackground = true }.Start(); }
private void Application_Startup(object sender, StartupEventArgs e) { if (SingleApplicationDetector.IsRunning()) { if ((e.Args.Any(x => x.StartsWith("--profile=")) && e.Args.All(x => x != "--emuonly")) || (e.Args.Any(x => x.StartsWith("--profile=")) && e.Args.Any(x => x == "--emuonly"))) { } else { if (MessageBox.Show( "TeknoParrot UI seems to already be running, want me to close it?", "Error", MessageBoxButton.YesNo, MessageBoxImage.Error) == MessageBoxResult.Yes) { TerminateProcesses(); } else { Application.Current.Shutdown(0); return; } } } if (File.Exists("DumbJVSManager.exe")) { MessageBox.Show( "Seems you have extracted me to directory of old TeknoParrot, please extract me to a new directory instead!", "Error", MessageBoxButton.OK, MessageBoxImage.Error); Application.Current.Shutdown(0); return; } JoystickHelper.DeSerialize(); ServicePointManager.ServerCertificateValidationCallback = delegate { return(true); }; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; // disable Discord RPC if the DLL doesn't exist if (!File.Exists("discord-rpc.dll")) { Lazydata.ParrotData.UseDiscordRPC = false; } if (Lazydata.ParrotData.UseDiscordRPC) { DiscordRPC.Initialize(APP_ID, IntPtr.Zero, false, null); } if (e.Args.Length != 0) { // Process command args if (HandleArgs(e.Args)) { // Args ok, let's do stuff Window window = new Window { Title = "GameRunning", Content = new TeknoParrotUi.Views.GameRunning(_profile, _test, _profile.TestMenuParameter, _profile.TestMenuIsExecutable, _profile.TestMenuExtraParameters, _emuOnly, _profileLaunch), MaxWidth = 800, MaxHeight = 800 }; window.Show(); return; } } StartApp(); }