public Tablero() { InitializeComponent(); gifImage = new GifImage(filePath); gifImage.ReverseAtEnd = false; pictureBox6.Image = gifImage.GetNextFrame(); gifImage2 = new GifImage(filePath2); gifImage2.ReverseAtEnd = false; pictureBox3.Image = gifImage2.GetNextFrame(); Shown += new EventHandler(Form1_Shown); backgroundWorker1.WorkerReportsProgress = true; backgroundWorker1.DoWork += new DoWorkEventHandler(backgroundWorker1_DoWork); backgroundWorker1.ProgressChanged += new ProgressChangedEventHandler(backgroundWorker1_ProgressChanged); lblRes.Parent = pictureBox6; lblMuertes.Parent = pictureBox6; label1.Parent = pictureBox6; label2.Parent = pictureBox6; label3.Parent = pictureBox6; label4.Parent = pictureBox6; dgvTablero.Rows.Add(); dgvTablero.Rows.Add(); dgvTablero.Rows.Add(); dgvTablero.Rows.Add(); dgvTablero.Rows[4].Height = 107; matrix = new RealWorldApp.Matrix(5); progressBar1.Value = 0; }
private void timer1_Tick(object sender, EventArgs e) { var g = panel.CreateGraphics(); Image bg = gibg.GetNextFrame(); if (bg != null) { g.DrawImage(bg, 0, 0, panel.Width, panel.Height); } Size sizeOfBlock = new Size(50, 50); Image block = gi.GetNextFrame(); if (block != null) { var bmp = new Bitmap(block, sizeOfBlock); bmp.MakeTransparent(Color.Transparent); for (int index = 0; index < squares.Count; index++) { g.DrawImage(bmp, squares[index].get("x"), squares[index].get("y")); } } }
private void timer2_Tick(object sender, EventArgs e) { if (Globals.ClientConfiguration.Settings.ScreenServerType == 1) { ScreenSever.Image = gifImage.GetNextFrame(); } }
private void timer1_Tick(object sender, EventArgs e) { if (Globals.ClientConfiguration.Settings.style == 1) { pBxGiveOxigen.Image = gifImage.GetNextFrame(); } //timer1.Enabled = false; }
public PantallaInicio() { InitializeComponent(); gifImage = new GifImage(filePath); gifImage.ReverseAtEnd = false; pictureBox1.Image = gifImage.GetNextFrame(); System.Media.SoundPlayer sp = new System.Media.SoundPlayer("..\\..\\Matrix-Cancion1.wav"); sp.Play(); }
private void Timer_Sent_Tick(object sender, EventArgs e) { PictureBox_Status.Image = sentGif.GetNextFrame(); if (!Button_Confirm.Enabled) { Button_Confirm.Enabled = true; Button_Cancel.Enabled = false; } }
public Final() { InitializeComponent(); SetStyle(ControlStyles.SupportsTransparentBackColor, true); this.button1.BackColor = Color.Transparent; gifImage = new GifImage(filePath); gifImage.ReverseAtEnd = false; pictureBox1.Image = gifImage.GetNextFrame(); }
public WindowLoading(MainWindow mainWindow) { InitializeComponent(); this.FormClosed += CloseHandler; this.mainWindow = mainWindow; this.mainWindow.Enabled = false; imagePath = Directory.GetParent(workingDirectory).Parent.FullName + @"\UI\Images\ticket_loading.gif"; gifImage = new GifImage(imagePath, 400, 300); gifImage.ReverseAtEnd = false; PictureBox_LoadingImage.Image = gifImage.GetNextFrame(); PictureBox_LoadingImage.BringToFront(); bool toMaximize = WindowHelper.checkIfMaximizeWindow(this.Width, this.Height); if (toMaximize) { this.WindowState = FormWindowState.Maximized; } BringToFront(); }
public ScanningWindow(MainWindow mainWindow, List <Event> events, List <Participant> participants) { InitializeComponent(); this.FormClosed += CloseHandler; this.mainWindow = mainWindow; this.participants = participants; this.events = events; imagePath = Directory.GetParent(workingDirectory).Parent.FullName + @"\UI\Images\qr-scan.gif"; gifImage = new GifImage(imagePath, 264, 132); gifImage.ReverseAtEnd = false; PictureBox_Barcode.Image = gifImage.GetNextFrame(); PictureBox_Barcode.BringToFront(); this.ActiveControl = TextBox_Barcode; bool toMaximize = WindowHelper.checkIfMaximizeWindow(this.Width, this.Height); if (toMaximize) { this.WindowState = FormWindowState.Maximized; } BringToFront(); }
private void Timer_TicketLoadingGif_Tick(object sender, EventArgs e) { PictureBox_LoadingImage.Image = gifImage.GetNextFrame(); }
private void Timer_Document_Tick(object sender, EventArgs e) { PictureBox_Status.Image = generatingDocumentGif.GetNextFrame(); }
private void timer1_Tick(object sender, EventArgs e) { pBxGiveOxigen.Image = gifImage.GetNextFrame(); }
private void Timer_Sending_Tick(object sender, EventArgs e) { PictureBox_Status.Image = sendingGif.GetNextFrame(); }
private void bootscreen_timer_Tick(object sender, EventArgs e) { bootscreen.BackgroundImage = gifImage.GetNextFrame(); }
private void Timer_Gif_Tick(object sender, EventArgs e) { PictureBox_Barcode.Image = gifImage.GetNextFrame(); }
private void timer1_Tick(object sender, EventArgs e) { pictureBox.Image = gifImage.GetNextFrame(); }
private void drawRandomSpace() { SolidBrush brush = new SolidBrush(Color.Black); Rectangle rect = new Rectangle(0, 0, 1280, 750); g.FillRectangle(brush, rect); SolidBrush whiteBrush = new SolidBrush(Color.White); Pen pen = new Pen(whiteBrush); for (int i = 0; i < 70; i++) { int x = r.Next(1280); int y = r.Next(750); g.DrawEllipse(pen, x, y, 1, 1); } if (oneup) { oney -= 10; g.DrawImage(submarineLeftUp, onex, oney, 80, 300); int v = r.Next((35 - level) * 15 - level / 2); if (v == 1 || v == 2 || v == 3 || v == 4 || v == 5 || v == 6 || v == 7 || v == 8) { Glock gl = new Glock(explosion, g, onex / 20, oney / 20, bulletOne, ship); gl.exe(gl.randomizeShiets(gl.Sheut())); B.AddRange(gl.B); } if (oney < 1) { oneup = false; } } else { oney += 10; g.DrawImage(submarineLeftDown, onex, oney, 80, 300); int v = r.Next((35 - level) * 15 - level / 2); if (v == 1 || v == 2 || v == 3 || v == 4 || v == 5 || v == 6 || v == 7 || v == 8) { Glock gl = new Glock(explosion, g, onex / 20, oney / 20, bulletOne, ship); gl.exe(gl.randomizeShiets(gl.Sheut())); B.AddRange(gl.B); } if (oney > 803) { oneup = true; } } if (threeup) { threey -= 10; g.DrawImage(submarineRightUp, threex, threey, 80, 300); int v = r.Next((35 - level) * 15 - level / 2); if (v == 1 || v == 2 || v == 3 || v == 4 || v == 5 || v == 6 || v == 7 || v == 8) { Glock gl = new Glock(explosion, g, threex / 20, threey / 20, bulletThree, ship); gl.opp(); gl.exe(gl.randomizeShiets(gl.Sheut())); B.AddRange(gl.B); } if (threey < 1) { threeup = false; } } else { threey += 10; g.DrawImage(submarineRightDown, threex, threey, 80, 300); int v = r.Next((35 - level) * 15 - level / 2); if (v == 1 || v == 2 || v == 3 || v == 4 || v == 5 || v == 6 || v == 7 || v == 8) { Glock gl = new Glock(explosion, g, threex / 20, threey / 20, bulletThree, ship); gl.opp(); gl.exe(gl.randomizeShiets(gl.Sheut())); B.AddRange(gl.B); } if (threey > 803) { threeup = true; } } if (twoleft) { twox -= 10; g.DrawImage(submarineTopLeft, twox, twoy, 300, 80); int v = r.Next((35 - level) * 15 - level / 2); if (v == 1 || v == 2 || v == 3 || v == 4 || v == 5 || v == 6 || v == 7 || v == 8) { Glock gl = new Glock(explosion, g, twox / 20, twoy / 20, bulletTwo, ship); gl.ver(); gl.exe(gl.randomizeShiets(gl.Sheut())); B.AddRange(gl.B); } if (twox < 1) { twoleft = false; } } else { twox += 10; g.DrawImage(submarineTopRight, twox, twoy, 300, 80); int v = r.Next((35 - level) * 15 - level / 2); if (v == 1 || v == 2 || v == 3 || v == 4 || v == 5 || v == 6 || v == 7 || v == 8) { Glock gl = new Glock(explosion, g, twox / 20, twoy / 20, bulletTwo, ship); gl.ver(); gl.exe(gl.randomizeShiets(gl.Sheut())); B.AddRange(gl.B); } if (twox > 1280) { twoleft = true; } } if (fourleft) { fourx -= 10; if (fourx < 0) { fourx += 10; } g.DrawImage(submarineBottomLeft, fourx, foury, 300, 80); int v = r.Next((35 - level) * 15 - level / 2); if (v == 1 || v == 2 || v == 3 || v == 4 || v == 5 || v == 6 || v == 7 || v == 8) { Glock gl = new Glock(explosion, g, fourx / 20, foury / 20, bulletFour, ship); gl.ver(); gl.opp(); gl.exe(gl.randomizeShiets(gl.Sheut())); B.AddRange(gl.B); } if (fourx < 1) { fourleft = false; } } else { fourx += 10; if (fourx > 1280) { fourleft = true; } if (fourx > 1280) { fourx -= 10; } g.DrawImage(submarineBottomRight, fourx, foury, 300, 80); int v = r.Next((35 - level) * 15 - level / 2); if (v == 1 || v == 2 || v == 3 || v == 4 || v == 5 || v == 6 || v == 7 || v == 8) { Glock gl = new Glock(explosion, g, fourx / 20, foury / 20, bulletFour, ship); gl.ver(); gl.opp(); gl.exe(gl.randomizeShiets(gl.Sheut())); B.AddRange(gl.B); } } for (int k = 0; k < B.Count; k++) { if (B[k].dead != true) { try { g.DrawImage(B[k].myBullet, B[k].whereami.X * 20, B[k].whereami.Y * 20, B[k].myBullet.Width / 2, B[k].myBullet.Height / 2); } catch (Exception ex) { } } else { B.Remove(B[k]); } } if (ship.direction.Equals("up")) { ship.y -= 1; Image gg = shipup.GetNextFrame(); g.DrawImage(gg, ship.x * 20, ship.y * 20, 40, 40); } if (ship.direction.Equals("down")) { ship.y += 1; Image gg = shipdown.GetNextFrame(); g.DrawImage(gg, ship.x * 20, ship.y * 20, 40, 40); } if (ship.direction.Equals("left")) { ship.x -= 1; Image gg = shipleft.GetNextFrame(); g.DrawImage(gg, ship.x * 20, ship.y * 20, 40, 40); } if (ship.direction.Equals("right")) { ship.x += 1; Image gg = shipright.GetNextFrame(); g.DrawImage(gg, ship.x * 20, ship.y * 20, 40, 40); } for (int i = 0; i < monsters.Count; i++) { if (i < monsters.Count) { int x = r.Next(2) - r.Next(2); int y = r.Next(2) - r.Next(2); int v = r.Next(20); int v2 = r.Next(7); if (level % 2 == 0) { if (v == 4) { monsters[i].follow = !monsters[i].follow; } else if (v2 == 4) { monsters[i].follow = !monsters[i].follow; } if (monsters[i].follow) { monsters[i].move = !monsters[i].move; if (ship.x < monsters[i].x && monsters[i].move) { monsters[i].x--; } if (ship.y < monsters[i].y && monsters[i].move) { monsters[i].y--; } if (ship.x > monsters[i].x && monsters[i].move) { monsters[i].x++; } if (ship.y > monsters[i].y && monsters[i].move) { monsters[i].y++; } } } if (!monsters[i].follow) { monsters[i].move = !monsters[i].move; if (monsters[i].move) { monsters[i].x += x; monsters[i].y += y; } } if (ship.x == monsters[i].x && ship.y == monsters[i].y) { ship.life -= 100; explode(); } try { Image m = null; if (monsters[i].follow) { m = monsterFollow; } else { m = monster; } g.DrawImage(m, monsters[i].x * 20, monsters[i].y * 20, 35, 35); } catch (Exception ex) { } } } for (int i = 0; i < caps.Count; i++) { if (i < caps.Count) { try { g.DrawImage(energy, caps[i].x * 20, caps[i].y * 20, 40, 40); if (ship.x == caps[i].x && ship.y == caps[i].y) { ship.life += 20; g.DrawImage(explosion, ship.x * 20, ship.y * 20, 68, 68); //threadPlayDing.Start(); explode(); eliminateCapsule(caps[i]); } } catch (Exception ex) { } } } }