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();
        }
Beispiel #2
0
        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 ProfilerObjectsView(ObjectRefsGrid grid)
        {
            objectsGrid = grid;

            delayOpen          = new Timer();
            delayOpen.Interval = 100;
            delayOpen.Tick    += new EventHandler(delayOpen_Tick);

            // action
            openItem        = new ToolStripMenuItem(PluginCore.Localization.TextHelper.GetString("Label.OpenMethodFile"));
            openItem.Click += new EventHandler(objectsGrid_Open);

            objectsGrid.ContextMenuStrip = new ContextMenuStrip();
            objectsGrid.ContextMenuStrip.Items.Add(openItem);
            objectsGrid.DoubleClick += new EventHandler(objectsGrid_Open);
        }
        public ProfilerObjectsView(ObjectRefsGrid grid)
        {
            objectsGrid = grid;

            delayOpen = new Timer();
            delayOpen.Interval = 100;
            delayOpen.Tick += new EventHandler(delayOpen_Tick);

            // action
            openItem = new ToolStripMenuItem(PluginCore.Localization.TextHelper.GetString("Label.OpenMethodFile"));
            openItem.Click += new EventHandler(objectsGrid_Open);

            objectsGrid.ContextMenuStrip = new ContextMenuStrip();
            objectsGrid.ContextMenuStrip.Items.Add(openItem);
            objectsGrid.DoubleClick += new EventHandler(objectsGrid_Open);
        }
        public ProfilerObjectsView(ObjectRefsGrid grid)
        {
            objectsGrid = grid;

            delayOpen = new Timer();
            delayOpen.Interval = 100;
            delayOpen.Tick += new EventHandler(delayOpen_Tick);

            // action
            openItem = new ToolStripMenuItem(TextHelper.GetString("Label.OpenMethodFile"));
            openItem.Click += new EventHandler(objectsGrid_Open);

            objectsGrid.ContextMenuStrip = new ContextMenuStrip();
            objectsGrid.ContextMenuStrip.Font = PluginBase.Settings.DefaultFont;
            objectsGrid.ContextMenuStrip.Renderer = new DockPanelStripRenderer(false);
            objectsGrid.ContextMenuStrip.Items.Add(openItem);
            objectsGrid.DoubleClick += new EventHandler(objectsGrid_Open);
        }
        public ProfilerObjectsView(ObjectRefsGrid grid)
        {
            objectsGrid = grid;

            delayOpen          = new Timer();
            delayOpen.Interval = 100;
            delayOpen.Tick    += new EventHandler(delayOpen_Tick);

            // action
            openItem        = new ToolStripMenuItem(TextHelper.GetString("Label.OpenMethodFile"));
            openItem.Click += new EventHandler(objectsGrid_Open);

            objectsGrid.ContextMenuStrip          = new ContextMenuStrip();
            objectsGrid.ContextMenuStrip.Font     = PluginBase.Settings.DefaultFont;
            objectsGrid.ContextMenuStrip.Renderer = new DockPanelStripRenderer(false);
            objectsGrid.ContextMenuStrip.Items.Add(openItem);
            objectsGrid.DoubleClick += new EventHandler(objectsGrid_Open);
        }