Esempio 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;
 }
Esempio n. 2
0
 private void XUIDEdit_Validating(object sender, CancelEventArgs e)
 {
     if (XUIDEdit.Text.Length <= 0)
     {
         return;
     }
     if (!XtraFunctions.IsValidBase16String(XUIDEdit.Text))
     {
         e.Cancel = true;
     }
     else
     {
         e.Cancel = !XUID.IsOnlineXUID(XtraFunctions.ValueFromHex(XUIDEdit.Text.Insert(0, "0x"))) && !XUID.IsTeamXUID(XtraFunctions.ValueFromHex(XUIDEdit.Text.Insert(0, "0x")));
     }
 }
Esempio n. 3
0
 public SigninForm(MainForm MainForm, IEnumerable <ConsoleProfile> LocalProfiles, ConsoleProfilesManager Manager)
 {
     InitializeComponent();
     mainForm               = MainForm;
     profileManager         = Manager;
     SigninTileControl.Text = "Profiles on " + profileManager.Console.Name;
     SigninTileControl.BeginUpdate();
     foreach (var profile in LocalProfiles)
     {
         var xai = XDKUtilities.XamProfileFindAccount((XboxConsole)profile.Console, profile.OfflineXuid.value);
         if (!profile.IsLiveProfile)
         {
             continue;
         }
         var ti = new TileItem {
             Tag = new TileTag {
                 Profile = profile, AccountInfo = xai
             }, Name = profile.Gamertag + "Tile", BackgroundImage = profile.Tier == SubscriptionTier.Silver ? Resources.Signin_Slot_Silver : Resources.Signin_Slot_Gold, BackgroundImageScaleMode = TileItemImageScaleMode.Stretch, Text = string.Format("<Color=\"black\"><b>{0}</b></Color>", profile.Gamertag)
         };
         ti.RightItemClick += ProfileTile_RightItemClick;
         ti.ItemClick      += ProfileTile_ItemClick;
         ti.Elements.Add(new TileItemElement {
             TextLocation = new Point(0, 15), TextAlignment = TileItemContentAlignment.Manual, Text = string.Format("<Color=\"gray\"><b>{0}</b></Color>", profile.Tier)
         });
         ti.Elements.Add(new TileItemElement {
             TextLocation = new Point(0, 30), TextAlignment = TileItemContentAlignment.Manual, Text = string.Format("<Color=\"gray\"><b>{0}</b></Color>", XtraFunctions.ValueToHex(profile.OfflineXuid.value).Remove(0, 2).PadLeft(16, '0'))
         });
         ti.Elements.Add(new TileItemElement {
             TextLocation = new Point(0, 45), TextAlignment = TileItemContentAlignment.Manual, Text = string.Format("<Color=\"gray\"><b>{0}</b></Color>", XtraFunctions.ValueToHex(profile.OnlineXuid.value).Remove(0, 2).PadLeft(16, '0'))
         });
         SigninTileGroup.Items.Add(ti);
     }
     SigninTileControl.EndUpdate();
 }
Esempio n. 4
0
        private void CopyOfflineXUIDItem_ItemClick(object sender, ItemClickEventArgs e)
        {
            var tag = (TileTag)((TileItem)SigninTileGroup.Tag).Tag;

            Clipboard.SetText(XtraFunctions.ValueToHex(tag.Profile.OfflineXuid.value).Remove(0, 2).PadLeft(16, '0'));
        }
Esempio n. 5
0
        private void ViewAccountInfoItem_ItemClick(object sender, ItemClickEventArgs e)
        {
            var tag = (TileTag)((TileItem)SigninTileGroup.Tag).Tag;

            XtraMessageBox.Show(string.Format("Gamertag: {0}{1}Subscription: {2}{1}Offline XUID: {3}{1}Online XUID: {4}{1}Has Passcode: {5}{1}Passcode: {6}, {7}, {8}, {9}{1}Requires Management: {10}{1}Service: {11}{1}Language: {12}{1}Country: {13}{1}Online Domain: {14}{1}Online Key: {15}{1}Kerberos Realm: {16}{1}User Passport Member Name: {17}{1}User Passport Password: {18}{1}Owner Passport Member Name: {19}", tag.Profile.Gamertag, Environment.NewLine, tag.Profile.Tier, XtraFunctions.ValueToHex(tag.Profile.OfflineXuid.value).Remove(0, 2).PadLeft(16, '0'), XtraFunctions.ValueToHex(tag.Profile.OnlineXuid.value).Remove(0, 2).PadLeft(16, '0'), tag.AccountInfo.HasPasscode, tag.AccountInfo.Passcode[0], tag.AccountInfo.Passcode[1], tag.AccountInfo.Passcode[2], tag.AccountInfo.Passcode[3], tag.AccountInfo.RequiresManagement, tag.AccountInfo.Service, tag.AccountInfo.Language, tag.AccountInfo.Country, tag.AccountInfo.Domain, XtraFunctions.ByteArrayToString(tag.AccountInfo.OnlineKey), tag.AccountInfo.KerberosRealm, tag.AccountInfo.UserPassportMembername, tag.AccountInfo.UserPassportPassword, tag.AccountInfo.OwnerPassportMembername), "Account Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }