예제 #1
0
        public void AddSenseLogsForHost(string name, List <SenseLogInfo> logNames)
        {
            _lastOpenedLog = logNames.LastOrDefault()?.Name;
            logNames.Sort((p1, p2) => string.Compare(p1.Name, p2.Name, StringComparison.Ordinal));
            var items      = CreateWrapper(logNames);
            var newWrapper = new MenuItemWrapper(name, null, null, items, ApplicationMenuIcon.BaseMenuServer);

            _frm.CreateDynamicMenuItems(new[] { newWrapper });
        }
예제 #2
0
 public MenuItemWrapper(string text, Func <Task> menuAction, Type formType, ApplicationMenuIcon menuIcon)
 {
     Text = text;
     ApplicationMenuIcon = menuIcon;
     MenuAction          = menuAction;
     FormType            = formType;
     //Access = access;
     SubMenuItems = new MenuItemWrapper[0];
 }
예제 #3
0
        public FrmMenu Start()
        {
            _frm = new FrmMenu(null, "FrmMenu");
            _frm.Show(_dockPanel, DockState.DockLeft);
            //frm.MdiParent = _main;
            _startItem = _formsCache.CreateFormItem <FrmSenseNodes>("Sense Nodes", ApplicationMenuIcon.BaseMenuNodes, null);
            var menuItems = new List <MenuItemWrapper>();

            //menuItems.Add(_formsCache.CreateFormItem<FrmSenseLogViewer>("Log"));
            menuItems.Add(_formsCache.CreateFormItem <FrmWindowsLogViewer>("Windows Logs", ApplicationMenuIcon.BaseMenuLogs, null));
            menuItems.Add(_formsCache.CreateFormItem <FrmLogCollectorLog>("LogCollector Log", ApplicationMenuIcon.BaseMenuLogs, null));
            menuItems.Add(_formsCache.CreateFormItem <FrmSenseLogs>("Log files", ApplicationMenuIcon.BaseMenuLogs, null));
            menuItems.Add(_startItem);
            _frm.ShowMenu(menuItems);
            return(_frm);
        }