private void MainWindow_OnLoaded(object sender, RoutedEventArgs e) { App.SplashScreen?.CloseWindowSafe(); _entityStats.Owner = this; _bossGageBar.Owner = this; _windowHistory.Owner = this; if (BasicTeraData.Instance.WindowData.RememberPosition) { LastSnappedPoint = BasicTeraData.Instance.WindowData.Location; Left = LastSnappedPoint?.X ?? 0; Top = LastSnappedPoint?.Y ?? 0; _dragged = true; SnapToScreen(); _popupNotification.LastSnappedPoint = BasicTeraData.Instance.WindowData.PopupNotificationLocation; _popupNotification.Left = _popupNotification.LastSnappedPoint?.X ?? 0; _popupNotification.Top = _popupNotification.LastSnappedPoint?.Y ?? 0; _popupNotification.Show(); _popupNotification.Hide(); _entityStats.LastSnappedPoint = BasicTeraData.Instance.WindowData.DebuffsStatus.Location; _entityStats.Left = _entityStats.LastSnappedPoint?.X ?? 0; _entityStats.Top = _entityStats.LastSnappedPoint?.Y ?? 0; _entityStats.Show(); _entityStats.Hide(); if (BasicTeraData.Instance.WindowData.DebuffsStatus.Visible) { _entityStats.ShowWindow(); } _bossGageBar.LastSnappedPoint = BasicTeraData.Instance.WindowData.BossGageStatus.Location; _bossGageBar.Left = _bossGageBar.LastSnappedPoint?.X ?? 0; _bossGageBar.Top = _bossGageBar.LastSnappedPoint?.Y ?? 0; _bossGageBar.Show(); _bossGageBar.Hide(); if (BasicTeraData.Instance.WindowData.BossGageStatus.Visible) { _bossGageBar.ShowWindow(); } _windowHistory.LastSnappedPoint = BasicTeraData.Instance.WindowData.HistoryStatus.Location; _windowHistory.Left = _windowHistory.LastSnappedPoint?.X ?? 0; _windowHistory.Top = _windowHistory.LastSnappedPoint?.Y ?? 0; _windowHistory.Show(); _windowHistory.Hide(); if (BasicTeraData.Instance.WindowData.HistoryStatus.Visible) { _windowHistory.ShowWindow(); } return; } Top = 0; Left = 0; }
private void MainWindow_OnLoaded(object sender, RoutedEventArgs e) { _entityStats.Owner = this; _bossGageBar.Owner = this; _windowHistory.Owner = this; if (BasicTeraData.Instance.WindowData.RememberPosition) { Top = BasicTeraData.Instance.WindowData.Location.Y; Left = BasicTeraData.Instance.WindowData.Location.X; if (BasicTeraData.Instance.WindowData.DebuffsStatus.Location != new Point(0, 0)) { _entityStats.Top = BasicTeraData.Instance.WindowData.DebuffsStatus.Location.Y; _entityStats.Left = BasicTeraData.Instance.WindowData.DebuffsStatus.Location.X; } if (BasicTeraData.Instance.WindowData.DebuffsStatus.Visible) { _entityStats.ShowWindow(); } if (BasicTeraData.Instance.WindowData.BossGageStatus.Location != new Point(0, 0)) { _bossGageBar.Top = BasicTeraData.Instance.WindowData.BossGageStatus.Location.Y; _bossGageBar.Left = BasicTeraData.Instance.WindowData.BossGageStatus.Location.X; } if (BasicTeraData.Instance.WindowData.BossGageStatus.Visible) { _bossGageBar.ShowWindow(); } if (BasicTeraData.Instance.WindowData.HistoryStatus.Location != new Point(0, 0)) { _windowHistory.Top = BasicTeraData.Instance.WindowData.HistoryStatus.Location.Y; _windowHistory.Left = BasicTeraData.Instance.WindowData.HistoryStatus.Location.X; } if (BasicTeraData.Instance.WindowData.HistoryStatus.Visible) { _windowHistory.ShowWindow(); } return; } Top = 0; Left = 0; }