Esempio n. 1
0
 private void SaveCounterVisualProperties(CounterInfo counterInfo, CounterItem item)
 {
     if (counterInfo.OriginalPath != item.Path)
     {
         return;
     }
     CounterInfoHelper.SaveCounterItemInfo(item, counterInfo);
 }
Esempio n. 2
0
        private void AddNewSysCounterFromUI(CounterItem currentUICounter, CounterFolder folder)
        {
            CounterInfo newCOunterInfo = CounterInfoHelper.FromPerfmonCounter(currentUICounter);

            if (folder.ContainsCounter(newCOunterInfo))
            {
                return;
            }
            folder.Counterinfos.Add(newCOunterInfo);
            AddCounterToTree(TreeSelectedFolderNode, newCOunterInfo);
        }
Esempio n. 3
0
        public CounterFolder GetAllCountersAsFolderHierarchy()
        {
            CounterFolder root = new CounterFolder();

            foreach (TabPage tabPage in tabs.TabPages)
            {
                if (tabPage.Text == "Default")
                {
                    continue;
                }

                CounterFolder subFolder = new CounterFolder();
                subFolder.Name = tabPage.Text;
                AxSystemMonitor.AxSystemMonitor tabMon = tabPage.Controls[0] as AxSystemMonitor.AxSystemMonitor;
                foreach (CounterItem item in tabMon.Counters)
                {
                    CounterInfo itemInfo = CounterInfoHelper.FromPerfmonCounter(item);
                    subFolder.Counterinfos.Add(itemInfo);
                }
                root.SubFolders.Add(subFolder);
            }
            return(root);
        }