Merge pull request #44 from Proopai/feature/fix-animation0settings-with-per-client-zoom-anchor

Feature/fix animation0settings with per client zoom anchor
This commit is contained in:
Eric
2025-01-23 20:32:43 -06:00
committed by GitHub
18 changed files with 1346 additions and 1262 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 |
| 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 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 |
| 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 |
@@ -275,6 +275,24 @@ You should modify this entry with a list of each of your clients replacing "Exam
If a client does not appear in this list, then it will use the global thumbnail size by default.
### Per Client Zoom Anchor
Would you like to have different clients with different ZoomAnchor for each thumbnail ?
EVE-O Preview doesn't provide any GUI to set the these per client overrides as yet. Though, It can be done via editing the configuration file directly.
**Note** Don't forget to make a backup copy of the file before editing it.
Open the file using any text editor. find the entry **PerClientZoomAnchor**. Most probably it will look like
"PerClientZoomAnchor": {
"EVE - Example Toon 1": 1,
"EVE - Example Toon 2": 2,
"EVE": 3
}
You should modify this entry with a list of each of your clients replacing "Example Toon 1", etc with the name of your character. The values on the right represent the Zoom Anchor for the thumbnail (which sets the starting point of the thumbnail zoom).
Valid values are 0-8 : 0-NW, 1-North, 2-NE, 3-West, 4-Center, 5-East, 6-SW, 7-South, 8-SE.
If a client does not appear in this list, then it will use the global Zoom Anchor by default.
### Compatibility Mode
This setting allows to enable an alternate thumbnail render. This render doesn't use advanced DWM API to create live previews. Instead it is a screenshot-based render with the following pros and cons:

View File

