using GalaSoft.MvvmLight.Messaging; using Muchinfo.MTPClient.Data.Enums; using Muchinfo.MTPClient.Infrastructure.Windows; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; using Muchinfo.MTPClient.Infrastructure.Helpers; namespace Muchinfo.MTPClient.Account.Views { /// /// RiskView.xaml 的交互逻辑 /// public partial class RiskView : TradeAccountWindow { public RiskView() { InitializeComponent(); this.Loaded+=RiskView_Loaded; this.Closing+=RiskView_Closing; } void RiskView_Closing(object sender, System.ComponentModel.CancelEventArgs e) { e.Cancel = true; this.Visibility = Visibility.Hidden; } void RiskView_Loaded(object sender, RoutedEventArgs e) { SetWindow(); } private void Grid_MouseDown(object sender, MouseButtonEventArgs e) { this.Close(); MessengerHelper.DefaultSend(TradeTreeMenu.Ntf, MessengerTokens.AccountFunction); } public void SetWindow() { double m_ScreenWidth = SystemParameters.WorkArea.Width; double m_ScreenHeight = SystemParameters.WorkArea.Height; this.Left = m_ScreenWidth - this.Width - 1.5; this.Top = m_ScreenHeight - this.Height - 1.5; } public void Shows() { if (this.Visibility == Visibility.Hidden) { SetWindow(); this.Visibility = Visibility.Visible; } } } }