/// <summary> /// Handles the OnWindowMove event of the DockingHelper control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="information">The information.</param> private void DockingHelper_OnWindowMove(object sender, PoeWindowInformation information) { if (this.View != null) { this.SetWindowPosition(information); } }
/// <summary> /// Sets the window position. /// </summary> /// <param name="windowInformation">The window information.</param> protected override void SetWindowPosition(PoeWindowInformation windowInformation) { var value = DefaultSize * windowInformation.Height / 1080; var margin = PoeApplicationContext.WindowStyle == WindowStyle.Windowed ? 10 : 0; Execute.OnUIThread(() => { this.View.Height = this.ApplyScalingY(value); this.View.Width = this.ApplyScalingX(value); this.View.Left = this.ApplyScalingX(windowInformation.Position.Left + margin); this.View.Top = this.ApplyScalingY(windowInformation.Position.Bottom - value - margin); }); }
/// <summary> /// Sets the window position. /// </summary> /// <param name="windowInformation"></param> protected override void SetWindowPosition(PoeWindowInformation windowInformation) { var overlayHeight = DefaultOverlayHeight * windowInformation.FlaskBarHeight / DefaultFlaskBarHeight; var overlayWidth = (windowInformation.Width - (windowInformation.FlaskBarWidth * 2)) / 2; Execute.OnUIThread(() => { this._view.Height = overlayHeight; this._view.Width = overlayWidth; this._view.Left = windowInformation.Position.Left + windowInformation.FlaskBarWidth + Margin; this._view.Top = windowInformation.Position.Bottom - overlayHeight - windowInformation.ExpBarHeight - Margin; }); }
/// <summary> /// Sets the window position. /// </summary> /// <param name="windowInformation"></param> protected override void SetWindowPosition(PoeWindowInformation windowInformation) { var yPosition = windowInformation.FlaskBarWidth * (238 / (double)DefaultFlaskBarWidth); var width = windowInformation.Height * DefaultWidth / 1080; Execute.OnUIThread(() => { this._view.Height = windowInformation.FlaskBarHeight - (Margin * 2); this._view.Width = width; this._view.Left = windowInformation.Position.Left + yPosition; this._view.Top = windowInformation.Position.Bottom - windowInformation.FlaskBarHeight + Margin; }); }
/// <summary> /// Sets the window position. /// </summary> /// <param name="windowInformation"></param> protected override void SetWindowPosition(PoeWindowInformation windowInformation) { var value = DefaultBulbHeight * windowInformation.Height / 1080; Execute.OnUIThread(() => { this._view.Height = value; this._view.Width = value; this._view.Left = windowInformation.Position.Right - value - 6; this._view.Top = windowInformation.Position.Bottom - value; var lifeView = this._view as ManaBulbView; }); }
/// <summary> /// Sets the window position. /// </summary> /// <param name="windowInformation">The window information.</param> protected override void SetWindowPosition(PoeWindowInformation windowInformation) { var value = 220 * windowInformation.Height / 1080; var margin = PoeApplicationContext.WindowStyle == WindowStyle.Windowed ? 10 : 0; Execute.OnUIThread(() => { this.View.Height = 500; this.View.Width = 350; this.View.Left = windowInformation.Position.Right - 350 - margin; this.View.Top = windowInformation.Position.Bottom - value - 500 - margin; }); }
/// <summary> /// Sets the window position. /// </summary> /// <param name="windowInformation">The window information.</param> protected override void SetWindowPosition(PoeWindowInformation windowInformation) { var value = DefaultBulbHeight * windowInformation.Height / 1080; Execute.OnUIThread(() => { this.View.Height = this.ApplyScalingY(value); this.View.Width = this.ApplyScalingX(value); this.View.Left = this.ApplyScalingX(windowInformation.Position.Left + 10); this.View.Top = this.ApplyScalingY(windowInformation.Position.Bottom - value - 10); var lifeView = this.View as LifeBulbView; lifeView.ResizeLifeBulb(); }); }
/// <summary> /// Sets the window position. /// </summary> /// <param name="windowInformation">The window information.</param> protected override void SetWindowPosition(PoeWindowInformation windowInformation) { var yPosition = windowInformation.FlaskBarWidth * (238 / (double)DefaultFlaskBarWidth); var width = windowInformation.Height * DefaultWidth / 1080; var height = windowInformation.FlaskBarHeight + 25; Execute.OnUIThread(() => { this.View.Height = this.ApplyScalingY(height < 0 ? 1 : height); this.View.Width = this.ApplyScalingX(width); this.View.Left = this.ApplyScalingX(windowInformation.Position.Left + yPosition); this.View.Top = this.ApplyScalingY(windowInformation.Position.Bottom - height - 12 + Margin); }); }
/// <summary> /// Sets the window position. /// </summary> /// <param name="windowInformation">The wndow information.</param> protected override void SetWindowPosition(PoeWindowInformation windowInformation) { var value = DefaultBulbHeight * windowInformation.Height / 1080; var margin = PoeApplicationContext.WindowStyle == WindowStyle.Windowed ? 10 : 0; Execute.OnUIThread(() => { this.View.Height = value; this.View.Width = value; this.View.Left = windowInformation.Position.Right - value - margin; this.View.Top = windowInformation.Position.Bottom - value - margin; var lifeView = this.View as ManaBulbView; }); }
/// <summary> /// Sets the window position. /// </summary> /// <param name="windowInformation">The window information.</param> protected override void SetWindowPosition(PoeWindowInformation windowInformation) { if (this.View == null) { return; } Execute.OnUIThread(() => { this.View.Height = this.ApplyScalingY(windowInformation.Height); this.View.Width = this.ApplyScalingX(windowInformation.Width); this.View.Left = windowInformation.Position.Left; this.View.Top = windowInformation.Position.Top; }); }
/// <summary> /// Sets the window position. /// </summary> /// <param name="windowInformation">The window information.</param> protected override void SetWindowPosition(PoeWindowInformation windowInformation) { if (this.View == null) { return; } var height = windowInformation.Height / 4; var margin = PoeApplicationContext.WindowStyle == WindowStyle.Windowed ? 10 : 0; var overlayWidth = windowInformation.Width - (windowInformation.FlaskBarWidth * 2); Execute.OnUIThread(() => { this.View.Height = this.ApplyScalingY(height); this.View.Width = this.ApplyScalingX(overlayWidth); this.View.Left = this.ApplyScalingX(windowInformation.Position.Left + windowInformation.FlaskBarWidth + Margin - margin); this.View.Top = this.ApplyScalingY(windowInformation.Position.Bottom - height - windowInformation.ExpBarHeight + Margin); }); }
/// <summary> /// Sets the window position. /// </summary> /// <param name="windowInformation">The window information.</param> protected override void SetWindowPosition(PoeWindowInformation windowInformation) { // When Poe Lurker is updated we save the settings before the view are loaded if (this.View == null) { return; } var overlayHeight = DefaultOverlayHeight * windowInformation.FlaskBarHeight / DefaultFlaskBarHeight * this.SettingsService.TradebarScaling; var overlayWidth = (windowInformation.Width - (windowInformation.FlaskBarWidth * 2)) / 2; var margin = PoeApplicationContext.WindowStyle == WindowStyle.Windowed ? 10 : 0; Execute.OnUIThread(() => { this.View.Height = this.ApplyScalingY(overlayHeight); this.View.Width = this.ApplyScalingX(overlayWidth); this.View.Left = this.ApplyScalingX(windowInformation.Position.Left + windowInformation.FlaskBarWidth + Margin - margin); this.View.Top = this.ApplyScalingY(windowInformation.Position.Bottom - overlayHeight - windowInformation.ExpBarHeight - Margin - margin); }); }
/// <summary> /// Invokes the window move. /// </summary> private void InvokeWindowMove() { this.WindowInformation = this.GetWindowInformation(); this.OnWindowMove?.Invoke(this, this.WindowInformation); }
/// <summary> /// Sets the window position. /// </summary> /// <param name="windowInformation">The window information.</param> protected abstract void SetWindowPosition(PoeWindowInformation windowInformation);
/// <summary> /// Handles the OnWindowMove event of the DockingHelper control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> /// <exception cref="System.NotImplementedException"></exception> private void DockingHelper_OnWindowMove(object sender, PoeWindowInformation position) { this.SetWindowPosition(position); }
/// <summary> /// Sets the window position. /// </summary> /// <param name="windowInformation">The window information.</param> protected override void SetWindowPosition(PoeWindowInformation windowInformation) { this._windowInformation = windowInformation; }