Market data streams work now
This commit is contained in:
1 parent
140c0c4152
commit
33030b1212
46 files changed
+2367
-787
No files matched your search
@@ -31,8 +31,8 @@ namespace BCG {
|
||||
var login = "bts";
|
||||
var passwd = String.Empty;
|
||||
Console.WriteLine("Starting DSQA... ");
|
||||
Log.notnull(login);
|
||||
Log.notnull(passwd);
|
||||
// Log.notnull(login);
|
||||
// Log.notnull(passwd);
|
||||
var service_ctx = bts.api.core.ServiceContext.create();
|
||||
await service_ctx.login(login, passwd);
|
||||
}
|
||||
@@ -71,7 +71,7 @@ namespace BCG {
|
||||
}
|
||||
private ViewStream myGetAllTagsStream() {
|
||||
// TODO: Port PublishedTagsStream from edge (then we can uncomment impl below)
|
||||
return new PubSubServerStateStream();
|
||||
return new FilterStream(new PubSubServerStateStream(), "tag~='DS_'");
|
||||
//return new LiteralStream("tag/String", "DS_Comedians;DS_Baldies");
|
||||
}
|
||||
|
||||
@@ -295,8 +295,10 @@ namespace BCG {
|
||||
return Math.Max(header_width, min_width);
|
||||
}
|
||||
}
|
||||
|
||||
private HighPerformanceTimer _timer = new HighPerformanceTimer();
|
||||
// this is the stream callback
|
||||
private void myCallback(object o) {
|
||||
_timer.start();
|
||||
DataPacket dp = o as DataPacket;
|
||||
myCrono.stop();
|
||||
Log.Ui.diag($"Received callback for {dp.schema.tableName}");
|
||||
@@ -306,13 +308,18 @@ namespace BCG {
|
||||
return;
|
||||
}
|
||||
Log.Ui.diag(dp.toIncrementalIDString());
|
||||
myToolStripStatusLabelTime.BackColor = Color.Black;
|
||||
myToolStripStatusLabelRows.BackColor = Color.Black;
|
||||
myToolStripStatusLabelTime.ForeColor = Color.White;
|
||||
myToolStripStatusLabelRows.ForeColor = Color.White;
|
||||
myToolStripStatusLabelTime.Text = "Last update: " + DateTime.Now.ToString("hh:mm:ss:fff tt");
|
||||
myToolStripStatusLabelRows.Text = "New = " + dp.newRows.Count + " Added = " + dp.addedRows.Count + " Deleted = " + dp.deletedRows.Count;
|
||||
Log.Ui.diag(Text);
|
||||
int hscrollval = myChangeStyle ? 0 : myDataGrid.HorizScrollBarValue;
|
||||
|
||||
myDataGrid.DataSource = new SimpleBindableCollection(dp.newRows.schema, dp.newRows);
|
||||
if (myChangeStyle) {
|
||||
var force = false;
|
||||
if (myChangeStyle && force) {
|
||||
myChangeStyle = false;
|
||||
myDataGrid.Columns.Clear();
|
||||
myDataGrid.Columns.AddRange(Array.ConvertAll(dp.schema.columnInfo, _column_factory));
|
||||
@@ -328,7 +335,11 @@ namespace BCG {
|
||||
string code = myExp.print(9, varNames);
|
||||
myPrintCode(dp.schema, varNames, code);
|
||||
myConsoleRichTextBox.Clear();
|
||||
myConsoleRichTextBox.Text = BlueDataUtility.get_printed_rows(dp.newRows, (col) => 30);
|
||||
// this was was very very slow
|
||||
//myConsoleRichTextBox.Text = BlueDataUtility.get_printed_rows(dp.newRows, (col) => 30);
|
||||
_timer.stop();
|
||||
var msecs = _timer.lastIntervalTime;
|
||||
bts.Log.Gen.info($"DSQA MainForm.myCallback table: {dp.schema.tableName} rows: {dp.newRows.Count} time: {msecs}");
|
||||
}
|
||||
|
||||
private Crono myCrono;
|
||||
@@ -442,22 +453,22 @@ namespace BCG {
|
||||
}
|
||||
|
||||
private void myCSharpText_MouseEnter(object sender, System.EventArgs e) {
|
||||
myCSharpText.BackColor = Color.Gainsboro;
|
||||
//myCSharpText.BackColor = Color.Gainsboro;
|
||||
myCSharpText.Font = new Font(myCSharpText.Font.Name, myCSharpText.Font.Size, FontStyle.Bold);
|
||||
}
|
||||
|
||||
private void myCSharpText_MouseLeave(object sender, System.EventArgs e) {
|
||||
myCSharpText.BackColor = Color.White;
|
||||
//myCSharpText.BackColor = Color.White;
|
||||
myCSharpText.Font = new Font(myCSharpText.Font.Name, myCSharpText.Font.Size, FontStyle.Regular);
|
||||
}
|
||||
|
||||
private void myTableListBox_MouseEnter(object sender, System.EventArgs e) {
|
||||
myTableListBox.BackColor = Color.Gainsboro;
|
||||
//myTableListBox.BackColor = Color.Gainsboro;
|
||||
myTableListBox.Font = new Font(myTableListBox.Font.Name, myTableListBox.Font.Size, FontStyle.Bold);
|
||||
}
|
||||
|
||||
private void myTableListBox_MouseLeave(object sender, System.EventArgs e) {
|
||||
myTableListBox.BackColor = Color.White;
|
||||
//myTableListBox.BackColor = Color.White;
|
||||
myTableListBox.Font = new Font(myTableListBox.Font.Name, myTableListBox.Font.Size, FontStyle.Regular);
|
||||
}
|
||||
|
||||
@@ -697,5 +708,13 @@ namespace BCG {
|
||||
}
|
||||
|
||||
private void libraryToolStripMenuItem_Click(object sender, EventArgs e) { }
|
||||
|
||||
private void myTableFilterLabel_Click(object sender, EventArgs e) {
|
||||
|
||||
}
|
||||
|
||||
private void MainForm_Load(object sender, EventArgs e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user