-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathForm1.cs
67 lines (57 loc) · 1.54 KB
/
Form1.cs
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
61
62
63
64
65
66
67
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace testProj
{
public partial class Form1 : MetroFramework.Forms.MetroForm
{
private int counter = 0;
void timer_Tick(object sender, EventArgs e)
{
counter++;
if (counter == 1)
{
pictureBox1.Show();
timer1.Stop();
counter = 0;
}
}
public Form1()
{
InitializeComponent();
timer1.Interval = 10;
timer1.Tick += new EventHandler(timer_Tick);
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void timer1_Tick(object sender, EventArgs e)
{
int x = pictureBox1.Location.X;
int y = pictureBox1.Location.Y;
pictureBox1.Location = new Point(x + 385, y);
if (x > this.Width)
timer1.Stop();
}
private void metroButton1_Click(object sender, EventArgs e)
{
pictureBox1.Show();
timer1.Start();
Login loginForm = new Login();
Thread.Sleep(1000);
this.Hide();
loginForm.ShowDialog();
this.Close();
}
private void metroToggle1_CheckedChanged(object sender, EventArgs e)
{
}
}
}