Ejemplo n.º 1
0
        // Создание картинки для клиента
        private void NewPicture(object sender, EventArgs args)
        {
            PatientImageEventArgs imgArgs = (PatientImageEventArgs)args;
            Client     patient            = m.clients[imgArgs.num];
            PictureBox img = new PictureBox();

            if (patient.car is Truck)
            {
                img.Image = AutoBase.Properties.Resources.truck;
            }
            else
            {
                img.Image = AutoBase.Properties.Resources.passanger;
            }

            PictureBox box = new PictureBox
            {
                Size     = new Size(89, 85),
                Visible  = true,
                Image    = img.Image,
                Location = new Point(1300, 435),
                SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom
            };

            panel.Invoke((Action)(() => panel.Controls.Add(box)));
            m.clients[imgArgs.num].picture = box;
            clientPics.Add(box);
        }
Ejemplo n.º 2
0
        //переворачиваем картинку
        private void NewBitMap(object sender, EventArgs args)
        {
            PatientImageEventArgs imgArgs = (PatientImageEventArgs)args;
            Bitmap img;
            Client client = m.clients[imgArgs.num];

            if (client.car is Truck)
            {
                img = AutoBase.Properties.Resources.truck;
            }
            else
            {
                img = AutoBase.Properties.Resources.passanger;
            }
            img.RotateFlip(RotateFlipType.Rotate180FlipY);
            client.picture.Image = img;
        }