using GalaSoft.MvvmLight.Ioc;
using GalaSoft.MvvmLight.Messaging;
using Muchinfo.MTPClient.Resources;
using Muchinfo.PC.Common.Helpers;
using Muchinfo.MTPClient.Data.Enums;
using Muchinfo.MTPClient.Data.Model.Account;
using Muchinfo.MTPClient.Infrastructure.MessengerArgs;
using Muchinfo.MTPClient.Infrastructure.Utilities;
using Muchinfo.MTPClient.UI.Utilities;
using Muchinfo.MTPClient.UI.ViewModels;
using Muchinfo.WPF.Controls.Windows;
using System;
using System.Linq;
using System.Windows;
using System.Windows.Input;
using System.Windows.Threading;
namespace Muchinfo.MTPClient.UI.Views
{
///
/// Window1.xaml 的交互逻辑
///
public partial class Home : Window
{
private DispatcherTimer dTimer;
private const int c_AccountIndex = 8;
private MenuCommandType _currentLayoutType = MenuCommandType.Horizontal;
private Style windowMaxImageStyle;
private Style windowImageStyle;
private int loginIndex = 0;
//private WarningMessageView _warningMessageView;
/////
///// 预警接口
/////
//private IWarningService _warningService;
public Home()
{
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.SizeChanged += Home_SizeChanged;
// MessageRegister.Register(this);
RegisterLogout();
this.Loaded += Home_Loaded;
SetChartTabItem();
windowMaxImageStyle = ResourceHelper.GetFromeResource