-
Notifications
You must be signed in to change notification settings - Fork 51
/
UpdateForm.cs
59 lines (49 loc) · 1.42 KB
/
UpdateForm.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
using System;
using System.Drawing;
using System.Windows.Forms;
namespace AndroidSideloader
{
public partial class UpdateForm : Form
{
private bool mouseDown;
private Point lastLocation;
public UpdateForm()
{
InitializeComponent();
CenterToScreen();
CurVerLabel.Text += " " + Updater.LocalVersion;
UpdateVerLabel.Text += " " + Updater.currentVersion;
UpdateTextBox.Text = Updater.changelog;
}
private void YesUpdate_Click(object sender, EventArgs e)
{
Updater.doUpdate();
Close();
}
private void SkipUpdate_Click(object sender, EventArgs e)
{
Close();
}
private void UpdateTextBox_TextChanged(object sender, EventArgs e)
{
}
private void UpdateForm_MouseDown(object sender, MouseEventArgs e)
{
mouseDown = true;
lastLocation = e.Location;
}
private void UpdateForm_MouseMove(object sender, MouseEventArgs e)
{
if (mouseDown)
{
Location = new Point(
Location.X - lastLocation.X + e.X, Location.Y - lastLocation.Y + e.Y);
Update();
}
}
private void UpdateForm_MouseUp(object sender, MouseEventArgs e)
{
mouseDown = false;
}
}
}