fix animation settings and allow Original animation or no animation - setable from GUI. This should fix client switching when using fixed window

This commit is contained in:
Izakbar
2024-12-27 17:09:38 +00:00
parent b7f9c71f5b
commit 9ee502d6b4
16 changed files with 1301 additions and 1256 deletions

View File

@@ -81,7 +81,7 @@ CCP Grimmi wrote:
| Track client locations | Determines whether the client's window position should be restored when it is activated or started | | Track client locations | Determines whether the client's window position should be restored when it is activated or started |
| Hide preview of active EVE client | Determines whether the thumbnail corresponding to the active EVE client is not displayed | | Hide preview of active EVE client | Determines whether the thumbnail corresponding to the active EVE client is not displayed |
| Minimize inactive EVE clients | Allows to auto-minimize inactive EVE clients to save CPU and GPU | | Minimize inactive EVE clients | Allows to auto-minimize inactive EVE clients to save CPU and GPU |
| Minimize inactive EVE clients Animation | If Minimize Clients is set, this setting will enable windows animations (if checked) or disable if unchecked. | Animation Style | Use original animation style (0) or No Animation style (1). You may find Original is cleaner with fixed window mode and No Animation is cleaner with windowed mode. Especially when using minimize inactive clients.
| Previews always on top | Determines whether EVE client thumbnails should stay on top of all other windows | | Previews always on top | Determines whether EVE client thumbnails should stay on top of all other windows |
| Hide previews when EVE client is not active | Determines whether all thumbnails should be visible only when an EVE client is active | | Hide previews when EVE client is not active | Determines whether all thumbnails should be visible only when an EVE client is active |
| Unique layout for each EVE client | Determines whether thumbnails positions are different depending on the EVE client being active | | Unique layout for each EVE client | Determines whether thumbnails positions are different depending on the EVE client being active |

View File

@@ -71,7 +71,7 @@ namespace EveOPreview.Configuration.Implementation
this.EnableClientLayoutTracking = false; this.EnableClientLayoutTracking = false;
this.HideActiveClientThumbnail = false; this.HideActiveClientThumbnail = false;
this.MinimizeInactiveClients = false; this.MinimizeInactiveClients = false;
this.MinimizeInactiveClientsAnimation = false; this.WindowsAnimationStyle = AnimationStyle.NoAnimation;
this.ShowThumbnailsAlwaysOnTop = true; this.ShowThumbnailsAlwaysOnTop = true;
this.EnablePerClientThumbnailLayouts = false; this.EnablePerClientThumbnailLayouts = false;
@@ -163,7 +163,7 @@ namespace EveOPreview.Configuration.Implementation
public bool HideActiveClientThumbnail { get; set; } public bool HideActiveClientThumbnail { get; set; }
public bool MinimizeInactiveClients { get; set; } public bool MinimizeInactiveClients { get; set; }
public bool MinimizeInactiveClientsAnimation { get; set; } public AnimationStyle WindowsAnimationStyle { get; set; }
public bool ShowThumbnailsAlwaysOnTop { get; set; } public bool ShowThumbnailsAlwaysOnTop { get; set; }
public bool EnablePerClientThumbnailLayouts public bool EnablePerClientThumbnailLayouts

View File

@@ -0,0 +1,8 @@
namespace EveOPreview.Configuration
{
public enum AnimationStyle
{
OriginalAnimation,
NoAnimation
}
}

View File

@@ -27,7 +27,7 @@ namespace EveOPreview.Configuration
bool EnableClientLayoutTracking { get; set; } bool EnableClientLayoutTracking { get; set; }
bool HideActiveClientThumbnail { get; set; } bool HideActiveClientThumbnail { get; set; }
bool MinimizeInactiveClients { get; set; } bool MinimizeInactiveClients { get; set; }
bool MinimizeInactiveClientsAnimation { get; set; } AnimationStyle WindowsAnimationStyle { get; set; }
bool ShowThumbnailsAlwaysOnTop { get; set; } bool ShowThumbnailsAlwaysOnTop { get; set; }
bool EnablePerClientThumbnailLayouts { get; set; } bool EnablePerClientThumbnailLayouts { get; set; }

View File

