aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-08-02 10:44:57 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-08-02 10:44:57 +0300
commit3499090dce4acc5b5d4bbb02f07f138950790b25 (patch)
tree1f78b36e8805eb9c1429c863dfd8ae043b1ef668 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views
parent9e979a9b18727fdc9f128da5a7d2347dff2d0705 (diff)
downloadTango-3499090dce4acc5b5d4bbb02f07f138950790b25.tar.gz
Tango-3499090dce4acc5b5d4bbb02f07f138950790b25.zip
Implemented new version display in machine studio.
Added release notes to machine studio update center.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml8
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml8
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml3
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/UpdateView.xaml27
4 files changed, 41 insertions, 5 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml
index 0f8bceac7..55c4edc91 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/AboutView.xaml
@@ -5,9 +5,15 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:vm="clr-namespace:Tango.MachineStudio.UI.ViewModels"
xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views"
mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300" Width="600" Height="700" Background="White" d:DataContext="{d:DesignInstance Type=vm:AboutViewVM, IsDesignTimeCreatable=False}" DataContext="{Binding AboutViewVM, Source={StaticResource Locator}}">
+ d:DesignHeight="300" d:DesignWidth="300" Width="600" Height="700" Background="White" d:DataContext="{d:DesignInstance Type=vm:AboutViewVM, IsDesignTimeCreatable=False}" DataContext="{Binding AboutViewVM, Source={StaticResource Locator}}">
+
+ <UserControl.Resources>
+ <converters:VersionToShortVersionConverter x:Key="VersionToShortVersionConverter" />
+ </UserControl.Resources>
+
<Grid>
<Grid>
<Grid.RowDefinitions>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml
index 2a63ae00f..c6b9cf881 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml
@@ -4,9 +4,15 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views"
mc:Ignorable="d"
d:DesignHeight="720" d:DesignWidth="1280" Cursor="Wait" DataContext="{Binding LoadingViewVM, Source={StaticResource Locator}}" Background="Transparent">
+
+ <UserControl.Resources>
+ <converters:VersionToShortVersionConverter x:Key="VersionToShortVersionConverter" />
+ </UserControl.Resources>
+
<Grid>
<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
<StackPanel>
@@ -23,7 +29,7 @@
<TextBlock Foreground="Gray" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="40" FontSize="20" FontWeight="SemiBold" FontStyle="Italic">
<Run>v</Run>
- <Run Text="{Binding ApplicationManager.Version,Mode=OneWay}"></Run>
+ <Run Text="{Binding ApplicationManager.Version,Converter={StaticResource VersionToShortVersionConverter},Mode=OneWay}"></Run>
</TextBlock>
</Grid>
</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml
index e36a03ffe..7044ad32e 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml
@@ -25,6 +25,7 @@
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
<converters:StringToWordsConverter x:Key="StringToWordsConverter" />
<commonConverters:PermissionToVisibilityConverter x:Key="PermissionToVisibilityConverter" />
+ <converters:VersionToShortVersionConverter x:Key="VersionToShortVersionConverter" />
</UserControl.Resources>
<Grid>
@@ -309,7 +310,7 @@
<Button.ToolTip>
<TextBlock>
<Run>Version</Run>
- <Run Text="{Binding LatestVersion}"></Run>
+ <Run Text="{Binding LatestVersion,Converter={StaticResource VersionToShortVersionConverter}}"></Run>
<Run>is available !</Run>
</TextBlock>
</Button.ToolTip>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/UpdateView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/UpdateView.xaml
index a5c31af3d..52ba9ee18 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/UpdateView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/UpdateView.xaml
@@ -5,10 +5,16 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:vm="clr-namespace:Tango.MachineStudio.UI.ViewModels"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
xmlns:mahApps="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views"
mc:Ignorable="d"
d:DesignHeight="1080" d:DesignWidth="1920" DataContext="{Binding UpdateViewVM, Source={StaticResource Locator}}" FontSize="20">
+
+ <UserControl.Resources>
+ <converters:VersionToShortVersionConverter x:Key="VersionToShortVersionConverter" />
+ </UserControl.Resources>
+
<Grid>
<!--<Grid.Background>
<ImageBrush ImageSource="/Images/White-Abstract.png" />
@@ -21,7 +27,7 @@
</Grid.Effect>-->
<StackPanel Orientation="Horizontal">
<Image Source="/Images/update.png" Width="100" />
- <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" FontSize="70">Update Center</TextBlock>
+ <TextBlock Margin="20 0 0 0" VerticalAlignment="Center" FontSize="60" Foreground="#606060">Update Center</TextBlock>
</StackPanel>
</Grid>
@@ -34,6 +40,23 @@
</StackPanel>
</Button>
</StackPanel>
+
+ <Canvas HorizontalAlignment="Left">
+ <StackPanel>
+ <StackPanel.Style>
+ <Style TargetType="StackPanel">
+ <Setter Property="Visibility" Value="Collapsed"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Status}" Value="{x:Static vm:UpdateStatus.UpdateAvailable}">
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </StackPanel.Style>
+ <TextBlock Foreground="Gray" FontSize="16">Release Notes</TextBlock>
+ <TextBlock FontSize="12" TextWrapping="Wrap" Foreground="#404040" Margin="0 5 0 0" Text="{Binding UpdateComments}"></TextBlock>
+ </StackPanel>
+ </Canvas>
</Grid>
<Grid>
@@ -70,7 +93,7 @@
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<TextBlock VerticalAlignment="Center" Margin="0 20 0 0">
<Run>Version</Run>
- <Run Text="{Binding LatestVersion}" FontWeight="SemiBold" Foreground="{StaticResource AccentColorBrush}"></Run>
+ <Run Text="{Binding LatestVersion,Converter={StaticResource VersionToShortVersionConverter}}" FontWeight="SemiBold" Foreground="{StaticResource AccentColorBrush}"></Run>
<Run>is available!</Run>
</TextBlock>
</StackPanel>