Merge pull request #53 from Proopai/feature/bugfixes-and-new-features-see-commit

Feature/bugfixes and new features see commit
This commit is contained in:
Eric
2025-02-05 17:25:08 -06:00
committed by GitHub
10 changed files with 171 additions and 28 deletions

View File

@@ -148,11 +148,13 @@ Some of the application options are not exposed in the GUI. They can be adjusted
| **CompatibilityMode** | <div style="font-size: small">Enables the alternative render mode (see below)<br />The default value is **false**<br />For example: **"CompatibilityMode": true**</div> |
| **EnableThumbnailSnap** | <div style="font-size: small">Allows to disable thumbnails snap feature by setting its value to **false**<br />The default value is **true**<br />For example: **"EnableThumbnailSnap": true**</div> |
| **HideThumbnailsDelay** | <div style="font-size: small">Delay before thumbnails are hidden if the **General** -> **Hide previews when EVE client is not active** option is enabled<br />The delay is measured in thumbnail refresh periods<br />The default value is **2** (corresponds to 1 second delay)<br />For example: **"HideThumbnailsDelay": 2**</div> |
| **HideLoginClientThumbnail** | <div style="font-size: small">Hide EVE login window clients. If an Eve online client is sat at character selection screen - hide the preview window for this client<br />The default value is **false**<br />For example: **"HideLoginClientThumbnail": false**</div> |
| **PriorityClients** | <div style="font-size: small">Allows to set a list of clients that are not auto-minimized on inactivity even if the **Minimize inactive EVE clients** option is enabled. Listed clients still can be minimized using Windows hotkeys or via _Ctrl+Click_ on the corresponding thumbnail<br />The default value is empty list **[]**<br />For example: **"PriorityClients": [ "EVE - Phrynohyas Tig-Rah", "EVE - Ondatra Patrouette" ]**</div> |
| **ThumbnailMinimumSize** | <div style="font-size: small">Minimum thumbnail size that can be set either via GUI or by resizing a thumbnail window. Value is written in the form "width, height"<br />The default value is **"100, 80"**.<br />For example: **"ThumbnailMinimumSize": "100, 80"**</div> |
| **ThumbnailMaximumSize** | <div style="font-size: small">Maximum thumbnail size that can be set either via GUI or by resizing a thumbnail window. Value is written in the form "width, height"<br />The default value is **"640, 400"**.<br />For example: **"ThumbnailMaximumSize": "640, 400"**</div> |
| **ThumbnailRefreshPeriod** | <div style="font-size: small">Thumbnail refresh period in milliseconds. This option accepts values between **300** and **1000** only.<br />The default value is **500** milliseconds.<br />For example: **"ThumbnailRefreshPeriod": 500**</div> |
| **ThumbnailResizeTimeoutPeriod** | <div style="font-size: small">Thumbnail Resize Timeout period in milliseconds. This option accepts values between **200** and **5000** only.<br />The default value is **500** milliseconds.<br />For example: **"ThumbnailResizeTimeoutPeriod": 500**. If you are having the preview windows resize incorrectly on startup increase this value.</div> |
| **ExecutablesToPreview** | <div style="font-size: small">List of executables to display preview windows for. List of strings.<br />The default value is **"exefile"**.<br />For example: **"ExecutablesToPreview": ["exefile","wow","Diablo IV"]**. If you are having the preview windows resize incorrectly on startup increase this value.</div> |
<div style="page-break-after: always;"></div>
@@ -218,19 +220,29 @@ Next find the entry **CycleGroup1ForwardHotkeys**. Most probably it will look li
You should modify this entry with a list of each of your clients replacing "Example DPS Toon 1", etc with the name of your character. The numbers on the right are used to force the order in which they cycle.
If a character appears in the list but is not currently logged in, then it will simply be skipped.
If a character does not appear in the list, then they will never become active when cycling clients.
If "EVE" is used instead of a character name - then this is taken to mean active clients with no active character (ie on character selection screen). This would allow you to setup a cycle group to go through clients at character selection screen. EVE-O Preview will cycle through all clients in this state.
By now you may have noticed that there are two groups. The above configuration can be followed for a second group by using the values **CycleGroup2ForwardHotkeys**, **CycleGroup2BackwardHotkeys**, and **CycleGroup2ForwardHotkeys**
This may provide useful if you want to have one HotKey to cycle through a group of DPS characters, while another HotKey cycles through support roles such as gate scouts, or a group of logi.
By now you may have noticed that there are multiple groups. The above configuration can be followed for a second group by using the values **CycleGroup2ForwardHotkeys**, **CycleGroup2BackwardHotkeys**, and **CycleGroup2ForwardHotkeys**
This may provide useful if you want to have one HotKey to cycle through a group of DPS characters, while another HotKey cycles through support roles such as gate scouts, or a group of logi. Cyclegroups are numbered 1 through 5.
Alternatively you may not want to use any of these HotKeys. Please note that deleting the values in their entirety will simply result in them being automatically re-generated.
Should you wish to remove these HotKeys completely, Simply set the values to empty, such as the example below:
"CycleGroup1ForwardHotkeys": [],
"CycleGroup1ForwardHotkeys": [],
"CycleGroup1BackwardHotkeys": [],
"CycleGroup1ClientsOrder": {},
"CycleGroup2ForwardHotkeys": [],
"CycleGroup2BackwardHotkeys": [],
"CycleGroup2ClientsOrder": {}
"CycleGroup2ClientsOrder": {},
"CycleGroup3ForwardHotkeys": [],
"CycleGroup3BackwardHotkeys": [],
"CycleGroup3ClientsOrder": {},
"CycleGroup4ForwardHotkeys": [],
"CycleGroup4BackwardHotkeys": [],
"CycleGroup4ClientsOrder": {},
"CycleGroup5ForwardHotkeys": [],
"CycleGroup5BackwardHotkeys": [],
"CycleGroup5ClientsOrder": {}
**Hints**
* Minimise the use of modifiers or standard keys to minimise issues with the client playing up. In the default example unusual Function keys (e.g. F14) are used which are then bound to a game pad or gaming mouse.

