MessagePromptView.xaml.cs 1018 B

123456789101112131415161718192021222324252627282930313233
  1. using Muchinfo.MTPClient.Infrastructure.Windows;
  2. using System;
  3. using System.Windows;
  4. namespace Muchinfo.MTPClient.Account.Views
  5. {
  6. /// <summary>
  7. /// MessagePrompt.xaml 的交互逻辑
  8. /// </summary>
  9. public partial class MessagePromptView : TradeAccountWindow
  10. {
  11. public MessagePromptView(string messageInfo)
  12. {
  13. InitializeComponent();
  14. this.MessageInfo.Text = messageInfo;
  15. Storyboard1.Completed += storyboard_Completed;
  16. this.Loaded += MessagePromptView_Loaded;
  17. }
  18. void MessagePromptView_Loaded(object sender, RoutedEventArgs e)
  19. {
  20. double m_ScreenWidth = SystemParameters.WorkArea.Width;
  21. double m_ScreenHeight = SystemParameters.WorkArea.Height;
  22. this.Left = m_ScreenWidth - this.Width - 1.5;
  23. this.Top = m_ScreenHeight - this.Height - 1.5;
  24. }
  25. void storyboard_Completed(object sender, EventArgs e)
  26. {
  27. this.Close();
  28. }
  29. }
  30. }