blob: 81927608fb3873f905f6ce143e1b55634479c0c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.FSE.Common;
using Tango.FSE.Common.Navigation;
using Tango.FSE.UI.Views;
using Tango.SharedUI.Helpers;
namespace Tango.FSE.UI.ViewModels
{
public class InternalModuleViewVM : FSEViewModel
{
public override void OnApplicationReady()
{
if (AuthenticationProvider.CurrentUser.HasPermission(Tango.BL.Enumerations.Permissions.FSE_RunFSE))
{
NavigationManager.MenuItems.Add(new NavigationMenuItem(() =>
{
NavigationManager.NavigateTo<InternalModule>(nameof(AccountView));
})
{
Name = "Account",
Index = -1,
Description = "Manage your account details",
Image = ResourceHelper.GetImageFromResources("Images/Menu/account.png"),
});
NavigationManager.MenuItems.Add(new NavigationMenuItem(() =>
{
NavigationManager.NavigateTo<InternalModule>(nameof(EventsView));
})
{
Name = "Events",
Index = 1,
Description = "View the active and history of the connected machine events.",
Image = ResourceHelper.GetImageFromResources("Images/Menu/events.png"),
});
NavigationManager.MenuItems.Add(new NavigationMenuItem(() =>
{
NavigationManager.NavigateTo<InternalModule>(nameof(SettingsView));
})
{
Name = "Settings",
Index = 100,
Description = "Configuration of your Tango FSE",
Image = ResourceHelper.GetImageFromResources("Images/Menu/settings.png"),
});
}
}
}
}
|