-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathProgram.cs
More file actions
77 lines (56 loc) · 2.06 KB
/
Program.cs
File metadata and controls
77 lines (56 loc) · 2.06 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// for release - remove the debug
using System;
using System.Windows.Forms;
using Homegrown.Updater;
namespace cacheCopy
{
/// <summary>
///
/// </summary>
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
// auto-generated
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
#if !DEBUG
try
{
#endif
//create the core of the application
Core core = new Core();
// create GUI for the application, giving reference to core
MainGUI gui = new MainGUI(ref core);
FirefoxHelper firefox = new FirefoxHelper();
gui.AddProfile(firefox.getProfiles());
ChromeHelper chrome = new ChromeHelper();
gui.AddProfile(chrome.getProfiles());
ChromiumHelper chromium = new ChromiumHelper();
gui.AddProfile(chromium.getProfiles());
IEHelper explorer = new IEHelper();
gui.AddProfile(explorer.getProfiles());
OperaHelper opera = new OperaHelper();
gui.AddProfile(opera.getProfiles());
// provide core with reference to GUI object
core.setMainGUI(ref gui);
// create the application bridge for the updater - decoupling layer
IApplicationUpdaterBridge application = new cacheCopyUpdaterBridge();
// new updater, pass references for gui and application.
IUpdater updater = new Updater((IMessagingGui)gui, application);
gui.SetUpdater(ref updater);
Application.Run(gui);
#if !DEBUG
}
catch (Exception e)
{
Util.WriteToLogFile(e);
}
#endif
}
}
}