View File

@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
@@ -35,6 +36,25 @@ namespace EveOPreview.Configuration.Implementation
{ "EVE - Example Tackle Toon 3", 3 }
};
this.CycleGroup3ForwardHotkeys = new List<string> { "" };
this.CycleGroup3BackwardHotkeys = new List<string> { "" };
this.CycleGroup3ClientsOrder = new Dictionary<string, int>
{
{ "EVE - cycle group 3", 1 },
};
this.CycleGroup4ForwardHotkeys = new List<string> { "" };
this.CycleGroup4BackwardHotkeys = new List<string> { "" };
this.CycleGroup4ClientsOrder = new Dictionary<string, int>
{
{ "EVE - cycle group 4", 1 },
};
this.CycleGroup5ForwardHotkeys = new List<string> { "" };
this.CycleGroup5BackwardHotkeys = new List<string> { "" };
this.CycleGroup5ClientsOrder = new Dictionary<string, int>
{
{ "EVE - cycle group 5", 1 },
};
this.PerClientActiveClientHighlightColor = new Dictionary<string, Color>
{
{"EVE - Example Toon 1", Color.Red},
@@ -60,6 +80,8 @@ namespace EveOPreview.Configuration.Implementation
this.DisableThumbnail = new Dictionary<string, bool>();
this.PriorityClients = new List<string>();
this.ExecutablesToPreview = new List<string> { "exefile" };
this.MinimizeToTray = false;
this.ThumbnailRefreshPeriod = 500;
this.ThumbnailResizeTimeoutPeriod = 500;
@@ -70,6 +92,7 @@ namespace EveOPreview.Configuration.Implementation
this.EnableClientLayoutTracking = false;
this.HideActiveClientThumbnail = false;
this.HideLoginClientThumbnail = false;
this.MinimizeInactiveClients = false;
this.WindowsAnimationStyle = AnimationStyle.NoAnimation;
this.ShowThumbnailsAlwaysOnTop = true;
@@ -129,6 +152,33 @@ namespace EveOPreview.Configuration.Implementation
[JsonProperty("CycleGroup2ClientsOrder")]
public Dictionary<string, int> CycleGroup2ClientsOrder { get; set; }
[JsonProperty("CycleGroup3ForwardHotkeys")]
public List<string> CycleGroup3ForwardHotkeys { get; set; }
[JsonProperty("CycleGroup3BackwardHotkeys")]
public List<string> CycleGroup3BackwardHotkeys { get; set; }
[JsonProperty("CycleGroup3ClientsOrder")]
public Dictionary<string, int> CycleGroup3ClientsOrder { get; set; }
[JsonProperty("CycleGroup4ForwardHotkeys")]
public List<string> CycleGroup4ForwardHotkeys { get; set; }
[JsonProperty("CycleGroup4BackwardHotkeys")]
public List<string> CycleGroup4BackwardHotkeys { get; set; }
[JsonProperty("CycleGroup4ClientsOrder")]
public Dictionary<string, int> CycleGroup4ClientsOrder { get; set; }
[JsonProperty("CycleGroup5ForwardHotkeys")]
public List<string> CycleGroup5ForwardHotkeys { get; set; }
[JsonProperty("CycleGroup5BackwardHotkeys")]
public List<string> CycleGroup5BackwardHotkeys { get; set; }
[JsonProperty("CycleGroup5ClientsOrder")]
public Dictionary<string, int> CycleGroup5ClientsOrder { get; set; }
[JsonProperty("PerClientActiveClientHighlightColor")]
public Dictionary<string, Color> PerClientActiveClientHighlightColor { get; set; }
@@ -162,6 +212,7 @@ namespace EveOPreview.Configuration.Implementation
}
public bool HideActiveClientThumbnail { get; set; }
public bool HideLoginClientThumbnail { get; set; }
public bool MinimizeInactiveClients { get; set; }
public AnimationStyle WindowsAnimationStyle { get; set; }
public bool ShowThumbnailsAlwaysOnTop { get; set; }
@@ -224,6 +275,8 @@ namespace EveOPreview.Configuration.Implementation
private Dictionary<string, bool> DisableThumbnail { get; set; }
[JsonProperty]
private List<string> PriorityClients { get; set; }
[JsonProperty]
private List<string> ExecutablesToPreview { get; set; }
public Point GetThumbnailLocation(string currentClient, string activeClient, Point defaultLocation)
{
@@ -326,6 +379,10 @@ namespace EveOPreview.Configuration.Implementation
{
return this.PriorityClients.Contains(currentClient);
}
public bool IsExecutableToPreview(string processName)
{
return this.ExecutablesToPreview.Any(s => s.Equals(processName, StringComparison.OrdinalIgnoreCase));
}
public bool IsThumbnailDisabled(string currentClient)
{

View File

@@ -14,6 +14,18 @@ namespace EveOPreview.Configuration
List<string> CycleGroup2BackwardHotkeys { get; set; }
Dictionary<string, int> CycleGroup2ClientsOrder { get; set; }
List<string> CycleGroup3ForwardHotkeys { get; set; }
List<string> CycleGroup3BackwardHotkeys { get; set; }
Dictionary<string, int> CycleGroup3ClientsOrder { get; set; }
List<string> CycleGroup4ForwardHotkeys { get; set; }
List<string> CycleGroup4BackwardHotkeys { get; set; }
Dictionary<string, int> CycleGroup4ClientsOrder { get; set; }
List<string> CycleGroup5ForwardHotkeys { get; set; }
List<string> CycleGroup5BackwardHotkeys { get; set; }
Dictionary<string, int> CycleGroup5ClientsOrder { get; set; }
Dictionary<string, Color> PerClientActiveClientHighlightColor { get; set; }
Dictionary<string, Size> PerClientThumbnailSize { get; set; }
@@ -26,6 +38,7 @@ namespace EveOPreview.Configuration
bool EnableClientLayoutTracking { get; set; }
bool HideActiveClientThumbnail { get; set; }
bool HideLoginClientThumbnail { get; set; }
bool MinimizeInactiveClients { get; set; }
AnimationStyle WindowsAnimationStyle { get; set; }
bool ShowThumbnailsAlwaysOnTop { get; set; }
@@ -73,6 +86,7 @@ namespace EveOPreview.Configuration
Keys StringToKey(string hotkey);
bool IsPriorityClient(string currentClient);
bool IsExecutableToPreview(string processName);
bool IsThumbnailDisabled(string currentClient);
void ToggleThumbnail(string currentClient, bool isDisabled);

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.5")]
[assembly: AssemblyFileVersion("8.0.1.5")]
[assembly: AssemblyVersion("8.0.1.8")]
[assembly: AssemblyFileVersion("8.0.1.8")]
[assembly: CLSCompliant(false)]

View File

@@ -1,4 +1,5 @@
using System;
using EveOPreview.Configuration;
using System;
using System.Collections.Generic;
using System.Diagnostics;
@@ -14,12 +15,14 @@ namespace EveOPreview.Services.Implementation
#region Private fields
private readonly IDictionary<IntPtr, string> _processCache;
private IProcessInfo _currentProcessInfo;
private readonly IThumbnailConfiguration _configuration;
#endregion
public ProcessMonitor()
public ProcessMonitor(IThumbnailConfiguration configuration)
{
this._processCache = new Dictionary<IntPtr, string>(512);
this._configuration = configuration;
// This field cannot be initialized properly in constructor
// At the moment this code is executed the main application window is not yet initialized
this._currentProcessInfo = new ProcessInfo(IntPtr.Zero, "");
@@ -28,7 +31,7 @@ namespace EveOPreview.Services.Implementation
private bool IsMonitoredProcess(string processName)
{
// This is a possible extension point
return String.Equals(processName, ProcessMonitor.DEFAULT_PROCESS_NAME, StringComparison.OrdinalIgnoreCase);
return _configuration.IsExecutableToPreview(processName);
}
private IProcessInfo GetCurrentProcessInfo()

View File

@@ -81,6 +81,15 @@ namespace EveOPreview.Services
RegisterCycleClientHotkey(this._configuration.CycleGroup2ForwardHotkeys?.Select(x => this._configuration.StringToKey(x)), true, this._configuration.CycleGroup2ClientsOrder);
RegisterCycleClientHotkey(this._configuration.CycleGroup2BackwardHotkeys?.Select(x => this._configuration.StringToKey(x)), false, this._configuration.CycleGroup2ClientsOrder);
RegisterCycleClientHotkey(this._configuration.CycleGroup3ForwardHotkeys?.Select(x => this._configuration.StringToKey(x)), true, this._configuration.CycleGroup3ClientsOrder);
RegisterCycleClientHotkey(this._configuration.CycleGroup3BackwardHotkeys?.Select(x => this._configuration.StringToKey(x)), false, this._configuration.CycleGroup3ClientsOrder);
RegisterCycleClientHotkey(this._configuration.CycleGroup4ForwardHotkeys?.Select(x => this._configuration.StringToKey(x)), true, this._configuration.CycleGroup4ClientsOrder);
RegisterCycleClientHotkey(this._configuration.CycleGroup4BackwardHotkeys?.Select(x => this._configuration.StringToKey(x)), false, this._configuration.CycleGroup4ClientsOrder);
RegisterCycleClientHotkey(this._configuration.CycleGroup5ForwardHotkeys?.Select(x => this._configuration.StringToKey(x)), true, this._configuration.CycleGroup5ClientsOrder);
RegisterCycleClientHotkey(this._configuration.CycleGroup5BackwardHotkeys?.Select(x => this._configuration.StringToKey(x)), false, this._configuration.CycleGroup5ClientsOrder);
}
public IThumbnailView GetClientByTitle(string title)
@@ -126,13 +135,46 @@ namespace EveOPreview.Services
foreach (var t in clientOrder)
{
if (t.Key == _activeClient.Title)
if (t.Key == _activeClient.Title && t.Key != "EVE")
{
setNextClient = true;
lastClient = _thumbnailViews.FirstOrDefault(x => x.Value.Title == t.Key).Value;
continue;
}
// cycle through login screens ?
if (t.Key == _activeClient.Title && t.Key == "EVE")
{
lastClient = _thumbnailViews.FirstOrDefault(x => x.Value.Title == t.Key && x.Value.Id == _activeClient.Handle).Value;
if (lastClient == null)
{
setNextClient = true;
continue;
}
var possibleClients = (isForwards ? _thumbnailViews.OrderBy(x => x.Value.Id.ToInt64()) : _thumbnailViews.OrderByDescending(x => x.Value.Id.ToInt64())).Where(x => x.Value.Title == t.Key);
foreach (var pc in possibleClients)
{
if ( pc.Value.Id.Equals(lastClient.Id) )
{
setNextClient = true;
continue;
}
if (!setNextClient)
{
continue;
}
// this is the next client (at login screen)
SetActive(pc);
return;
}
// rolled off top of list - back to first (if any there!)
// set next client ?
continue;
}
if (!setNextClient)
{
continue;
@@ -140,7 +182,9 @@ namespace EveOPreview.Services
if (_thumbnailViews.Any(x => x.Value.Title == t.Key))
{
var ptr = _thumbnailViews.First(x => x.Value.Title == t.Key);
var ptr = t.Key.Equals("EVE") ?
(isForwards ? _thumbnailViews.OrderBy(x => x.Value.Id.ToInt64()) : _thumbnailViews.OrderByDescending(x => x.Value.Id.ToInt64())).First(x => x.Value.Title == t.Key)
: _thumbnailViews.First(x => x.Value.Title == t.Key);
SetActive(ptr);
return;
}
@@ -151,7 +195,9 @@ namespace EveOPreview.Services
{
if (_thumbnailViews.Any(x => x.Value.Title == t.Key))
{
var ptr = _thumbnailViews.First(x => x.Value.Title == t.Key);
var ptr = t.Key.Equals("EVE") ?
(isForwards ? _thumbnailViews.OrderBy(x => x.Value.Id.ToInt64()) : _thumbnailViews.OrderByDescending(x => x.Value.Id.ToInt64())).First(x => x.Value.Title == t.Key)
: _thumbnailViews.First(x => x.Value.Title == t.Key);
SetActive(ptr);
_activeClient = (ptr.Key, t.Key);
return;
@@ -406,6 +452,15 @@ namespace EveOPreview.Services
continue;
}
if (this._configuration.HideLoginClientThumbnail && (view.Title == DEFAULT_CLIENT_TITLE ))
{
if (view.IsActive)
{
view.Hide();
}
continue;
}
// No need to update Thumbnails while one of them is highlighted
if (!this._isHoverEffectActive)
{

View File

@@ -39,6 +39,7 @@ namespace EveOPreview.View
System.Windows.Forms.TabControl ContentTabControl;
System.Windows.Forms.TabPage GeneralTabPage;
System.Windows.Forms.Panel GeneralSettingsPanel;
System.Windows.Forms.Label label4;
System.Windows.Forms.TabPage ThumbnailTabPage;
System.Windows.Forms.Panel ThumbnailSettingsPanel;
System.Windows.Forms.Label HeigthLabel;
@@ -59,7 +60,6 @@ namespace EveOPreview.View
System.Windows.Forms.Label DescriptionLabel;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
System.Windows.Forms.Label NameLabel;
System.Windows.Forms.Label label4;
this.AnimationStyleCombo = new System.Windows.Forms.ComboBox();
this.MinimizeInactiveClientsCheckBox = new System.Windows.Forms.CheckBox();
this.EnableClientLayoutTrackingCheckBox = new System.Windows.Forms.CheckBox();
@@ -122,6 +122,7 @@ namespace EveOPreview.View
ContentTabControl = new System.Windows.Forms.TabControl();
GeneralTabPage = new System.Windows.Forms.TabPage();
GeneralSettingsPanel = new System.Windows.Forms.Panel();
label4 = new System.Windows.Forms.Label();
ThumbnailTabPage = new System.Windows.Forms.TabPage();
ThumbnailSettingsPanel = new System.Windows.Forms.Panel();
HeigthLabel = new System.Windows.Forms.Label();
@@ -141,7 +142,6 @@ namespace EveOPreview.View
DocumentationLinkLabel = new System.Windows.Forms.Label();
DescriptionLabel = new System.Windows.Forms.Label();
NameLabel = new System.Windows.Forms.Label();
label4 = new System.Windows.Forms.Label();
ContentTabControl.SuspendLayout();
GeneralTabPage.SuspendLayout();
GeneralSettingsPanel.SuspendLayout();
@@ -244,6 +244,15 @@ namespace EveOPreview.View
GeneralSettingsPanel.TabIndex = 18;
GeneralSettingsPanel.Paint += new System.Windows.Forms.PaintEventHandler(this.GeneralSettingsPanel_Paint);
//
// 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";
//
// AnimationStyleCombo
//
this.AnimationStyleCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
@@ -407,6 +416,7 @@ namespace EveOPreview.View
0,
0,
0});
this.ThumbnailSnapToGridSizeYNumericEdit.ValueChanged += new System.EventHandler(this.OptionChanged_Handler);
//
// SnapYLabel
//
@@ -1173,15 +1183,6 @@ namespace EveOPreview.View
this.TrayMenu.Name = "contextMenuStrip1";
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
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

View File

@@ -28,8 +28,8 @@ namespace EveOPreview.View
this._overlayLabelMap = new Dictionary<ViewZoomAnchor, RadioButton>();
this._cachedThumbnailZoomAnchor = ViewZoomAnchor.NW;
this._suppressEvents = false;
this._minimumSize = new Size(80, 60);
this._maximumSize = new Size(80, 60);
this._minimumSize = new Size(20, 20);
this._maximumSize = new Size(20, 20);
InitializeComponent();

View File

@@ -57,6 +57,7 @@
this.OverlayLabel.Size = new System.Drawing.Size(25, 13);
this.OverlayLabel.TabIndex = 1;
this.OverlayLabel.Text = "...";
this.OverlayLabel.MouseUp += new System.Windows.Forms.MouseEventHandler(this.OverlayArea_Click);
//
// ThumbnailOverlay
//

View File

@@ -28,7 +28,7 @@ namespace EveOPreview.View
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.MinimumSize = new System.Drawing.Size(64, 64);
this.MinimumSize = new System.Drawing.Size(20, 20);
this.Name = "ThumbnailView";
this.Opacity = 0.1D;
this.ShowIcon = false;