public void initialize() { each(StatusTracker.allLiveSystems(), liveSystem => { var tag = liveSystem.bloombergTag(); var tagTotals = tags.get(tag); each(list <MsivPv>(liveSystem.liveMarkets()), liveMarket => { var symbol = new Symbol(new Market(liveMarket.market())); if (!tagTotals.has(symbol)) { var myRow = addRow(tag, nameString(symbol), rowKey(tag, symbol)); myRow["symbolHIDDEN"] = symbol; } var symbolTotals = tagTotals.get(symbol); symbolTotals[liveSystem] = 0; new Topic(liveSystem.topicName("TOMAHAWK", symbol.name + ".optimalPosition")).subscribe(fields => { lock (symbolTotals) { symbolTotals[liveSystem] = fields.numeric("liveValue"); lastUpdateTime.get(tag)[liveMarket] = date(fields.time("liveTimestamp")); var total = sum(symbolTotals.Values); gui.runOnGuiThread(() => { var myRow = row(tag, symbol); myRow["tomahawk"] = total; update(myRow); }); } }); }); }); new Topic("Positions.QMF.>", positionsBroker_).subscribe(fields => { var tag = fields.text("level1TagName"); var ticker = fields.text("ticker"); if (isEmpty(ticker)) { ticker = fields.text("securityId"); } var yellowKey = Strings.javaClassify(fields.text("yellowKey").ToLower()); gui.runOnGuiThread(() => { var myRow = row(tag, ticker, yellowKey); myRow["aim"] = fields.numeric("currentPosition"); update(myRow); }); }); }
public FakeStatusTrackerGUI(List <LiveSystem> systems) { tracker = new StatusTracker(this, systems); }
public StatusTreeMap(StatusMapGUI gui) : this(gui, StatusTracker.allLiveSystems()) { }