Example #1
0
        public override void CustomizePlayerContextMenu(ServerRow server, Player player, List<PlayerContextMenuItem> menu)
        {
            this.UpdatePlayerInfos(server);
              ToxikkPlayerInfo info;
              if (!this.playerInfos.TryGetValue(player.Name, out info))
            return;

              menu.Insert(0, new PlayerContextMenuItem("Open Steam Chat", () => { Process.Start("steam://friends/message/" + info.SteamId); }, true));
              menu.Insert(1, new PlayerContextMenuItem("Show Steam Profile", () => { Process.Start("http://steamcommunity.com/profiles/" + info.SteamId + "/"); }));
              menu.Insert(2, new PlayerContextMenuItem("Add to Steam Friends", () => { Process.Start("steam://friends/add/" + info.SteamId); }));
              menu.Add(new PlayerContextMenuItem("Copy Steam-ID to Clipboard", () => { Clipboard.SetText(info.SteamId); }));
        }
 /// <summary>
 /// Gets a value for a game specific column.
 /// Derived classes can put game specific logic here for more complex value calculations.
 /// The default implementation just looks up the given fieldName in the row's Rules collection.
 /// </summary>
 /// <param name="server">ServerRow object with all the data known about the server</param>
 /// <param name="player">Player object with all the data known about the player</param>
 /// <param name="fieldName">FieldName of the GridColumn that was added with CustomizePlayerGridColumns</param>
 public virtual object GetPlayerCellValue(ServerRow server, Player player, string fieldName)
 {
     return null;
 }
 public virtual void CustomizePlayerContextMenu(ServerRow server, Player player, List<PlayerContextMenuItem> menu)
 {
 }
Example #4
0
        public override object GetPlayerCellValue(ServerRow server, Player player, string fieldName)
        {
            this.UpdatePlayerInfos(server);
              ToxikkPlayerInfo info;
              if (!this.playerInfos.TryGetValue(player.Name, out info))
            return null;

              if (fieldName == "Team")
            return info.Team;
              if (fieldName == "SC")
            return Math.Round(info.SkillClass, 1, MidpointRounding.AwayFromZero);
              if (fieldName == "Rank")
            return info.Rank;
              return null;
        }