forked from ptrsuder/IEU.Winforms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUpdateNotifyDialog.cs
More file actions
48 lines (37 loc) · 1.33 KB
/
UpdateNotifyDialog.cs
File metadata and controls
48 lines (37 loc) · 1.33 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.Windows.Forms;
using GitHubUpdate;
namespace ImageEnhancingUtility.Winforms
{
public partial class UpdateNotifyDialog : Form
{
private readonly UpdateChecker _checker;
private bool _loadednotes;
public UpdateNotifyDialog(UpdateChecker checker, string message)
{
_checker = checker;
InitializeComponent();
label1.Text = message;//string.Format(label1.Text, _checker.RepositoryName);
}
void panel1_Resize(object sender, EventArgs e)
{
label1.Left = (panel1.ClientSize.Width - label1.Width) / 2;
label2.Left = (panel1.ClientSize.Width - label2.Width) / 2;
}
async void boxReleaseNotes_CheckedChanged(object sender, EventArgs e)
{
ReleaseNotesPanel.Visible = boxReleaseNotes.Checked;
if (_loadednotes) return;
ReleaseNotes.DocumentText = await _checker.RenderReleaseNotes();
_loadednotes = true;
}
private void buttonYes_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start($"https://github.com/ptrsuder/{_checker.RepositoryName}/releases");
}
private void buttonNo_Click(object sender, EventArgs e)
{
this.Close();
}
}
}