-
Notifications
You must be signed in to change notification settings - Fork 27
/
MainWindow.xaml.cs
90 lines (86 loc) · 3.59 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
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
78
79
80
81
82
83
84
85
86
87
88
89
90
using System;
using System.Collections.ObjectModel;
using System.Windows;
using System.Windows.Input;
using WpfAboutView;
namespace DesktopClock
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void Window_MouseDown(object sender, MouseButtonEventArgs e)
{
if (e.ChangedButton == MouseButton.Left)
{
DragMove();
}
}
private void MenuItemAbout_OnClick(object sender, RoutedEventArgs e)
{
new AboutDialog
{
Owner = this,
WindowStartupLocation = WindowStartupLocation.CenterOwner,
AboutView = new AboutView
{
AppIconSource = new Uri("pack://application:,,,/DesktopClock.ico"),
CreditColumns = 3,
Credits = new ObservableCollection<Credit> {
new Credit {
Name = "DesktopClock",
Author = "Daniel Chalmers",
Website = new Uri("https://github.com/danielchalmers/DesktopClock"),
LicenseText = Properties.Resources.DesktopClock_License
},
new Credit {
Name = "Costura.Fody",
Author = "Simon Cropp",
Website = new Uri("https://github.com/Fody/Costura"),
LicenseText = Properties.Resources.Costura_Fody_License
},
new Credit {
Name = "MVVM Light",
Author = "Laurent Bugnion",
Website = new Uri("http://mvvmlight.net"),
LicenseText = Properties.Resources.MVVM_Light_License
},
new Credit {
Name = "Json.NET",
Author = "James Newton-King",
Website = new Uri("https://newtonsoft.com/json"),
LicenseText = Properties.Resources.Json_NET_License
},
new Credit {
Name = "PropertyChanged.Fody",
Author = "Simon Cropp",
Website = new Uri("https://github.com/Fody/PropertyChanged"),
LicenseText = Properties.Resources.PropertyChanged_Fody_License
},
new Credit {
Name = "WpfAboutView",
Author = "Daniel Chalmers",
Website = new Uri("https://github.com/danielchalmers/WpfAboutView"),
LicenseText = Properties.Resources.WpfAboutView_License
},
new Credit {
Name = "WpfWindowPlacement",
Author = "Daniel Chalmers",
Website = new Uri("https://github.com/danielchalmers/WpfWindowPlacement"),
LicenseText = Properties.Resources.WpfWindowPlacement_License
},
}
}
}.ShowDialog();
}
private void MenuItemExit_OnClick(object sender, RoutedEventArgs e)
{
Close();
}
}
}