@@ -126,6 +126,7 @@
<Compile Include="ApplicationBase\PresenterGeneric.cs" /> <Compile Include="ApplicationBase\PresenterGeneric.cs" />
<Compile Include="Configuration\Implementation\AppConfig.cs" /> <Compile Include="Configuration\Implementation\AppConfig.cs" />
<Compile Include="Configuration\Implementation\ConfigurationStorage.cs" /> <Compile Include="Configuration\Implementation\ConfigurationStorage.cs" />
<Compile Include="Configuration\Interface\AnimationStyle.cs" />
<Compile Include="Configuration\Interface\IAppConfig.cs" /> <Compile Include="Configuration\Interface\IAppConfig.cs" />
<Compile Include="Configuration\Interface\IThumbnailConfiguration.cs" /> <Compile Include="Configuration\Interface\IThumbnailConfiguration.cs" />
<Compile Include="Configuration\Interface\ZoomAnchor.cs" /> <Compile Include="Configuration\Interface\ZoomAnchor.cs" />
@@ -145,6 +146,7 @@
<Compile Include="Mediator\Messages\Services\StopService.cs" /> <Compile Include="Mediator\Messages\Services\StopService.cs" />
<Compile Include="Mediator\Messages\Thumbnails\ThumbnailLocationUpdated.cs" /> <Compile Include="Mediator\Messages\Thumbnails\ThumbnailLocationUpdated.cs" />
<Compile Include="Mediator\Messages\Thumbnails\ThumbnailActiveSizeUpdated.cs" /> <Compile Include="Mediator\Messages\Thumbnails\ThumbnailActiveSizeUpdated.cs" />
<Compile Include="Presenters\Implementation\ViewAnimationStyleConverter.cs" />
<Compile Include="Presenters\Interface\IMainFormPresenter.cs" /> <Compile Include="Presenters\Interface\IMainFormPresenter.cs" />
<Compile Include="Services\Implementation\ProcessInfo.cs" /> <Compile Include="Services\Implementation\ProcessInfo.cs" />
<Compile Include="Services\Implementation\ProcessMonitor.cs" /> <Compile Include="Services\Implementation\ProcessMonitor.cs" />
@@ -184,6 +186,7 @@
<Compile Include="View\Interface\IMainFormView.cs" /> <Compile Include="View\Interface\IMainFormView.cs" />
<Compile Include="ApplicationBase\IView.cs" /> <Compile Include="ApplicationBase\IView.cs" />
<Compile Include="View\Interface\IThumbnailDescription.cs" /> <Compile Include="View\Interface\IThumbnailDescription.cs" />
<Compile Include="View\Interface\ViewAnimationStyle.cs" />
<Compile Include="View\Interface\ViewZoomAnchor.cs" /> <Compile Include="View\Interface\ViewZoomAnchor.cs" />
<Compile Include="Configuration\Implementation\ThumbnailConfiguration.cs" /> <Compile Include="Configuration\Implementation\ThumbnailConfiguration.cs" />
<Compile Include="Hotkeys\HotkeyHandler.cs" /> <Compile Include="Hotkeys\HotkeyHandler.cs" />

View File

@@ -107,7 +107,7 @@ namespace EveOPreview.Presenters
this.View.EnableClientLayoutTracking = this._configuration.EnableClientLayoutTracking; this.View.EnableClientLayoutTracking = this._configuration.EnableClientLayoutTracking;
this.View.HideActiveClientThumbnail = this._configuration.HideActiveClientThumbnail; this.View.HideActiveClientThumbnail = this._configuration.HideActiveClientThumbnail;
this.View.MinimizeInactiveClients = this._configuration.MinimizeInactiveClients; this.View.MinimizeInactiveClients = this._configuration.MinimizeInactiveClients;
this.View.MinimizeInactiveClientsAnimation = this._configuration.MinimizeInactiveClientsAnimation; this.View.WindowsAnimationStyle = ViewAnimationStyleConverter.Convert(this._configuration.WindowsAnimationStyle);
this.View.ShowThumbnailsAlwaysOnTop = this._configuration.ShowThumbnailsAlwaysOnTop; this.View.ShowThumbnailsAlwaysOnTop = this._configuration.ShowThumbnailsAlwaysOnTop;
this.View.HideThumbnailsOnLostFocus = this._configuration.HideThumbnailsOnLostFocus; this.View.HideThumbnailsOnLostFocus = this._configuration.HideThumbnailsOnLostFocus;
this.View.EnablePerClientThumbnailLayouts = this._configuration.EnablePerClientThumbnailLayouts; this.View.EnablePerClientThumbnailLayouts = this._configuration.EnablePerClientThumbnailLayouts;
@@ -142,7 +142,7 @@ namespace EveOPreview.Presenters
this._configuration.EnableClientLayoutTracking = this.View.EnableClientLayoutTracking; this._configuration.EnableClientLayoutTracking = this.View.EnableClientLayoutTracking;
this._configuration.HideActiveClientThumbnail = this.View.HideActiveClientThumbnail; this._configuration.HideActiveClientThumbnail = this.View.HideActiveClientThumbnail;
this._configuration.MinimizeInactiveClients = this.View.MinimizeInactiveClients; this._configuration.MinimizeInactiveClients = this.View.MinimizeInactiveClients;
this._configuration.MinimizeInactiveClientsAnimation = this.View.MinimizeInactiveClientsAnimation; this._configuration.WindowsAnimationStyle = ViewAnimationStyleConverter.Convert(this.View.WindowsAnimationStyle);
this._configuration.ShowThumbnailsAlwaysOnTop = this.View.ShowThumbnailsAlwaysOnTop; this._configuration.ShowThumbnailsAlwaysOnTop = this.View.ShowThumbnailsAlwaysOnTop;
this._configuration.HideThumbnailsOnLostFocus = this.View.HideThumbnailsOnLostFocus; this._configuration.HideThumbnailsOnLostFocus = this.View.HideThumbnailsOnLostFocus;
this._configuration.EnablePerClientThumbnailLayouts = this.View.EnablePerClientThumbnailLayouts; this._configuration.EnablePerClientThumbnailLayouts = this.View.EnablePerClientThumbnailLayouts;

