diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-04-22 19:50:30 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-04-22 19:50:30 +0300 |
| commit | ffbda2b8be71d4942e0d4af2f53b5bde357c72e2 (patch) | |
| tree | 6656196be6ecaccaed9b39aaf1a75619aeec194b /Software/Visual_Studio/PPC/Tango.PPC.UI | |
| parent | c2945492e7c4d168c36b632d1f28dd8ca569b5ac (diff) | |
| parent | 0a63ef17afb9afe60e4ea98cff86dda7fbdad1f6 (diff) | |
| download | Tango-ffbda2b8be71d4942e0d4af2f53b5bde357c72e2.tar.gz Tango-ffbda2b8be71d4942e0d4af2f53b5bde357c72e2.zip | |
MERGE!
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI')
14 files changed, 44 insertions, 22 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/Ready_Anim.gif b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/Ready_Anim.gif Binary files differnew file mode 100644 index 000000000..11cef3b10 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/Ready_Anim.gif diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/dyeing_Anim.gif b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/dyeing_Anim.gif Binary files differnew file mode 100644 index 000000000..058d9a34d --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/dyeing_Anim.gif diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/error_Anim.gif b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/error_Anim.gif Binary files differnew file mode 100644 index 000000000..9bf0d84f3 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/error_Anim.gif diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/getting_ready_Anim.gif b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/getting_ready_Anim.gif Binary files differnew file mode 100644 index 000000000..79256816a --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/getting_ready_Anim.gif diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/machine_off_Anim.gif b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/machine_off_Anim.gif Binary files differnew file mode 100644 index 000000000..9ca81da39 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/machine_off_Anim.gif diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/service_Anim.gif b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/service_Anim.gif Binary files differnew file mode 100644 index 000000000..f5962c36c --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/service_Anim.gif diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/shutdown_icon_Anim.gif b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/shutdown_icon_Anim.gif Binary files differnew file mode 100644 index 000000000..d936476b6 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/shutdown_icon_Anim.gif diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/standby_Anim.gif b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/standby_Anim.gif Binary files differnew file mode 100644 index 000000000..89491179d --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/standby_Anim.gif diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs index 364ca8ee7..b90a1afff 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs @@ -11,7 +11,9 @@ using System.Windows.Data; using System.Windows.Documents; using System.Windows.Forms; using System.Windows.Input; +using System.Windows.Interop; using System.Windows.Media; +using System.Windows.Media.Animation; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; @@ -32,6 +34,8 @@ namespace Tango.PPC.UI { Instance = this; + //Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline),new FrameworkPropertyMetadata { DefaultValue = 30 }); + InitializeComponent(); bool has_touch = false; @@ -77,6 +81,16 @@ namespace Tango.PPC.UI Closing += MainWindow_Closing; } + protected override void OnSourceInitialized(EventArgs e) + { + //var hwndSource = PresentationSource.FromVisual(this) as HwndSource; + + //if (hwndSource != null) + // hwndSource.CompositionTarget.RenderMode = RenderMode.SoftwareOnly; + + base.OnSourceInitialized(e); + } + private void LockAspectRatio() { this.Width = (this.Height * (800d / 1280d)) - 10; diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs index d7dca484e..5062df1d6 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs @@ -140,7 +140,7 @@ namespace Tango.PPC.UI.Notifications return ShowMessageBox(new MessageBoxVM() { Message = message, - Icon = TouchIconKind.AlertOctagon, + Icon = TouchIconKind.AlertCircleOutline, Title = "Error", Brush = Application.Current.Resources["TangoMessageBoxErrorBrush"] as Brush, }); @@ -156,7 +156,7 @@ namespace Tango.PPC.UI.Notifications return ShowMessageBox(new MessageBoxVM() { Message = message, - Icon = TouchIconKind.InfoCircleSolid, + Icon = TouchIconKind.AlertCircleOutline, Title = "Information", Brush = Application.Current.Resources["TangoMessageBoxInfoBrush"] as Brush, }); @@ -172,7 +172,7 @@ namespace Tango.PPC.UI.Notifications return ShowMessageBox(new MessageBoxVM() { Message = message, - Icon = TouchIconKind.Alert, + Icon = TouchIconKind.AlertCircleOutline, Title = "Warning", Brush = Application.Current.Resources["TangoMessageBoxWarningBrush"] as Brush, }); @@ -188,7 +188,7 @@ namespace Tango.PPC.UI.Notifications return ShowMessageBox(new MessageBoxVM() { Message = message, - Icon = TouchIconKind.QuestionCircleSolid, + Icon = TouchIconKind.QuestionCircleRegular, Title = "Confirm", HasCancel = true, Brush = Application.Current.Resources["TangoMessageBoxQuestionBrush"] as Brush, @@ -218,6 +218,8 @@ namespace Tango.PPC.UI.Notifications /// <returns></returns> private Task<bool> ShowMessageBox(MessageBoxVM vm) { + ReleaseGlobalBusyMessage(); + LogManager.Log($"Displaying MessagBox '{vm.Message}'."); TaskCompletionSource<bool> source = new TaskCompletionSource<bool>(); diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj index 8c4cc4992..22ecff0f6 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj @@ -287,6 +287,14 @@ <Resource Include="Images\Menu\power.png" /> <Resource Include="Images\Menu\update.png" /> <Resource Include="Images\technician-mode.png" /> + <Resource Include="Images\GlobalStatus\getting_ready_Anim.gif" /> + <Resource Include="Images\GlobalStatus\dyeing_Anim.gif" /> + <Resource Include="Images\GlobalStatus\error_Anim.gif" /> + <Resource Include="Images\GlobalStatus\machine_off_Anim.gif" /> + <Resource Include="Images\GlobalStatus\Ready_Anim.gif" /> + <Resource Include="Images\GlobalStatus\service_Anim.gif" /> + <Resource Include="Images\GlobalStatus\shutdown_icon_Anim.gif" /> + <Resource Include="Images\GlobalStatus\standby_Anim.gif" /> <Content Include="Manifests\release.xml" /> <Content Include="Manifests\debug.xml" /> <None Include="packages.config" /> @@ -518,7 +526,7 @@ del "$(TargetDir)firmware_package.tfp"</PostBuildEvent> </PropertyGroup> <ProjectExtensions> <VisualStudio> - <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" /> + <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" /> </VisualStudio> </ProjectExtensions> </Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml index 4079777f7..768fce222 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml @@ -214,27 +214,30 @@ <Grid DockPanel.Dock="Right" Margin="0 0 20 0"> <StackPanel Orientation="Horizontal"> <StackPanel x:Name="techPressElement" VerticalAlignment="Center" Background="Transparent"> - <Image Width="33" HorizontalAlignment="Center"> - <Image.Style> - <Style TargetType="Image"> + <touch:TouchGifAnimation Width="36" HorizontalAlignment="Center" EnableAnimation="True"> + <touch:TouchGifAnimation.Style> + <Style TargetType="touch:TouchGifAnimation"> <Setter Property="Source" Value="/Images/GlobalStatus/standby.png"></Setter> <Style.Triggers> <DataTrigger Binding="{Binding MachineProvider.MachineOperator.Status}" Value="{x:Static operations:MachineStatuses.Disconnected}"> - <Setter Property="Source" Value="/Images/GlobalStatus/machine-off.png"></Setter> + <Setter Property="Source" Value="/Images/GlobalStatus/machine_off_Anim.gif"></Setter> </DataTrigger> <DataTrigger Binding="{Binding MachineProvider.MachineOperator.Status}" Value="{x:Static operations:MachineStatuses.Standby}"> - <Setter Property="Source" Value="/Images/GlobalStatus/standby.png"></Setter> + <Setter Property="Source" Value="/Images/GlobalStatus/standby_Anim.gif"></Setter> </DataTrigger> <DataTrigger Binding="{Binding MachineProvider.MachineOperator.Status}" Value="{x:Static operations:MachineStatuses.ReadyToDye}"> - <Setter Property="Source" Value="/Images/GlobalStatus/ready-to-dye.png"></Setter> + <Setter Property="Source" Value="/Images/GlobalStatus/Ready_Anim.gif"></Setter> + </DataTrigger> + <DataTrigger Binding="{Binding MachineProvider.MachineOperator.Status}" Value="{x:Static operations:MachineStatuses.GettingReady}"> + <Setter Property="Source" Value="/Images/GlobalStatus/getting_ready_Anim.gif"></Setter> </DataTrigger> <DataTrigger Binding="{Binding MachineProvider.MachineOperator.Status}" Value="{x:Static operations:MachineStatuses.Printing}"> - <Setter Property="Source" Value="/Images/GlobalStatus/dyeing.png"></Setter> + <Setter Property="Source" Value="/Images/GlobalStatus/dyeing_Anim.gif"></Setter> </DataTrigger> </Style.Triggers> </Style> - </Image.Style> - </Image> + </touch:TouchGifAnimation.Style> + </touch:TouchGifAnimation> <TextBlock Margin="0 10 0 0" Text="{Binding MachineProvider.MachineOperator.Status,Converter={StaticResource EnumToDescriptionConverter}}"></TextBlock> </StackPanel> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoginView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoginView.xaml index 179d1dde3..dee4e9c7b 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoginView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoginView.xaml @@ -27,13 +27,6 @@ <TextBlock HorizontalAlignment="Center" Margin="0 20 0 0">Forgot password?</TextBlock> </StackPanel> - <StackPanel> - <controls:AsyncAdornerControl Height="130" Visibility="{Binding IsLoading,Converter={StaticResource BooleanToVisibilityConverter}}"> - <StackPanel VerticalAlignment="Center"> - <touch:TouchGifAnimation Source="/Images/preloader_rectangles.gif" EnableAnimation="{Binding IsLoading}" /> - </StackPanel> - </controls:AsyncAdornerControl> - </StackPanel> </StackPanel> </StackPanel> </Grid> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml index c63ef1e13..604c79aeb 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml @@ -28,7 +28,9 @@ ItemExpandedPropertyPath="IsExpanded" HasDialog="{Binding NotificationProvider.HasDialog}" CurrentDialog="{Binding NotificationProvider.CurrentDialog}" - NotificationBarVisibility="{Binding NotificationProvider.NotificationsVisible,Converter={StaticResource BooleanToVisibilityConverter}}"> + NotificationBarVisibility="{Binding NotificationProvider.NotificationsVisible,Converter={StaticResource BooleanToVisibilityConverter}}" + IsBusy="{Binding NotificationProvider.IsInGlobalBusyState}" + BusyMessage="{Binding NotificationProvider.GlobalBusyMessage}"> <touch:TouchPanel.NotificationTemplate> <DataTemplate> <touch:TouchButton Style="{StaticResource TangoFlatButton}" Padding="0" Command="{Binding PressedCommand}" components:TransformationHelper.TransformWhenPressed="False"> |
