fix version on about page
authorStricted <info@stricted.de>
Tue, 12 Jan 2016 17:44:39 +0000 (18:44 +0100)
committerStricted <info@stricted.de>
Tue, 12 Jan 2016 17:44:39 +0000 (18:44 +0100)
SpeedportHybridControl/PageModel/AboutPageModel.cs
SpeedportHybridControl/page/AboutPage.xaml

index 05e42d53451e563b957ffdea3bc3b08d5e993ee3..0346e25d207955b5290d471ce4f0d33366a8b6dd 100644 (file)
@@ -7,10 +7,17 @@ using System.Windows;
 
 namespace SpeedportHybridControl.PageModel {
        class AboutPageModel : SuperViewModel {
+               private string _version;
                private DelegateCommand _donateCommand;
                private DelegateCommand _bugtrackerCommand;
                private DelegateCommand _updateCommand;
 
+               public string version
+               {
+                       get { return _version; }
+                       set { SetProperty(ref _version, value); }
+               }
+
                public DelegateCommand DonateCommand {
                        get { return _donateCommand; }
                        set { SetProperty(ref _donateCommand, value); }
@@ -47,6 +54,8 @@ namespace SpeedportHybridControl.PageModel {
                        DonateCommand = new DelegateCommand(new Action(OnDonateCommandExecute));
                        BugtrackerCommand = new DelegateCommand(new Action(OnBugtrackerCommandExecute));
                        UpdateCommand = new DelegateCommand(new Action(OnUpdateCommandExecute));
+
+                       version = MainWindowModel.VERSION;
                }
        }
 }
index 405c994f3ad66bf308f33bbdab9333d106e5af68..4646af34ef3a0014083c859bea9b717438779839 100644 (file)
@@ -13,7 +13,7 @@
         <TextBlock HorizontalAlignment="Left" Margin="10,31,0,0" TextWrapping="Wrap" Text="Copyright © 2015 stricted.net" VerticalAlignment="Top"/>
 
         <TextBlock HorizontalAlignment="Left" Margin="10,52,0,0" TextWrapping="Wrap" Text="Version:" VerticalAlignment="Top"/>
-        <TextBlock x:Name="tbVersion" HorizontalAlignment="Left" Margin="57,52,0,0" TextWrapping="Wrap" VerticalAlignment="Top"/>
+        <TextBlock x:Name="tbVersion" Text="{Binding Path=version}" HorizontalAlignment="Left" Margin="57,52,0,0" TextWrapping="Wrap" VerticalAlignment="Top"/>
 
         <Button Command="{Binding Path=BugtrackerCommand}" x:Name="btnBugtracker" Content="Bugtracker" HorizontalAlignment="Left" Margin="10,0,0,10" VerticalAlignment="Bottom"/>
         <Button Command="{Binding Path=UpdateCommand}" x:Name="btnUpdate" Content="Auf Update prüfen" HorizontalAlignment="Left" Margin="10,73,0,0" VerticalAlignment="Top" />