public StatusMapPanel() { var panel = downPanel(); model = new StatusTreeMap(this); treeMap = new QTreeMap(model); Content = panel; var controlGrid = new QGrid(); ResizingPanel.SetResizeHeight(controlGrid, 23); controlGrid.addColumn(1, GridUnitType.Star); controlGrid.addColumn(1, GridUnitType.Star); controlGrid.addColumn(7, GridUnitType.Star); controlGrid.add(new QCheckBox("Equal Size Boxes", true, selected => { model.setIsEqualSizes(selected); treeMap.updateGuiNodes(); }) { VerticalAlignment = VerticalAlignment.Center }, 0); var refershBox = new QComboBox("5", refreshRate => treeMap.setRefreshRate(int.Parse(refreshRate) * 1000)) { Height = 20 }; controlGrid.add(withLabel("Refresh Rate (sec): ", refershBox), 1); refershBox.populateWithFirst("1", O.list("3", "5", "10", "30", "60"), false); panel.Children.Add(controlGrid); panel.Children.Add(treeMap); refreshContextMenus(); }
object setupControls() { var grid = new QGrid(); grid.addColumn(115); // system id // take 20 or 30 or 40 grid.addColumn(150); // market grid.add(withLabel("System ID", idBox), 0); grid.add(withLabel("Market", marketBox), 1); return(grid); }
UIElement filterPanel() { var result = new QGrid { Height = 25 }; result.addColumn(200); result.addColumn(100); result.addColumn(100); result.add(new QComboBox("ALL", selected => watcher.setTagFilter(selected), O.list <string>(BloombergTagsTable.TAGS.C_TAG.distinct(Clause.TRUE)))); result.add(new QCheckBox("Show Zeros", false, setting => watcher.setFilterZeroes(!setting)), 1); result.add(new QCheckBox("Show Hidden", false, setting => watcher.setShowHidden(setting)), 2); return(result); }
public ReconPanel() { Producer <string> buttonText = () => "set LOG__VERBOSE " + (Log.verbose() ? "off" : "on"); QButton[] verboseButton = { null }; verboseButton[0] = new QButton(buttonText(), () => { bool newVerbose; LogC.flipVerbose(out newVerbose); runOnGuiThread(() => verboseButton[0].setText(buttonText())); }) { HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Top, Width = 250 }; var dockPanel = new QDockPanel { LastChildFill = false }; Content = dockPanel; dockPanel.add(verboseButton[0], Dock.Top); var executionConfigurationGrid = new QGrid { Height = 25 }; dockPanel.add(executionConfigurationGrid, Dock.Top); O.zeroTo(4, i => executionConfigurationGrid.addColumn(200)); var platformBox = new TextBox(); var routeBox = new TextBox(); var typeBox = new QComboBox("Future", selected => { var config = ExecutionConfigurationTable.currentConfiguration(selected); platformBox.Text = config.platform(); routeBox.Text = config.route(); }, O.list("Equity")); executionConfigurationGrid.add(typeBox, 0); executionConfigurationGrid.add(withLabel("Platform", platformBox), 1); executionConfigurationGrid.add(withLabel("Route", routeBox), 2); executionConfigurationGrid.add(new QButton("Set Current Execution Configuration", () => { var type = typeBox.selected("NA"); var platform = platformBox.Text; var route = routeBox.Text; ExecutionConfigurationTable.CONFIG.insert(type, platform, route); Db.commit(); Email.notification("Execution Configuration Changed for " + type + ": " + platform + ", " + route, "").sendTo("team"); alertUser("Configuration changed for " + type + " - don't forget to restart systems to pick up the change."); }) { Width = 200 }, 3); }
object runSetupControls() { var grid = new QGrid(); grid.addColumn(150); // name grid.addColumn(100); // load grid.addColumn(100); // save grid.addColumn(20); grid.addColumn(115); // system id // take 20 or 30 or 40 grid.addColumn(115); // run number // take same amount as system id grid.addColumn(100); // load system grid.addColumn(20); grid.addColumn(150); //startDate grid.addColumn(150); // end Date grid.addColumn(10); grid.addColumn(90); // Plots checkbox grid.addColumn(10); grid.addColumn(80); // run button (historical) grid.addColumn(60); // live button // word Live is about 25 so 30 + border 10 + 20 for checkbox need 90 grid.add(withLabel("Name:", nameBox), 0); grid.add(loadButton, 1); grid.add(saveButton, 2); grid.add(withLabel("System ID", idBox), 4); numberBoxWithLabel = withLabel("RunNumber", numberBox); numberBoxWithLabel.IsEnabled = false; grid.add(numberBoxWithLabel, 5); grid.add(loadSystemButton, 6); grid.add(withLabel("Start Date:", startDatePicker), 8); grid.add(withLabel("End Date:", endDatePicker), 9); grid.add(showPlots, 11); grid.add(runButton, 13); grid.add(liveButton, 14); return(grid); }