private void favoritenLoeschen_Click(object sender, EventArgs e)
        {
            MessageBox.Show(this.Name);
            Favoriten f = new Favoriten();

            f.loeschen(Artikel);
            //zu favoriten datenbank hinzufügen
        }
Example #2
0
        public void getOPSkinsPreis()
        {
            string  URL  = "https://api.opskins.com/IPricing/GetAllLowestListPrices/v1/?appid=" + getAppID();
            string  json = new System.Net.WebClient().DownloadString(URL);
            JObject o    = JObject.Parse(json);

            string PreisString = (string)o["response"][this.Name]["price"];

            OPSkinsPreis = Convert.ToDouble(PreisString.Substring(0, PreisString.Length - 2) + "," + PreisString.Substring(PreisString.Length - 2));
            Favoriten f = new Favoriten(); f.preiseAktualisieren(this, 1);
        }
Example #3
0
        public void getSteamPreis()
        {
            string URL = "http://steamcommunity.com/market/priceoverview/?currency=1&appid=" + getAppID() + "&market_hash_name=";

            System.Threading.Thread.Sleep(3000);
            string  json        = new System.Net.WebClient().DownloadString(URL + this.Name);
            JObject o           = JObject.Parse(json);
            string  PreisString = (string)o["lowest_price"];

            this.SteamPreis = Convert.ToDouble(PreisString.Replace(".", ",").Substring(1));
            Favoriten f = new Favoriten(); f.preiseAktualisieren(this, 0);
        }
        public PanelSuchergebnis(int x, int y, SteamGegenstand a, int panelindex)
        {
            Artikel          = a;
            this.Size        = new Size(700, 120);
            this.Location    = new Point(x, y);
            this.BorderStyle = BorderStyle.Fixed3D;
            //this.BackColor = Color.Red;

            Favorit.Parent   = this;
            Favorit.Location = new Point(500, 60);
            Favorit.Name     = panelindex.ToString();

            fav = new Favoriten();
            if (fav.FavoritenListe.Exists(z => z.Name == Artikel.Name))
            {
                Favorit.Text   = "Favorit entfernen";
                Favorit.Click += favoritenLoeschen_Click;
            }

            else
            {
                Favorit.Text   = "Favorit hinzufügen";
                Favorit.Click += favoritenHinzufuegen_Click;
            }
            Favorit.AutoSize = true;

            Bezeichnung.Parent   = this;
            Bezeichnung.Location = new Point(150, 30);
            Bezeichnung.Text     = Artikel.Name;
            Bezeichnung.AutoSize = true;

            Spiel.Parent   = this;
            Spiel.Location = new Point(150, 90);
            Spiel.Text     = Artikel.Spiel;
            Spiel.AutoSize = true;

            Bild.Parent   = this;
            Bild.Location = new Point(10, 10);
            Bild.Size     = new Size(100, 100);
            Bild.SizeMode = PictureBoxSizeMode.Zoom;
            Bild.Load(Artikel.BildURL);
        }