private void createLeftPanel() { leftPanel = new FlowLayoutPanel(); leftPanel.Location = new Point(0, 0); leftPanel.Width = 84; leftPanel.Height = this.Height - SystemInformation.CaptionHeight; reloadButton = new PmButton("Reload", reload_click, true); leftPanel.Controls.Add(reloadButton); thresholdButton = new PmButton("Set threshold", threshold_click, true); leftPanel.Controls.Add(thresholdButton); aggregateRWBox = new CheckBox() { Text = "Combine RW", Enabled = true, Checked = true }; aggregateRWBox.CheckedChanged += new EventHandler(aggregate_click); leftPanel.Controls.Add(aggregateRWBox); scaleTo100Box = new CheckBox() { Text = "Scale to 100", Enabled = true, Checked = false }; scaleTo100Box.CheckedChanged += new EventHandler(scaleTo100_click); leftPanel.Controls.Add(scaleTo100Box); screenshotButton = new PmButton("Screenshot", screenshot_click, true); leftPanel.Controls.Add(screenshotButton); this.Controls.Add(leftPanel); }
public ControlPanel(PmGraph p) { pmgraph = p; Width = 84; Height = pmgraph.Height - SystemInformation.CaptionHeight; FlowDirection = FlowDirection.TopDown; importManualSingleButton = new PmButton("Import XML", importSingleBenches_click, true); exportManualButton = new PmButton("Export CSV", pmgraph.exportCsvManual_click, false); averageSelectedButton = new PmButton("Average selected", pmgraph.averageSelectedButton_click, false); deleteSelectedButton = new PmButton("Delete seleted", pmgraph.deleteSelectedButton_click, false); selectAllButton = new PmButton("Select all", pmgraph.selectAll_click, false); helpButton = new PmButton("Instructions", helpButton_click, true); Controls.Add(importManualSingleButton); Controls.Add(exportManualButton); Controls.Add(averageSelectedButton); Controls.Add(deleteSelectedButton); Controls.Add(selectAllButton); Controls.Add(helpButton); // chart selection radio button chartSelectPanel = new Panel(); chartSelectPanel.BorderStyle = BorderStyle.Fixed3D; chartSelectPanel.Size = new Size(84, 80); String[] chtnames = { "mini", "full", "log" }; String[] chttexts = { "Mini (linear)", "Full (linear)", "Full (Log)" }; bool[] chtchecked = { false, true, false }; selectChart = new RadioButton[3]; for (int i = 0; i < 3; i++) { RadioButton rb = new RadioButton(); rb.Name = chtnames[i]; rb.Text = chttexts[i]; rb.Checked = chtchecked[i]; rb.Size = new Size(90, 18); rb.CheckedChanged += new EventHandler(pmgraph.chartchange_click); rb.Location = new Point(0, i * 25 + 3); selectChart[i] = rb; } chartSelectPanel.Controls.AddRange(selectChart); Controls.Add(chartSelectPanel); barGraphButton = new PmButton("Bar Graph", bargraph_click, false); Controls.Add(barGraphButton); screenshotButton = new PmButton("Screenshot", pmgraph.screenshot_click, true); Controls.Add(screenshotButton); aboutButton = new PmButton("About", about_click, true); Controls.Add(aboutButton); debugDumpInternalButton = new PmButton("debug dump", pmgraph.testError_click, true); debugRebuildChartButton = new PmButton("redraw chart", rebuildChart_click, true); selectAllButton.Enabled = true; exportManualButton.Enabled = false; }