public void Sort(AuthorizedDevice item, bool up) { var index = item.Index; int count = _AuthorizedSourceList.Count - 1; if (up ? item.Index != 0 : item.Index != count) { _AuthorizedSourceList.AddOrUpdate(_AuthorizedSourceList.Items.Select(x => { if (up ? x.Index == index - 1 : x.Index == index + 1) { x.Index = up ? x.Index + 1 : x.Index - 1; } if (x.SteamId3_Int == item.SteamId3_Int) { x.Index = up ? item.Index - 1 : item.Index + 1; } x.First = x.Index == 0; x.End = x.Index == count; return(x); }).ToList()); } }
public void DowButton_Click(AuthorizedDevice item) { Sort(item, false); }
public void SetFirstButton_Click(AuthorizedDevice item) { item.Index = 1; Sort(item, true); }
public void UpButton_Click(AuthorizedDevice item) { Sort(item, true); }
public async void OpenUserProfileUrl(AuthorizedDevice user) { await Browser2.OpenAsync(user.ProfileUrl); }