コード例 #1
0
ファイル: MainWindow.cs プロジェクト: TzarIvan/ratel
            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);
            }
コード例 #2
0
ファイル: OrdersPanel.cs プロジェクト: TzarIvan/ratel
 public string pv()
 {
     return(pvBox.selected("ALL"));
 }
コード例 #3
0
ファイル: OrdersPanel.cs プロジェクト: TzarIvan/ratel
 public string filter()
 {
     return(filterBox.selected("ALL"));
 }
コード例 #4
0
ファイル: OrdersPanel.cs プロジェクト: TzarIvan/ratel
 public string siv()
 {
     return(systemBox.selected("ALL"));
 }
コード例 #5
0
ファイル: OrdersPanel.cs プロジェクト: TzarIvan/ratel
 public string market()
 {
     return(marketBox.selected("ALL"));
 }