@@ -47,6 +47,12 @@ namespace EveOPreview.Configuration.Implementation
{"EVE - Example Toon 2", new Size(200, 200)}
};
this.PerClientZoomAnchor = new Dictionary<string, ZoomAnchor>
{
{"EVE - Example Toon 1", ZoomAnchor.N },
{"EVE - Example Toon 2", ZoomAnchor.S}
};
this.PerClientLayout = new Dictionary<string, Dictionary<string, Point>>();
this.FlatLayout = new Dictionary<string, Point>();
this.ClientLayout = new Dictionary<string, ClientLayout>();
@@ -65,7 +71,7 @@ namespace EveOPreview.Configuration.Implementation
this.EnableClientLayoutTracking = false;
this.HideActiveClientThumbnail = false;
this.MinimizeInactiveClients = false;
this.MinimizeInactiveClientsAnimation = false;
this.WindowsAnimationStyle = AnimationStyle.NoAnimation;
this.ShowThumbnailsAlwaysOnTop = true;
this.EnablePerClientThumbnailLayouts = false;
@@ -129,6 +135,8 @@ namespace EveOPreview.Configuration.Implementation
[JsonProperty("PerClientThumbnailSize")]
public Dictionary<string, Size> PerClientThumbnailSize { get; set; }
[JsonProperty("PerClientZoomAnchor")]
public Dictionary<string, ZoomAnchor> PerClientZoomAnchor{ get; set; }
public bool MinimizeToTray { get; set; }
public int ThumbnailRefreshPeriod { get; set; }
public int ThumbnailResizeTimeoutPeriod { get; set; }
@@ -155,7 +163,7 @@ namespace EveOPreview.Configuration.Implementation
public bool HideActiveClientThumbnail { get; set; }
public bool MinimizeInactiveClients { get; set; }
public bool MinimizeInactiveClientsAnimation { get; set; }
public AnimationStyle WindowsAnimationStyle { get; set; }
public bool ShowThumbnailsAlwaysOnTop { get; set; }
public bool EnablePerClientThumbnailLayouts
@@ -246,6 +254,11 @@ namespace EveOPreview.Configuration.Implementation
Size sizeOfThumbnail;
return this.PerClientThumbnailSize.TryGetValue(currentClient, out sizeOfThumbnail) ? sizeOfThumbnail : defaultSize;
}
public ZoomAnchor GetZoomAnchor(string currentClient, ZoomAnchor defaultZoomAnchor)
{
ZoomAnchor zoomAnchor;
return this.PerClientZoomAnchor.TryGetValue(currentClient, out zoomAnchor) ? zoomAnchor : defaultZoomAnchor;
}
public void SetThumbnailLocation(string currentClient, string activeClient, Point location)
{

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 HideActiveClientThumbnail { get; set; }
bool MinimizeInactiveClients { get; set; }
bool MinimizeInactiveClientsAnimation { get; set; }
AnimationStyle WindowsAnimationStyle { get; set; }
bool ShowThumbnailsAlwaysOnTop { get; set; }
bool EnablePerClientThumbnailLayouts { get; set; }
@@ -62,6 +62,7 @@ namespace EveOPreview.Configuration
Point GetThumbnailLocation(string currentClient, string activeClient, Point defaultLocation);
Size GetThumbnailSize(string currentClient, string activeClient, Size defaultSize);
ZoomAnchor GetZoomAnchor(string currentClient, ZoomAnchor defaultZoomAnchor);
void SetThumbnailLocation(string currentClient, string activeClient, Point location);
ClientLayout GetClientLayout(string currentClient);

View File

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

View File

@@ -107,7 +107,7 @@ namespace EveOPreview.Presenters
this.View.EnableClientLayoutTracking = this._configuration.EnableClientLayoutTracking;
this.View.HideActiveClientThumbnail = this._configuration.HideActiveClientThumbnail;
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.HideThumbnailsOnLostFocus = this._configuration.HideThumbnailsOnLostFocus;
this.View.EnablePerClientThumbnailLayouts = this._configuration.EnablePerClientThumbnailLayouts;
@@ -142,7 +142,7 @@ namespace EveOPreview.Presenters
this._configuration.EnableClientLayoutTracking = this.View.EnableClientLayoutTracking;
this._configuration.HideActiveClientThumbnail = this.View.HideActiveClientThumbnail;
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.HideThumbnailsOnLostFocus = this.View.HideThumbnailsOnLostFocus;
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: ComVisible(false)]
[assembly: Guid("04f08f8d-9e98-423b-acdb-4effb31c0d35")]
[assembly: AssemblyVersion("8.0.1.3")]
[assembly: AssemblyFileVersion("8.0.1.3")]
[assembly: AssemblyVersion("8.0.1.5")]
[assembly: AssemblyFileVersion("8.0.1.5")]
[assembly: CLSCompliant(false)]

View File

