private void fillCondition(VolumeCondition volumeCondition) { fillOperator(volumeCondition, volumeOperator); fillUnderlyingContract(volumeCondition, volumeUnderlying); volumeCondition.Volume = int.Parse(volume.Text); }
private void fillFromCondition(VolumeCondition volumeCondition) { fillOperator(volumeOperator, volumeCondition); fillUnderlyingContract(volumeUnderlying, volumeCondition); volume.Text = volumeCondition.Volume.ToString(); volumeRb.Checked = true; }
/// <summary> /// TThostFtdcVolumeConditionType枚举型转为VolumeConditionType枚举型 /// </summary> /// <param name="tfvct">TThostFtdcVolumeConditionType枚举型</param> /// <returns></returns> public static VolumeCondition TThostFtdcVolumeConditionType_To_VolumeCondition(TThostFtdcVolumeConditionType tfvct) { VolumeCondition vct = VolumeCondition.AV; switch (tfvct) { case TThostFtdcVolumeConditionType.THOST_FTDC_VC_AV: break; case TThostFtdcVolumeConditionType.THOST_FTDC_VC_MV: vct = VolumeCondition.MV; break; case TThostFtdcVolumeConditionType.THOST_FTDC_VC_CV: vct = VolumeCondition.CV; break; default: break; } return(vct); }
public static OrderCondition Create(OrderConditionType type) { OrderCondition?rval = null; switch (type) { case OrderConditionType.Execution: rval = new ExecutionCondition(); break; case OrderConditionType.Margin: rval = new MarginCondition(); break; case OrderConditionType.PercentChange: rval = new PercentChangeCondition(); break; case OrderConditionType.Price: rval = new PriceCondition(); break; case OrderConditionType.Time: rval = new TimeCondition(); break; case OrderConditionType.Volume: rval = new VolumeCondition(); break; } if (rval != null) { rval.Type = type; } return(rval ?? throw new InvalidOperationException("Invalid OrderConditionType.")); }
public override int GetHashCode() { int hash = 1; if (BrokerId.Length != 0) { hash ^= BrokerId.GetHashCode(); } if (InvestorId.Length != 0) { hash ^= InvestorId.GetHashCode(); } if (UserId.Length != 0) { hash ^= UserId.GetHashCode(); } if (InstrumentId.Length != 0) { hash ^= InstrumentId.GetHashCode(); } if (ExchangeId.Length != 0) { hash ^= ExchangeId.GetHashCode(); } if (OrderPriceType != 0) { hash ^= OrderPriceType.GetHashCode(); } if (Direction != 0) { hash ^= Direction.GetHashCode(); } if (CombOffsetFlag != 0) { hash ^= CombOffsetFlag.GetHashCode(); } if (CombHedgeFlag != 0) { hash ^= CombHedgeFlag.GetHashCode(); } if (LimitPrice != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(LimitPrice); } if (VolumeTotalOriginal != 0) { hash ^= VolumeTotalOriginal.GetHashCode(); } if (TimeCondition != 0) { hash ^= TimeCondition.GetHashCode(); } if (VolumeCondition != 0) { hash ^= VolumeCondition.GetHashCode(); } if (MinVolume != 0) { hash ^= MinVolume.GetHashCode(); } if (ContigentCondition != 0) { hash ^= ContigentCondition.GetHashCode(); } if (StopPrice != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(StopPrice); } if (ForceCloseReason != 0) { hash ^= ForceCloseReason.GetHashCode(); } if (IsAutoSuspend != 0) { hash ^= IsAutoSuspend.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
/// <summary> /// VolumeCondition枚举型转为TThostFtdcVolumeConditionType枚举型 /// </summary> /// <param name="vc">VolumeCondition枚举型</param> /// <returns></returns> public static TThostFtdcVolumeConditionType VolumeCondition_To_TThostFtdcVolumeConditionType(VolumeCondition vc) { TThostFtdcVolumeConditionType tfvct = TThostFtdcVolumeConditionType.THOST_FTDC_VC_AV; switch (vc) { case VolumeCondition.AV: break; case VolumeCondition.MV: tfvct = TThostFtdcVolumeConditionType.THOST_FTDC_VC_MV; break; case VolumeCondition.CV: tfvct = TThostFtdcVolumeConditionType.THOST_FTDC_VC_CV; break; default: break; } return(tfvct); }