QuotePriceViewModel.cs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726
  1. using System.Collections.ObjectModel;
  2. using System.Windows.Controls;
  3. using System.Windows.Input;
  4. using GalaSoft.MvvmLight;
  5. using GalaSoft.MvvmLight.Command;
  6. using GalaSoft.MvvmLight.Ioc;
  7. using Muchinfo.MTPClient.Analysis.Views.PriceCard;
  8. using Muchinfo.MTPClient.Data;
  9. using Muchinfo.MTPClient.Data.Enums;
  10. using Muchinfo.MTPClient.Data.Model;
  11. using Muchinfo.MTPClient.Data.Model.Analysis;
  12. using Muchinfo.MTPClient.Data.Quote;
  13. using Muchinfo.MTPClient.Infrastructure.Cache;
  14. using Muchinfo.MTPClient.Infrastructure.Helpers;
  15. using Muchinfo.MTPClient.Infrastructure.Utilities;
  16. using Muchinfo.MTPClient.IService;
  17. using Muchinfo.PC.Common.Extensions;
  18. using System;
  19. using System.Collections.Generic;
  20. using System.Linq;
  21. //----------------------------------------------------------------
  22. //Module Name: $safeprojectname$
  23. //Purpose:
  24. //CopyRight: Muchinfo
  25. //History:
  26. //----------------------------------------------------------------
  27. //DateTime 2015/12/12 14:10:10
  28. //Author
  29. //Description Create
  30. //----------------------------------------------------------------
  31. using System.Threading.Tasks;
  32. using System.Windows;
  33. namespace Muchinfo.MTPClient.Analysis.ViewModels
  34. {
  35. public class QuotePriceViewModel : ViewModelBase, IDisposable
  36. {
  37. public IQuoteDataService _iQuoteDataService;
  38. // private List<SubPenData> _allSource = new List<SubPenData>();
  39. private QuoteGoods _currentGoods; //当前显示的商品
  40. private short _tickCount = 100;
  41. private FrameworkElement _goodsCategory;
  42. private static object _lockObject = new object();
  43. /// <summary>
  44. /// 商品分类显示盘面
  45. /// </summary>
  46. public FrameworkElement GoodsCategory
  47. {
  48. get
  49. {
  50. return _goodsCategory;
  51. }
  52. set { Set(() => GoodsCategory, ref _goodsCategory, value); }
  53. }
  54. /// <summary>
  55. /// 报价牌中的商品
  56. /// </summary>
  57. public QuoteGoods Goods
  58. {
  59. get
  60. {
  61. return _currentGoods;
  62. }
  63. set
  64. {
  65. bool isupdate = _currentGoods == null || !_currentGoods.Equals(value);
  66. Set(() => Goods, ref _currentGoods, value);
  67. if (value != null)
  68. {
  69. UiInitQuotePriceView( );
  70. }
  71. if (isupdate)
  72. {
  73. UpdateCommissions(_currentGoods);
  74. InitData();
  75. }
  76. RaisePropertyChanged(()=> IsQuoteQueueVbs);
  77. }
  78. }
  79. /// <summary>
  80. /// 是否显示大力士
  81. /// </summary>
  82. public bool IsQuoteQueueVbs
  83. {
  84. get
  85. {
  86. if (_currentGoods == null)
  87. return false;
  88. switch (_currentGoods.TradeMode)
  89. {
  90. case eTradeMode.TRADEMODE_MARKETMAKE:
  91. return false; ////做市不显示
  92. case eTradeMode.TRADEMODE_BIDDING:
  93. var showType = (QueueShowType) ApplicationParameter.QuoteQueueInfo;
  94. return showType == QueueShowType.Bid || showType == QueueShowType.All;
  95. case eTradeMode.TRADEMODE_BIDDINGMARKETMAKE:
  96. var showType1 = (QueueShowType) ApplicationParameter.QuoteQueueInfo;
  97. return showType1 == QueueShowType.BidMake || showType1 == QueueShowType.All;
  98. default:
  99. return false;
  100. }
  101. }
  102. }
  103. #region 是否显示买卖更多=》点选市场才显示
  104. /// <summary>
  105. /// 是否显示买卖更多=》点选市场才显示
  106. /// </summary>
  107. public Visibility IsVisibility_More
  108. {
  109. get
  110. {
  111. if (Goods.TradeMode == eTradeMode.TRADEMODE_LISTING_SELECT)
  112. {
  113. return Visibility.Visible;
  114. }
  115. else
  116. {
  117. return Visibility.Collapsed;
  118. }
  119. }
  120. }
  121. #endregion
  122. #region 是否显示间隔线-分割买卖五档
  123. /// <summary>
  124. /// 是否显示间隔线-分割买卖五档
  125. /// </summary>
  126. public Visibility IsVisibility_Line
  127. {
  128. get
  129. {
  130. if (Goods.TradeMode != eTradeMode.TRADEMODE_LISTING_SELECT)
  131. {
  132. return Visibility.Visible;
  133. }
  134. else
  135. {
  136. return Visibility.Collapsed;
  137. }
  138. }
  139. }
  140. #endregion
  141. private RelayCommand<string> _getAskCommissionCommand;
  142. /// <summary>
  143. /// 卖五档 更多
  144. /// </summary>
  145. public RelayCommand<string> GetAskCommissionCommand
  146. {
  147. get
  148. {
  149. return _getAskCommissionCommand
  150. ?? (_getAskCommissionCommand = new RelayCommand<string>(
  151. p =>
  152. {
  153. var SearchParameters = new SearchCommissionsParameter();
  154. SearchParameters.BuyOrSell = Direction.Ask;
  155. SearchParameters.CurrentContenModel = TabContetMode.HistoryCommissions;
  156. SearchParameters.GoodsId = Goods.GoodsId;
  157. // MessengerHelper.DefaultSend<TabContetMode>(TabContetMode.HistoryCommissions, MessengerTokens.HistoryCommissionsTab);
  158. //MessengerHelper.DefaultSend<bool>(false, MessengerTokens.IsShowSellCommondBtn);
  159. MessengerHelper.DefaultSend<SearchCommissionsParameter>(SearchParameters, MessengerTokens.HistoryCommissionsTab);
  160. }));
  161. }
  162. }
  163. private RelayCommand<string> _getBidCommissionCommand;
  164. /// <summary>
  165. /// 买五档 更多
  166. /// </summary>
  167. public RelayCommand<string> GetBidCommissionCommand
  168. {
  169. get
  170. {
  171. return _getBidCommissionCommand
  172. ?? (_getBidCommissionCommand = new RelayCommand<string>(
  173. p =>
  174. {
  175. var SearchParameters = new SearchCommissionsParameter();
  176. SearchParameters.BuyOrSell = Direction.Bid;
  177. SearchParameters.CurrentContenModel = TabContetMode.HistoryCommissions;
  178. SearchParameters.GoodsId = Goods.GoodsId;
  179. // MessengerHelper.DefaultSend<TabContetMode>(TabContetMode.HistoryCommissions, MessengerTokens.HistoryCommissionsTab);
  180. // MessengerHelper.DefaultSend<bool>(false, MessengerTokens.IsShowBuyCommondBtn);
  181. MessengerHelper.DefaultSend<SearchCommissionsParameter>(SearchParameters, MessengerTokens.HistoryCommissionsTab);
  182. }));
  183. }
  184. }
  185. private bool _isBidGoods;
  186. /// <summary>
  187. /// 竞价商品显示内容
  188. /// </summary>
  189. public bool IsBidGoods
  190. {
  191. get { return _isBidGoods; }
  192. set
  193. {
  194. Set(() => IsBidGoods, ref _isBidGoods, value);
  195. }
  196. }
  197. private double _showCount;
  198. /// <summary>
  199. /// 显示数量
  200. /// </summary>
  201. public double ShowCount
  202. {
  203. get { return _showCount; }
  204. set { _showCount = value; }
  205. }
  206. private bool _isBusy;
  207. /// <summary>
  208. /// 显示忙等待
  209. /// </summary>
  210. public bool IsBusy
  211. {
  212. get { return _isBusy; }
  213. set { Set(() => IsBusy, ref _isBusy, value); }
  214. }
  215. private List<SubPenData> _listSubSource=new List<SubPenData>();
  216. private ObservableCollection<SubPenData> _dataSource=new ObservableCollection<SubPenData>();
  217. /// <summary>
  218. /// 分笔数据
  219. /// </summary>
  220. public ObservableCollection<SubPenData> DataSource
  221. {
  222. get { return _dataSource; }
  223. set { Set(() => DataSource, ref _dataSource, value); }
  224. }
  225. public QuotePriceViewModel()
  226. {
  227. _iQuoteDataService = SimpleIoc.Default.GetInstance<IQuoteDataService>();
  228. if (ApplicationParameter.QuoteTickCount > 0)
  229. {
  230. _tickCount = ApplicationParameter.QuoteTickCount;
  231. }
  232. }
  233. public void TaskInitQuotePriceView(QuoteTradePlan tradePlan,QuoteGoods goods)
  234. {
  235. //#if DEBUG
  236. // DataSource = new ObservableCollection<SubPenData>();
  237. // int count = 60;
  238. // Random random=new Random(ApplicationParameter.ServerTimeNow.Millisecond);
  239. // for (int i = 0; i < count; i++)
  240. // {
  241. // var penData = new SubPenData(Goods.GoodsParameters.HqExchFigures);
  242. // penData.Time = ApplicationParameter.ServerTimeNow.AddMinutes(-count + i);
  243. // penData.Price = random.Next(4000, 4500);
  244. // penData.CompleteQte = random.Next(20, 100);
  245. // DataSource.Add(penData);
  246. // }
  247. // ////累计实时行情
  248. // RegReadTimeQuote();
  249. //#else
  250. Goods = goods;
  251. if (tradePlan != null &&tradePlan.OpenCloseDates!=null&& tradePlan.OpenCloseDates.Any())
  252. {
  253. DateTime openDate = ApplicationParameter.ServerTimeNow.Date,
  254. closeDate = ApplicationParameter.ServerTimeNow.Date.AddHours(24);
  255. openDate = tradePlan.OpenCloseDates[0].OpenDate;
  256. closeDate = tradePlan.OpenCloseDates[tradePlan.OpenCloseDates.Count - 1].CloseDate;
  257. //IsBusy = true; //暂时将加载状态条去掉,后续开启
  258. _iQuoteDataService.GetHistoryCycleData(Goods, CycleType.Tik, openDate, closeDate, _tickCount, QueryTikSuccess, QueryTikError);
  259. }
  260. //#endif
  261. }
  262. /// <summary>
  263. /// 查询历史Tik数据
  264. /// </summary>
  265. /// <param name="historyCycle">历史Tik数据</param>
  266. public void QueryTikSuccess(GoodsHistoryCycle historyCycle)
  267. {
  268. IsBusy = false;
  269. if (historyCycle != null && historyCycle.Symbol.ToUpper() == _currentGoods.Symbol.ToUpper()) ///当前商品是否一致
  270. {
  271. if (historyCycle.SubDataPoints != null && historyCycle.SubDataPoints.Any())
  272. {
  273. // 任务 #90594
  274. _listSubSource = historyCycle.SubDataPoints.ToList().Where(z=>z.CompleteQte > 0).ToList();
  275. //todo:滚动到最后一条数据
  276. MessengerHelper.DefaultSend<QuotePriceViewModel>(this, MessengerTokens.UpdateTik);
  277. }
  278. }
  279. ////累计实时行情
  280. RegReadTimeQuote();
  281. }
  282. #region 大力士
  283. private Commission _currentCommission;
  284. /// <summary>
  285. /// 当前选择的五档
  286. /// </summary>
  287. public Commission CurrentCommission
  288. {
  289. get { return _currentCommission; }
  290. set
  291. {
  292. Set(() => CurrentCommission, ref _currentCommission, value);
  293. AnalysisPackage(_currentCommission);
  294. }
  295. }
  296. private List<EntructInfo> _entructInfos;
  297. /// <summary>
  298. /// 显示委托信息列表
  299. /// </summary>
  300. public List<EntructInfo> EntructInfos
  301. {
  302. get { return _entructInfos; }
  303. set { Set(() => EntructInfos, ref _entructInfos, value); }
  304. }
  305. /// <summary>
  306. /// 委托信息显示解析(大利市)
  307. /// </summary>
  308. private void AnalysisPackage(Commission commission)
  309. {
  310. var entructInfos = new List<EntructInfo>();
  311. if (_currentGoods != null && commission != null)
  312. {
  313. var askBidQueue = commission.Direction == Direction.Ask
  314. ? _currentGoods.AskQueueInfo
  315. : _currentGoods.BidQueueInfo;
  316. if (!string.IsNullOrWhiteSpace(askBidQueue))
  317. {
  318. string[] queueStrings = askBidQueue.Split(';');
  319. if (queueStrings.Length >= (commission.Index - 1)) ////分解5档
  320. {
  321. var accountsOrder = queueStrings[commission.Index - 1];
  322. if (!string.IsNullOrWhiteSpace(accountsOrder))
  323. {
  324. string[] dataVals = accountsOrder.Split(',');
  325. for (int i = 0; i < dataVals.Length; i += 2)
  326. {
  327. var entruct = new EntructInfo();
  328. entruct.AccountCode = dataVals[i];
  329. if (i + 1 < dataVals.Length)
  330. {
  331. entruct.Qty = dataVals[i + 1];
  332. }
  333. entructInfos.Add(entruct);
  334. }
  335. }
  336. }
  337. }
  338. }
  339. EntructInfos = entructInfos;
  340. }
  341. #endregion
  342. public void QueryTikError(ErrorEntity error)
  343. {
  344. IsBusy = false;
  345. ////累计实时行情
  346. RegReadTimeQuote();
  347. LogInfoHelper.WriteInfo(string.Format("请求分笔数据:{0}({1})", error.ReturnCode, error.ReturnDesc));
  348. }
  349. /// <summary>
  350. /// 更新商品
  351. /// </summary>
  352. /// <param name="goods">商品信息</param>
  353. public void UpdateGoods(QuoteGoods goods)
  354. {
  355. Goods = goods;
  356. _listSubSource.Clear();
  357. DataSource.Clear();
  358. }
  359. public void UiInitQuotePriceView()
  360. {
  361. Application.Current.Dispatcher.BeginInvoke(new Action(() =>
  362. {
  363. switch (_currentGoods.TradeMode)
  364. {
  365. case eTradeMode.TRADEMODE_MARKETMAKE:
  366. GoodsCategory = new PriceCardDiskAskBid(this);
  367. IsBidGoods = false;
  368. break;
  369. case eTradeMode.TRADEMODE_BIDDINGMARKETMAKE:
  370. case eTradeMode.TRADEMODE_BIDDING:
  371. case eTradeMode.TRADEMODE_LISTING_SELECT:
  372. case eTradeMode.TRADEMODE_ENTRUST_HEDGE:
  373. GoodsCategory = new PriceCardDiskMakeMatch2(this);
  374. IsBidGoods = true;
  375. break;
  376. default:
  377. GoodsCategory = new PriceCardDiskAskBid(this);
  378. break;
  379. }
  380. }));
  381. }
  382. private void RegReadTimeQuote()
  383. {
  384. MessengerHelper.QuoteUnregister<List<QuoteGoods>>(this, MessengerTokens.ReceiveRealTikQuote);
  385. MessengerHelper.QuoteRegister<List<QuoteGoods>>(this, MessengerTokens.ReceiveRealTikQuote, (quoteList) =>
  386. {
  387. if (quoteList == null || !quoteList.Any()) return;
  388. lock (_lockObject)
  389. {
  390. foreach (var item in quoteList)
  391. {
  392. if (item == null) continue;
  393. if (Goods.Symbol.ToUpper() == item.Symbol.ToUpper())
  394. {
  395. UpdateCommissions(item); ////更新五档
  396. if ((item.CurrentPrice==0||item.Date==DateTime.MinValue))
  397. {
  398. continue; ////竞价不是成交的行情不显示分笔
  399. }
  400. var penData = new SubPenData(Goods.GoodsParameters.HqExchFigures)
  401. {
  402. Time = item.Date,
  403. Price =(double) item.CurrentPrice,
  404. CompleteQte =(double) item.CurrentVolume,
  405. IsChangedByTotalVolume = item.IsChangedByTotalVolume,
  406. };
  407. // 任务 #90594
  408. if (penData.CompleteQte <= 0 || !penData.IsChangedByTotalVolume) continue;
  409. if (null != _listSubSource)
  410. {
  411. if (_listSubSource.Count >= _tickCount)
  412. {
  413. var removeNum = _listSubSource.Count - (_tickCount - 1); //移除数量
  414. for (int i = 0; i < removeNum; i++)
  415. {
  416. _listSubSource.RemoveAt(0);
  417. }
  418. }
  419. _listSubSource.Add(penData);
  420. MessengerHelper.DefaultSend<QuotePriceViewModel>(this, MessengerTokens.UpdateTik);
  421. }
  422. else
  423. {
  424. _listSubSource = new List<SubPenData>();
  425. _listSubSource.Add(penData);
  426. MessengerHelper.DefaultSend<QuotePriceViewModel>(this, MessengerTokens.UpdateTik);
  427. }
  428. break;
  429. }
  430. }
  431. }
  432. });
  433. }
  434. public void Dispose()
  435. {
  436. this.Cleanup();
  437. //if (this._allSource != null)
  438. //{
  439. // foreach (var subPenData in _allSource)
  440. // {
  441. // subPenData.Dispose();
  442. // }
  443. // this._allSource.Clear();
  444. //}
  445. //this._allSource = null;
  446. }
  447. /// <summary>
  448. /// 更新数据
  449. /// </summary>
  450. public void UpdateDataSource(int showCount)
  451. {
  452. if (_listSubSource.Any())
  453. {
  454. var index = _listSubSource.Count - showCount < 0 ? 0 : _listSubSource.Count - showCount;
  455. DataSource =new ObservableCollection<SubPenData>(_listSubSource.GetRange(index, _listSubSource.Count - index));
  456. }
  457. }
  458. public void SendQuoteTick()
  459. {
  460. if (_currentGoods!=null)
  461. {
  462. MessengerHelper.DefaultSend<QuoteGoods>(_currentGoods, MessengerTokens.ShowTikDetail);
  463. }
  464. }
  465. #region 切换商品
  466. /// <summary>
  467. /// 下一商品
  468. /// </summary>
  469. public RelayCommand NextCommand
  470. {
  471. get
  472. {
  473. return new RelayCommand(() =>
  474. {
  475. MessengerHelper.DefaultSend<bool>(true, MessengerTokens.ChartGoodsChange);
  476. }, IsCanNext);
  477. }
  478. }
  479. /// <summary>
  480. /// 前一个商品
  481. /// </summary>
  482. public RelayCommand ForwordCommand
  483. {
  484. get
  485. {
  486. return new RelayCommand(() =>
  487. {
  488. MessengerHelper.DefaultSend<bool>(false, MessengerTokens.ChartGoodsChange);
  489. }, IsCanForword);
  490. }
  491. }
  492. /// <summary>
  493. /// 是否可前一个
  494. /// </summary>
  495. /// <returns></returns>
  496. private bool IsCanForword()
  497. {
  498. if (_currentGoods == null)
  499. {
  500. return false;
  501. }
  502. var goodsList = CacheManager.CacheGoodsBaseInfos.Where((item) => item.TradeMode != eTradeMode.TRADEMODE_SALE).ToList();
  503. if (!goodsList.Any())
  504. {
  505. return false;
  506. }
  507. var index = goodsList.FindIndex((item) => _currentGoods.Symbol == item.Symbol);
  508. return index != -1 && index != 0; ///当前是否为第一个
  509. }
  510. /// <summary>
  511. /// 是否可下一个商品
  512. /// </summary>
  513. /// <returns></returns>
  514. private bool IsCanNext()
  515. {
  516. if (_currentGoods == null)
  517. {
  518. return false;
  519. }
  520. var goodsList = CacheManager.CacheGoodsBaseInfos.Where((item) => item.TradeMode != eTradeMode.TRADEMODE_SALE).ToList();
  521. if (!goodsList.Any())
  522. {
  523. return false;
  524. }
  525. var index = goodsList.FindIndex((item) => _currentGoods.Symbol == item.Symbol);
  526. return index != -1 && index != goodsList.Count - 1; ///当前是否为第一个
  527. }
  528. #endregion
  529. #region 五档
  530. private List<Commission> _commissions;
  531. /// <summary>
  532. /// 卖五档
  533. /// </summary>
  534. public List<Commission> Commissions
  535. {
  536. get { return _commissions; }
  537. set { Set(() => Commissions, ref _commissions, value); }
  538. }
  539. private List<Commission> _bidcommissions;
  540. /// <summary>
  541. /// 买五档
  542. /// </summary>
  543. public List<Commission> BidCommissions
  544. {
  545. get { return _bidcommissions; }
  546. set { Set(() => BidCommissions, ref _bidcommissions, value); }
  547. }
  548. /// <summary>
  549. /// 设置买卖档
  550. /// </summary>
  551. /// <param name="bid">if set to <c>true</c> [bid].</param>
  552. /// <param name="commissions">The commissions.</param>
  553. /// <returns>List{Commission}.</returns>
  554. private List<Commission> SortCommissions(bool bid, Commission[] commissions, string formatStr)
  555. {
  556. var commissionLsit = new List<Commission>();
  557. int index = 1;
  558. foreach (var commission in commissions)
  559. {
  560. commission.Index = index;
  561. commission.FormatString = formatStr;
  562. commissionLsit.Add(commission);
  563. index++;
  564. }
  565. if (!bid)
  566. {
  567. commissionLsit = commissionLsit.OrderByDescending((item) => item.Index).ToList();
  568. }
  569. return commissionLsit;
  570. }
  571. /// <summary>
  572. /// 更新五档行情
  573. /// </summary>
  574. /// <param name="goods"></param>
  575. private void UpdateCommissions(QuoteGoods goods)
  576. {
  577. if (goods != null)
  578. {
  579. //var askCommissions = SortCommissions(false, goods.AskList, Goods.FormatPrice);
  580. //var bidCommissions = SortCommissions(true, goods.BidList, Goods.FormatPrice);
  581. //askCommissions.AddRange(bidCommissions);
  582. //Commissions = askCommissions;
  583. Commissions = SortCommissions(false, goods.AskList, Goods.FormatPrice);
  584. BidCommissions = SortCommissions(true, goods.BidList, Goods.FormatPrice);
  585. }
  586. }
  587. #endregion
  588. #region 是否显示换手率
  589. private void InitData()
  590. {
  591. HiddenDataByMarket();
  592. }
  593. /// <summary>
  594. /// 隐藏数据逻辑
  595. /// </summary>
  596. private void HiddenDataByMarket()
  597. {
  598. if (_currentGoods != null && _currentGoods.GoodsParameters != null)
  599. switch (_currentGoods.GoodsParameters.TradeMode)
  600. {
  601. case eTradeMode.TRADEMODE_MARKETMAKE:
  602. case eTradeMode.TRADEMODE_BIDDING:
  603. IsVisibilityTurnoverRate = Visibility.Visible;
  604. break;
  605. case eTradeMode.TRADEMODE_BIDDINGMARKETMAKE:
  606. //换手率混合市场应隐藏
  607. IsVisibilityTurnoverRate = Visibility.Collapsed;
  608. break;
  609. default:
  610. IsVisibilityTurnoverRate = Visibility.Visible;
  611. break;
  612. }
  613. }
  614. private Visibility _isVisibilityTurnoverRate = Visibility.Visible;
  615. /// <summary>
  616. /// 是否显示换手率-
  617. /// </summary>
  618. public Visibility IsVisibilityTurnoverRate
  619. {
  620. get
  621. {
  622. return _isVisibilityTurnoverRate;
  623. }
  624. set
  625. {
  626. Set(() => IsVisibilityTurnoverRate, ref _isVisibilityTurnoverRate, value);
  627. }
  628. }
  629. #endregion
  630. }
  631. }