Exemple #1
0
        private void Client_OnJoinRequested(object sender, DiscordRPC.Message.JoinRequestMessage args)
        {
            Debugger.Discord(GStrings.GetLocalizationByXPath("/Console/String[@ID='MESSAGE_DISCORD_JOIN_REQUEST']").Replace("{Username}", args.User.ToString()));

            App.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Render, new Action(() =>
            {
                GUI.Widgets.Notifications.DiscordNotify DiscordNotification = new GUI.Widgets.Notifications.DiscordNotify(args);

                DiscordNotification.OnRequestAccepted += OnDiscordRequestAccepted;
                DiscordNotification.OnRequestRejected += OnDiscordRequestRejected;

                DiscordNotification.Show();
            }));
        }