aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-06-17 19:06:13 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-06-17 19:06:13 +0300
commit7658a8546a9c33a76376dff3ab646f2aceaf0a01 (patch)
tree10c2cee7f96268e9052e19901f49f3e0a1e75d41 /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs
parent22853e394b878578084db1062664c38c40e88d07 (diff)
downloadTango-7658a8546a9c33a76376dff3ab646f2aceaf0a01.tar.gz
Tango-7658a8546a9c33a76376dff3ab646f2aceaf0a01.zip
Working on PPC !!!
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs36
1 files changed, 35 insertions, 1 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs
index 99841516e..d65dfc11c 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs
@@ -8,6 +8,7 @@ using Tango.Core.DI;
using Tango.PPC.Common;
using Tango.PPC.Common.Modules;
using Tango.PPC.Common.Navigation;
+using Tango.PPC.UI.Notifications.NotificationItems;
using Tango.PPC.UI.ViewsContracts;
using Tango.SharedUI;
@@ -35,6 +36,16 @@ namespace Tango.PPC.UI.ViewModels
set { _isMenuOpened = value; RaisePropertyChangedAuto(); }
}
+ private bool _isNotificationsOpened;
+ /// <summary>
+ /// Gets or sets a value indicating whether to display all notifications.
+ /// </summary>
+ public bool IsNotificationsOpened
+ {
+ get { return _isNotificationsOpened; }
+ set { _isNotificationsOpened = value; RaisePropertyChangedAuto(); }
+ }
+
/// <summary>
/// Gets or sets the module navigation command.
/// </summary>
@@ -51,6 +62,11 @@ namespace Tango.PPC.UI.ViewModels
public RelayCommand HomeCommand { get; set; }
/// <summary>
+ /// Gets or sets the notifications area pressed command.
+ /// </summary>
+ public RelayCommand NotificationsAreaPressedCommand { get; set; }
+
+ /// <summary>
/// Initializes a new instance of the <see cref="LayoutViewVM"/> class.
/// </summary>
public LayoutViewVM()
@@ -58,6 +74,7 @@ namespace Tango.PPC.UI.ViewModels
ModuleNavigationCommand = new RelayCommand<string>(NavigateToModule);
HomeCommand = new RelayCommand(NavigateHome);
MenuOrBackCommand = new RelayCommand(OpenMenuOrNavigateBack);
+ NotificationsAreaPressedCommand = new RelayCommand(OpenFirstNotificationOrDisplayAll);
}
/// <summary>
@@ -73,6 +90,8 @@ namespace Tango.PPC.UI.ViewModels
{
IsMenuOpened = true;
}
+
+ NotificationProvider.PushNotification(new EmptyCartridgesNotification());
}
/// <summary>
@@ -118,7 +137,22 @@ namespace Tango.PPC.UI.ViewModels
/// </summary>
public override void OnViewAttached()
{
-
+
+ }
+
+ /// <summary>
+ /// Opens the first notification or display all.
+ /// </summary>
+ private void OpenFirstNotificationOrDisplayAll()
+ {
+ if (NotificationProvider.NotificationItems.Count == 1)
+ {
+ //Open first
+ }
+ else
+ {
+ IsNotificationsOpened = true;
+ }
}
}
}