Beispiel #1
0
 private void sendTradeOfferToolStripMenuItem_Click(object sender, EventArgs e)
 {
     var sid = new SteamID(contextMenuSteamId);
     var url = "http://steamcommunity.com/tradeoffer/new/?partner=" + sid.AccountID;
     var tradeOffersForm = new MetroForm();
     tradeOffersForm.Icon = MistClient.Properties.Resources.Icon;
     tradeOffersForm.Width = 720;
     tradeOffersForm.Height = 730;
     tradeOffersForm.Text = "Trade Offer with " + bot.SteamFriends.GetFriendPersonaName(sid);
     tradeOffersForm.Style = this.Style;
     tradeOffersForm.Theme = this.Theme;
     tradeOffersForm.ShadowType = MetroFormShadowType.DropShadow;
     var tradeOffersWeb = new Awesomium.Windows.Forms.WebControl();
     tradeOffersWeb.Dock = DockStyle.Fill;
     string cookies = string.Format("steamLogin={0}; sessionid={1}", bot.token, bot.sessionId);
     tradeOffersWeb.WebSession = WebCore.CreateWebSession(new WebPreferences());
     tradeOffersWeb.WebSession.SetCookie("http://steamcommunity.com".ToUri(), cookies, true, true);
     tradeOffersWeb.Source = url.ToUri();
     tradeOffersWeb.DocumentReady += tradeOffersWeb_DocumentReady;
     tradeOffersForm.Controls.Add(tradeOffersWeb);
     tradeOffersForm.Show();
     tradeOffersForm.Focus();
 }
Beispiel #2
0
 private void tradeOffersToolStripMenuItem_Click(object sender, EventArgs e)
 {
     var tradeOffersForm = new MetroForm();
     tradeOffersForm.Icon = MistClient.Properties.Resources.Icon;
     tradeOffersForm.Width = 1012;
     tradeOffersForm.Height = 500;
     tradeOffersForm.Text = "Trade Offers";
     tradeOffersForm.Style = this.Style;
     tradeOffersForm.Theme = this.Theme;
     tradeOffersForm.ShadowType = MetroFormShadowType.DropShadow;
     var tradeOffersWeb = new Awesomium.Windows.Forms.WebControl();
     tradeOffersWeb.Dock = DockStyle.Fill;
     string cookies = string.Format("steamLogin={0}; sessionid={1}", bot.token, bot.sessionId);
     tradeOffersWeb.WebSession = WebCore.CreateWebSession(new WebPreferences());
     tradeOffersWeb.WebSession.SetCookie("http://steamcommunity.com".ToUri(), cookies, true, true);
     tradeOffersWeb.Source = ("http://steamcommunity.com/profiles/" + bot.SteamUser.SteamID.ConvertToUInt64() + "/tradeoffers/").ToUri();
     tradeOffersWeb.DocumentReady += tradeOffersWeb_DocumentReady;
     tradeOffersForm.Controls.Add(tradeOffersWeb);
     tradeOffersForm.Show();
     tradeOffersForm.Focus();
 }