本文整理汇总了C#中Client.HttpSend方法的典型用法代码示例。如果您正苦于以下问题:C# Client.HttpSend方法的具体用法?C# Client.HttpSend怎么用?C# Client.HttpSend使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Client
的用法示例。
在下文中一共展示了Client.HttpSend方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Init
public override bool Init(Client client)
{
Hashtable data = new Hashtable();
data.Add("Title", "Принцип честной игры GAMESLOT");
client.HttpSend(TemplateActivator.Activate(this, client, data));
return true;
}
示例2: Init
public override bool Init(Client client)
{
Hashtable data = new Hashtable();
data.Add("Title", "Идет профилактика");
client.HttpSend("Сайт на профилактике. <br />Пока вы можете посетить наше ВК сообщество: <a href='https://vk.com/thegameslot'>https://vk.com/thegameslot</a>");
return true;
}
示例3: Init
public override bool Init(Client client)
{
uint id;
UGroup Group;
XUser Owner;
if (uint.TryParse(BaseFuncs.GetAdditionalURLArray(client.URL, this.URL)[0], out id) && Helper.GroupHelper.SelectByID(id, out Group, out Owner, client))
{
Hashtable data = new Hashtable();
data.Add("Owner", Owner);
XUser CurrentUser;
bool InGroup = Helper.UserHelper.GetCurrentUser(client, out CurrentUser) && CurrentUser.GroupOwnerID == Group.ID ? true : false;
bool InOtherGroup = !InGroup && CurrentUser.GroupOwnerID >= 0 ? true : false;
data.Add("Group", Group);
data.Add("InGroup", InGroup);
data.Add("InOtherGroup", InOtherGroup);
data.Add("Title", "Тусовка пользователя " + Owner.Name);
client.HttpSend(TemplateActivator.Activate(this, client, data));
return true;
}
BaseFuncs.Show404(client);
return false;
}
示例4: Init
public override bool Init(Client client)
{
Hashtable data = new Hashtable();
data.Add("Lottery_CSGO", Helper.LotteryHelper.GetCurrent(Configs.CSGO_STEAM_GAME_ID, client));
data.Add("Lottery_DOTA", Helper.LotteryHelper.GetCurrent(Configs.DOTA2_STEAM_GAME_ID, client));
ushort currency = Helper.UserHelper.GetCurrency(client);
int today_i_d2, today_i_cs;
double today_p_d2, today_p_cs;
if (currency == 1)
{
data.Add("GameToday_CSGO", Helper.LotteryHelper.TodaysGames(Configs.CSGO_STEAM_GAME_ID, out today_p_cs, out today_i_cs, 1).Length);
data.Add("GameToday_DOTA", Helper.LotteryHelper.TodaysGames(Configs.DOTA2_STEAM_GAME_ID, out today_p_d2, out today_i_d2, 1).Length);
data.Add("MaxJackpot_CSGO", LotteryHelper.RUB_MaxJackpotPrice[Configs.CSGO_STEAM_GAME_ID].ToString("###,###,##0"));
data.Add("MaxJackpot_DOTA", LotteryHelper.RUB_MaxJackpotPrice[Configs.DOTA2_STEAM_GAME_ID].ToString("###,###,##0"));
}
else
{
data.Add("GameToday_CSGO", Helper.LotteryHelper.TodaysGames(Configs.CSGO_STEAM_GAME_ID, out today_p_cs, out today_i_cs, 0).Length);
data.Add("GameToday_DOTA", Helper.LotteryHelper.TodaysGames(Configs.DOTA2_STEAM_GAME_ID, out today_p_d2, out today_i_d2, 0).Length);
data.Add("MaxJackpot_CSGO", LotteryHelper.MaxJackpotPrice[Configs.CSGO_STEAM_GAME_ID].ToString("###,##0.00"));
data.Add("MaxJackpot_DOTA", LotteryHelper.MaxJackpotPrice[Configs.DOTA2_STEAM_GAME_ID].ToString("###,##0.00"));
}
data.Add("Title", "GAMESLOT — Удача сопутствует смелым");
client.HttpSend(TemplateActivator.Activate(this, client, data));
return true;
}
示例5: Init
public override bool Init(Client client)
{
XUser User;
if (Helper.UserHelper.GetCurrentUser(client, out User))
{
uint SteamGameID = 0;
string Action = BaseFuncs.GetAdditionalURLArray(client.URL, this.URL)[0];
if (Action.Equals("dota2"))
{
SteamGameID = Configs.DOTA2_STEAM_GAME_ID;
}
else if (Action.Equals("csgo"))
{
SteamGameID = Configs.CSGO_STEAM_GAME_ID;
}
else
{
BaseFuncs.Show404(client);
return false;
}
List<Chip> Chips = Helper.UserHelper.GetChipInventory(User.ID);
int f5 = 0 , f10 = 0, f25=0, f50=0, f100 = 0;
foreach(Chip chip in Chips)
{
switch(chip.ID)
{
case 0:
f5++;
break;
case 1:
f10++;
break;
case 2:
f25++;
break;
case 3:
f50++;
break;
case 4:
f100++;
break;
}
}
Hashtable data = new Hashtable();
data.Add("SteamGameID", SteamGameID);
data.Add("Chips", Helper.UserHelper.GetChipInventory(User.ID));
data.Add("Title", "Мой инвентарь");
data.Add("User", User);
data.Add("f5", f5);
data.Add("f10", f10);
data.Add("f25", f25);
data.Add("f50", f50);
data.Add("f100", f100);
client.HttpSend(TemplateActivator.Activate(this, client, data));
return true;
}
BaseFuncs.Show403(client);
return false;
}
示例6: Init
//.........这里部分代码省略.........
Helper.LotteryHelper.TableUsersBetsPrice.Select(data => data.LotteryID == Lottery.ID && data.UserID != Lottery.Winner, out BetsPrice);
foreach (XLotteryUsersBetsPrice Bet in BetsPrice)
{
if (Lottery.SteamGameID == Configs.DOTA2_STEAM_GAME_ID)
{
CurUser.DOTA_GroupWonTotalPrice += Bet.TotalBetsPrice;
CurUser.DOTA_RUB_GroupWonTotalPrice += Bet.TotalBetsPrice * Lottery.RubCurrency;
CurUser.DOTA_GroupWonItemsCount += Bet.TotalBetsItemsNum;
}
else if (Lottery.SteamGameID == Configs.CSGO_STEAM_GAME_ID)
{
CurUser.CSGO_GroupWonTotalPrice += Bet.TotalBetsPrice;
CurUser.CSGO_RUB_GroupWonTotalPrice += Bet.TotalBetsPrice * Lottery.RubCurrency;
CurUser.CSGO_GroupWonItemsCount += Bet.TotalBetsItemsNum;
}
}
}
}
Helper.UserHelper.Table.UpdateByID(CurUser, CurUser.ID);
}
Logger.ConsoleLog("Command done!", ConsoleColor.Cyan, LogLevel.Warning);
}
else if (client.GetParam("wtf_wtf") != null)
{
foreach (XSteamBotProcessItems XSteamBotProcessItems in Helper.SteamBotHelper.Table_ProcessItems.SelectAll())
{
Logger.ConsoleLog("User" + XSteamBotProcessItems.UserID);
Logger.ConsoleLog("SteamID" + XSteamBotProcessItems.UserSteamID);
Logger.ConsoleLog("Satus" + XSteamBotProcessItems.Status);
Logger.ConsoleLog("offer" + XSteamBotProcessItems.OfferID + "\n------------------------------------------------------");
}
}
else if(client.GetParam("send_lost_items_to_local_usr") != null && client.GetParam("sure") != null)
{
List<XBotsOffer> XBotsOffers;
Helper.SteamBotHelper.Table_BotsOffer.Select(data => (data.Status == 0), out XBotsOffers);
int i = 0;
foreach(XBotsOffer offer_d in XBotsOffers)
{
Helper.SteamBotHelper.ErrorToSendLocalItem(offer_d.SteamUserID, offer_d.SentTime, offer_d.BotID);
XUser g_usr;
Helper.UserHelper.SelectBySteamID(offer_d.SteamUserID, out g_usr);
Logger.ConsoleLog("Sent to " + g_usr.ID + "SteamID " + offer_d.SteamUserID + " num: " + i++, ConsoleColor.Cyan, LogLevel.Warning);
}
Logger.ConsoleLog("Command done!", ConsoleColor.Cyan, LogLevel.Warning);
}
else if (client.GetParam("local") != null && client.GetParam("userID") != null)
{
uint userID;
XUser us;
if (uint.TryParse(client.GetParam("userID"), out userID) && Helper.UserHelper.Table.SelectByID(userID, out us))
{
List<XBotsOffer> XBotsOffers;
Helper.SteamBotHelper.Table_BotsOffer.Select(data => data.SteamUserID == us.SteamID, out XBotsOffers);
foreach (XBotsOffer offer_d in XBotsOffers)
{
Logger.ConsoleLog(offer_d.ID + ":" + offer_d.Status, ConsoleColor.Cyan, LogLevel.Warning);
}
Logger.ConsoleLog("Command done!", ConsoleColor.Cyan, LogLevel.Warning);
}
}
else if(client.GetParam("send_local_items_to_all_users") != null && client.GetParam("sure") != null)
{
int i = 0;
Logger.ConsoleLog("Starting!", ConsoleColor.Cyan, LogLevel.Warning);
foreach(XUser cur in Helper.UserHelper.Table.SelectAll())
{
Helper.SteamBotHelper.SendLocalItemsToSteam(cur, Configs.DOTA2_STEAM_GAME_ID, client);
Helper.SteamBotHelper.SendLocalItemsToSteam(cur, Configs.CSGO_STEAM_GAME_ID, client);
Logger.ConsoleLog("Send to " + cur.ID + "(" + cur.Name + ") " + cur.SteamID + " position: " + i++);
}
Logger.ConsoleLog("Command done!", ConsoleColor.Cyan, LogLevel.Warning);
}
}
if (client.GetParam("auth_by_other_user") != null & client.GetParam("cheat_it_motherfucker") == "lolita")
{
uint userID;
XUser usr;
if (uint.TryParse(client.GetParam("auth_by_other_user"), out userID) && Helper.UserHelper.Table.SelectByID(userID, out usr))
{
Helper.UserHelper.Auth(usr.SteamID, out usr, client);
Logger.ConsoleLog("Auth done to: " + usr.Name + " (" + usr.SteamID + ")", ConsoleColor.Cyan, LogLevel.Warning);
}
}
else if(client.GetParam("get_all processes") != null)
{
}
Random rnd = new Random();
client.HttpSend(rnd.Next(0,2).ToString());
return true;
}
示例7: Init
//.........这里部分代码省略.........
}
Hashtable data = new Hashtable();
ushort currency = Helper.UserHelper.GetCurrency(client);
if (!byid)
{
Lottery = Helper.LotteryHelper.GetCurrent(SteamGameID, client);
}
XUser user;
bool auth = Helper.UserHelper.GetCurrentUser(client, out user);
if (auth)
{
double ChipsTotalPrice;
data.Add("Chips", Helper.UserHelper.GetChipInventory(user.ID, out ChipsTotalPrice));
double UsersBetsPrice = 0;
XLotteryUsersBetsPrice Users_XLotteryUsersBetsPrice;
if (Helper.LotteryHelper.TableUsersBetsPrice.SelectOne(dt => dt.LotteryID == Lottery.ID && dt.UserID == user.ID, out Users_XLotteryUsersBetsPrice))
{
UsersBetsPrice = Users_XLotteryUsersBetsPrice.TotalBetsPrice;
Logger.ConsoleLog("UsersBetsPrice: " + UsersBetsPrice);
}
if (user.Currency == 1)
{
data.Add("ChipsTotalPrice", ChipsTotalPrice.ToString("###,###,##0"));
data.Add("UsersBetsPrice", Math.Round(UsersBetsPrice * Lottery.RubCurrency));
}
else
{
data.Add("ChipsTotalPrice", ChipsTotalPrice.ToString("###,##0.00"));
data.Add("UsersBetsPrice", UsersBetsPrice);
}
data.Add("User", user);
}
if (auth && Lottery.LeftTime == 0 && user.ID == Lottery.Winner.ID)
{
data.Add("ItsWinner", true);
}
else
{
data.Add("ItsWinner", false);
}
data.Add("Lottery", Lottery);
data.Add("TopItems", Helper.LotteryHelper.GetTopItems(Lottery.ID, 7, client));
data.Add("Bets", Helper.LotteryHelper.GetBets(Lottery.ID, client));
double TodaysJackpotPrice;
int TodaysJackpotItems;
data.Add("TodaysGames", Helper.LotteryHelper.TodaysGames(SteamGameID, out TodaysJackpotPrice, out TodaysJackpotItems, currency).Length);
if (currency == 1)
{
data.Add("MaxJackpot", LotteryHelper.RUB_MaxJackpotPrice[SteamGameID].ToString("###,###,##0"));
data.Add("TodaysJackpotPrice", TodaysJackpotPrice.ToString("###,###,##0"));
}
else
{
data.Add("MaxJackpot", LotteryHelper.MaxJackpotPrice[SteamGameID].ToString("###,##0.00"));
data.Add("TodaysJackpotPrice", TodaysJackpotPrice.ToString("###,##0.00"));
}
data.Add("MaxJackpotItems", LotteryHelper.ItemsRecord[SteamGameID]);
data.Add("TodaysJackpotItems", TodaysJackpotItems);
string title = "";
if(SteamGameID == Configs.DOTA2_STEAM_GAME_ID)
{
if(byid)
{
title = "История игры DOTA2 #" + Lottery.ID;
}
else
{
title = "Лотерея DOTA2 — Удача сопутствует смелым";
}
}
else if(SteamGameID == Configs.CSGO_STEAM_GAME_ID)
{
if (byid)
{
title = "История игры CSGO #" + Lottery.ID;
}
else
{
title = "Лотерея CSGO — Удача сопутствует смелым";
}
}
data.Add("Title", title);
data.Add("Game", Game);
data.Add("ItsHistory", byid);
client.HttpSend(TemplateActivator.Activate(this, client, data));
return true;
}
示例8: Init
public override bool Init(Client client)
{
client.HttpSend(TemplateActivator.Activate(this, client));
return true;
}
示例9: Init
public override bool Init(Client client)
{
Dictionary<uint, USteamItem> StoreItems = new Dictionary<uint,USteamItem>();
int ElementsOnPage = 2;
uint SteamGameID = Configs.DOTA2_STEAM_GAME_ID;
if(client.GetParam("game") != null && client.GetParam("game").Equals(Configs.CSGO_STEAM_GAME_ID.ToString()))
{
SteamGameID = Configs.CSGO_STEAM_GAME_ID;
}
foreach (USteamItem SteamItem in Helper.UserHelper.GetSteamLocalInventory(Configs.ADMIN_ACCOUNT, SteamGameID, false, 1))
{
if(StoreItems.ContainsKey(SteamItem.ID))
{
StoreItems[SteamItem.ID].Num++;
}
else
{
SteamItem.Num++;
SteamItem.ShopPrice = SteamItem.Price - (SteamItem.Price / 100 * 40);
SteamItem.ShopPrice_Str = SteamItem.ShopPrice.ToString("###,###,##0");
StoreItems.Add(SteamItem.ID, SteamItem);
}
}
Dictionary<uint, USteamItem> StoreItemsData = new Dictionary<uint, USteamItem>();
int Page = 1;
if (client.GetParam("page") != null)
{
if(int.TryParse(client.GetParam("page"), out Page))
{
if (Page > StoreItems.Count / ElementsOnPage)
{
Page = StoreItems.Count / ElementsOnPage;
}
}
}
if(Page <= 0)
{
Page = 1;
}
int count = 0;
foreach(uint Key in StoreItems.Keys)
{
if(count < (Page -1) * ElementsOnPage)
{
count++;
continue;
}
StoreItemsData.Add(Key, StoreItems[Key]);
count++;
if (count >= Page * ElementsOnPage)
{
break;
}
}
Hashtable data = new Hashtable();
data.Add("Title", "Магазин GAMESLOT");
data.Add("StoreItems", StoreItemsData);
data.Add("Page", Page);
data.Add("ItemsNum", StoreItems.Count);
data.Add("ElementsOnPage", ElementsOnPage);
data.Add("Game", SteamGameID);
client.HttpSend(TemplateActivator.Activate(this, client, data));
return true;
}
示例10: Init
//.........这里部分代码省略.........
Users = (from it in Users orderby it.CSGO_RUB_WonTotalPrice descending select it).ToList();
title = "Топ победителей CSGO";
}
else if (Game.Equals("current"))
{
Helper.UserHelper.Table.Select(data => (data.DOTA_WonTotalPrice + data.CSGO_WonTotalPrice) > 0, out Users);
Users = (from it in Users orderby (it.CSGO_RUB_WonTotalPrice + it.DOTA_RUB_WonTotalPrice) descending select it).ToList();
title = "Топ победителей";
}
else
{
BaseFuncs.Show404(client);
return false;
}
int ShowNum = 10;
int from = 0;
if(client.GetParam("from") != null)
{
int.TryParse(client.GetParam("from"), out from);
}
if (from >= Users.Count)
{
from = (Users.Count / ShowNum) * ShowNum;
}
List<TopPlayer> TopPlayers = new List<TopPlayer>();
for (int i = from; i < Math.Min(from + ShowNum, Users.Count); i++)
{
TopPlayer TopPlayer = new TopPlayer();
TopPlayer.ID = Users[i].ID;
TopPlayer.Position = i + 1;
TopPlayer.Name = Users[i].Name;
TopPlayer.Avatar = Users[i].Avatar;
if (SteamGameID == Configs.DOTA2_STEAM_GAME_ID)
{
TopPlayer.GamesCount = Users[i].DOTA_GamesCount;
TopPlayer.WonCount = Users[i].DOTA_WonCount;
TopPlayer.BetItemsCount = Users[i].DOTA_TotalBetItemsCount;
TopPlayer.WonItemsCount = Users[i].DOTA_WonItemsCount;
TopPlayer.BetPrice = Users[i].DOTA_RUB_TotalBetPrice;
TopPlayer.WonPrice = Users[i].DOTA_RUB_WonTotalPrice;
}
else if (SteamGameID == Configs.CSGO_STEAM_GAME_ID)
{
TopPlayer.GamesCount = Users[i].CSGO_GamesCount;
TopPlayer.WonCount = Users[i].CSGO_WonCount;
TopPlayer.BetItemsCount = Users[i].CSGO_TotalBetItemsCount;
TopPlayer.WonItemsCount = Users[i].CSGO_WonItemsCount;
TopPlayer.BetPrice = Users[i].CSGO_RUB_TotalBetPrice;
TopPlayer.WonPrice = Users[i].CSGO_RUB_WonTotalPrice;
}
else if (SteamGameID == 0)
{
TopPlayer.GamesCount = (Users[i].CSGO_GamesCount + Users[i].DOTA_GamesCount);
TopPlayer.WonCount = (Users[i].CSGO_WonCount + Users[i].DOTA_WonCount);
TopPlayer.BetItemsCount = (Users[i].CSGO_TotalBetItemsCount + Users[i].DOTA_TotalBetItemsCount);
TopPlayer.WonItemsCount = (Users[i].CSGO_WonItemsCount + Users[i].DOTA_WonItemsCount);
TopPlayer.BetPrice = (Users[i].CSGO_RUB_TotalBetPrice + Users[i].DOTA_RUB_TotalBetPrice);
TopPlayer.WonPrice = (Users[i].CSGO_RUB_WonTotalPrice + Users[i].DOTA_RUB_WonTotalPrice);
}
if (TopPlayer.WonCount > 0)
{
TopPlayer.Winrate = (int)(TopPlayer.WonCount / ((double)TopPlayer.GamesCount / 100d));
}
else
{
TopPlayer.Winrate = 0;
}
TopPlayer.BetPrice_Str = TopPlayer.BetPrice.ToString("###,###,##0");
TopPlayer.WonPrice_Str = TopPlayer.WonPrice.ToString("###,###,##0");
TopPlayers.Add(TopPlayer);
}
Hashtable page_data = new Hashtable();
page_data.Add("SteamGameID", SteamGameID);
page_data.Add("Users", TopPlayers);
page_data.Add("GameURL", Game);
page_data.Add("From", from);
page_data.Add("ShowNum", ShowNum);
page_data.Add("UsersNum", Users.Count);
page_data.Add("Title", title);
client.HttpSend(TemplateActivator.Activate(this, client, page_data));
return true;
}
示例11: Init
public override bool Init(Client client)
{
string Action = BaseFuncs.GetAdditionalURLArray(client.URL, this.URL)[0];
Logger.ConsoleLog("ROBO page; GET: " + client.Head.GetParams.Count + " POST: " + client.Head.PostParams.Count);
uint OrderID;
XOrder Order;
if (Action == "success")
{
client.Redirect(Helper.GetReferer(client));
return false;
}
if (Action == "result")
{
Logger.ConsoleLog("Result come!", ConsoleColor.Green);
if (uint.TryParse(client.GetParam("InvId"), out OrderID) && Helper.OrderHelper.Table.SelectOne(data => data.ID == OrderID && data.Status == 0, out Order))
{
if (this.ResultCRC(client).Equals(client.GetParam("SignatureValue")))
{
Order.Status = 1;
XUser user = Helper.UserHelper.Table.SelectByID(Order.UserID);
user.Wallet += Order.Price;
Helper.OrderHelper.Table.UpdateByID(Order, Order.ID);
Helper.UserHelper.Table.UpdateByID(user, user.ID);
client.HttpSend("OK" + Order.ID);
return false;
}
}
}
client.HttpSend("");
return false;
}