View File

@@ -0,0 +1,19 @@
using EveOPreview.Configuration;
namespace EveOPreview.View
{
static class ViewAnimationStyleConverter
{
public static AnimationStyle Convert(ViewAnimationStyle value)
{
// Cheat based on fact that the order and byte values of both enums are the same
return (AnimationStyle)((int)value);
}
public static ViewAnimationStyle Convert(AnimationStyle value)
{
// Cheat based on fact that the order and byte values of both enums are the same
return (ViewAnimationStyle)((int)value);
}
}
}

View File

@@ -12,7 +12,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
[assembly: ComVisible(false)] [assembly: ComVisible(false)]
[assembly: Guid("04f08f8d-9e98-423b-acdb-4effb31c0d35")] [assembly: Guid("04f08f8d-9e98-423b-acdb-4effb31c0d35")]
[assembly: AssemblyVersion("8.0.1.4")] [assembly: AssemblyVersion("8.0.1.5")]
[assembly: AssemblyFileVersion("8.0.1.4")] [assembly: AssemblyFileVersion("8.0.1.5")]
[assembly: CLSCompliant(false)] [assembly: CLSCompliant(false)]

View File

@@ -102,7 +102,7 @@ namespace EveOPreview.Services
{ {
this.GetActiveClient()?.ClearBorder(); this.GetActiveClient()?.ClearBorder();
this._windowManager.ActivateWindow(newClient.Key, this._configuration.MinimizeInactiveClientsAnimation); this._windowManager.ActivateWindow(newClient.Key, this._configuration.WindowsAnimationStyle);
this.SwitchActiveClient(newClient.Key, newClient.Value.Title); this.SwitchActiveClient(newClient.Key, newClient.Value.Title);
newClient.Value.SetHighlight(); newClient.Value.SetHighlight();
@@ -490,7 +490,7 @@ namespace EveOPreview.Services
// Minimize the currently active client if needed // Minimize the currently active client if needed
if (this._configuration.MinimizeInactiveClients && !this._configuration.IsPriorityClient(this._activeClient.Title)) if (this._configuration.MinimizeInactiveClients && !this._configuration.IsPriorityClient(this._activeClient.Title))
{ {
this._windowManager.MinimizeWindow(this._activeClient.Handle, this._configuration.MinimizeInactiveClientsAnimation); this._windowManager.MinimizeWindow(this._activeClient.Handle, this._configuration.WindowsAnimationStyle, false);
} }
this._activeClient = (foregroundClientHandle, foregroundClientTitle); this._activeClient = (foregroundClientHandle, foregroundClientTitle);
@@ -541,7 +541,7 @@ namespace EveOPreview.Services
Task.Run(() => Task.Run(() =>
{ {
this._windowManager.ActivateWindow(view.Id, this._configuration.MinimizeInactiveClientsAnimation); this._windowManager.ActivateWindow(view.Id, this._configuration.WindowsAnimationStyle);
}) })
.ContinueWith((task) => .ContinueWith((task) =>
{ {
@@ -556,7 +556,7 @@ namespace EveOPreview.Services
{ {
if (switchOut) if (switchOut)
{ {
this._windowManager.ActivateWindow(this._externalApplication, this._configuration.MinimizeInactiveClientsAnimation); this._windowManager.ActivateWindow(this._externalApplication, this._configuration.WindowsAnimationStyle);
} }
else else
{ {
@@ -565,7 +565,7 @@ namespace EveOPreview.Services
return; return;
} }
this._windowManager.MinimizeWindow(view.Id, this._configuration.MinimizeInactiveClientsAnimation); this._windowManager.MinimizeWindow(view.Id, this._configuration.WindowsAnimationStyle, true);
this.RefreshThumbnails(); this.RefreshThumbnails();
} }
} }
@@ -750,7 +750,7 @@ namespace EveOPreview.Services
if (clientLayout.IsMaximized) if (clientLayout.IsMaximized)
{ {
this._windowManager.MaximizeWindow(clientHandle, this._configuration.MinimizeInactiveClientsAnimation); this._windowManager.MaximizeWindow(clientHandle);
} }
else else
{ {

View File

@@ -1,6 +1,7 @@
using System; using System;
using System.Drawing; using System.Drawing;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using EveOPreview.Configuration;
using EveOPreview.Services.Interop; using EveOPreview.Services.Interop;
namespace EveOPreview.Services.Implementation namespace EveOPreview.Services.Implementation
@@ -9,6 +10,7 @@ namespace EveOPreview.Services.Implementation
{ {
#region Private constants #region Private constants
private const int WINDOW_SIZE_THRESHOLD = 300; private const int WINDOW_SIZE_THRESHOLD = 300;
private const int NO_ANIMATION = 0;
#endregion #endregion
public WindowManager() public WindowManager()
@@ -18,8 +20,12 @@ namespace EveOPreview.Services.Implementation
((Environment.OSVersion.Version.Major == 6) && (Environment.OSVersion.Version.Minor >= 2)) // Win 8 and Win 8.1 ((Environment.OSVersion.Version.Major == 6) && (Environment.OSVersion.Version.Minor >= 2)) // Win 8 and Win 8.1
|| (Environment.OSVersion.Version.Major >= 10) // Win 10 || (Environment.OSVersion.Version.Major >= 10) // Win 10
|| DwmNativeMethods.DwmIsCompositionEnabled(); // In case of Win 7 an API call is requiredWin 7 || DwmNativeMethods.DwmIsCompositionEnabled(); // In case of Win 7 an API call is requiredWin 7
_animationParam.cbSize = (System.UInt32)Marshal.SizeOf(typeof(ANIMATIONINFO));
} }
private int? _currentAnimationSetting = null;
private ANIMATIONINFO _animationParam = new ANIMATIONINFO();
public bool IsCompositionEnabled { get; } public bool IsCompositionEnabled { get; }
public IntPtr GetForegroundWindowHandle() public IntPtr GetForegroundWindowHandle()
@@ -27,7 +33,36 @@ namespace EveOPreview.Services.Implementation
return User32NativeMethods.GetForegroundWindow(); return User32NativeMethods.GetForegroundWindow();
} }
public void ActivateWindow(IntPtr handle, bool enableAnimation) private void TurnOffAnimation()
{
var currentAnimationSetup = User32NativeMethods.SystemParametersInfo(User32NativeMethods.SPI_GETANIMATION, (System.Int32)Marshal.SizeOf(typeof(ANIMATIONINFO)), ref _animationParam, 0);
if (_currentAnimationSetting == null)
{
// Store the current Animation Setting
_currentAnimationSetting = _animationParam.iMinAnimate;
}
if (currentAnimationSetup != NO_ANIMATION)
{
// Turn off Animation
_animationParam.iMinAnimate = NO_ANIMATION;
var animationOffReturn = User32NativeMethods.SystemParametersInfo(User32NativeMethods.SPI_SETANIMATION, (System.Int32)Marshal.SizeOf(typeof(ANIMATIONINFO)), ref _animationParam, 0);
}
}
private void RestoreAnimation()
{
var currentAnimationSetup = User32NativeMethods.SystemParametersInfo(User32NativeMethods.SPI_GETANIMATION, (System.Int32)Marshal.SizeOf(typeof(ANIMATIONINFO)), ref _animationParam, 0);
// Restore current Animation Settings
if (_animationParam.iMinAnimate != (int)_currentAnimationSetting)
{
_animationParam.iMinAnimate = (int)_currentAnimationSetting;
var animationResetReturn = User32NativeMethods.SystemParametersInfo(User32NativeMethods.SPI_SETANIMATION, (System.Int32)Marshal.SizeOf(typeof(ANIMATIONINFO)), ref _animationParam, 0);
}
}
public void ActivateWindow(IntPtr handle, AnimationStyle animation)
{ {
User32NativeMethods.SetForegroundWindow(handle); User32NativeMethods.SetForegroundWindow(handle);
User32NativeMethods.SetFocus(handle); User32NativeMethods.SetFocus(handle);
@@ -36,56 +71,53 @@ namespace EveOPreview.Services.Implementation
if ((style & InteropConstants.WS_MINIMIZE) == InteropConstants.WS_MINIMIZE) if ((style & InteropConstants.WS_MINIMIZE) == InteropConstants.WS_MINIMIZE)
{ {
if (enableAnimation) switch (animation)
{ {
case AnimationStyle.OriginalAnimation:
User32NativeMethods.ShowWindowAsync(handle, InteropConstants.SW_RESTORE); User32NativeMethods.ShowWindowAsync(handle, InteropConstants.SW_RESTORE);
} break;
else case AnimationStyle.NoAnimation:
{ TurnOffAnimation();
ANIMATIONINFO param = new ANIMATIONINFO();
param.cbSize = (System.UInt32)Marshal.SizeOf(typeof(ANIMATIONINFO));
// Store the current Animation Setting
var ret = User32NativeMethods.SystemParametersInfo(User32NativeMethods.SPI_GETANIMATION, (System.Int32)Marshal.SizeOf(typeof(ANIMATIONINFO)), ref param, 0);
int currentAnimationSetting = param.iMinAnimate;
// Turn off Animation
param.iMinAnimate = 0;
ret = User32NativeMethods.SystemParametersInfo(User32NativeMethods.SPI_SETANIMATION, (System.Int32)Marshal.SizeOf(typeof(ANIMATIONINFO)), ref param, 0);
User32NativeMethods.ShowWindowAsync(handle, InteropConstants.SW_RESTORE); User32NativeMethods.ShowWindowAsync(handle, InteropConstants.SW_RESTORE);
RestoreAnimation();
// Restore current Animation Settings break;
param.iMinAnimate = currentAnimationSetting;
ret = User32NativeMethods.SystemParametersInfo(User32NativeMethods.SPI_SETANIMATION, (System.Int32)Marshal.SizeOf(typeof(ANIMATIONINFO)), ref param, 0);
} }
} }
} }
public void MinimizeWindow(IntPtr handle, bool enableAnimation) public void MinimizeWindow(IntPtr handle, AnimationStyle animation, bool enableAnimation)
{ {
if (enableAnimation) if (enableAnimation)
{ {
switch (animation)
{
case AnimationStyle.OriginalAnimation:
User32NativeMethods.SendMessage(handle, InteropConstants.WM_SYSCOMMAND, InteropConstants.SC_MINIMIZE, 0); User32NativeMethods.SendMessage(handle, InteropConstants.WM_SYSCOMMAND, InteropConstants.SC_MINIMIZE, 0);
break;
case AnimationStyle.NoAnimation:
TurnOffAnimation();
User32NativeMethods.SendMessage(handle, InteropConstants.WM_SYSCOMMAND, InteropConstants.SC_MINIMIZE, 0);
RestoreAnimation();
break;
}
} }
else else
{ {
ANIMATIONINFO param = new ANIMATIONINFO(); switch (animation)
param.cbSize = (System.UInt32)Marshal.SizeOf(typeof(ANIMATIONINFO)); {
case AnimationStyle.OriginalAnimation:
// Store Current Animation Setting WINDOWPLACEMENT param = new WINDOWPLACEMENT();
var ret = User32NativeMethods.SystemParametersInfo(User32NativeMethods.SPI_GETANIMATION, (System.Int32)Marshal.SizeOf(typeof(ANIMATIONINFO)), ref param, 0); param.length = Marshal.SizeOf(typeof(WINDOWPLACEMENT));
int currentAnimationSetting = param.iMinAnimate; User32NativeMethods.GetWindowPlacement(handle, ref param);
param.showCmd = WINDOWPLACEMENT.SW_MINIMIZE;
// Turn off Animation User32NativeMethods.SetWindowPlacement(handle, ref param);
param.iMinAnimate = 0; break;
ret = User32NativeMethods.SystemParametersInfo(User32NativeMethods.SPI_SETANIMATION, (System.Int32)Marshal.SizeOf(typeof(ANIMATIONINFO)), ref param, 0); case AnimationStyle.NoAnimation:
TurnOffAnimation();
User32NativeMethods.SendMessage(handle, InteropConstants.WM_SYSCOMMAND, InteropConstants.SC_MINIMIZE, 0); User32NativeMethods.SendMessage(handle, InteropConstants.WM_SYSCOMMAND, InteropConstants.SC_MINIMIZE, 0);
RestoreAnimation();
// Restore current Animation Settings break;
param.iMinAnimate = currentAnimationSetting; }
ret = User32NativeMethods.SystemParametersInfo(User32NativeMethods.SPI_SETANIMATION, (System.Int32)Marshal.SizeOf(typeof(ANIMATIONINFO)), ref param, 0);
} }
} }
@@ -94,21 +126,9 @@ namespace EveOPreview.Services.Implementation
User32NativeMethods.MoveWindow(handle, left, top, width, height, true); User32NativeMethods.MoveWindow(handle, left, top, width, height, true);
} }
public void MaximizeWindow(IntPtr handle, bool enableAnimation) public void MaximizeWindow(IntPtr handle)
{
if (enableAnimation)
{ {
User32NativeMethods.ShowWindowAsync(handle, InteropConstants.SW_SHOWMAXIMIZED); User32NativeMethods.ShowWindowAsync(handle, InteropConstants.SW_SHOWMAXIMIZED);
}
else
{
WINDOWPLACEMENT param = new WINDOWPLACEMENT();
param.length = Marshal.SizeOf(typeof(WINDOWPLACEMENT));
User32NativeMethods.GetWindowPlacement(handle, ref param);
param.showCmd = WINDOWPLACEMENT.SW_MINIMIZE;
User32NativeMethods.SetWindowPlacement(handle, ref param);
}
} }
public (int Left, int Top, int Right, int Bottom) GetWindowPosition(IntPtr handle) public (int Left, int Top, int Right, int Bottom) GetWindowPosition(IntPtr handle)

View File

@@ -1,4 +1,5 @@
using System; using EveOPreview.Configuration;
using System;
using System.Drawing; using System.Drawing;
namespace EveOPreview.Services namespace EveOPreview.Services
@@ -8,10 +9,10 @@ namespace EveOPreview.Services
bool IsCompositionEnabled { get; } bool IsCompositionEnabled { get; }
IntPtr GetForegroundWindowHandle(); IntPtr GetForegroundWindowHandle();
void ActivateWindow(IntPtr handle, bool enableAnimation); void ActivateWindow(IntPtr handle, AnimationStyle animation);
void MinimizeWindow(IntPtr handle, bool enableAnimation); void MinimizeWindow(IntPtr handle, AnimationStyle animation, bool enableAnimation);
void MoveWindow(IntPtr handle, int left, int top, int width, int height); void MoveWindow(IntPtr handle, int left, int top, int width, int height);
void MaximizeWindow(IntPtr handle, bool enableAnimation); void MaximizeWindow(IntPtr handle);
(int Left, int Top, int Right, int Bottom) GetWindowPosition(IntPtr handle); (int Left, int Top, int Right, int Bottom) GetWindowPosition(IntPtr handle);
bool IsWindowMaximized(IntPtr handle); bool IsWindowMaximized(IntPtr handle);
bool IsWindowMinimized(IntPtr handle); bool IsWindowMinimized(IntPtr handle);

View File

@@ -59,7 +59,8 @@ namespace EveOPreview.View
System.Windows.Forms.Label DescriptionLabel; System.Windows.Forms.Label DescriptionLabel;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
System.Windows.Forms.Label NameLabel; System.Windows.Forms.Label NameLabel;
this.MinimizeInactiveClientsAnimationCheckBox = new System.Windows.Forms.CheckBox(); System.Windows.Forms.Label label4;
this.AnimationStyleCombo = new System.Windows.Forms.ComboBox();
this.MinimizeInactiveClientsCheckBox = new System.Windows.Forms.CheckBox(); this.MinimizeInactiveClientsCheckBox = new System.Windows.Forms.CheckBox();
this.EnableClientLayoutTrackingCheckBox = new System.Windows.Forms.CheckBox(); this.EnableClientLayoutTrackingCheckBox = new System.Windows.Forms.CheckBox();
this.HideActiveClientThumbnailCheckBox = new System.Windows.Forms.CheckBox(); this.HideActiveClientThumbnailCheckBox = new System.Windows.Forms.CheckBox();
@@ -140,6 +141,7 @@ namespace EveOPreview.View
DocumentationLinkLabel = new System.Windows.Forms.Label(); DocumentationLinkLabel = new System.Windows.Forms.Label();
DescriptionLabel = new System.Windows.Forms.Label(); DescriptionLabel = new System.Windows.Forms.Label();
NameLabel = new System.Windows.Forms.Label(); NameLabel = new System.Windows.Forms.Label();
label4 = new System.Windows.Forms.Label();
ContentTabControl.SuspendLayout(); ContentTabControl.SuspendLayout();
GeneralTabPage.SuspendLayout(); GeneralTabPage.SuspendLayout();
GeneralSettingsPanel.SuspendLayout(); GeneralSettingsPanel.SuspendLayout();
@@ -226,7 +228,8 @@ namespace EveOPreview.View
// GeneralSettingsPanel // GeneralSettingsPanel
// //
GeneralSettingsPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; GeneralSettingsPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
GeneralSettingsPanel.Controls.Add(this.MinimizeInactiveClientsAnimationCheckBox); GeneralSettingsPanel.Controls.Add(label4);
GeneralSettingsPanel.Controls.Add(this.AnimationStyleCombo);
GeneralSettingsPanel.Controls.Add(this.MinimizeInactiveClientsCheckBox); GeneralSettingsPanel.Controls.Add(this.MinimizeInactiveClientsCheckBox);
GeneralSettingsPanel.Controls.Add(this.EnableClientLayoutTrackingCheckBox); GeneralSettingsPanel.Controls.Add(this.EnableClientLayoutTrackingCheckBox);
GeneralSettingsPanel.Controls.Add(this.HideActiveClientThumbnailCheckBox); GeneralSettingsPanel.Controls.Add(this.HideActiveClientThumbnailCheckBox);
@@ -239,17 +242,17 @@ namespace EveOPreview.View
GeneralSettingsPanel.Name = "GeneralSettingsPanel"; GeneralSettingsPanel.Name = "GeneralSettingsPanel";
GeneralSettingsPanel.Size = new System.Drawing.Size(256, 204); GeneralSettingsPanel.Size = new System.Drawing.Size(256, 204);
GeneralSettingsPanel.TabIndex = 18; GeneralSettingsPanel.TabIndex = 18;
GeneralSettingsPanel.Paint += new System.Windows.Forms.PaintEventHandler(this.GeneralSettingsPanel_Paint);
// //
// MinimizeInactiveClientsAnimationCheckBox // AnimationStyleCombo
// //
this.MinimizeInactiveClientsAnimationCheckBox.AutoSize = true; this.AnimationStyleCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.MinimizeInactiveClientsAnimationCheckBox.Location = new System.Drawing.Point(8, 101); this.AnimationStyleCombo.FormattingEnabled = true;
this.MinimizeInactiveClientsAnimationCheckBox.Name = "MinimizeInactiveClientsAnimationCheckBox"; this.AnimationStyleCombo.Location = new System.Drawing.Point(90, 97);
this.MinimizeInactiveClientsAnimationCheckBox.Size = new System.Drawing.Size(190, 17); this.AnimationStyleCombo.Name = "AnimationStyleCombo";
this.MinimizeInactiveClientsAnimationCheckBox.TabIndex = 25; this.AnimationStyleCombo.Size = new System.Drawing.Size(152, 21);
this.MinimizeInactiveClientsAnimationCheckBox.Text = "Minimize Inactive Clients Animation"; this.AnimationStyleCombo.TabIndex = 26;
this.MinimizeInactiveClientsAnimationCheckBox.UseVisualStyleBackColor = true; this.AnimationStyleCombo.SelectedIndexChanged += new System.EventHandler(this.OptionChanged_Handler);
this.MinimizeInactiveClientsAnimationCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
// //
// MinimizeInactiveClientsCheckBox // MinimizeInactiveClientsCheckBox
// //
@@ -467,7 +470,7 @@ namespace EveOPreview.View
HeigthLabel.Name = "HeigthLabel"; HeigthLabel.Name = "HeigthLabel";
HeigthLabel.Size = new System.Drawing.Size(90, 13); HeigthLabel.Size = new System.Drawing.Size(90, 13);
HeigthLabel.TabIndex = 24; HeigthLabel.TabIndex = 24;
HeigthLabel.Text = "Thumbnail Heigth"; HeigthLabel.Text = "Thumbnail Height";
// //
// WidthLabel // WidthLabel
// //
@@ -1170,6 +1173,15 @@ namespace EveOPreview.View
this.TrayMenu.Name = "contextMenuStrip1"; this.TrayMenu.Name = "contextMenuStrip1";
this.TrayMenu.Size = new System.Drawing.Size(152, 76); this.TrayMenu.Size = new System.Drawing.Size(152, 76);
// //
// label4
//
label4.AutoSize = true;
label4.Location = new System.Drawing.Point(5, 100);
label4.Name = "label4";
label4.Size = new System.Drawing.Size(79, 13);
label4.TabIndex = 27;
label4.Text = "Animation Style";
//
// MainForm // MainForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -1261,7 +1273,6 @@ namespace EveOPreview.View
private Label SnapYLabel; private Label SnapYLabel;
private NumericUpDown ThumbnailSnapToGridSizeXNumericEdit; private NumericUpDown ThumbnailSnapToGridSizeXNumericEdit;
private Label SnapXLabel; private Label SnapXLabel;
private CheckBox MinimizeInactiveClientsAnimationCheckBox;
private CheckBox ThumbnailSnapToGridCheckBox; private CheckBox ThumbnailSnapToGridCheckBox;
private Label label3; private Label label3;
private Label label2; private Label label2;
@@ -1278,5 +1289,6 @@ namespace EveOPreview.View
private RadioButton OverlayLabelERadioButton; private RadioButton OverlayLabelERadioButton;
private RadioButton OverlayLabelSWRadioButton; private RadioButton OverlayLabelSWRadioButton;
private Label label1; private Label label1;
private ComboBox AnimationStyleCombo;
} }
} }

