This repository was archived by the owner on Mar 17, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLoadscreen.cs
More file actions
60 lines (54 loc) · 1.84 KB
/
Loadscreen.cs
File metadata and controls
60 lines (54 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MineSweeper {
public class Loadscreen : Form {
private IContainer components;
private Timer timer;
private PictureBox load;
private Game newGame;
public Loadscreen() {
init();
newGame = new Game(new Size(15, 10));
load.Image = global::MineSweeper.Properties.Resources.load;
timer.Start();
}
private void init() {
components = new Container();
load = new PictureBox();
timer = new Timer(this.components);
((System.ComponentModel.ISupportInitialize)(this.load)).BeginInit();
SuspendLayout();
load.Location = new Point(0, 0);
load.Name = "load";
load.Size = new Size(500, 310);
load.SizeMode = PictureBoxSizeMode.StretchImage;
load.TabIndex = 0;
load.TabStop = false;
timer.Interval = 6350;
timer.Tick += new EventHandler(this.startGame);
ClientSize = load.Size;
ControlBox = false;
Controls.Add(this.load);
ShowInTaskbar = false;
DoubleBuffered = true;
FormBorderStyle = FormBorderStyle.FixedDialog;
Name = "Loadscreen";
StartPosition = FormStartPosition.CenterScreen;
((System.ComponentModel.ISupportInitialize)(this.load)).EndInit();
this.ResumeLayout(false);
}
private void startGame(object sender, EventArgs e) {
Visible = false;
timer.Stop();
timer.Dispose();
newGame.Show();
}
}
}