-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml.cs
45 lines (41 loc) · 1.17 KB
/
MainWindow.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
using System.Windows;
using System.Windows.Input;
using VivaldiUpdater.ViewModel;
using System.Threading.Tasks;
namespace VivaldiUpdater
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow
{
public MainWindow()
{
InitializeComponent();
var model = new MainViewModel
{
Operation = Properties.Resources.text_install,
EnableVivaldiPlus = true,
EnableVivaldiPlusUpdate = true,
EnableVivaldiUpdate = true,
ShowUpdateProcessBar = Visibility.Hidden,
};
DataContext = model;
}
private void HandleDrag(object sender, MouseButtonEventArgs e)
{
DragMove();
}
private void CloseButton_OnClick(object sender, RoutedEventArgs e)
{
Application.Current.Shutdown();
}
private async void MainWindow_OnLoaded(object sender, RoutedEventArgs e)
{
if (DataContext is MainViewModel mm)
{
await mm.UpdateContext();
}
}
}
}