Repository navigation
Expand file tree
/
Copy pathUpdateForm.cs
More file actions
48 lines (45 loc) · 1.6 KB
/
Copy pathUpdateForm.cs
File metadata and controls
48 lines (45 loc) · 1.6 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
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 STALK_IRC
{
public partial class UpdateForm : Form
{
// Prevents window stealing focus after startup
private bool focus = false;
protected override bool ShowWithoutActivation
{
get { return focus; }
}
public UpdateForm(string notes, bool setFocus, bool force)
{
InitializeComponent();
webBrowser1.DocumentText = notes;
focus = setFocus;
if (force)
{
this.Text = "Mandatory Update";
label1.Text = "A mandatory update is available! Click Download to close STALK-IRC and open the link in your browser.";
button2.Text = "Exit";
toolTip1.SetToolTip(button2, "Shuts down STALK-IRC without downloading the update. You will be reminded on next startup.");
}
else
{
this.Text = "Optional Update";
label1.Text = "An optional update is available! Click Download to close STALK-IRC and open the link in your browser.";
button2.Text = "Skip";
toolTip1.SetToolTip(button2, "Skips the update temporarily. You will be reminded on next startup.");
}
}
private void UpdateForm_HelpButtonClicked(object sender, CancelEventArgs e)
{
new HelpForm(0).ShowDialog();
}
}
}