public void onTablesUpdates(O2GResponse response) { if (response.Type == O2GResponseType.GetOffers || response.Type == O2GResponseType.TablesUpdates) { BSFX.printOffers(response); } }
public void onRequestCompleted(string requestId, O2GResponse response) { if (response.Type == O2GResponseType.GetOffers) { BSFX.printOffers(response); } }
// DB Reader Class private void ReadSingleRow(IDataRecord dataRecord) { try { Console.WriteLine(String.Format("{0}, {1}, {2}", dataRecord[0], dataRecord[1], dataRecord[2])); dbUserName = dataRecord[0].ToString(); dbPassword = dataRecord[1].ToString(); allow = dataRecord[2].ToString(); if (dbUserName == userName && dbPassword == password && allow == "Y") { BSFX bsfx = new BSFX(); connect.Close(); this.Hide(); File.AppendAllText(logLoc, Environment.NewLine + Environment.NewLine + time + ":" + " Login complete! Initializing main window..." + Environment.NewLine); bsfx.Show(); } else { Console.WriteLine("ERROR OCCURED WHEN COMPARING USER NAMES AND PASSWORDS"); } } catch (Exception readErr) { Console.WriteLine(readErr); } }
// Generate Button // Grab values, and generate report via HTML private void generateButton_Click(object sender, EventArgs e) { BSFX bsfx = new BSFX(); try { if (todayCheck.Checked == true) { toDate = DateTime.Today.Date; } else { toDatePicker.Select(); toDate = toDatePicker.Value; } } catch (Exception todayErr) { Console.WriteLine(todayErr); } fromDate = fromDatePicker.Value; bsfx.generateReports(); this.Close(); }
public void onRequestCompleted(string requestId, O2GResponse response) { if (response.Type == O2GResponseType.MarketDataSnapshot) { BSFX bsfx = new BSFX(); bsfx.PrintPrices(mSession, response, ""); } mResponseHandle.Set(); }
public void getParams() { BSFX bsfx = new BSFX(); lotSizeBoxParam.Text = bsfx.lotSizeBox.Text; maxPosBoxParam.Text = bsfx.maxPosBox.Text; maxSpreadBoxParam.Text = bsfx.maxSpreadBox.Text; moveBoxParam.Text = bsfx.moveBox.Text; goalBoxParam.Text = bsfx.goalBox.Text; stopLossBoxParam.Text = bsfx.stopLossBox.Text; intervalBoxParam.Text = bsfx.intervalBox.Text; }
public void paramOK_Click(object sender, EventArgs e) { try { BSFX bsfx = new BSFX(); bsfx.lotSizeBox.Text = lotSizeBoxParam.Text.ToString(); this.Invoke(new MethodInvoker(delegate { bsfx.lotSizeBox.Text = lotSizeBoxParam.Text.ToString(); })); this.Invoke(new MethodInvoker(delegate { bsfx.maxPosBox.Text = maxPosBoxParam.Text; })); this.Invoke(new MethodInvoker(delegate { bsfx.maxSpreadBox.Text = maxSpreadBoxParam.Text; })); this.Invoke(new MethodInvoker(delegate { bsfx.moveBox.Text = moveBoxParam.Text; })); this.Invoke(new MethodInvoker(delegate { bsfx.goalBox.Text = goalBoxParam.Text; })); this.Invoke(new MethodInvoker(delegate { bsfx.stopLossBox.Text = stopLossBoxParam.Text; })); this.Invoke(new MethodInvoker(delegate { bsfx.intervalBox.Text = intervalBoxParam.Text; })); bsfx.Update(); this.Close(); } catch (Exception updateErr) { Console.WriteLine(updateErr); } }