-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.xaml.cs
46 lines (39 loc) · 1.38 KB
/
App.xaml.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
using System.Windows;
using DasBackupTool.Engine;
using DasBackupTool.Model;
using DasBackupTool.Ui;
using DasBackupTool.Properties;
namespace DasBackupTool
{
public partial class App : Application
{
private Files files = new Files();
private BackupProgress backupProgress = new BackupProgress();
private LocalLister localLister;
private BucketLister remoteLister;
private BackupEngine backupEngine;
private StatisticsUpdater statisticsUpdater;
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
remoteLister = new BucketLister(files, backupProgress);
remoteLister.Run();
localLister = new LocalLister(files, backupProgress);
localLister.Run();
statisticsUpdater = new StatisticsUpdater(files);
statisticsUpdater.Run();
backupEngine = new BackupEngine(files, backupProgress);
MainWindow mainWindow = new MainWindow(files, backupProgress, backupEngine);
mainWindow.Show();
}
protected override void OnExit(ExitEventArgs e)
{
backupEngine.Dispose();
remoteLister.Dispose();
localLister.Dispose();
statisticsUpdater.Dispose();
Settings.Default.Save();
base.OnExit(e);
}
}
}