示例#1
0
 private void loadLabelPanel()
 {
     foreach (PictureBox mypicture in DispalyImagesPanel.Controls)
     {
         Label name = new Label();
         settingForPictureBox(mypicture, name);
         DispalyImagesPanel.Invoke(new Action(() => DispalyImagesPanel.Controls.Add(name)));
     }
 }
示例#2
0
        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));
            }
        }
示例#3
0
 protected void SetCoordinatesForPanel()
 {
     DispalyImagesPanel.Invoke(new Action(() => X = DispalyImagesPanel.Location.X - 10));
     DispalyImagesPanel.Invoke(new Action(() => Y = DispalyImagesPanel.Location.Y + 5));
 }
示例#4
0
 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;
 }