public JeremieLauncher()
        {
            InitializeComponent();
            instance      = this;
            Text         += " " + launcherVersion.ToString();
            client        = new DiscordRpcClient("718605351263535106");
            client.Logger = new ConsoleLogger()
            {
                Level = LogLevel.Warning
            };
            client.Initialize();

            startTime = (ulong)DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();

            RichPresence = new RichPresence()
            {
                Details = "Jeremie Launcher " + launcherVersion.ToString(),
                Assets  = new Assets()
                {
                    LargeImageKey = "image"
                },
                Timestamps = new Timestamps()
                {
                    StartUnixMilliseconds = startTime
                }
            };

            client.SetPresence(RichPresence);
        }
Exemple #2
0
 public void SwitchToGame()
 {
     updateUI();
     //if (!CustomGame)
     //JeremieLauncher.instance.RichPresence.State = GameName;
     //else
     //JeremieLauncher.instance.RichPresence.State = "";
     //JeremieLauncher.instance.client.SetPresence(JeremieLauncher.instance.RichPresence);
     JeremieLauncher.setText(GameName);
     foreach (Control c in controls)
     {
         c.Visible = true;
     }
     if (UpToDate())
     {
         JeremieLauncher.instance.pb_gif.Image = Properties.Resources.no_update;
     }
     else
     {
         JeremieLauncher.instance.pb_gif.Image = Properties.Resources.update;
     }
 }