Ejemplo n.º 1
0
        private void tUpdate_Tick(object sender, EventArgs e)
        {
            if (client.recievedData.Count > 0)
            {
                if (client.recievedData.First <String>().Contains("image"))
                {
                    clsImage img             = new clsImage(client.recievedData.First <String>().Split(';')[2]);
                    ucImage  newImageControl = new ucImage(img);
                    flowLayoutPanel1.Controls.Add(newImageControl);

                    frmNotify notification = new frmNotify(img.img);
                    notification.TopMost = true;
                    notification.Show();

                    if (autoCopy == true)
                    {
                        newImageControl.pbCopy_Click(null, null);
                    }

                    if (autoSave == true)
                    {
                        img.img.Save(Environment.GetFolderPath(Environment.SpecialFolder.MyPictures) + "\\" + DateTime.Now.ToString().Replace(" ", "").Replace(":", "").Replace("/", "") + ".png", ImageFormat.Png);
                    }
                }
                client.recievedData.Clear();
            }
        }
Ejemplo n.º 2
0
 public ucImage(clsImage img)
 {
     InitializeComponent();
     loadedImage   = img;
     pbImage.Image = img.img;
     pbCopy.Width  = panel1.Width / 2;
     pbImage.Width = panel1.Width / 2;
 }