-
Notifications
You must be signed in to change notification settings - Fork 68
/
Copy pathNetSparkleUIFactory.cs
56 lines (47 loc) · 1.92 KB
/
NetSparkleUIFactory.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
using NetSparkle;
using NetSparkle.Interfaces;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace EasyConnect
{
public class NetSparkleUIFactory : IUIFactory
{
public IDownloadProgress CreateProgressWindow(AppCastItem item, Icon applicationIcon)
{
return new NetSparkleProgressWindow(item);
}
public IUpdateAvailable CreateSparkleForm(Sparkle sparkle, AppCastItem[] updates, Icon applicationIcon, bool isUpdateAlreadyDownloaded = false)
{
return new NetSparkleUpdateWindow(updates, sparkle);
}
public void Init()
{
}
public void ShowCannotDownloadAppcast(string appcastUrl, Icon applicationIcon = null)
{
MessageBox.Show("Unable to download the EasyConnect update manifest from " + appcastUrl + ".", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
public void ShowDownloadErrorMessage(string message, string appcastUrl, Icon applicationIcon = null)
{
MessageBox.Show("Error occurred while downloading the update: " + message + ".", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
public void ShowToast(AppCastItem[] updates, Icon applicationIcon, Action<AppCastItem[]> clickHandler)
{
}
public void ShowUnknownInstallerFormatMessage(string downloadFileName, Icon applicationIcon = null)
{
MessageBox.Show("Unknown installer format for " + downloadFileName + ".", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
public void ShowVersionIsSkippedByUserRequest(Icon applicationIcon = null)
{
}
public void ShowVersionIsUpToDate(Icon applicationIcon = null)
{
}
}
}