@@ -102,7 +102,7 @@ namespace EveOPreview.Services
{
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);
newClient.Value.SetHighlight();
@@ -236,7 +236,7 @@ namespace EveOPreview.Services
view.RegisterHotkey(this._configuration.GetClientHotkey(view.Title));
this.ApplyClientLayout(view.Id, view.Title);
this.ApplyClientLayout(view);
// TODO Add extension filter here later
if (view.Title != ThumbnailManager.DEFAULT_CLIENT_TITLE)
@@ -263,7 +263,7 @@ namespace EveOPreview.Services
view.RegisterHotkey(this._configuration.GetClientHotkey(process.Title));
this.ApplyClientLayout(view.Id, view.Title);
this.ApplyClientLayout(view);
}
}
@@ -490,7 +490,7 @@ namespace EveOPreview.Services
// Minimize the currently active client if needed
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);
@@ -541,7 +541,7 @@ namespace EveOPreview.Services
Task.Run(() =>
{
this._windowManager.ActivateWindow(view.Id, this._configuration.MinimizeInactiveClientsAnimation);
this._windowManager.ActivateWindow(view.Id, this._configuration.WindowsAnimationStyle);
})
.ContinueWith((task) =>
{
@@ -556,7 +556,7 @@ namespace EveOPreview.Services
{
if (switchOut)
{
this._windowManager.ActivateWindow(this._externalApplication, this._configuration.MinimizeInactiveClientsAnimation);
this._windowManager.ActivateWindow(this._externalApplication, this._configuration.WindowsAnimationStyle);
}
else
{
@@ -565,7 +565,7 @@ namespace EveOPreview.Services
return;
}
this._windowManager.MinimizeWindow(view.Id, this._configuration.MinimizeInactiveClientsAnimation);
this._windowManager.MinimizeWindow(view.Id, this._configuration.WindowsAnimationStyle, true);
this.RefreshThumbnails();
}
}
@@ -629,7 +629,7 @@ namespace EveOPreview.Services
{
this.DisableViewEvents();
view.ZoomIn(ViewZoomAnchorConverter.Convert(this._configuration.ThumbnailZoomAnchor), this._configuration.ThumbnailZoomFactor);
view.ZoomIn(ViewZoomAnchorConverter.Convert(view.ClientZoomAnchor), this._configuration.ThumbnailZoomFactor);
view.Refresh(false);
this.EnableViewEvents();
@@ -725,8 +725,11 @@ namespace EveOPreview.Services
return (0, 0);
}
private void ApplyClientLayout(IntPtr clientHandle, string clientTitle)
private void ApplyClientLayout(IThumbnailView view)
{
IntPtr clientHandle = view.Id;
string clientTitle = view.Title;
if (!this._configuration.EnableClientLayoutTracking)
{
return;
@@ -747,12 +750,14 @@ namespace EveOPreview.Services
if (clientLayout.IsMaximized)
{
this._windowManager.MaximizeWindow(clientHandle, this._configuration.MinimizeInactiveClientsAnimation);
this._windowManager.MaximizeWindow(clientHandle);
}
else
{
this._windowManager.MoveWindow(clientHandle, clientLayout.X, clientLayout.Y, clientLayout.Width, clientLayout.Height);
}
view.ClientZoomAnchor = this._configuration.GetZoomAnchor(clientTitle, this._configuration.ThumbnailZoomAnchor);
}
private void UpdateClientLayouts()

View File

@@ -1,6 +1,7 @@
using System;
using System.Drawing;
using System.Runtime.InteropServices;
using EveOPreview.Configuration;
using EveOPreview.Services.Interop;
namespace EveOPreview.Services.Implementation
@@ -9,6 +10,7 @@ namespace EveOPreview.Services.Implementation
{
#region Private constants
private const int WINDOW_SIZE_THRESHOLD = 300;
private const int NO_ANIMATION = 0;
#endregion
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 >= 10) // Win 10
|| 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 IntPtr GetForegroundWindowHandle()
@@ -27,7 +33,36 @@ namespace EveOPreview.Services.Implementation
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.SetFocus(handle);
@@ -36,57 +71,54 @@ namespace EveOPreview.Services.Implementation
if ((style & InteropConstants.WS_MINIMIZE) == InteropConstants.WS_MINIMIZE)
{
if (enableAnimation)
switch (animation)
{
User32NativeMethods.ShowWindowAsync(handle, InteropConstants.SW_RESTORE);
}
else
{
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);
// Restore current Animation Settings
param.iMinAnimate = currentAnimationSetting;
ret = User32NativeMethods.SystemParametersInfo(User32NativeMethods.SPI_SETANIMATION, (System.Int32)Marshal.SizeOf(typeof(ANIMATIONINFO)), ref param, 0);
}
}
case AnimationStyle.OriginalAnimation:
User32NativeMethods.ShowWindowAsync(handle, InteropConstants.SW_RESTORE);
break;
case AnimationStyle.NoAnimation:
TurnOffAnimation();
User32NativeMethods.ShowWindowAsync(handle, InteropConstants.SW_RESTORE);
RestoreAnimation();
break;
}
}
}
public void MinimizeWindow(IntPtr handle, bool enableAnimation)
public void MinimizeWindow(IntPtr handle, AnimationStyle animation, bool enableAnimation)
{
if (enableAnimation)
{
User32NativeMethods.SendMessage(handle, InteropConstants.WM_SYSCOMMAND, InteropConstants.SC_MINIMIZE, 0);
switch (animation)
{
case AnimationStyle.OriginalAnimation:
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
{
ANIMATIONINFO param = new ANIMATIONINFO();
param.cbSize = (System.UInt32)Marshal.SizeOf(typeof(ANIMATIONINFO));
// Store 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.SendMessage(handle, InteropConstants.WM_SYSCOMMAND, InteropConstants.SC_MINIMIZE, 0);
// Restore current Animation Settings
param.iMinAnimate = currentAnimationSetting;
ret = User32NativeMethods.SystemParametersInfo(User32NativeMethods.SPI_SETANIMATION, (System.Int32)Marshal.SizeOf(typeof(ANIMATIONINFO)), ref param, 0);
}
switch (animation)
{
case AnimationStyle.OriginalAnimation:
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);
break;
case AnimationStyle.NoAnimation:
TurnOffAnimation();
User32NativeMethods.SendMessage(handle, InteropConstants.WM_SYSCOMMAND, InteropConstants.SC_MINIMIZE, 0);
RestoreAnimation();
break;
}
}
}
public void MoveWindow(IntPtr handle, int left, int top, int width, int height)
@@ -94,21 +126,9 @@ namespace EveOPreview.Services.Implementation
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);
}
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);
}
User32NativeMethods.ShowWindowAsync(handle, InteropConstants.SW_SHOWMAXIMIZED);
}
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;
namespace EveOPreview.Services
@@ -8,10 +9,10 @@ namespace EveOPreview.Services
bool IsCompositionEnabled { get; }
IntPtr GetForegroundWindowHandle();
void ActivateWindow(IntPtr handle, bool enableAnimation);
void MinimizeWindow(IntPtr handle, bool enableAnimation);
void ActivateWindow(IntPtr handle, AnimationStyle animation);
void MinimizeWindow(IntPtr handle, AnimationStyle animation, bool enableAnimation);
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);
bool IsWindowMaximized(IntPtr handle);
bool IsWindowMinimized(IntPtr handle);

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,10 @@
using EveOPreview.Configuration;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
namespace EveOPreview.View
{
@@ -36,6 +38,10 @@ namespace EveOPreview.View
this.InitZoomAnchorMap();
this.InitOverlayLabelMap();
this.InitFormSize();
this.AnimationStyleCombo.DataSource = Enum.GetValues(typeof(AnimationStyle));
}
public bool MinimizeToTray
@@ -80,10 +86,10 @@ namespace EveOPreview.View
get => this.MinimizeInactiveClientsCheckBox.Checked;
set => this.MinimizeInactiveClientsCheckBox.Checked = value;
}
public bool MinimizeInactiveClientsAnimation
public ViewAnimationStyle WindowsAnimationStyle
{
get => this.MinimizeInactiveClientsAnimationCheckBox.Checked;
set => this.MinimizeInactiveClientsAnimationCheckBox.Checked = value;
get => (ViewAnimationStyle)this.AnimationStyleCombo.SelectedItem;
set => this.AnimationStyleCombo.SelectedIndex = (int)value;
}
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">
<value>False</value>
</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">
<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="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="OverlayTabPage.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
@@ -159,75 +177,15 @@
<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="AboutTabPage.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="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">
<value>False</value>
</metadata>

View File

@@ -96,6 +96,7 @@ namespace EveOPreview.View
public bool IsActive { get; set; }
public bool IsOverlayEnabled { get; set; }
public ZoomAnchor ClientZoomAnchor { get; set; }
public Point ThumbnailLocation
{

View File

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

View File

@@ -1,6 +1,7 @@
using System;
using System.Drawing;
using System.Windows.Forms;
using EveOPreview.Configuration;
using EveOPreview.Services;
namespace EveOPreview.View
@@ -14,7 +15,7 @@ namespace EveOPreview.View
Point ThumbnailLocation { get; set; }
Size ThumbnailSize { get; set; }
bool IsOverlayEnabled { get; set; }
ZoomAnchor ClientZoomAnchor { get; set; }
bool IsKnownHandle(IntPtr handle);
void SetSizeLimitations(Size minimumSize, Size maximumSize);

View File

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