private void putPictureInProjector() { PictureBox picture = SetPictureBox(new PhotoAdapter(PhotosCollection[m_PhotoIndex])); Projector.Invoke(new Action(() => Projector.Controls.Clear())); Projector.Invoke(new Action(() => Projector.Controls.Add(picture))); }
protected override void pictureBoxIcon_Click(object sender, EventArgs e) { PictureBox icon = sender as PictureBox; Projector.Invoke(new Action(() => Projector.Visible = true)); Projector.Invoke(new Action(() => (Projector as WebBrowser).Navigate("https://www.google.com/search?q=" + icon.Name + " watch online"))); }
protected override void pictureBoxIcon_Click(object sender, EventArgs e) { PictureBox albumIcon = sender as PictureBox; m_PhotoIndex = 0; Projector.Invoke(new Action(() => Projector.Visible = true)); foreach (Album fbAlbum in MyUser.Albums) { if (albumIcon.Name == fbAlbum.Name) { PhotosCollection = fbAlbum.Photos.ToList(); putPictureInProjector(); ButtonNextPhoto.Click += ButtonNextPhoto_Click; ButtonPrevPhoto.Click += ButtonPrevPhoto_Click; } } }
public ImagesMenager(Control i_DispalyPanel, User i_LoginUser, Control i_Projector) { DispalyImagesPanel.Invoke(new Action(() => DispalyImagesPanel = i_DispalyPanel as Panel)); Projector.Invoke(new Action(() => Projector = i_Projector)); MyUser = i_LoginUser; }