public bool SetTargetPlayer(string playerName) { User record = null; if (this.PlayerViewLookups.ContainsKey(playerName)) { this.mCurrentPlayer = this.PlayerViewLookups[playerName]; return true; } if (!Chatroom.GatheringParticipants.TryFindByIndex("name", playerName, out record) && ((User.CurrentFriends == null) || !User.CurrentFriends.TryFindByIndex("name", playerName, out record))) { if (playerName == User.Current.Name) { record = User.Current; } else { MappedObjectList<User> objects = DataAccess.GetObjects<User>("GetPlayerDetails", new object[] { playerName }); if (objects.Count > 0) { record = objects[0]; } } } if (record != null) { this.mCurrentPlayer = new PlayerView(record); this.PlayerViewLookups.Add(playerName, this.CurrentPlayer); return true; } base.MainForm.ErrorMessage("<LOC>Unable to locate {0}", new object[] { playerName }); if (this.ViewList.Count < 1) { base.Dispose(); } return false; }
private void skinButtonPreviousProfile_Click(object sender, EventArgs e) { this.mCurrentPlayer = this.ViewList.Find(this.CurrentPlayer).Previous.Value; this.Construct(); }
private void skinButtonNext_Click(object sender, EventArgs e) { this.mCurrentPlayer = this.ViewList.Find(this.CurrentPlayer).Next.Value; this.Construct(); }