TradeHeaderView.xaml.cs 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. using System.Windows;
  2. using System.Windows.Controls;
  3. using Muchinfo.MTPClient.Account.ViewModels;
  4. using Muchinfo.MTPClient.Infrastructure.Helpers;
  5. using Muchinfo.MTPClient.Data.Enums;
  6. using Muchinfo.MTPClient.Infrastructure.Cache;
  7. namespace Muchinfo.MTPClient.Account.Views
  8. {
  9. /// <summary>
  10. /// TradeHeader.xaml 的交互逻辑
  11. /// </summary>
  12. public partial class TradeHeaderView : UserControl
  13. {
  14. public TradeHeaderView()
  15. {
  16. InitializeComponent();
  17. #region 是否显示买卖按钮=》顶部买卖按钮与挂牌无关
  18. //MessengerHelper.DefaultRegister<bool>(this, MessengerTokens.IsEnableBuyAndSellCommondBtn,
  19. // (e) =>
  20. // {
  21. // #region 是否有数据可用
  22. // if (CacheManager.IsHasListingData == true)
  23. // {
  24. // this.btn_SellCommand.IsEnabled = true;
  25. // this.btn_BuyCommand.IsEnabled = true;
  26. // }
  27. // else
  28. // {
  29. // this.btn_SellCommand.IsEnabled = false;
  30. // this.btn_BuyCommand.IsEnabled = false;
  31. // }
  32. // #endregion
  33. // });
  34. //this.btn_BuyCommand.Visibility = Visibility.Visible;
  35. //MessengerHelper.DefaultRegister<bool>(this, MessengerTokens.IsShowBuyCommondBtn,
  36. // (e) =>
  37. // {
  38. // if (e == false)
  39. // {
  40. // this.btn_BuyCommand.Visibility = Visibility.Collapsed;
  41. // }
  42. // else
  43. // {
  44. // this.btn_BuyCommand.Visibility = Visibility.Visible;
  45. // }
  46. // });
  47. //this.btn_SellCommand.Visibility = Visibility.Visible;
  48. //MessengerHelper.DefaultRegister<bool>(this, MessengerTokens.IsShowSellCommondBtn,
  49. //(e) =>
  50. //{
  51. // if (e == false)
  52. // {
  53. // this.btn_SellCommand.Visibility = Visibility.Collapsed;
  54. // }
  55. // else
  56. // {
  57. // this.btn_SellCommand.Visibility = Visibility.Visible;
  58. // }
  59. //});
  60. #endregion
  61. }
  62. }
  63. }