| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565 |
- using System;
- namespace Muchinfo.MTPClient.Data.Model
- {
- /// <summary>
- /// QuoteGoods Partial类(显示)
- /// </summary>
- public partial class QuoteGoods
- {
- #region Properties
- #region Public Properties
- /// <summary>
- /// 振幅
- /// </summary>
- public string AmplitudeDisplay
- {
- get
- {
- return Amplitude.ToString("P2");
- }
- }
- /// <summary>
- /// 卖价显示
- /// </summary>
- public string AskPriceDisplay
- {
- get
- {
- if (_askPrice <= 0)
- {
- return "-";
- }
- return _askPrice.ToString(FormatPrice);
- }
- }
- /// <summary>
- /// 均价显示
- /// </summary>
- public string AveragePriceDisplay
- {
- get
- {
- return GetAbbreviated((double)_averagePrice);
- }
- }
- /// <summary>
- /// 买价显示
- /// </summary>
- public string BidPriceDisplay
- {
- get
- {
- if (_bidPrice <= 0)
- {
- return "-";
- }
- return _bidPrice.ToString(FormatPrice);
- }
- }
- /// <summary>
- /// 买量显示
- /// </summary>
- public string BidVolumeDisplay
- {
- get
- {
- return GetAbbreviatedEx(_bidVolume, false);
- }
- }
- /// <summary>
- /// 现价显示
- /// </summary>
- public string CurrentPriceDisplay
- {
- get
- {
- if (_currentPrice <= 0)
- {
- return "-";
- }
- return _currentPrice.ToString(FormatPrice);
- }
- }
- /// <summary>
- /// 现量
- /// </summary>
- public string CurrentVolumeDisplay
- {
- get
- {
- return GetAbbreviatedEx(_currentVolume, false);
- }
- }
- /// <summary>
- /// 时间显示
- /// </summary>
- public string DateDisplay
- {
- get
- {
- if (_date == DateTime.MinValue)
- {
- return DefaultString;
- }
- return _date.ToString("HH:mm:ss");
- }
- }
- /// <summary>
- /// 日增仓
- /// </summary>
- public string DayAddPositionsDisplay
- {
- get
- {
- return GetAbbreviated(_dayAddPositions, "N0");
- }
- }
- /// <summary>
- /// 交收日显示
- /// </summary>
- public string DeliveryDateDisplay
- {
- get
- {
- return _deliveryDate.ToString("yyyyMMdd");
- }
- }
- /// <summary>
- /// 最高显示
- /// </summary>
- public string HighDisplay
- {
- get
- {
- if (_high <= 0)
- {
- return "-";
- }
- return _high.ToString(FormatPrice);
- }
- }
- /// <summary>
- /// 涨幅
- /// </summary>
- public string IncreasePercentDisplay
- {
- get
- {
- if (_currentPrice <= 0 || LastClose <= 0)
- {
- return "-";
- }
- return IncreasePercent.ToString("P2");
- }
- }
- /// <summary>
- /// 内盘
- /// </summary>
- public string InSizeDisplay
- {
- get
- {
- return GetAbbreviated((double)_inSize);
- }
- }
- /// <summary>
- /// 昨收显示
- /// </summary>
- public string
-
- LastCloseDisplay
- {
- get
- {
- if (_lastClose <= 0)
- {
- return "-";
- }
- return _lastClose.ToString(FormatPrice);
- }
- }
- /// <summary>
- /// 涨跌显示
- /// </summary>
- public string IncreaseValueDisplay
- {
- get
- {
- if (_currentPrice <= 0 || LastClose <= 0)
- {
- return "-";
- }
- return IncreaseValue.ToString(FormatPrice);
- }
- }
- /// <summary>
- /// 昨持仓量
- /// </summary>
- public string LastPositionsDisplay
- {
- get
- {
- return GetAbbreviatedEx(_lastPositions);
- }
- }
- /// <summary>
- /// 昨结算
- /// </summary>
- public string LastSettlementDisplay
- {
- get
- {
- return _lastSettlement.ToString(FormatPrice);
- }
- }
- /// <summary>
- /// 最低显示
- /// </summary>
- public string LowDisplay
- {
- get
- {
- if (_low <= 0)
- {
- return "-";
- }
- return _low.ToString(FormatPrice);
- }
- }
- /// <summary>
- /// 流通市值显示
- /// </summary>
- public string MarketCapitalizationsDisplay
- {
- get
- {
- return GetAbbreviated((double)_marketCapitalizations);
- }
- }
- /// <summary>
- /// 流通股本
- /// </summary>
- public string NegotiableSharesDisplay
- {
- get
- {
- return GetAbbreviated((double)_negotiableShares);
- }
- }
- /// <summary>
- /// 今开显示
- /// </summary>
- public string OpenDisplay
- {
- get
- {
- if (_open <= 0)
- {
- return "-";
- }
- return _open.ToString(FormatPrice);
- }
- }
- /// <summary>
- /// 交收价格
- /// </summary>
- public string DeliveryPriceDisplay
- {
- get
- {
- return _deliveryPrice.ToString(FormatPrice);
- }
- }
- /// <summary>
- /// 外盘
- /// </summary>
- public string OutSizeDisplay
- {
- get
- {
- return GetAbbreviated((double)_outSize);
- }
- }
- /// <summary>
- /// 持仓量显示
- /// </summary>
- public string PositionsDisplay
- {
- get
- {
- return GetAbbreviatedEx(_positions);
- }
- }
- /// <summary>
- /// 市盈率
- /// </summary>
- public string PriceEarningRatioDisplay
- {
- get
- {
- return GetAbbreviated((double)_priceEarningRatio);
- }
- }
- /// <summary>
- /// 结算
- /// </summary>
- public string SettlementDisplay
- {
- get
- {
- return GetAbbreviated((double)_settlement);
- }
- }
- /// <summary>
- /// 总股本显示
- /// </summary>
- public string TotalEquityDisplay
- {
- get
- {
- return GetAbbreviated((double)_totalEquity);
- }
- }
- /// <summary>
- /// 总额
- /// </summary>
- public string TotalTurnoverDisplay
- {
- get
- {
- if (_totalTurnover == 0)
- {
- return DefaultString;
- }
- return _totalTurnover.ToString("f2");
- // return GetAbbreviated((double)_totalTurnover);
- }
- }
- /// <summary>
- /// 总量显示
- /// </summary>
- public string TotalVolumeDisplay
- {
- get
- {
- if (_totalVolume == 0)
- {
- return DefaultString;
- }
- return _totalVolume.ToString("f0");
- // return GetAbbreviated(_totalVolume);
- }
- }
- /// <summary>
- /// 总库存量
- /// </summary>
- public string InventoryDisplay
- {
- get
- {
- //if (this.GoodsParameters != null && GoodsParameters.)
- //{
- // return DefaultString;
- //}
- //return _inventory.ToString("f0");
- return GetAbbreviatedEx(_totalVolume);
- }
- }
- /// <summary>
- /// 成交额显示
- /// </summary>
- public string TradeTurnoverDisplay
- {
- get
- {
- return GetAbbreviated((double)_tradeTurnover);
- }
- }
- /// <summary>
- /// 换手率
- /// </summary>
- public string TurnoverRateDisplay
- {
- get
- {
- if (this.TradeMode != eTradeMode.TRADEMODE_BIDDING)
- {
- return "-";
- }
- if (_turnoverRate != 0)
- {
- return GetAbbreviated((double)_turnoverRate);
- }
- else
- {
- if (_lastPositions == 0)
- {
- return "100%";//DefaultString;
- }
- else
- {
- return (_totalVolume / _lastPositions ).ToString("P2");
- }
- }
- }
- }
- /// <summary>
- /// 量比显示
- /// </summary>
- public string QuantityRelativeRatioDisplay
- {
- get
- {
- return GetAbbreviated((double)_quantityRelativeRatio);
- }
- }
- /// <summary>
- /// 委比
- /// </summary>
- public string WeiBiDisplay
- {
- get
- {
- return GetAbbreviated((double)WeiBi);
- }
- }
- /// <summary>
- /// 委差
- /// </summary>
- public string WeiChaDisplay
- {
- get
- {
- return GetAbbreviated((double)WeiCha);
- }
- }
- /// <summary>
- /// 格式化数据字符串
- /// </summary>
- public string FormatPrice
- {
- get
- {
- if (this.GoodsParameters == null)
- {
- return "F0";
- }
- else
- {
- if (this.GoodsParameters.HqExchFigures > 0 && this.GoodsParameters.HqExchFigures < 20)
- {
- return "F" + this.GoodsParameters.HqExchFigures;
- }
- else
- {
- return "F0";
- }
- }
- }
- }
- private decimal _raisesPrice;
- /// <summary>
- /// 涨停价
- /// </summary>
- public decimal RaisesPrice
- {
- get { return _raisesPrice; }
- set
- {
- Set(() => RaisesPrice, ref _raisesPrice, value);
- RaisePropertyChanged(() => RaisesPriceDisplay);
- RaisePropertyChanged(() => RaisesPriceColor);
- }
- }
- private decimal _fallsPrice;
- /// <summary>
- /// 跌停价
- /// </summary>
- public decimal FallsPrice
- {
- get { return _fallsPrice; }
- set
- {
- Set(() => FallsPrice, ref _fallsPrice, value);
- RaisePropertyChanged(() => FallsPriceDisplay);
- RaisePropertyChanged(() => FallsPriceColor);
- }
- }
-
- /// <summary>
- /// 发行总量
- /// </summary>
- public decimal IssueTotal
- {
- get; set;
- }
-
- /// <summary>
- /// 涨停价-显示字符
- /// </summary>
- public string RaisesPriceDisplay
- {
- get {
- //return (RaisesPrice == 0 || (this.TradeMode == eTradeMode.TRADEMODE_BIDDINGMARKETMAKE && this.IsQuoteValid)) ? "-" : RaisesPrice.ToString(FormatPrice);
- return (RaisesPrice == 0) ? "-" : RaisesPrice.ToString(FormatPrice);
- }
- }
- /// <summary>
- /// 跌停价-显示字符
- /// </summary>
- public string FallsPriceDisplay
- {
- //get { return (FallsPrice == 0 || (this.TradeMode == eTradeMode.TRADEMODE_BIDDINGMARKETMAKE&&this.IsQuoteValid)) ? "-" : FallsPrice.ToString(FormatPrice); }
- get { return (FallsPrice == 0) ? "-" : FallsPrice.ToString(FormatPrice); }
- }
- #endregion Public Properties
- #endregion Properties
- }
- }
|