diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-08-02 10:44:57 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-08-02 10:44:57 +0300 |
| commit | 3499090dce4acc5b5d4bbb02f07f138950790b25 (patch) | |
| tree | 1f78b36e8805eb9c1429c863dfd8ae043b1ef668 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI | |
| parent | 9e979a9b18727fdc9f128da5a7d2347dff2d0705 (diff) | |
| download | Tango-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')
10 files changed, 64 insertions, 17 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs index 5c08c868b..69528c8db 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs @@ -4,5 +4,5 @@ using System.Runtime.InteropServices; [assembly: System.Windows.ThemeInfo(System.Windows.ResourceDictionaryLocation.None, System.Windows.ResourceDictionaryLocation.SourceAssembly)] [assembly: AssemblyTitle("Tango - Machine Studio")] -[assembly: AssemblyVersion("2.1.14.18213")] +[assembly: AssemblyVersion("2.0.14.18213")] [assembly: ComVisible(false)]
\ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs index c7ac60ace..ee9337eb3 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs @@ -131,11 +131,11 @@ namespace Tango.MachineStudio.UI.StudioApplication /// <summary> /// Gets the machine studio application version. /// </summary> - public string Version + public Version Version { get { - return AssemblyHelper.GetCurrentAssemblyVersion().ToString(4); + return AssemblyHelper.GetCurrentAssemblyVersion(); } } @@ -276,11 +276,11 @@ namespace Tango.MachineStudio.UI.StudioApplication /// <summary> /// Gets the core libraries version. /// </summary> - public string CoreVersion + public Version CoreVersion { get { - return typeof(ExtendedObject).Assembly.GetName().Version.ToString(3); + return typeof(ExtendedObject).Assembly.GetName().Version; } } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs index d81a78a93..dbae25e70 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs @@ -74,7 +74,7 @@ namespace Tango.MachineStudio.UI.TFS IStudioApplicationManager app = TangoIOC.Default.GetInstance<IStudioApplicationManager>(); var items = await GetWorkItemsCreatedBy(Project, GetUserTeamMember()); items.Where(x => x.StepsToReproduce != null).ToList().ForEach(x => x.StepsToReproduce = x.StepsToReproduce.Replace("<div style=\"white-space:pre;\">", "").Replace("</div>", "")); - ResolvedWorkItems = items.Where(x => x.State == State.Resolved && x.ResolvedReason == ResolvedReason.Fixed && x.IsBuildVersionValid && x.FoundInBuildVersion < Version.Parse(app.Version)).ToObservableCollection(); + ResolvedWorkItems = items.Where(x => x.State == State.Resolved && x.ResolvedReason == ResolvedReason.Fixed && x.IsBuildVersionValid && x.FoundInBuildVersion < app.Version).ToObservableCollection(); } } catch (Exception ex) @@ -134,7 +134,7 @@ namespace Tango.MachineStudio.UI.TFS item.ChangedBy = currentUser; item.AuthorizedAs = currentUser; - item.FoundInBuild = app.Version; + item.FoundInBuild = app.Version.ToString(); item.Priority = Priority.Priority3; item.Severity = Severity.Medium; item.State = State.New; @@ -189,7 +189,7 @@ namespace Tango.MachineStudio.UI.TFS } SystemInformationModel sysModel = new SystemInformationModel(); - sysModel.ApplicationVersion = app.Version; + sysModel.ApplicationVersion = app.Version.ToString(); sysModel.EmbeddedVersion = "N/A"; sysModel.HostName = Environment.MachineName; sysModel.UserName = auth.CurrentUser.Contact.FullName; diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs index a7750b39c..a468dc2e7 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs @@ -98,7 +98,7 @@ namespace Tango.MachineStudio.UI.ViewModels { Email = "ForceUpdate", Password = "ForceUpdate", - Version = ApplicationManager.Version, + Version = ApplicationManager.Version.ToString(), }); if (response.IsUpdateAvailable && response.ForcedUpdate) diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs index df1ea5f7e..f8320e1f2 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs @@ -235,7 +235,6 @@ namespace Tango.MachineStudio.UI.ViewModels set { _latestVersion = value; RaisePropertyChangedAuto(); } } - private bool _disableCheckForUpdates; /// <summary> /// Gets or sets a value indicating whether [disable check for updates]. @@ -359,7 +358,7 @@ namespace Tango.MachineStudio.UI.ViewModels { Email = _authenticationProvider.CurrentUser.Email, Password = _authenticationProvider.CurrentUser.Password, - Version = _applicationManager.Version, + Version = _applicationManager.Version.ToString(), }); IsUpdateAvailable = response.IsUpdateAvailable; diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/UpdateViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/UpdateViewVM.cs index d7ce29b2e..f2550c598 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/UpdateViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/UpdateViewVM.cs @@ -70,6 +70,16 @@ namespace Tango.MachineStudio.UI.ViewModels set { _latestVersion = value; RaisePropertyChangedAuto(); } } + private String _updateComments; + /// <summary> + /// Gets or sets the latest version comments. + /// </summary> + public String UpdateComments + { + get { return _updateComments; } + set { _updateComments = value; RaisePropertyChangedAuto(); } + } + private double _downloadProgress; public double DownloadProgress @@ -127,6 +137,7 @@ namespace Tango.MachineStudio.UI.ViewModels _updateInfo = msg.UpdateResponse; Status = UpdateStatus.UpdateAvailable; LatestVersion = _updateInfo.Version; + UpdateComments = _updateInfo.Comments; StartUpdate(); } @@ -157,7 +168,7 @@ namespace Tango.MachineStudio.UI.ViewModels { Email = _authentication.CurrentUser.Email, Password = _authentication.CurrentUser.Password, - Version = _application.Version, + Version = _application.Version.ToString(), }); if (response.IsUpdateAvailable) @@ -165,6 +176,7 @@ namespace Tango.MachineStudio.UI.ViewModels _updateInfo = response; Status = UpdateStatus.UpdateAvailable; LatestVersion = response.Version; + UpdateComments = response.Comments; } else { 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> |
