aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-03-04 19:46:05 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-03-04 19:46:05 +0200
commitfc8f4f7a358640f8f6495397f822320f87018d04 (patch)
treee185ab464f2cdfdf71ed473ca87d5044e6b04c23 /Software/Visual_Studio/PPC/Tango.PPC.UI
parentecd2a6146289cd6b3c3dd7c1153a5f9da16dd69c (diff)
downloadTango-fc8f4f7a358640f8f6495397f822320f87018d04.tar.gz
Tango-fc8f4f7a358640f8f6495397f822320f87018d04.zip
Fixed issue with Start/Stop App Button on PPC.
Implemented new notifications design.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs10
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml6
3 files changed, 10 insertions, 8 deletions
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 9cd34e67c..d7dca484e 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs
@@ -29,6 +29,7 @@ namespace Tango.PPC.UI.Notifications
{
private ConcurrentQueue<PendingNotification<MessageBoxVM, bool>> _pendingMessageBoxes;
private ConcurrentQueue<PendingNotification<DialogAndView, DialogViewVM>> _pendingDialogs;
+ private List<AppButton> _appButtons;
private bool _notificationsVisible;
/// <summary>
@@ -60,6 +61,7 @@ namespace Tango.PPC.UI.Notifications
TaskBarItems = new ObservableCollection<TaskBarItem>();
_pendingMessageBoxes = new ConcurrentQueue<PendingNotification<MessageBoxVM, bool>>();
_pendingDialogs = new ConcurrentQueue<PendingNotification<DialogAndView, DialogViewVM>>();
+ _appButtons = new List<AppButton>();
PopNotificationCommand = new RelayCommand<NotificationItem>((x) => PopNotification(x));
@@ -521,6 +523,7 @@ namespace Tango.PPC.UI.Notifications
/// <param name="appButton">The app button.</param>
public void PushAppButton(AppButton appButton)
{
+ _appButtons.Insert(0, appButton);
CurrentAppButton = appButton;
}
@@ -530,10 +533,9 @@ namespace Tango.PPC.UI.Notifications
/// <param name="appButton">The app button.</param>
public void PopAppButton(AppButton appButton)
{
- if (CurrentAppButton == appButton)
- {
- CurrentAppButton = null;
- }
+ _appButtons.RemoveAll(x => x == appButton);
+
+ CurrentAppButton = _appButtons.FirstOrDefault();
}
}
}
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 bf3a85543..0a6919fbf 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml
@@ -141,7 +141,7 @@
<TextBlock Margin="0 10 0 0" Text="{Binding MachineProvider.MachineOperator.Status,Converter={StaticResource EnumToDescriptionConverter}}"></TextBlock>
</StackPanel>
- <touch:TouchButton Margin="40 0 0 0" Height="54" Padding="50 0" MinWidth="184" CornerRadius="30" 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>
+ <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>
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 c6e3fa6ea..e4c107049 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml
@@ -32,10 +32,10 @@
<touch:TouchPanel.NotificationTemplate>
<DataTemplate>
<touch:TouchButton Style="{StaticResource TangoFlatButton}" Padding="0" Command="{Binding PressedCommand}" components:TransformationHelper.TransformWhenPressed="False">
- <DockPanel>
- <touch:TouchIconButton Visibility="{Binding CanClose,Converter={StaticResource BooleanToVisibilityConverter}}" DockPanel.Dock="Right" Background="Transparent" Padding="20" Style="{StaticResource TangoRoundTouchIconButton}" Command="{Binding CloseCommand}" CommandParameter="{Binding}" HorizontalAlignment="Right" MaxHeight="60" Width="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}" Icon="Close" Foreground="White" />
+ <Grid>
<ContentControl Content="{Binding Converter={StaticResource ItemBaseConverter}}"/>
- </DockPanel>
+ <touch:TouchIconButton Visibility="{Binding CanClose,Converter={StaticResource BooleanToVisibilityConverter}}" DockPanel.Dock="Right" Background="Transparent" Padding="35" Style="{StaticResource TangoRoundTouchIconButton}" Command="{Binding CloseCommand}" CommandParameter="{Binding}" HorizontalAlignment="Right" MaxHeight="90" Width="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}" Icon="Close" Foreground="{StaticResource TangoDarkForegroundBrush}" />
+ </Grid>
</touch:TouchButton>
</DataTemplate>
</touch:TouchPanel.NotificationTemplate>