| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056 |
- using GalaSoft.MvvmLight;
- using Muchinfo.MTPClient.Data.Helper;
- using Muchinfo.MTPClient.Data.Model;
- using Muchinfo.MTPClient.Resources;
- using System.Windows;
- using System.Windows.Media;
- namespace Muchinfo.MTPClient.Data.DTO
- {
- public class QuoteGoodsDTO : ObservableObject
- {
- #region Propertities
- /// <summary>
- /// 获取和设置标签(获取行情时用)
- /// </summary>
- public string Symbol
- {
- get
- {
- return _exchangeCode.PadLeft(3, ' ') + _goodsCode.PadLeft(6, ' ');
- }
- }
- /// <summary>
- /// ExchangeCode
- /// </summary>
- private string _exchangeCode;
- /// <summary>
- /// Sets and gets the ExchangeCode property.
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- public string ExchHqCode
- {
- get
- {
- return _exchangeCode;
- }
- set
- {
- Set(() => ExchHqCode, ref _exchangeCode, value);
- }
- }
- /// <summary>
- /// GoodsCode
- /// </summary>
- private string _goodsCode;
- /// <summary>
- /// Sets and gets the GoodsCode property.
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- public string GoodsCode
- {
- get
- {
- return _goodsCode;
- }
- set
- {
- Set(() => GoodsCode, ref _goodsCode, value);
- }
- }
- public string GoodsHqCode { get; set; }
- /// <summary>
- /// ShowIndex
- /// </summary>
- private int? _showIndex;
- /// <summary>
- /// Sets and gets the ShowIndex property.
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- public int? ShowIndex
- {
- get
- {
- return _showIndex;
- }
- set
- {
- Set(() => ShowIndex, ref _showIndex, value);
- }
- }
- /// <summary>
- /// DateDisplay
- /// </summary>
- private string _dateDisplay;
- /// <summary>
- /// Sets and gets the DateDisplay property.
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- public string DateDisplay
- {
- get
- {
- return _dateDisplay;
- }
- set
- {
- Set(() => DateDisplay, ref _dateDisplay, value);
- }
- }
- /// <summary>
- /// Name
- /// </summary>
- private string _name;
- /// <summary>
- /// Sets and gets the Name property.
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- public string Name
- {
- get
- {
- // todo:商品字称最大长度
- //int MaxLen = 2;
- //if (_name.Length > MaxLen)
- //{
- // return _name.Substring(0, MaxLen) + "...";
- //}
- return _name;
- }
- set
- {
- Set(() => Name, ref _name, value);
- }
- }
- private string _AgreeUnitDisplay;
- /// <summary>
- /// 合约单位显示
- /// </summary>
- public string AgreeUnitDisplay
- {
- get { return _AgreeUnitDisplay; }
- set { _AgreeUnitDisplay = value; }
- }
- /// <summary>
- /// AskPriceDisplay
- /// </summary>
- private string _askPriceDisplay;
- /// <summary>
- /// Sets and gets the AskPriceDisplay property.
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- public string AskPriceDisplay
- {
- get
- {
- return _askPriceDisplay;
- }
- set
- {
- Set(() => AskPriceDisplay, ref _askPriceDisplay, value);
- }
- }
- /// <summary>
- /// AskPriceColor
- /// </summary>
- private Brush _askPriceColor;
- /// <summary>
- /// Sets and gets the AskPriceColor property.
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- public Brush AskPriceColor
- {
- get
- {
- return _askPriceColor;
- }
- set
- {
- Set(() => AskPriceColor, ref _askPriceColor, value);
- }
- }
- /// <summary>
- /// BidPriceDisplay
- /// </summary>
- private string _bidPriceDisplay;
- /// <summary>
- /// Sets and gets the BidPriceDisplay property.
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- public string BidPriceDisplay
- {
- get
- {
- return _bidPriceDisplay;
- }
- set
- {
- Set(() => BidPriceDisplay, ref _bidPriceDisplay, value);
- }
- }
- private string _bidVolumeDisplay = string.Empty;
- /// <summary>
- /// 买量显示
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- public string BidVolumeDisplay
- {
- get
- {
- return _bidVolumeDisplay;
- }
- set
- {
- Set(() => BidVolumeDisplay, ref _bidVolumeDisplay, value);
- }
- }
- private string _askVolumeDisplay = string.Empty;
- /// <summary>
- /// 卖量显示
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- public string AskVolumeDisplay
- {
- get
- {
- return _askVolumeDisplay;
- }
- set
- {
- Set(() => AskVolumeDisplay, ref _askVolumeDisplay, value);
- }
- }
- /// <summary>
- /// BidPriceColor
- /// </summary>
- private Brush _bidPriceColor;
- /// <summary>
- /// Sets and gets the BidPriceColor property.
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- public Brush BidPriceColor
- {
- get
- {
- return _bidPriceColor;
- }
- set
- {
- Set(() => BidPriceColor, ref _bidPriceColor, value);
- }
- }
- /// <summary>
- /// OpenDisplay
- /// </summary>
- private string _openDisplay;
- /// <summary>
- /// Sets and gets the OpenDisplay property.
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- public string OpenDisplay
- {
- get
- {
- return _openDisplay;
- }
- set
- {
- Set(() => OpenDisplay, ref _openDisplay, value);
- }
- }
- /// <summary>
- /// OpenColor
- /// </summary>
- private Brush _openColor;
- /// <summary>
- /// Sets and gets the OpenColor property.
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- public Brush OpenColor
- {
- get
- {
- return _openColor;
- }
- set
- {
- Set(() => OpenColor, ref _openColor, value);
- }
- }
- /// <summary>
- /// LastCloseDisplay
- /// </summary>
- private string _lastCloseDisplay;
- /// <summary>
- /// Sets and gets the LastCloseDisplay property.
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- public string LastCloseDisplay
- {
- get
- {
- return _lastCloseDisplay;
- }
- set
- {
- Set(() => LastCloseDisplay, ref _lastCloseDisplay, value);
- }
- }
- /// <summary>
- /// LowDisplay
- /// </summary>
- private string _lowDisplay;
- /// <summary>
- /// Sets and gets the LowDisplay property.
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- public string LowDisplay
- {
- get
- {
- return _lowDisplay;
- }
- set
- {
- Set(() => LowDisplay, ref _lowDisplay, value);
- }
- }
- /// <summary>
- /// LowColor
- /// </summary>
- private Brush _lowColor;
- /// <summary>
- /// Sets and gets the LowColor property.
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- public Brush LowColor
- {
- get
- {
- return _lowColor;
- }
- set
- {
- Set(() => LowColor, ref _lowColor, value);
- }
- }
- /// <summary>
- /// HighDisplay
- /// </summary>
- private string _highDisplay;
- /// <summary>
- /// Sets and gets the HighDisplay property.
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- public string HighDisplay
- {
- get
- {
- return _highDisplay;
- }
- set
- {
- Set(() => HighDisplay, ref _highDisplay, value);
- }
- }
- /// <summary>
- /// HighColor
- /// </summary>
- private Brush _highColor;
- /// <summary>
- /// Sets and gets the HighColor property.
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- public Brush HighColor
- {
- get
- {
- return _highColor;
- }
- set
- {
- Set(() => HighColor, ref _highColor, value);
- }
- }
- /// <summary>
- /// IncreasePercentDisplay
- /// </summary>
- private string _increasePercentDisplay;
- /// <summary>
- /// Sets and gets the IncreasePercentDisplay property.
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- public string IncreasePercentDisplay
- {
- get
- {
- return _increasePercentDisplay;
- }
- set
- {
- Set(() => IncreasePercentDisplay, ref _increasePercentDisplay, value);
- }
- }
- /// <summary>
- /// IncreasePercentColor
- /// </summary>
- private Brush _increasePercentColor;
- /// <summary>
- /// Sets and gets the IncreasePercentColor property.
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- public Brush IncreasePercentColor
- {
- get
- {
- return _increasePercentColor;
- }
- set
- {
- Set(() => IncreasePercentColor, ref _increasePercentColor, value);
- }
- }
- /// <summary>
- /// IncreaseValueDisplay
- /// </summary>
- private string _increaseValueDisplay;
- /// <summary>
- /// Sets and gets the IncreaseValueDisplay property.
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- public string IncreaseValueDisplay
- {
- get
- {
- return _increaseValueDisplay;
- }
- set
- {
- Set(() => IncreaseValueDisplay, ref _increaseValueDisplay, value);
- }
- }
- /// <summary>
- /// IncreaseValueColor
- /// </summary>
- private Brush _increaseValueColor;
- /// <summary>
- /// Sets and gets the IncreaseValueColor property.
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- public Brush IncreaseValueColor
- {
- get
- {
- return _increaseValueColor;
- }
- set
- {
- Set(() => IncreaseValueColor, ref _increaseValueColor, value);
- }
- }
- private Brush _defaultColor;
- /// <summary>
- /// 默认颜色
- /// </summary>
- public Brush DefaultColor
- {
- get
- {
- return _defaultColor;
- }
- set { Set(() => DefaultColor, ref _defaultColor, value); }
- }
- private Brush _goodsCodeColor;
- /// <summary>
- /// 商品代码颜色
- /// </summary>
- public Brush GoodsCodeColor
- {
- get
- {
- return _goodsCodeColor;
- }
- set { Set(() => GoodsCodeColor, ref _goodsCodeColor, value); }
- }
- private Brush _nameColor;
- /// <summary>
- /// 商品名称颜色
- /// </summary>
- public Brush NameColor
- {
- get
- {
- return _nameColor;
- }
- set { Set(() => NameColor, ref _nameColor, value); }
- }
- private decimal _lot;
- /// <summary>
- /// 商品下单数量-大字报价牌用
- /// </summary>
- /// <value>The lot.</value>
- public decimal Lot
- {
- get
- {
- return _lot;
- }
- set
- {
- Set(() => Lot, ref _lot, value);
- }
- }
- private GoodsParameters _goodsParameters;
- /// <summary>
- /// 查询回来的商品参数
- /// </summary>
- public GoodsParameters GoodsParameters
- {
- get
- {
- return _goodsParameters;
- }
- set
- {
- _goodsParameters = value;
- }
- }
- /// <summary>
- /// CurrentPriceDisplay
- /// </summary>
- private string _currentPriceDisplay;
- /// <summary>
- /// Sets and gets the CurrentPriceDisplay property.
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- public string CurrentPriceDisplay
- {
- get
- {
- return _currentPriceDisplay;
- }
- set
- {
- Set(() => CurrentPriceDisplay, ref _currentPriceDisplay, value);
- }
- }
- /// <summary>
- /// CurrentPriceColor
- /// </summary>
- private Brush _currentPriceColor;
- /// <summary>
- /// Sets and gets the CurrentPriceColor property.
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- public Brush CurrentPriceColor
- {
- get
- {
- return _currentPriceColor;
- }
- set
- {
- Set(() => CurrentPriceColor, ref _currentPriceColor, value);
- }
- }
- /// <summary>
- /// VolumeDisplay
- /// </summary>
- private string _currentvolumeDisplay;
- /// <summary>
- /// Sets and gets the VolumeDisplay property.
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- public string CurrentVolumeDisplay
- {
- get
- {
- return _currentvolumeDisplay;
- }
- set
- {
- Set(() => CurrentVolumeDisplay, ref _currentvolumeDisplay, value);
- }
- }
- /// <summary>
- /// RaisesPriceDisplay
- /// </summary>
- private string _raisesPriceDisplay;
- /// <summary>
- /// 涨停价-显示字符
- /// </summary>
- public string RaisesPriceDisplay
- {
- get
- {
- return _raisesPriceDisplay;
- }
- set
- {
- Set(() => RaisesPriceDisplay, ref _raisesPriceDisplay, value);
- }
- }
- /// <summary>
- /// 涨停价颜色
- /// </summary>
- private Brush _raisesPriceColor;
- /// <summary>
- /// 涨停价颜色
- /// </summary>
- /// <value>The color of the raises price.</value>
- public Brush RaisesPriceColor
- {
- get
- {
- return _raisesPriceColor;
- }
- set
- {
- Set(() => RaisesPriceColor, ref _raisesPriceColor, value);
- }
- }
- /// <summary>
- /// FallsPriceDisplay
- /// </summary>
- private string _fallsPriceDisplay;
- /// <summary>
- /// 跌停价-显示字符
- /// </summary>
- public string FallsPriceDisplay
- {
- get
- {
- return _fallsPriceDisplay;
- }
- set
- {
- Set(() => FallsPriceDisplay, ref _fallsPriceDisplay, value);
- }
- }
- private string _turnoverRateDisplay;
- public string TurnoverRateDisplay
- {
- get { return _turnoverRateDisplay; }
- set { Set(() => TurnoverRateDisplay, ref _turnoverRateDisplay, value); }
- }
- /// <summary>
- /// 跌停价颜色
- /// </summary>
- private Brush _fallsPriceColor;
- /// <summary>
- /// 跌停价颜色
- /// </summary>
- public Brush FallsPriceColor
- {
- get
- {
- return _fallsPriceColor;
- }
- set
- {
- Set(() => FallsPriceColor, ref _fallsPriceColor, value);
- }
- }
- /// <summary>
- /// IsAskPriceBorder
- /// </summary>
- private bool _isAskPriceBorder;
- /// <summary>
- /// Sets and gets the IsAskPriceBorder property.
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- public bool IsAskPriceBorder
- {
- get
- {
- return _isAskPriceBorder;
- }
- set
- {
- Set(() => IsAskPriceBorder, ref _isAskPriceBorder, value);
- }
- }
- /// <summary>
- /// IsCurrentPriceBorder
- /// </summary>
- private bool _isCurrentPriceBorder;
- /// <summary>
- /// Sets and gets the IsCurrentPriceBorder property.
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- public bool IsCurrentPriceBorder
- {
- get
- {
- return _isCurrentPriceBorder;
- }
- set
- {
- Set(() => IsCurrentPriceBorder, ref _isCurrentPriceBorder, value);
- }
- }
- /// <summary>
- /// IsBidPriceBorder
- /// </summary>
- private bool _isBidPriceBorder;
- /// <summary>
- /// Sets and gets the IsBidPriceBorder property.
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- public bool IsBidPriceBorder
- {
- get
- {
- return _isBidPriceBorder;
- }
- set
- {
- Set(() => IsBidPriceBorder, ref _isBidPriceBorder, value);
- }
- }
- private decimal _increaseValue;
- /// <summary>
- /// 涨跌(现价-昨收)
- /// </summary>
- /// <value>The _increaseValue.</value>
- public decimal IncreaseValue
- {
- get
- {
- return _increaseValue;
- }
- set
- {
- Set(() => IncreaseValue, ref _increaseValue, value);
- }
- }
- /// <summary>
- /// 市场ID
- /// </summary>
- public long GoodsGroupId { get; set; }
- private decimal _minOpenNumber;
- /// <summary>
- /// 最小建仓数量
- /// </summary>
- public decimal MinOpenNumber
- {
- get
- {
- return _minOpenNumber;
- }
- set
- {
- Set(() => MinOpenNumber, ref _minOpenNumber, value);
- }
- }
- public uint GoodsId { get; set; }
- /// <summary>
- /// 交易端模式
- /// </summary>
- public eTradeMode TradeMode { get; set; }
- private Visibility _mySelectedFlagVisibility = Visibility.Collapsed;
- /// <summary>
- /// 我的自选标记是否显示
- /// </summary>
- /// <value>My selected flag visibility.</value>
- public Visibility MySelectedFlagVisibility
- {
- get
- {
- return _mySelectedFlagVisibility;
- }
- set
- {
- Set(() => MySelectedFlagVisibility, ref _mySelectedFlagVisibility, value);
- }
- }
- private string _totalVolumeDisplay;
- /// <summary>
- /// 总量
- /// </summary>
- public string TotalVolumeDisplay
- {
- get { return _totalVolumeDisplay; }
- set { Set(() => TotalVolumeDisplay, ref _totalVolumeDisplay, value); }
- }
- private string _totalTurnoverDisplay;
- /// <summary>
- /// 总额
- /// </summary>
- public string TotalTurnoverDisplay
- {
- get { return _totalTurnoverDisplay; }
- set { Set(() => TotalTurnoverDisplay, ref _totalTurnoverDisplay, value); }
- }
- private string _positionsDisplay;
- /// <summary>
- /// 持仓量
- /// </summary>
- public string PositionsDisplay
- {
- get { return _positionsDisplay; }
- set { Set(() => PositionsDisplay, ref _positionsDisplay, value); }
- }
- /// <summary>
- /// 显示代码名称
- /// </summary>
- //public string CodeNameDisplay
- //{
- // get
- // {
- // return string.Format("{0}:{1}", GoodsCode, Name);
- // }
- //}
- private string _lastPositions;
- /// <summary>
- /// 昨持仓量
- /// </summary>
- public string LastPositionsDisplay
- {
- get { return _lastPositions; }
- set { Set(() => LastPositionsDisplay, ref _lastPositions, value); }
- }
- private string _inventoryDisplay;
- /// <summary>
- /// 库存量
- /// </summary>
- public string InventoryDisplay
- {
- get { return _inventoryDisplay; }
- set { Set(() => InventoryDisplay, ref _inventoryDisplay, value); }
- }
- /// <summary>
- /// 显示代码名称
- /// </summary>
- public string CodeNameDisplay
- {
- get
- {
- return string.Format("{0}:{1}", GoodsCode, Name);
- }
- }
- #endregion
- #region Constructor
- /// <summary>
- /// Initializes a new instance of the <see cref="QuoteGoodsDTO"/> class.
- /// </summary>
- /// <param name="goods">The goods.</param>
- public QuoteGoodsDTO(QuoteGoods goods)
- {
- if (goods == null) return;
- UpdateFromQuoteGoods(goods, false);
- }
- #endregion
- #region Methods
- /// <summary>
- /// 根据QuoteGoods更新实例
- /// </summary>
- /// <param name="goods">The goods.</param>
- /// <param name="isUpdate">if set to <c>true</c> [is update].</param>
- /// <returns>QuoteGoodsDTO.</returns>
- public void UpdateFromQuoteGoods(QuoteGoods goods, bool isUpdate = true)
- {
- if (goods == null) return;
- if (!isUpdate)
- {
- ExchHqCode = goods.ExchHqCode;
- GoodsCode = goods.GoodsCode;
- GoodsHqCode = goods.GoodsHqCode;
- Name = goods.Name;
- ShowIndex = goods.ShowIndex;
- if (goods.GoodsParameters != null)
- {
- GoodsGroupId = goods.GoodsParameters.SortId;
- Lot = MinOpenNumber;
- TradeMode = goods.TradeMode;
- GoodsId = goods.GoodsId;
- }
- }
- DateDisplay = goods.DateDisplay;
- AskPriceDisplay = goods.AskPriceDisplay;
- AskVolumeDisplay = goods.AskVolumeDisplay;
- AskPriceColor = goods.AskPriceColor;
- BidPriceDisplay = goods.BidPriceDisplay;
- BidVolumeDisplay = goods.BidVolumeDisplay;
- BidPriceColor = goods.BidPriceColor;
- CurrentPriceColor = goods.CurrentPriceColor;
- CurrentPriceDisplay = goods.CurrentPriceDisplay;
- OpenDisplay = goods.OpenDisplay;
- OpenColor = goods.OpenColor;
- HighColor = goods.HighColor;
- HighDisplay = goods.HighDisplay;
- LowColor = goods.LowColor;
- LowDisplay = goods.LowDisplay;
- LastCloseDisplay = goods.LastCloseDisplay;
- IncreasePercentColor = goods.IncreasePercentColor;
- IncreasePercentDisplay = goods.IncreasePercentDisplay;
- IncreaseValueDisplay = goods.IncreaseValueDisplay;
- IncreaseValueColor = goods.IncreaseValueColor;
- DefaultColor = goods.DefaultColor;
- GoodsCodeColor = goods.GoodsCodeColor;
- NameColor = goods.NameColor;
- CurrentVolumeDisplay = goods.CurrentVolumeDisplay;
- RaisesPriceDisplay = goods.RaisesPriceDisplay;
- RaisesPriceColor = goods.RaisesPriceColor;
- FallsPriceDisplay = goods.FallsPriceDisplay;
- FallsPriceColor = goods.FallsPriceColor;
- // Lot = goods.Lot;
- //GoodsParameters = goods.GoodsParameters;
- AgreeUnitDisplay = goods.AgreeUnitDisplay;
- TotalVolumeDisplay = goods.TotalVolumeDisplay;
- TotalTurnoverDisplay = goods.TotalTurnoverDisplay;
- InventoryDisplay = goods.InventoryDisplay;
- PositionsDisplay = goods.PositionsDisplay;
- TurnoverRateDisplay = goods.TurnoverRateDisplay;
- IsAskPriceBorder = goods.IsAskPriceBorder;
- IsBidPriceBorder = goods.IsCurrentPriceBorder;
- IsCurrentPriceBorder = goods.IsCurrentPriceBorder;
- IncreaseValue = (goods.CurrentPrice == 0) ? 0 : goods.IncreaseValue;
- }
- #endregion
- #region "P+X分组属性"
- /// <summary>
- /// 交割商品名称(关联交易商品 存放交割商品名称)
- /// </summary>
- public string DeliveryGoodsName { get; set; }
- /// <summary>
- /// 仅用于P+X交割时表示P方还是X, X为主商品 true:X, false: P
- /// </summary>
- public bool IsMain { get; set; }
- /// <summary>
- /// 以P为主显示
- /// </summary>
- /// <value>The p and x display.</value>
- public string PAndXDisplay
- {
- get
- {
- if (IsMain) return Client_Resource.Delivery_PDisplay;
- return Client_Resource.Delivery_XDisplay;
- }
- }
- /// <summary>
- /// P,X的tooltip, 以P为主显示
- /// </summary>
- /// <value>The p and x tool tip.</value>
- public string PAndXToolTip
- {
- get
- {
- if (IsMain) return Client_Resource.Delivery_PDesc;
- return Client_Resource.Delivery_XDesc;
- }
- }
- /// <summary>
- /// 商品列表行背景色
- /// </summary>
- /// <value>The row background.</value>
- public SolidColorBrush RowBackground
- {
- get
- {
- if (IsMain) return ResourceHelper.GetFromResource<SolidColorBrush>("QuoteRowBackgroundBrushP");
- return new SolidColorBrush(Colors.Transparent);
- }
- }
- #endregion
- }
- }
|