using System.Windows.Forms;
using GalaSoft.MvvmLight.Ioc;
using Muchinfo.MTPClient.Account.Views;
using Muchinfo.MTPClient.Data.Enums;
using Muchinfo.MTPClient.Infrastructure.Helpers;
using Muchinfo.MTPClient.Infrastructure.MessageBox;
using Muchinfo.MTPClient.Infrastructure.Utilities;
using Muchinfo.MTPClient.IService;
using Muchinfo.MTPClient.Resources;
using Muchinfo.MTPClient.UI.Utilities;
using Muchinfo.MTPClient.UI.ViewModels;
using Muchinfo.PC.Common.Helpers;
using Muchinfo.WPF.Controls.Windows;
using System;
using System.Windows;
using System.Windows.Input;
using System.Windows.Threading;
using KeyEventArgs = System.Windows.Input.KeyEventArgs;
namespace Muchinfo.MTPClient.UI.Views
{
///
/// MainView.xaml 的交互逻辑
///
public partial class MainPage : Window
{
private Style windowMaxImageStyle;
private Style windowImageStyle;
public MainPage()
{
InitializeComponent();
new WindowResizer(this,
new WindowBorder(BorderPosition.TopLeft, TopLeftBorder),
new WindowBorder(BorderPosition.Top, TopBorder),
new WindowBorder(BorderPosition.TopRight, TopRightBorder),
new WindowBorder(BorderPosition.Right, RightBorder),
new WindowBorder(BorderPosition.BottomRight, BottomRightBorder),
new WindowBorder(BorderPosition.Bottom, BottomBorder),
new WindowBorder(BorderPosition.BottomLeft, BottomLeftBorder),
new WindowBorder(BorderPosition.Left, LeftBorder));
//避免窗口最大化时遮盖任务栏
FullScreenManager.RepairWpfWindowFullScreenBehavior(this);
// this.WindowState =WindowState.Maximized;
this.SizeChanged += Home_SizeChanged;
MessageRegister.Register(this);
this.Loaded += Home_Loaded;
this.KeyUp += MainPage_KeyUp;
windowMaxImageStyle = ResourceHelper.GetFromeResource