aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/FSE/Modules/Tango.FSE.Procedures/ViewModels/MainViewVM.cs
blob: 2e38bcb3f5d3e4c62ffe86439e562e4eb62b91c7 (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
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.BL.Enumerations;
using Tango.FSE.Common;
using Tango.FSE.Common.Navigation;
using Tango.FSE.Procedures.Views;
using Tango.SharedUI.Helpers;

namespace Tango.FSE.Procedures.ViewModels
{
    [NavigationContainer]
    public class MainViewVM : FSEViewModel
    {
        public override void OnApplicationReady()
        {
            InvokeUI(() =>
            {
                NavigationManager.MenuItems.Add(new NavigationMenuItem(() =>
                {
                    NavigationManager.NavigateTo<ProceduresModule>(nameof(ProcedureRunnerView));
                })
                {
                    Name = "Procedures",
                    Index = 6,
                    Description = "Execute procedures against the currently connected machine.",
                    Image = ResourceHelper.GetImageFromResources("Images/test_runner.png"),
                });

                if (AuthenticationProvider.CurrentUser.HasPermission(Permissions.FSE_RunProcedureDesigner))
                {
                    NavigationManager.MenuItems.Add(new NavigationMenuItem(() =>
                    {
                        NavigationManager.NavigateTo<ProceduresModule>(nameof(ProcedureDesignerView));
                    })
                    {
                        Name = "Procedure Designer",
                        Index = 7,
                        Description = "Create, edit, test and publish new procedures.",
                        Image = ResourceHelper.GetImageFromResources("Images/test_designer.png"),
                    });
                }
            });
        }
    }
}
an class="n">BitConverter.ToUInt16(bytes, 6); byte packedFields = bytes[8]; HasLocalColorTable = (packedFields & 0x80) != 0; Interlace = (packedFields & 0x40) != 0; IsLocalColorTableSorted = (packedFields & 0x20) != 0; LocalColorTableSize = 1 << ((packedFields & 0x07) + 1); } } }