private void clickcustomhandler(object state) { ClickhandlerArgs cha = (ClickhandlerArgs)state; if (TraceOrders) { Print("clickcustomhandler(" + cha.Units.ToString() + "," + cha.ClickedButton.ToString() + ")"); } try { Zweistein.SpreadTraderWindow.StrategyHandleClickedButton(this, cha, spreads, strratio, leg1entrytype, leg2entrytype, IExitHandlingInstance()); } catch (Exception e) { if (TraceOrders) { Print("ERROR: " + e.Message + " STACKTRACE:" + e.StackTrace); } } }
public void GoLong_Click(object sender, System.EventArgs e) { ClickhandlerArgs A = new ClickhandlerArgs(ClickedButton.GoLong, this.Units); clickcustomhandler(A); }