View File

@@ -1,8 +1,10 @@
using EveOPreview.Configuration;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.Linq; using System.Linq;
using System.Windows.Forms; using System.Windows.Forms;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
namespace EveOPreview.View namespace EveOPreview.View
{ {
@@ -36,6 +38,10 @@ namespace EveOPreview.View
this.InitZoomAnchorMap(); this.InitZoomAnchorMap();
this.InitOverlayLabelMap(); this.InitOverlayLabelMap();
this.InitFormSize(); this.InitFormSize();
this.AnimationStyleCombo.DataSource = Enum.GetValues(typeof(AnimationStyle));
} }
public bool MinimizeToTray public bool MinimizeToTray
@@ -80,10 +86,10 @@ namespace EveOPreview.View
get => this.MinimizeInactiveClientsCheckBox.Checked; get => this.MinimizeInactiveClientsCheckBox.Checked;
set => this.MinimizeInactiveClientsCheckBox.Checked = value; set => this.MinimizeInactiveClientsCheckBox.Checked = value;
} }
public bool MinimizeInactiveClientsAnimation public ViewAnimationStyle WindowsAnimationStyle
{ {
get => this.MinimizeInactiveClientsAnimationCheckBox.Checked; get => (ViewAnimationStyle)this.AnimationStyleCombo.SelectedItem;
set => this.MinimizeInactiveClientsAnimationCheckBox.Checked = value; set => this.AnimationStyleCombo.SelectedIndex = (int)value;
} }
public bool ShowThumbnailsAlwaysOnTop public bool ShowThumbnailsAlwaysOnTop
@@ -515,5 +521,15 @@ namespace EveOPreview.View
} }
} }
} }
private void AnimationStyleCombo_SelectedIndexChanged(object sender, EventArgs e)
{
}
private void GeneralSettingsPanel_Paint(object sender, PaintEventArgs e)
{
}
} }
} }

