using System.Windows;
using System.Windows.Controls;
using Muchinfo.MTPClient.Account.ViewModels;
using Muchinfo.MTPClient.Infrastructure.Helpers;
using Muchinfo.MTPClient.Data.Enums;
using Muchinfo.MTPClient.Infrastructure.Cache;
namespace Muchinfo.MTPClient.Account.Views
{
///
/// TradeHeader.xaml 的交互逻辑
///
public partial class TradeHeaderView : UserControl
{
public TradeHeaderView()
{
InitializeComponent();
#region 是否显示买卖按钮=》顶部买卖按钮与挂牌无关
//MessengerHelper.DefaultRegister(this, MessengerTokens.IsEnableBuyAndSellCommondBtn,
// (e) =>
// {
// #region 是否有数据可用
// if (CacheManager.IsHasListingData == true)
// {
// this.btn_SellCommand.IsEnabled = true;
// this.btn_BuyCommand.IsEnabled = true;
// }
// else
// {
// this.btn_SellCommand.IsEnabled = false;
// this.btn_BuyCommand.IsEnabled = false;
// }
// #endregion
// });
//this.btn_BuyCommand.Visibility = Visibility.Visible;
//MessengerHelper.DefaultRegister(this, MessengerTokens.IsShowBuyCommondBtn,
// (e) =>
// {
// if (e == false)
// {
// this.btn_BuyCommand.Visibility = Visibility.Collapsed;
// }
// else
// {
// this.btn_BuyCommand.Visibility = Visibility.Visible;
// }
// });
//this.btn_SellCommand.Visibility = Visibility.Visible;
//MessengerHelper.DefaultRegister(this, MessengerTokens.IsShowSellCommondBtn,
//(e) =>
//{
// if (e == false)
// {
// this.btn_SellCommand.Visibility = Visibility.Collapsed;
// }
// else
// {
// this.btn_SellCommand.Visibility = Visibility.Visible;
// }
//});
#endregion
}
}
}