void HandleTreeCountersSelectionChanged(object sender, EventArgs e) { TreeIter it; if (!treeCounters.Selection.GetSelected(out it)) { SetView(null, null, false); return; } if (store.GetPath(it).Equals(store.GetPath(iterTimers))) { if (timersWidget == null) { timersWidget = new InstrumenationChartView(this); timersWidget.ShowAllTimers(); } SetView(timersWidget, "Timers", false); } else if (store.GetPath(it).Equals(store.GetPath(iterTimerStats))) { if (timerStatsView == null) { timerStatsView = new TimeStatisticsView(this); } timerStatsView.Fill(); SetView(timerStatsView, "Timer Statistics", false); } else { ChartView v = (ChartView)store.GetValue(it, 1); if (v != null) { InstrumenationChartView cv; if (!chartWidgets.TryGetValue(v, out cv)) { cv = new InstrumenationChartView(this); chartWidgets [v] = cv; cv.SetView(v); } SetView(cv, v.Name, true); } else { SetView(null, null, false); } } }
void HandleTreeCountersSelectionChanged (object sender, EventArgs e) { TreeIter it; if (!treeCounters.Selection.GetSelected (out it)) { SetView (null, null, false); return; } if (store.GetPath (it).Equals (store.GetPath (iterTimers))) { if (timersWidget == null) { timersWidget = new InstrumenationChartView (this); timersWidget.ShowAllTimers (); } SetView (timersWidget, "Timers", false); } else if (store.GetPath (it).Equals (store.GetPath (iterTimerStats))) { if (timerStatsView == null) timerStatsView = new TimeStatisticsView (this); timerStatsView.Fill (); SetView (timerStatsView, "Timer Statistics", false); } else { ChartView v = (ChartView) store.GetValue (it, 1); if (v != null) { InstrumenationChartView cv; if (!chartWidgets.TryGetValue (v, out cv)) { cv = new InstrumenationChartView (this); chartWidgets [v] = cv; cv.SetView (v); } SetView (cv, v.Name, true); } else { SetView (null, null, false); } } }