private void loadLabelPanel() { foreach (PictureBox mypicture in DispalyImagesPanel.Controls) { Label name = new Label(); settingForPictureBox(mypicture, name); DispalyImagesPanel.Invoke(new Action(() => DispalyImagesPanel.Controls.Add(name))); } }
protected void LoadPanel(IImageAndTextAdapter i_Page) { PictureBox iconPage = InitIcon(i_Page); iconPage.Click += new EventHandler(pictureBoxIcon_Click); int amountOfControls = 0; DispalyImagesPanel.Invoke(new Action(() => amountOfControls = DispalyImagesPanel.Controls.Count)); if (amountOfControls % 2 == 0) { DispalyImagesPanel.Invoke(new Action(() => DispalyImagesPanel.Controls.Add(iconPage))); X += iconPage.Width + 10; } else { DispalyImagesPanel.Invoke(new Action(() => DispalyImagesPanel.Controls.Add(iconPage))); Y += iconPage.Height + 20; DispalyImagesPanel.Invoke(new Action(() => X = DispalyImagesPanel.Location.X - 10)); } }
protected void SetCoordinatesForPanel() { DispalyImagesPanel.Invoke(new Action(() => X = DispalyImagesPanel.Location.X - 10)); DispalyImagesPanel.Invoke(new Action(() => Y = DispalyImagesPanel.Location.Y + 5)); }
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; }