private void SaveCounterVisualProperties(CounterInfo counterInfo, CounterItem item) { if (counterInfo.OriginalPath != item.Path) { return; } CounterInfoHelper.SaveCounterItemInfo(item, counterInfo); }
private void AddNewSysCounterFromUI(CounterItem currentUICounter, CounterFolder folder) { CounterInfo newCOunterInfo = CounterInfoHelper.FromPerfmonCounter(currentUICounter); if (folder.ContainsCounter(newCOunterInfo)) { return; } folder.Counterinfos.Add(newCOunterInfo); AddCounterToTree(TreeSelectedFolderNode, newCOunterInfo); }
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); }