Esempio n. 1
0
        public GameObject toGameObject(GameDTOs a)
        {
            GameObject temp1 = new GameObject();

            temp1.Id           = a.Id;
            temp1.Name         = a.Name;
            temp1.Rating       = a.Rating;
            temp1.Price        = Convert.ToInt32(a.Price);
            temp1.PurchaseDate = Convert.ToDateTime(a.PurchaseDate);
            temp1.PublisherId  = a.Publisher.Id;
            temp1.Content      = a.Content;
            temp1.VideoUrl     = a.VideoUrl;
            temp1.Logo         = new PictureBox();
            temp1.Logo.Load(a.ImageGames.ElementAt(0).UrlOnline);
            temp1.Sale = a.Sale;
            for (int i = 0; i < a.ImageGames.Count(); i++)
            {
                if (temp1.GameImages == null)
                {
                    temp1.GameImages = new List <String>();
                }
                temp1.GameImages.Add(a.ImageGames.ElementAt(i).UrlOnline);
            }
            return(temp1);
        }
Esempio n. 2
0
 public PushPreview(GameDTOs gameDTO, List <string> _listImage, string pub)
 {
     InitializeComponent();
     listImage = _listImage;
     LoadImage();
     GameDescription.Text      = gameDTO.Content;
     Publisher.Text            = Publisher.Text + gameDTO.Publisher;
     this.BackColor            = Color.FromArgb(42, 46, 51);
     GameNameLabel.Text        = gameDTO.Name;
     Publisher.Text            = pub;
     GameDetailPanel.BackColor = Color.FromArgb(42, 46, 51);
     panel5.BackColor          = Color.FromArgb(20, 46, 51);
     GameDescription.BackColor = Color.FromArgb(20, 46, 51);
     PriceLabel.Text           = gameDTO.Price;
 }
Esempio n. 3
0
        private void btnPreview_Click(object sender, EventArgs e)
        {
            List <string> listImage = new List <string>();

            listImage.Add(txtLink1.Text);
            listImage.Add(txtLink2.Text);
            listImage.Add(txtLink3.Text);
            listImage.Add(txtLink4.Text);

            GameDTOs gameDTO = new GameDTOs();

            gameDTO.Name    = txtName.Text;
            gameDTO.Price   = txtPrice.Text;
            gameDTO.Content = txtContent.Text;
            string      Pub = comboBox1.Text;
            PushPreview a   = new PushPreview(gameDTO, listImage, Pub);

            a.Show();
        }