diff options
| author | Roy <Roy.mail.net@gmail.com> | 2023-03-05 22:47:23 +0200 |
|---|---|---|
| committer | Roy <Roy.mail.net@gmail.com> | 2023-03-05 22:47:23 +0200 |
| commit | a47bbe8211c4b7a02c6974cba017d77ea31ffc37 (patch) | |
| tree | 59e94a7511053aaa0dc78978cb572f3a8fe3c57a /Software/Visual_Studio/PPC/Tango.PPC.UI/Views | |
| parent | c256fc124a867707c787074c9076227341766794 (diff) | |
| download | Tango-a47bbe8211c4b7a02c6974cba017d77ea31ffc37.tar.gz Tango-a47bbe8211c4b7a02c6974cba017d77ea31ffc37.zip | |
Dialog Adaptations.
Separate Job View.
Machine Status View Start.
EurekaTouchPanel.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Views')
4 files changed, 373 insertions, 231 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml index 93666d8f5..bc75ea258 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml @@ -35,217 +35,194 @@ <Grid Background="{StaticResource TangoPrimaryBackgroundBrush}"> <Viewbox Stretch="Fill" Width="230"> - <Grid Width="250"> - <Border TextElement.FontSize="16" Height="865" x:Name="border" BorderThickness="0 0 0 0" BorderBrush="{StaticResource TangoDarkForegroundBrush}" TextElement.Foreground="{StaticResource TangoDarkForegroundBrush}"> - <Grid Background="{StaticResource TangoPrimaryBackgroundBrush}"> - <StackPanel VerticalAlignment="Top"> - <Border Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="0 0 0 0"> - <Grid> - <Border Background="{StaticResource TangoPrimaryBackgroundBrush}"> - <Border.Effect> - <DropShadowEffect Color="Silver" ShadowDepth="0" BlurRadius="20" Opacity="1" /> - </Border.Effect> - </Border> - <StackPanel> + <Grid Width="250"> + <Border TextElement.FontSize="16" Height="865" x:Name="border" BorderThickness="0 0 0 0" BorderBrush="{StaticResource TangoDarkForegroundBrush}" TextElement.Foreground="{StaticResource TangoDarkForegroundBrush}"> + <Grid Background="{StaticResource TangoPrimaryBackgroundBrush}"> + <StackPanel VerticalAlignment="Top"> + <Border Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="0 0 0 0"> + <Grid> + <Border Background="{StaticResource TangoPrimaryBackgroundBrush}"> + <Border.Effect> + <DropShadowEffect Color="Silver" ShadowDepth="0" BlurRadius="20" Opacity="1" /> + </Border.Effect> + </Border> + <StackPanel> <DockPanel> - <touch:TouchIconButton Icon="ChevronLeft" IsHitTestVisible="{Binding NavigationManager.IsNavigating,Converter={StaticResource BooleanInverseConverter}}" IsEnabled="{Binding NavigationManager.CanNavigateBack}" Width="50" Height="50" Padding="10" Margin="10 0 0 0" Command="{Binding MenuOrBackCommand}" EnableDropShadow="False"> + <touch:TouchIconButton Icon="ChevronLeft" IsHitTestVisible="{Binding NavigationManager.IsNavigating,Converter={StaticResource BooleanInverseConverter}}" IsEnabled="{Binding NavigationManager.CanNavigateBack}" Width="40" Height="40" Padding="10" Margin="10 0 0 0" Command="{Binding MenuOrBackCommand}" EnableDropShadow="False"> <touch:TouchIconButton.Style> <Style TargetType="touch:TouchIconButton" BasedOn="{StaticResource {x:Type touch:TouchIconButton}}"> <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter> </Style> </touch:TouchIconButton.Style> </touch:TouchIconButton> - <Image Source="/Images/logo.png" Stretch="Uniform" HorizontalAlignment="Right" Margin="20" Width="157"></Image> + <Image Source="/Images/logo.png" Stretch="Uniform" HorizontalAlignment="Center" Margin="0 10 10 10" Width="157"></Image> </DockPanel> - <StackPanel Orientation="Horizontal" Margin="20 0 20 10" HorizontalAlignment="Left"> - <TextBlock Foreground="{StaticResource TangoGrayTextBrush}" FontSize="9"> - <Run>Machine S/N:</Run> - <Run FontStyle="Italic" Text="{Binding MachineProvider.Machine.SerialNumber,Mode=OneWay,IsAsync=True,FallbackValue='0000'}"></Run> - <Run>|</Run> - <Run>Version:</Run> - <Run FontStyle="Italic" Text="{Binding ApplicationManager.VersionAndTag,FallbackValue='1.0.0.0',Mode=OneWay,IsAsync=True}"></Run> - </TextBlock> - - <TextBlock Margin="5 0 0 0" Foreground="{StaticResource TangoGrayTextBrush}" FontSize="9"> - <TextBlock.Style> - <Style TargetType="TextBlock"> - <Setter Property="Visibility" Value="Visible"></Setter> - <Style.Triggers> - <DataTrigger Binding="{Binding Settings.DeploymentSlot}" Value="PROD"> - <Setter Property="Visibility" Value="Collapsed"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding Settings.DeploymentSlot}" Value="BETA"> - <Setter Property="Visibility" Value="Collapsed"></Setter> - </DataTrigger> - </Style.Triggers> - </Style> - </TextBlock.Style> - <Run>|</Run> - <Run Text="{Binding Settings.DeploymentSlot}"></Run> - </TextBlock> </StackPanel> - </StackPanel> - </Grid> - </Border> + </Grid> + </Border> - <ItemsControl ItemsSource="{Binding ModuleLoader.UserModules}" Margin="0 10 0 0"> - <ItemsControl.ItemTemplate> - <DataTemplate> - <Border Visibility="{Binding DockToBottom,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> - <Border BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="0 0 0 1" Visibility="{Binding IsVisibleInMenu,Converter={StaticResource BooleanToVisibilityConverter}}"> - <touch:TouchButton Margin="0 0 0 0" Padding="30 15" Foreground="{StaticResource TangoDarkForegroundBrush}" Style="{StaticResource TangoFlatButton}" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.ModuleNavigationCommand}" CommandParameter="{Binding Name}" > - <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image VerticalAlignment="Center" Source="{Binding Image}" Width="32" Height="32"></Image> - <TextBlock VerticalAlignment="Center" Margin="40 0 0 0" Text="{Binding Name}" Foreground="{StaticResource TangoPrimaryAccentBrush}"></TextBlock> - </StackPanel> - </touch:TouchButton> + <ItemsControl ItemsSource="{Binding ModuleLoader.UserModules}" Margin="0 10 0 0"> + <ItemsControl.ItemTemplate> + <DataTemplate> + <Border Visibility="{Binding DockToBottom,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> + <Border BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="0 0 0 1" Visibility="{Binding IsVisibleInMenu,Converter={StaticResource BooleanToVisibilityConverter}}"> + <touch:TouchButton Margin="0 0 0 0" Padding="30 15" Foreground="{StaticResource TangoDarkForegroundBrush}" Style="{StaticResource TangoFlatButton}" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.ModuleNavigationCommand}" CommandParameter="{Binding Name}" > + <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> + <Image VerticalAlignment="Center" Source="{Binding Image}" Width="32" Height="32"></Image> + <TextBlock VerticalAlignment="Center" Margin="40 0 0 0" Text="{Binding Name}" Foreground="{StaticResource TangoPrimaryAccentBrush}"></TextBlock> + </StackPanel> + </touch:TouchButton> + </Border> </Border> - </Border> - </DataTemplate> - </ItemsControl.ItemTemplate> - </ItemsControl> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> - <StackPanel Margin="0 5 0 0"> - <Border BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="0 0 0 1"> - <touch:TouchButton Style="{StaticResource TangoFlatButton}" Padding="30 15" Foreground="{StaticResource TangoDarkForegroundBrush}" Command="{Binding UpdateCommand}"> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image Source="/Images/Menu/update.png" VerticalAlignment="Center" Width="32" Height="32"></Image> - <TextBlock VerticalAlignment="Center" Margin="40 0 0 0" Foreground="{StaticResource TangoPrimaryAccentBrush}">Update</TextBlock> - </StackPanel> - </touch:TouchButton> - </Border> + <StackPanel Margin="0 5 0 0"> + <Border BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="0 0 0 1"> + <touch:TouchButton Style="{StaticResource TangoFlatButton}" Padding="30 15" Foreground="{StaticResource TangoDarkForegroundBrush}" Command="{Binding UpdateCommand}"> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> + <Image Source="/Images/Menu/update.png" VerticalAlignment="Center" Width="32" Height="32"></Image> + <TextBlock VerticalAlignment="Center" Margin="40 0 0 0" Foreground="{StaticResource TangoPrimaryAccentBrush}">Update</TextBlock> + </StackPanel> + </touch:TouchButton> + </Border> + </StackPanel> </StackPanel> - </StackPanel> - - <Grid VerticalAlignment="Bottom"> - <Border Background="{StaticResource TangoPowerMenuOpenedBackgroundBrush}" Height="350" Padding="20" RenderTransformOrigin="0.5,1" VerticalAlignment="Bottom"> - <Border.Resources> - <Style x:Key="PowerButton" TargetType="touch:TouchButton" BasedOn="{StaticResource TangoLinkButton}"> - <Setter Property="Foreground" Value="{StaticResource TangoPrimaryBackgroundBrush}"></Setter> - <Setter Property="FontSize" Value="{StaticResource TangoTitleFontSize}"></Setter> - <Setter Property="HorizontalAlignment" Value="Left"></Setter> - <Setter Property="VerticalAlignment" Value="Center"></Setter> - <Setter Property="Padding" Value="50 20"></Setter> - <Setter Property="Height" Value="Auto"></Setter> - <Style.Triggers> - <Trigger Property="IsEnabled" Value="False"> - <Setter Property="Foreground" Value="{StaticResource TangoGrayBrush}"></Setter> - </Trigger> - </Style.Triggers> - </Style> - </Border.Resources> - <Border.Style> - <Style TargetType="Border"> - <Setter Property="RenderTransform"> - <Setter.Value> - <ScaleTransform ScaleX="1" ScaleY="0" /> - </Setter.Value> - </Setter> - <Style.Triggers> - <DataTrigger Binding="{Binding IsPowerOpened}" Value="True"> - <DataTrigger.EnterActions> - <BeginStoryboard> - <Storyboard> - <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="00:00:0.2" /> - </Storyboard> - </BeginStoryboard> - </DataTrigger.EnterActions> - <DataTrigger.ExitActions> - <BeginStoryboard> - <Storyboard> - <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="0" Duration="00:00:0.2" /> - </Storyboard> - </BeginStoryboard> - </DataTrigger.ExitActions> - </DataTrigger> - </Style.Triggers> - </Style> - </Border.Style> - <Grid> - <Grid.RowDefinitions> - <RowDefinition Height="1.4*"/> - <RowDefinition Height="1*"/> - </Grid.RowDefinitions> + <Grid VerticalAlignment="Bottom"> + <Border Background="{StaticResource TangoPowerMenuOpenedBackgroundBrush}" Height="350" Padding="20" RenderTransformOrigin="0.5,1" VerticalAlignment="Bottom"> + <Border.Resources> + <Style x:Key="PowerButton" TargetType="touch:TouchButton" BasedOn="{StaticResource TangoLinkButton}"> + <Setter Property="Foreground" Value="{StaticResource TangoPrimaryBackgroundBrush}"></Setter> + <Setter Property="FontSize" Value="{StaticResource TangoTitleFontSize}"></Setter> + <Setter Property="HorizontalAlignment" Value="Left"></Setter> + <Setter Property="VerticalAlignment" Value="Center"></Setter> + <Setter Property="Padding" Value="50 20"></Setter> + <Setter Property="Height" Value="Auto"></Setter> + <Style.Triggers> + <Trigger Property="IsEnabled" Value="False"> + <Setter Property="Foreground" Value="{StaticResource TangoGrayBrush}"></Setter> + </Trigger> + </Style.Triggers> + </Style> + </Border.Resources> + <Border.Style> + <Style TargetType="Border"> + <Setter Property="RenderTransform"> + <Setter.Value> + <ScaleTransform ScaleX="1" ScaleY="0" /> + </Setter.Value> + </Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding IsPowerOpened}" Value="True"> + <DataTrigger.EnterActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="00:00:0.2" /> + </Storyboard> + </BeginStoryboard> + </DataTrigger.EnterActions> + <DataTrigger.ExitActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="0" Duration="00:00:0.2" /> + </Storyboard> + </BeginStoryboard> + </DataTrigger.ExitActions> + </DataTrigger> + </Style.Triggers> + </Style> + </Border.Style> <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="188*"/> - <ColumnDefinition Width="261*"/> - </Grid.ColumnDefinitions> + <Grid.RowDefinitions> + <RowDefinition Height="1.4*"/> + <RowDefinition Height="1*"/> + </Grid.RowDefinitions> + + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="188*"/> + <ColumnDefinition Width="261*"/> + </Grid.ColumnDefinitions> - <Image Source="/Images/power-machine.png" Margin="30" /> + <Image Source="/Images/power-machine.png" Margin="30" /> - <UniformGrid Grid.Column="1" Rows="3"> - <touch:TouchButton Style="{StaticResource PowerButton}" Command="{Binding PowerOffCommand}">Turn Off</touch:TouchButton> - <touch:TouchButton Style="{StaticResource PowerButton}" Command="{Binding StandByCommand}">Stand By</touch:TouchButton> - <touch:TouchButton Style="{StaticResource PowerButton}" Command="{Binding ResetCommand}">Reset</touch:TouchButton> - </UniformGrid> - </Grid> + <UniformGrid Grid.Column="1" Rows="3"> + <touch:TouchButton Style="{StaticResource PowerButton}" Command="{Binding PowerOffCommand}">Turn Off</touch:TouchButton> + <touch:TouchButton Style="{StaticResource PowerButton}" Command="{Binding StandByCommand}">Stand By</touch:TouchButton> + <touch:TouchButton Style="{StaticResource PowerButton}" Command="{Binding ResetCommand}">Reset</touch:TouchButton> + </UniformGrid> + </Grid> - <Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="25 0" Opacity="0.3" StrokeThickness="1" Stroke="{StaticResource TangoDividerBrush}" /> + <Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="25 0" Opacity="0.3" StrokeThickness="1" Stroke="{StaticResource TangoDividerBrush}" /> - <Grid Grid.Row="1"> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="188*"/> - <ColumnDefinition Width="261*"/> - </Grid.ColumnDefinitions> - <Image Source="/Images/power-tablet.png" Margin="30" /> + <Grid Grid.Row="1"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="188*"/> + <ColumnDefinition Width="261*"/> + </Grid.ColumnDefinitions> + <Image Source="/Images/power-tablet.png" Margin="30" /> - <touch:TouchButton Command="{Binding RestartApplicationCommand}" Grid.Column="1" Style="{StaticResource PowerButton}">Restart</touch:TouchButton> + <touch:TouchButton Command="{Binding RestartApplicationCommand}" Grid.Column="1" Style="{StaticResource PowerButton}">Restart</touch:TouchButton> + </Grid> </Grid> - </Grid> - </Border> + </Border> - <Border Background="{StaticResource TangoMidBackgroundBrush}" RenderTransformOrigin="0.5,1" VerticalAlignment="Bottom"> - <Border.Style> - <Style TargetType="Border"> - <Setter Property="RenderTransform"> - <Setter.Value> - <ScaleTransform ScaleX="1" ScaleY="1" /> - </Setter.Value> - </Setter> - <Style.Triggers> - <DataTrigger Binding="{Binding IsPowerOpened}" Value="True"> - <DataTrigger.EnterActions> - <BeginStoryboard> - <Storyboard> - <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="0" Duration="00:00:0.2" /> - </Storyboard> - </BeginStoryboard> - </DataTrigger.EnterActions> - <DataTrigger.ExitActions> - <BeginStoryboard> - <Storyboard> - <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="00:00:0.2" /> - </Storyboard> - </BeginStoryboard> - </DataTrigger.ExitActions> - </DataTrigger> - </Style.Triggers> - </Style> - </Border.Style> - <touch:TouchButton Style="{StaticResource TangoFlatButton}" Padding="40 25" Foreground="{StaticResource TangoDarkForegroundBrush}" Command="{Binding PowerCommand}"> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image Source="/Images/menu/power.png" VerticalAlignment="Center" Width="32" Height="32"></Image> - <TextBlock VerticalAlignment="Center" Margin="40 0 0 0" Foreground="{StaticResource TangoPrimaryAccentBrush}">Power</TextBlock> - </StackPanel> - </touch:TouchButton> - </Border> + <Border Background="{StaticResource TangoMidBackgroundBrush}" RenderTransformOrigin="0.5,1" VerticalAlignment="Bottom"> + <Border.Style> + <Style TargetType="Border"> + <Setter Property="RenderTransform"> + <Setter.Value> + <ScaleTransform ScaleX="1" ScaleY="1" /> + </Setter.Value> + </Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding IsPowerOpened}" Value="True"> + <DataTrigger.EnterActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="0" Duration="00:00:0.2" /> + </Storyboard> + </BeginStoryboard> + </DataTrigger.EnterActions> + <DataTrigger.ExitActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="00:00:0.2" /> + </Storyboard> + </BeginStoryboard> + </DataTrigger.ExitActions> + </DataTrigger> + </Style.Triggers> + </Style> + </Border.Style> + <touch:TouchButton Style="{StaticResource TangoFlatButton}" Padding="40 25" Foreground="{StaticResource TangoDarkForegroundBrush}" Command="{Binding PowerCommand}"> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> + <Image Source="/Images/menu/power.png" VerticalAlignment="Center" Width="32" Height="32"></Image> + <TextBlock VerticalAlignment="Center" Margin="40 0 0 0" Foreground="{StaticResource TangoPrimaryAccentBrush}">Power</TextBlock> + </StackPanel> + </touch:TouchButton> + </Border> + </Grid> </Grid> - </Grid> - </Border> - </Grid> + </Border> + </Grid> </Viewbox> + + <Grid Background="{StaticResource TangoPanelMaskBrushLight}" Visibility="{Binding NotificationProvider.HasDialogOrMessage,Converter={StaticResource BooleanToVisibilityConverter}}"> + + </Grid> </Grid> <Grid Background="Gainsboro" Grid.Column="2"> - + <local:MachineStatusView /> </Grid> <Grid Grid.Column="1" Background="{StaticResource TangoPrimaryBackgroundBrush}"> <Grid> <Viewbox> - <touch:TouchPanel Width="800" Height="1280" + <touch:TouchPanelEureka Width="800" Height="1280" HasMessageBox="{Binding NotificationProvider.HasMessageBox}" CurrentMessageBox="{Binding NotificationProvider.CurrentMessageBox}" HasDialog="{Binding NotificationProvider.HasDialog}" @@ -254,20 +231,21 @@ BusyMessage="{Binding NotificationProvider.GlobalBusyMessage}"> <Grid> <DockPanel> - <Border BorderThickness="0 0 0 0" BorderBrush="{StaticResource TangoDividerBrush}" DockPanel.Dock="Top"> - <DockPanel> + <Border BorderThickness="0 0 0 0" BorderBrush="{StaticResource TangoDividerBrush}" DockPanel.Dock="Top" Height="41"> + <DockPanel Visibility="Collapsed"> <Border Height="101" BorderThickness="0 0 0 0" BorderBrush="{StaticResource TangoDividerBrush}"> <!--<touch:TouchHamburgerButton IsHitTestVisible="{Binding NavigationManager.IsNavigating,Converter={StaticResource BooleanInverseConverter}}" IsEnabled="{Binding NavigationManager.IsBackEnabled}" Width="100" Height="100" Padding="15" Command="{Binding MenuOrBackCommand}" EnableDropShadow="False" Foreground="{StaticResource TangoPrimaryAccentBrush}" IsBack="{Binding NavigationManager.CanNavigateBack}"/>--> </Border> + <Grid DockPanel.Dock="Right" Margin="0 0 20 0"> <StackPanel Orientation="Horizontal"> <Grid> - <StackPanel x:Name="techPressElement" VerticalAlignment="Center" Background="Transparent"> + <StackPanel Visibility="Hidden" x:Name="techPressElement" VerticalAlignment="Center" Background="Transparent"> <locaControls:MachineStatusControl HorizontalAlignment="Center" DataContext="{Binding MachineProvider.MachineOperator}" /> <TextBlock Margin="0 10 0 0" Text="{Binding MachineProvider.MachineOperator.Status,Converter={StaticResource EnumToDescriptionConverter}}"></TextBlock> </StackPanel> - <Grid IsHitTestVisible="False" HorizontalAlignment="Center"> + <Grid Visibility="Hidden" IsHitTestVisible="False" HorizontalAlignment="Center"> <Grid.Style> <Style TargetType="Grid"> <Setter Property="Visibility" Value="Hidden"></Setter> @@ -284,10 +262,9 @@ <touch:TouchIcon Icon="InvertColors" Foreground="#151515" Width="18" Height="18" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 6 -30 0"></touch:TouchIcon> </Grid> </Grid> - - <touch:TouchButton Margin="40 0 0 0" Height="65" Padding="50 0" MinWidth="200" CornerRadius="35" BlurRadius="20" Command="{Binding NotificationProvider.CurrentAppButton.Command}" IsEnabled="{Binding NotificationProvider.CurrentAppButton.IsEnabled}" Content="{Binding NotificationProvider.CurrentAppButton.Text}" Visibility="{Binding NotificationProvider.CurrentAppButton,Converter={StaticResource IsNullToVisibilityConverter}}"></touch:TouchButton> </StackPanel> </Grid> + <Grid> <Grid Margin="20 0 60 0" Height="80" Visibility="{Binding NotificationProvider.HasAppBarItems,Converter={StaticResource BooleanToVisibilityConverter}}"> @@ -346,7 +323,7 @@ </Grid> </DockPanel> </Grid> - </touch:TouchPanel> + </touch:TouchPanelEureka> </Viewbox> </Grid> </Grid> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml.cs index 5fa9efb47..903c15149 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml.cs @@ -31,19 +31,12 @@ namespace Tango.PPC.UI.Views { public static LayoutEurekaView Instance { get; private set; } private LayoutViewVM _vm; - private System.Timers.Timer _timer; public LayoutEurekaView() { InitializeComponent(); Instance = this; Loaded += (_, __) => _vm = DataContext as LayoutViewVM; - techPressElement.RegisterForPreviewMouseOrTouchDown(OnMouseOrTouchDown); - techPressElement.RegisterForPreviewMouseOrTouchUp(OnMouseOrTouchUp); - _timer = new System.Timers.Timer(); - _timer.Interval = TimeSpan.FromSeconds(10).TotalMilliseconds; - _timer.Elapsed += _timer_Elapsed; - this.PreviewMouseUp += LayoutView_PreviewMouseUp; } @@ -52,44 +45,6 @@ namespace Tango.PPC.UI.Views _vm.ApplicationManager.ResetScreenLockTimer(); } - private void _timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) - { - _timer.Stop(); - - Dispatcher.BeginInvoke(new Action(() => - { - _vm.ToggleTechnicianMode(); - })); - } - - private void OnMouseOrTouchDown(object sender, MouseOrTouchEventArgs e) - { - //if (e.TouchDevice != null) - //{ - // techPressElement.CaptureTouch(e.TouchDevice); - //} - //else - //{ - // techPressElement.CaptureMouse(); - //} - - _timer.Start(); - } - - private void OnMouseOrTouchUp(object sender, MouseOrTouchEventArgs e) - { - //if (e.TouchDevice != null) - //{ - // techPressElement.ReleaseTouchCapture(e.TouchDevice); - //} - //else - //{ - // techPressElement.ReleaseMouseCapture(); - //} - - _timer.Stop(); - } - private void Grid_PreviewMouseUp(object sender, MouseButtonEventArgs e) { _vm.ApplicationManager.ReleaseScreenLock(); diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml new file mode 100644 index 000000000..43b85887b --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml @@ -0,0 +1,149 @@ +<UserControl x:Class="Tango.PPC.UI.Views.MachineStatusView" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" + xmlns:vm="clr-namespace:Tango.PPC.UI.ViewModels" + xmlns:locaControls="clr-namespace:Tango.PPC.UI.Controls" + xmlns:global="clr-namespace:Tango.PPC.UI" + xmlns:local="clr-namespace:Tango.PPC.UI.Views" + mc:Ignorable="d" + d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:MachineStatusViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MachineStatusViewVM}"> + <Grid Background="{StaticResource TangoMidBackgroundBrush}"> + <DockPanel> + <Grid Panel.ZIndex="100" DockPanel.Dock="Top" Height="79" Background="{StaticResource TangoPrimaryBackgroundBrush}"> + <Grid.Effect> + <DropShadowEffect Color="Silver" ShadowDepth="0" BlurRadius="20" Opacity="1" /> + </Grid.Effect> + + <Grid HorizontalAlignment="Right" Margin="0 0 20 0"> + <StackPanel Orientation="Horizontal"> + <Grid> + <StackPanel x:Name="techPressElement" VerticalAlignment="Center" Background="Transparent"> + <locaControls:MachineStatusControl HorizontalAlignment="Center" DataContext="{Binding MachineProvider.MachineOperator}" /> + <TextBlock Margin="0 10 0 0" FontSize="{StaticResource TangoSmallFontSize}" Text="{Binding MachineProvider.MachineOperator.Status,Converter={StaticResource EnumToDescriptionConverter}}"></TextBlock> + </StackPanel> + + <Grid IsHitTestVisible="False" HorizontalAlignment="Center"> + <Grid.Style> + <Style TargetType="Grid"> + <Setter Property="Visibility" Value="Hidden"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding MachineProvider.MachineOperator.MachineStatus.AutoInkFillingEnabled}" Value="True"> + <Setter Property="Visibility" Value="Visible"></Setter> + </DataTrigger> + <DataTrigger Binding="{Binding MachineProvider.MachineOperator.IsConnected}" Value="False"> + <Setter Property="Visibility" Value="Hidden"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </Grid.Style> + </Grid> + </Grid> + </StackPanel> + </Grid> + </Grid> + + <Grid Background="{StaticResource TangoMidBackgroundBrush}"> + <StackPanel VerticalAlignment="Center"> + <Grid> + + <touch:TouchRingProgress Width="364" Height="364" RingThickness="10"> + <touch:TouchRingProgress.Style> + <Style TargetType="touch:TouchRingProgress"> + <Setter Property="Visibility" Value="Visible"></Setter> + <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter> + <Setter Property="Maximum" Value="{Binding RunningJobStatus.TotalProgressMinusSettingUp}"></Setter> + <Setter Property="Value" Value="{Binding RunningJobStatus.ProgressMinusSettingUp}"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding RunningJobStatus.IsSettingUp}" Value="False"> + <Setter Property="Visibility" Value="Visible"></Setter> + </DataTrigger> + <DataTrigger Binding="{Binding RunningJobStatus.IsCompleted}" Value="True"> + <Setter Property="Maximum" Value="100"></Setter> + <Setter Property="Value" Value="99.9999999"></Setter> + <Setter Property="Foreground" Value="{StaticResource TangoSuccessBrush}"></Setter> + </DataTrigger> + <DataTrigger Binding="{Binding RunningJobStatus.IsCanceled}" Value="True"> + <Setter Property="Foreground" Value="{StaticResource TangoWarningBrush}"></Setter> + </DataTrigger> + <DataTrigger Binding="{Binding RunningJobStatus.IsFailed}" Value="True"> + <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </touch:TouchRingProgress.Style> + </touch:TouchRingProgress> + + <touch:TouchBusyIndicator Width="360" Height="360" StrokeThickness="10" Maximum="100" Visibility="{Binding RunningJobStatus.IsSettingUp,Converter={StaticResource BooleanToVisibilityConverter}}"> + <touch:TouchBusyIndicator.Style> + <Style TargetType="touch:TouchBusyIndicator"> + <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter> + <Setter Property="Value" Value="0"></Setter> + <Setter Property="IsIndeterminate" Value="False"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding RunningJobStatus.IsSettingUp}" Value="True"> + <Setter Property="Visibility" Value="Visible"></Setter> + <Setter Property="Value" Value="0"></Setter> + <Setter Property="IsIndeterminate" Value="True"></Setter> + </DataTrigger> + <DataTrigger Binding="{Binding RunningJobStatus.IsCompleted}" Value="True"> + <Setter Property="IsIndeterminate" Value="False"></Setter> + </DataTrigger> + <DataTrigger Binding="{Binding RunningJobStatus.IsCanceled}" Value="True"> + <Setter Property="Value" Value="99.9999999"></Setter> + <Setter Property="IsIndeterminate" Value="False"></Setter> + <Setter Property="Foreground" Value="{StaticResource TangoWarningBrush}"></Setter> + </DataTrigger> + <DataTrigger Binding="{Binding RunningJobStatus.IsFailed}" Value="True"> + <Setter Property="Value" Value="99.9999999"></Setter> + <Setter Property="IsIndeterminate" Value="False"></Setter> + <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </touch:TouchBusyIndicator.Style> + </touch:TouchBusyIndicator> + + <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center"> + + <StackPanel Visibility="{Binding RunningJobStatus.IsSettingUp,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> + <Image Source="../Images/JobProgressView/drop.png" Stretch="None" /> + <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Completed</TextBlock> + </StackPanel> + + <TextBlock FontWeight="Light" FontSize="{StaticResource TangoLargeFontSize}" Margin="0 10 0 0" HorizontalAlignment="Center"> + <Run Text="{Binding RunningJobStatus.ProgressMinusSettingUp,StringFormat=0,FallbackValue=0}"></Run><Run Text="/" /><Run Text="{Binding RunningJobStatus.TotalProgressMinusSettingUp,StringFormat=0,FallbackValue=0}"/> + <Run FontSize="16">m</Run> + </TextBlock> + </StackPanel> + + <StackPanel Height="90" Visibility="{Binding RunningJobStatus.IsSettingUp,Converter={StaticResource BooleanToVisibilityConverter}}"> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> + <Image Source="../Images/JobProgressView/drop.png" Stretch="None" /> + <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Getting Ready...</TextBlock> + </StackPanel> + </StackPanel> + + <Rectangle Margin="0 10 0 0" Width="250" Stroke="{StaticResource TangoDividerBrush}" /> + + <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0 15 0 0"> + <Image Source="../Images/JobProgressView/clock.png" Stretch="None" /> + <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Time Left</TextBlock> + </StackPanel> + + <TextBlock FontWeight="Light" FontSize="{StaticResource TangoLargeFontSize}" Margin="0 10 0 0" HorizontalAlignment="Center"> + <Run Text="{Binding RunningJobStatus.RemainingTime,Converter={StaticResource TimeSpanToTwoDigitsTimeConverter},FallbackValue=5}"></Run> + <Run FontSize="16" Text="{Binding RunningJobStatus.RemainingTime,Converter={StaticResource TimeSpanToLabelConverter},FallbackValue=min}"></Run> + </TextBlock> + </StackPanel> + </Grid> + + <touch:TouchButton Content="STOP" Margin="0 20 0 0" Height="60" Width="160" CornerRadius="30" BlurRadius="20" Command="{Binding StopCommand}" IsEnabled="{Binding MachineProvider.MachineOperator.IsPrinting}"></touch:TouchButton> + </StackPanel> + </Grid> + </DockPanel> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml.cs new file mode 100644 index 000000000..2ee98bc2b --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using Tango.Core.EventArguments; +using Tango.PPC.UI.ViewModels; + +namespace Tango.PPC.UI.Views +{ + /// <summary> + /// Interaction logic for MachineStatusView.xaml + /// </summary> + public partial class MachineStatusView : UserControl + { + private MachineStatusViewVM _vm; + private System.Timers.Timer _timer; + + public MachineStatusView() + { + InitializeComponent(); + + techPressElement.RegisterForPreviewMouseOrTouchDown(OnMouseOrTouchDown); + techPressElement.RegisterForPreviewMouseOrTouchUp(OnMouseOrTouchUp); + _timer = new System.Timers.Timer(); + _timer.Interval = TimeSpan.FromSeconds(10).TotalMilliseconds; + _timer.Elapsed += _timer_Elapsed; + + Loaded += (_, __) => _vm = DataContext as MachineStatusViewVM; + } + + private void _timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) + { + _timer.Stop(); + + Dispatcher.BeginInvoke(new Action(() => + { + _vm.ToggleTechnicianMode(); + })); + } + + private void OnMouseOrTouchDown(object sender, MouseOrTouchEventArgs e) + { + _timer.Start(); + } + + private void OnMouseOrTouchUp(object sender, MouseOrTouchEventArgs e) + { + _timer.Stop(); + } + } +} |
