public ProfilerUI() { instance = this; InitializeComponent(); objectRefsGrid = new ObjectRefsGrid(); objectsPage.Controls.Add(objectRefsGrid); InitializeLocalization(); toolStrip.Renderer = new DockPanelStripRenderer(); runButton.Image = PluginBase.MainForm.FindImage("127"); gcButton.Image = PluginBase.MainForm.FindImage("90"); gcButton.Enabled = false; autoButton.Image = PluginBase.MainForm.FindImage("514"); if (PluginMain.Settings.ProfilerTimeout == 0) { PluginMain.Settings.ProfilerTimeout = 30; } detectDisconnect = new Timer(); detectDisconnect.Interval = Math.Max(5, PluginMain.Settings.ProfilerTimeout) * 1000; detectDisconnect.Tick += new EventHandler(detectDisconnect_Tick); memView = new ProfilerMemView(memLabel, memStatsLabel, memScaleCombo, memoryPage); liveObjectsView = new ProfilerLiveObjectsView(listView); liveObjectsView.OnViewObject += new ViewObjectEvent(liveObjectsView_OnViewObject); objectRefsView = new ProfilerObjectsView(objectRefsGrid); configureProfilerChooser(); StopProfiling(); }
public ProfilerUI() { instance = this; InitializeComponent(); objectRefsGrid = new ObjectRefsGrid(); objectsPage.Controls.Add(objectRefsGrid); InitializeLocalization(); toolStrip.Renderer = new DockPanelStripRenderer(); runButton.Image = PluginBase.MainForm.FindImage("127"); gcButton.Image = PluginBase.MainForm.FindImage("90"); gcButton.Enabled = false; autoButton.Image = PluginBase.MainForm.FindImage("514"); if (PluginMain.Settings.ProfilerTimeout == 0) PluginMain.Settings.ProfilerTimeout = 30; detectDisconnect = new Timer(); detectDisconnect.Interval = Math.Max(5, PluginMain.Settings.ProfilerTimeout) * 1000; detectDisconnect.Tick += new EventHandler(detectDisconnect_Tick); memView = new ProfilerMemView(memLabel, memStatsLabel, memScaleCombo, memoryPage); liveObjectsView = new ProfilerLiveObjectsView(listView); liveObjectsView.OnViewObject += new ViewObjectEvent(liveObjectsView_OnViewObject); objectRefsView = new ProfilerObjectsView(objectRefsGrid); configureProfilerChooser(); StopProfiling(); }
/// <summary> /// Create dock panels /// </summary> private void CreatePanels() { profilerUI = new ProfilerUI(); profilerUI.Text = TextHelper.GetString("Title.Profiler"); profilerPanel = PluginBase.MainForm.CreateDockablePanel(profilerUI, pluginGuid, pluginIcon, DockState.Hidden); profilerPanel.VisibleState = DockState.Float; profilerUI.PanelRef = profilerPanel; }