Ejemplo n.º 1
0
 private void GetValuesButton_Click(object sender, EventArgs e)
 {
     try
     {
         converting = true;
         if (string.IsNullOrWhiteSpace(GamertagEdit.Text))
         {
             resUser                     = XDKUtilities.XUserFindUser(console, address, p1XUID, XtraFunctions.ValueFromHex(XUIDEdit.Text.Insert(0, "0x")));
             GamertagEdit.Text           = string.IsNullOrWhiteSpace(resUser.Gamertag) ? "(XUID does not exist on the service)" : resUser.Gamertag;
             ShowGamercardButton.Enabled = resUser.OnlineXUID != 0;
             ViewGamertagButton.Enabled  = resUser.OnlineXUID != 0;
         }
         else
         {
             resUser = XDKUtilities.XUserFindUser(console, address, p1XUID, GamertagEdit.Text);
             if (resUser.OnlineXUID == 0)
             {
                 XUIDEdit.Text = "(Gamertag does not exist on the service)";
             }
             else
             {
                 XUIDEdit.Text     = XtraFunctions.ValueToHex(resUser.OnlineXUID).Remove(0, 2).PadLeft(16, '0');
                 GamertagEdit.Text = resUser.Gamertag; //To correct case.
             }
             ShowGamercardButton.Enabled = resUser.OnlineXUID != 0;
             ViewGamertagButton.Enabled  = resUser.OnlineXUID != 0;
         }
     }
     catch (Exception ex) { XtraMessageBox.Show("Failed to carry out the conversion." + Environment.NewLine + XDKUtilities.CreateExceptionMessage(ex, console.XboxManager), "DevTool Message", MessageBoxButtons.OK, MessageBoxIcon.Error); }
     converting = false;
 }
Ejemplo n.º 2
0
 static public ulong GetXUID(XDevkit.IXboxConsole xbc, string gamertag)
 {
     XDKUtilities.FIND_USER_INFO_RESPONSE test = XDKUtilities.XUserFindUser(xbc, (ulong)0x0009000006F93463L, gamertag);
     return(test.OnlineXUID);
 }