2 using SpeedportHybridControl.Model;
3 using SpeedportHybridControl.Implementations;
4 using System.Diagnostics;
5 using System.Threading;
8 namespace SpeedportHybridControl.PageModel {
9 class AboutPageModel : SuperViewModel {
10 private DelegateCommand _donateCommand;
11 private DelegateCommand _bugtrackerCommand;
12 private DelegateCommand _updateCommand;
16 get { return MainWindowModel.VERSION; }
19 public DelegateCommand DonateCommand
21 get { return _donateCommand; }
22 set { SetProperty(ref _donateCommand, value); }
25 public DelegateCommand BugtrackerCommand
27 get { return _bugtrackerCommand; }
28 set { SetProperty(ref _bugtrackerCommand, value); }
31 public DelegateCommand UpdateCommand
33 get { return _updateCommand; }
34 set { SetProperty(ref _updateCommand, value); }
37 private void OnDonateCommandExecute () {
38 Process.Start("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=E7EBAC5NP928J");
41 private void OnBugtrackerCommandExecute () {
42 Process.Start("https://stricted.net/bugtracker/index.php/ProductList/");
45 private void OnUpdateCommandExecute () {
46 if (util.checkUpdate(MainWindowModel.VERSION).Equals(true)) {
47 new Thread(() => { MessageBox.Show("Ein Update ist verfügbar.", "Confirmation", MessageBoxButton.OK, MessageBoxImage.Warning); }).Start();
50 new Thread(() => { MessageBox.Show("SpeedportHybridControl ist auf dem neuesten Stand.", "Confirmation", MessageBoxButton.OK, MessageBoxImage.Information); }).Start();
54 public AboutPageModel () {
55 DonateCommand = new DelegateCommand(new Action(OnDonateCommandExecute));
56 BugtrackerCommand = new DelegateCommand(new Action(OnBugtrackerCommandExecute));
57 UpdateCommand = new DelegateCommand(new Action(OnUpdateCommandExecute));