public Boolean SendOrder(OrderServer orderServer) { if (IsDone()) { return true; } if (!IsSendAgainCondition()) { return false; } ResetConditions(); // cancel again String code = _order.Code; if (_order.TargetAccount.LineType == Account.OrderLineType.FutureOptionSpreadLine) { orderServer.SendCancel_FO(_accountName, _password, code, "" + _order.OrderNumber, "" + _order.ReqCount); _sendCount++; logger.Debug("SendCancel_FO {0}, {1}, Order#({2}), {3}, send count({4})", _accountName, code, _order.OrderNumber, _order.ReqCount, _sendCount); SoundManager.Ins().PlayContractSound(); } else if (_order.TargetAccount.LineType == Account.OrderLineType.StockSpotLine) { orderServer.SendCancel(_accountName, _password, code, "" + _order.OrderNumber, "0"); _sendCount++; logger.Debug("SendCancel {0}, {1}, Order#({2}), {3}, send count({4})", _accountName, code, _order.OrderNumber, "0", _sendCount); SoundManager.Ins().PlayContractSound(); } else { logger.Error("Unknown type"); Util.KillWithNotice("Unknown type"); } return false; }