View File

@@ -138,15 +138,33 @@
<metadata name="GeneralSettingsPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="GeneralSettingsPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value> <value>False</value>
</metadata> </metadata>
<metadata name="label4.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="ThumbnailTabPage.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="ThumbnailTabPage.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value> <value>False</value>
</metadata> </metadata>
<metadata name="ThumbnailSettingsPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="ThumbnailSettingsPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value> <value>False</value>
</metadata> </metadata>
<metadata name="HeigthLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="WidthLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="OpacityLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="ZoomSettingsPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="ZoomSettingsPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value> <value>False</value>
</metadata> </metadata>
<metadata name="ZoomFactorLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="ZoomAnchorLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="OverlayTabPage.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="OverlayTabPage.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value> <value>False</value>
</metadata> </metadata>
@@ -159,75 +177,15 @@
<metadata name="ClientsPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="ClientsPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value> <value>False</value>
</metadata> </metadata>
<metadata name="ThumbnailsListLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="AboutTabPage.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="AboutTabPage.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value> <value>False</value>
</metadata> </metadata>
<metadata name="AboutPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="AboutPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value> <value>False</value>
</metadata> </metadata>
<metadata name="GeneralSettingsPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="ThumbnailSettingsPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="HeigthLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="WidthLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="OpacityLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="HeigthLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="WidthLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="OpacityLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="ZoomSettingsPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="ZoomFactorLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="ZoomAnchorLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="ZoomFactorLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="ZoomAnchorLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="ClientsPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="ThumbnailsListLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="ThumbnailsListLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="AboutPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="CreditMaintLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="DocumentationLinkLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="DescriptionLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="NameLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="CreditMaintLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="CreditMaintLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value> <value>False</value>
</metadata> </metadata>

View File

@@ -17,7 +17,7 @@ namespace EveOPreview.View
bool EnableClientLayoutTracking { get; set; } bool EnableClientLayoutTracking { get; set; }
bool HideActiveClientThumbnail { get; set; } bool HideActiveClientThumbnail { get; set; }
bool MinimizeInactiveClients { get; set; } bool MinimizeInactiveClients { get; set; }
bool MinimizeInactiveClientsAnimation { get; set; } ViewAnimationStyle WindowsAnimationStyle { get; set; }
bool ShowThumbnailsAlwaysOnTop { get; set; } bool ShowThumbnailsAlwaysOnTop { get; set; }
bool HideThumbnailsOnLostFocus { get; set; } bool HideThumbnailsOnLostFocus { get; set; }
bool EnablePerClientThumbnailLayouts { get; set; } bool EnablePerClientThumbnailLayouts { get; set; }

View File

@@ -0,0 +1,8 @@
namespace EveOPreview.View
{
public enum ViewAnimationStyle
{
OriginalAnimation,
NoAnimation
}
}