Ejemplo n.º 1
0
        public void PrintListSoonFilm(FilmControl filmControl)
        {
            OleDbCommand command = new OleDbCommand("SELECT * FROM SoonFilm", myConnection);

            myConnection.Open();
            OleDbDataReader reader = command.ExecuteReader();

            while (reader.Read())
            {
                FilmEl       Item         = new FilmEl();
                byte[]       Photo        = (byte[])(reader[0]);
                MemoryStream memoryStream = new MemoryStream(Photo);
                Item.PictureBoxSoonFilm.Image   = Image.FromStream(memoryStream);
                Item.NaneLableFilm.Text         = reader[1].ToString();
                Item.PictureBoxSoonFilm.Visible = true;
                if (reader[8].ToString() == "True")
                {
                    Item.gunaAdvenceButton1.Visible = true;
                    Item.PictureBoxSoonFilm.Cursor  = Cursors.Default;
                }

                filmControl.flowLayoutPanel1.Controls.Add(Item);
            }
            reader.Close();
            myConnection.Close();
        }
Ejemplo n.º 2
0
        private void btnWatchLater_Click(object sender, EventArgs e)
        {
            btnBack.Visible      = false;
            PanelSearch.Location = new Point(26, 11);

            gunaPanel2.Controls.RemoveAt(0);
            FilmControl filmControl = new FilmControl();

            gunaPanel2.Controls.Add(filmControl);
            filmControl.Dock = DockStyle.Fill;
            filmControl.BringToFront();
        }