| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- 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
- {
- /// <summary>
- /// RiskView.xaml 的交互逻辑
- /// </summary>
- 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;
- }
- }
- }
- }
|