예제 #1
0
        public bool BeforeInit(Strategy _stag, StateNotify _sn = null, OutPut _outp = null)
        {
            if (_stag == null)
            {
                return(false);
            }
            runStrategy = _stag;
            runStrategy.SetContractID(this.contractID);
            runStrategy.SetUserInfo(this.username, this.password);
            runStrategy.SetValSign(this.valsign);
            runStrategy.SetTradeAddr(this.trade_addr, this.trade_port);
            runStrategy.SetMarketAddr(this.market_addr, this.market_port);
            runStrategy.SetHttpAddr(this.http_addr, this.http_port);

            showMessage = _outp;
            runStrategy.SetPrintMessage(_outp);

            runStrategy.SetStateNotify(_sn);
            return(true);
        }
예제 #2
0
 /// <summary>
 /// 设置一个状态通知
 /// </summary>
 /// <param name="snt"></param>
 public void SetStateNotify(StateNotify snt)
 {
     stateNotify = snt;
 }