示例#1
0
 /// <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);
     }
 }
示例#2
0
        /// <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;
            });
        }
示例#4
0
        /// <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;
            });
        }
示例#6
0
        /// <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;
            });
        }
示例#7
0
        /// <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();
            });
        }
示例#8
0
        /// <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);
            });
        }
示例#9
0
        /// <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;
            });
        }
示例#11
0
        /// <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);
            });
        }
示例#12
0
        /// <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);
            });
        }
示例#13
0
 /// <summary>
 /// Invokes the window move.
 /// </summary>
 private void InvokeWindowMove()
 {
     this.WindowInformation = this.GetWindowInformation();
     this.OnWindowMove?.Invoke(this, this.WindowInformation);
 }
示例#14
0
 /// <summary>
 /// Sets the window position.
 /// </summary>
 /// <param name="windowInformation">The window information.</param>
 protected abstract void SetWindowPosition(PoeWindowInformation windowInformation);
示例#15
0
 /// <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);
 }
示例#16
0
 /// <summary>
 /// Sets the window position.
 /// </summary>
 /// <param name="windowInformation">The window information.</param>
 protected override void SetWindowPosition(PoeWindowInformation windowInformation)
 {
     this._windowInformation = windowInformation;
 }