From 08740f743c91de660321282ead69ba8ed2c3bbf6 Mon Sep 17 00:00:00 2001 From: Anton Kasyanov Date: Tue, 20 Jun 2017 20:12:53 +0300 Subject: [PATCH 01/10] readme.md update --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a837bf2..cab65f8 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ The purpose of this application is to provide a simple way to keep an eye on sev It's essentially a task switcher, it does not relay any keyboard/mouse events and suchlike. The app works with EVE, EVE through Steam, or any combination thereof. The program does NOT (and will NOT ever) do the following things: + * modify EVE Online interface * display modified EVE Online interface * broadcast any keyboard or mouse events @@ -24,13 +25,13 @@ If you have find out that some of the features or their combination of EVE-O Pre # How To Install & Use 1. Download and extract the contents of the .zip archive to a location of your choice (ie: Desktop, CCP folder, etc) -..* **Note**: Please do not install the program into the *Program Files* or *Program files (x86)* folders. These folders in general do not allow applications to write anything there while EVE-O Preview now stores its configuration file next to its executable, thus requiring the write access to the folder it is installed into. +..* **Note**: Please do not install the application into the *Program Files* or *Program files (x86)* folders. These folders in general do not allow applications to write anything there while EVE-O Preview now stores its configuration file next to its executable, thus requiring the write access to the folder it is installed into. 2. Start up both EVE-O Preview and your EVE Clients (the order does not matter) 3. Adjust settings as you see fit. Program options are described below # EVE Online EULA/ToS -This program is legal under the EULA/ToS: +This application is legal under the EULA/ToS: CCP FoxFour wrote: > Please keep the discussion on topic. The legitimacy of this software has already been discussed @@ -159,6 +160,8 @@ https://forums.eveonline.com/default.aspx?g=posts&t=484927 * https://forums.eveonline.com/default.aspx?g=posts&t=246157 +* https://forums.eveonline.com/default.aspx?g=posts&t=484927 + ## Original repository From 1093b5e22cd8348a9965f4b1050c3d8d7d08d8ee Mon Sep 17 00:00:00 2001 From: Anton Kasyanov Date: Tue, 20 Jun 2017 20:21:55 +0300 Subject: [PATCH 02/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cab65f8..fb56d04 100644 --- a/README.md +++ b/README.md @@ -151,7 +151,7 @@ The following hotkey is described as `modifier+key` where `modifier` can be **Co ## Forum thread -https://forums.eveonline.com/default.aspx?g=posts&t=484927 +https://meta.eveonline.com/t/eve-o-preview-v3-0-0-multi-client-preview-switcher/4202 ## Original threads From a7e56018466b35d476b8c50aedd79d6fef74b923 Mon Sep 17 00:00:00 2001 From: Anton Kasyanov Date: Wed, 5 Jul 2017 21:43:53 +0300 Subject: [PATCH 03/10] Documentation update --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fb56d04..bdf9d81 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,9 @@ The following hotkey is described as `modifier+key` where `modifier` can be **Co ## Maintained by * Phrynohyas Tig-Rah + + +## Previous maintainers * Makari Aeron @@ -151,7 +154,7 @@ The following hotkey is described as `modifier+key` where `modifier` can be **Co ## Forum thread -https://meta.eveonline.com/t/eve-o-preview-v3-0-0-multi-client-preview-switcher/4202 +https://meta.eveonline.com/t/4202 ## Original threads From 7b1a37aea74480caba94055de8d9d402726070e2 Mon Sep 17 00:00:00 2001 From: Anton Kasyanov Date: Wed, 5 Jul 2017 21:44:26 +0300 Subject: [PATCH 04/10] Updated app version to 3.0.1 --- Eve-O-Preview/Properties/AssemblyInfo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Eve-O-Preview/Properties/AssemblyInfo.cs b/Eve-O-Preview/Properties/AssemblyInfo.cs index 85dc7c2..5988898 100644 --- a/Eve-O-Preview/Properties/AssemblyInfo.cs +++ b/Eve-O-Preview/Properties/AssemblyInfo.cs @@ -12,7 +12,7 @@ [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: Guid("04f08f8d-9e98-423b-acdb-4effb31c0d35")] -[assembly: AssemblyVersion("3.0.0.0")] -[assembly: AssemblyFileVersion("3.0.0.0")] +[assembly: AssemblyVersion("3.0.0.1")] +[assembly: AssemblyFileVersion("3.0.0.1")] [assembly: CLSCompliant(true)] \ No newline at end of file From cb0dcedf6ed6d83a472100dba2c328b0846aeb0f Mon Sep 17 00:00:00 2001 From: Anton Kasyanov Date: Wed, 5 Jul 2017 21:54:05 +0300 Subject: [PATCH 05/10] MainWindow.About tab GUI tweak --- .../UI/Implementation/MainForm.Designer.cs | 8 ++- Eve-O-Preview/UI/Implementation/MainForm.resx | 60 ------------------- 2 files changed, 6 insertions(+), 62 deletions(-) diff --git a/Eve-O-Preview/UI/Implementation/MainForm.Designer.cs b/Eve-O-Preview/UI/Implementation/MainForm.Designer.cs index 9276f1e..50698c1 100644 --- a/Eve-O-Preview/UI/Implementation/MainForm.Designer.cs +++ b/Eve-O-Preview/UI/Implementation/MainForm.Designer.cs @@ -755,7 +755,8 @@ private void InitializeComponent() DocumentationLinkLabel.AutoSize = true; DocumentationLinkLabel.Location = new System.Drawing.Point(0, 157); DocumentationLinkLabel.Name = "DocumentationLinkLabel"; - DocumentationLinkLabel.Size = new System.Drawing.Size(206, 13); + DocumentationLinkLabel.Padding = new System.Windows.Forms.Padding(8, 3, 8, 3); + DocumentationLinkLabel.Size = new System.Drawing.Size(222, 19); DocumentationLinkLabel.TabIndex = 6; DocumentationLinkLabel.Text = "For more information visit our forum thread:"; // @@ -763,7 +764,8 @@ private void InitializeComponent() // DescriptionLabel.Location = new System.Drawing.Point(0, 41); DescriptionLabel.Name = "DescriptionLabel"; - DescriptionLabel.Size = new System.Drawing.Size(261, 108); + DescriptionLabel.Padding = new System.Windows.Forms.Padding(8, 3, 8, 3); + DescriptionLabel.Size = new System.Drawing.Size(261, 116); DescriptionLabel.TabIndex = 5; DescriptionLabel.Text = resources.GetString("DescriptionLabel.Text"); // @@ -790,7 +792,9 @@ private void InitializeComponent() // DocumentationLink // this.DocumentationLink.Location = new System.Drawing.Point(0, 173); + this.DocumentationLink.Margin = new System.Windows.Forms.Padding(30, 3, 3, 3); this.DocumentationLink.Name = "DocumentationLink"; + this.DocumentationLink.Padding = new System.Windows.Forms.Padding(8, 3, 8, 3); this.DocumentationLink.Size = new System.Drawing.Size(262, 33); this.DocumentationLink.TabIndex = 2; this.DocumentationLink.TabStop = true; diff --git a/Eve-O-Preview/UI/Implementation/MainForm.resx b/Eve-O-Preview/UI/Implementation/MainForm.resx index fddb21e..137ad30 100644 --- a/Eve-O-Preview/UI/Implementation/MainForm.resx +++ b/Eve-O-Preview/UI/Implementation/MainForm.resx @@ -135,24 +135,6 @@ False - - False - - - False - - - False - - - False - - - False - - - False - False @@ -162,18 +144,6 @@ False - - False - - - False - - - False - - - False - False @@ -186,15 +156,6 @@ False - - False - - - False - - - False - False @@ -207,21 +168,12 @@ False - - False - False False - - False - - - False - False @@ -231,18 +183,6 @@ False - - False - - - False - - - False - - - False - False From 52b041ec76d04a78841ed28c2d10bfbe9241a525 Mon Sep 17 00:00:00 2001 From: Anton Kasyanov Date: Wed, 5 Jul 2017 21:54:56 +0300 Subject: [PATCH 06/10] Provide new Forum link in the About tab --- Eve-O-Preview/Presentation/MainPresenter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Eve-O-Preview/Presentation/MainPresenter.cs b/Eve-O-Preview/Presentation/MainPresenter.cs index eaf55ab..c83bb40 100644 --- a/Eve-O-Preview/Presentation/MainPresenter.cs +++ b/Eve-O-Preview/Presentation/MainPresenter.cs @@ -9,7 +9,7 @@ namespace EveOPreview.UI public class MainPresenter : Presenter { #region Private constants - private const string ForumUrl = @"https://forums.eveonline.com/default.aspx?g=posts&t=484927"; + private const string ForumUrl = @"https://meta.eveonline.com/t/4202"; #endregion #region Private fields From f9ca98f317cda1e1c71dbeebd2c3a6a901cbed23 Mon Sep 17 00:00:00 2001 From: Anton Kasyanov Date: Wed, 5 Jul 2017 22:03:15 +0300 Subject: [PATCH 07/10] Documentation update - Add info about the Ctrl+Click action --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bdf9d81..de37c01 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The program does NOT (and will NOT ever) do the following things: * modify EVE Online interface * display modified EVE Online interface * broadcast any keyboard or mouse events -* anyhow interact with EVE Online except of bringing its main window to foreground or resizing it +* anyhow interact with EVE Online except of bringing its main window to foreground or resizing/minimizing it **Under any conditions you should NOT use EVE-O Preview for any actions that break EULA or ToS of EVE Online.** @@ -75,12 +75,14 @@ CCP FoxFour wrote: | Overlay | Color | Color used to highlight the active client's thumbnail in case the corresponding option is set | | **Active Clients** | Thumbnails list | List of currently active EVE client thumbnails. Checking an element in this list will hide the corresponding thumbnail. However these checks are not persisted and on the next EVE client or EVE-O Preview run the thumbnail will be visible again | -## Mouse Gestures +## Mouse Gestures and Actions Mouse gestures are applied to the thumbnail window currently being hovered over. | Action | Gesture | | --- | --- | +| Activate the EVE Online client and bring it to front | Click the thumbnail | +| Minimize the EVE Online client | Hold Control key and click the thumbnail | | Move thumbnail to a new position | Press right mouse button and move the mouse | | Adjust thumbnail height | Press both left and right mouse buttons and move the mouse up or down | | Adjust thumbnail width | Press both left and right mouse buttons and move the mouse left or right | From 6bd6eafc2ce5addf26525a1829ec7b1c6b6bb6fb Mon Sep 17 00:00:00 2001 From: Anton Kasyanov Date: Wed, 5 Jul 2017 22:06:38 +0300 Subject: [PATCH 08/10] Odd coordinates like (-32000, -32000) are saved as EVE Online main window position --- .../Presentation/ThumbnailManager.cs | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/Eve-O-Preview/Presentation/ThumbnailManager.cs b/Eve-O-Preview/Presentation/ThumbnailManager.cs index 01f957c..717e7c9 100644 --- a/Eve-O-Preview/Presentation/ThumbnailManager.cs +++ b/Eve-O-Preview/Presentation/ThumbnailManager.cs @@ -10,6 +10,9 @@ namespace EveOPreview.UI public class ThumbnailManager : IThumbnailManager { #region Private constants + private const int WindowPositionThreshold = -5000; + private const int WindowSizeThreshold = -5000; + private const string ClientProcessName = "ExeFile"; private const string DefaultClientTitle = "EVE"; #endregion @@ -473,13 +476,13 @@ private void UpdateClientLayouts() RECT rect; WindowManagerNativeMethods.GetWindowRect(process.MainWindowHandle, out rect); - int left = Math.Abs(rect.Left); - int right = Math.Abs(rect.Right); - int clientWidth = Math.Abs(left - right); + int clientWidth = Math.Abs(rect.Right - rect.Left); + int clientHeight = Math.Abs(rect.Bottom - rect.Top); - int top = Math.Abs(rect.Top); - int bottom = Math.Abs(rect.Bottom); - int clientHeight = Math.Abs(top - bottom); + if (!this.IsManageableWindow(rect.Left, rect.Top, clientWidth, clientHeight)) + { + continue; + } ClientLayout clientLayout = new ClientLayout(); clientLayout.X = rect.Left; @@ -496,5 +499,16 @@ private bool IsManageableThumbnail(IThumbnailView view) { return view.Title != ThumbnailManager.DefaultClientTitle; } + + // Quick sanity check + // EVE Online client can create a window on a really weird position outside of the screen for some reason + // In this case we need to just skip such clients + private bool IsManageableWindow(int letf, int top, int width, int height) + { + return (letf >= ThumbnailManager.WindowPositionThreshold) + && (top >= ThumbnailManager.WindowPositionThreshold) + && (width >= ThumbnailManager.WindowSizeThreshold) + && (height >= ThumbnailManager.WindowSizeThreshold); + } } } \ No newline at end of file From 1d37e4373c9a5480052269eea8d10d6b11e4571a Mon Sep 17 00:00:00 2001 From: Anton Kasyanov Date: Wed, 5 Jul 2017 22:07:32 +0300 Subject: [PATCH 09/10] Streamline code used to minimize the EVE Online main window --- Eve-O-Preview/Presentation/ThumbnailManager.cs | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/Eve-O-Preview/Presentation/ThumbnailManager.cs b/Eve-O-Preview/Presentation/ThumbnailManager.cs index 717e7c9..10f64d1 100644 --- a/Eve-O-Preview/Presentation/ThumbnailManager.cs +++ b/Eve-O-Preview/Presentation/ThumbnailManager.cs @@ -363,23 +363,12 @@ private void ThumbnailActivated(IntPtr id) private void ThumbnailDeactivated(IntPtr id) { IThumbnailView view; - this._thumbnailViews.TryGetValue(id, out view); - - - if (view?.Id == this._activeClientHandle) - { - WindowManagerNativeMethods.SendMessage(view.Id, WindowManagerNativeMethods.WM_SYSCOMMAND, WindowManagerNativeMethods.SC_MINIMIZE, 0); - } - else + if (!this._thumbnailViews.TryGetValue(id, out view)) { - int style = WindowManagerNativeMethods.GetWindowLong(id, WindowManagerNativeMethods.GWL_STYLE); - // If the window is not already minimized then minimize it - if ((style & WindowManagerNativeMethods.WS_MINIMIZE) != WindowManagerNativeMethods.WS_MINIMIZE) - { - WindowManagerNativeMethods.ShowWindowAsync(id, WindowManagerNativeMethods.SW_SHOWMINIMIZED); - } + return; } + WindowManagerNativeMethods.SendMessage(view.Id, WindowManagerNativeMethods.WM_SYSCOMMAND, WindowManagerNativeMethods.SC_MINIMIZE, 0); this.RefreshThumbnails(); } From abf81625c436562acbb13f5c3ab4d0a427e25fee Mon Sep 17 00:00:00 2001 From: Anton Kasyanov Date: Wed, 5 Jul 2017 22:11:45 +0300 Subject: [PATCH 10/10] Application crashes if its configuration file is locked while it attempts to write down changed configuration --- Eve-O-Preview/Configuration/ConfigurationStorage.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Eve-O-Preview/Configuration/ConfigurationStorage.cs b/Eve-O-Preview/Configuration/ConfigurationStorage.cs index f6452db..e378dbf 100644 --- a/Eve-O-Preview/Configuration/ConfigurationStorage.cs +++ b/Eve-O-Preview/Configuration/ConfigurationStorage.cs @@ -1,4 +1,5 @@ -using System.IO; +using System; +using System.IO; using Newtonsoft.Json; namespace EveOPreview.Configuration @@ -36,8 +37,16 @@ public void Load() public void Save() { string rawData = JsonConvert.SerializeObject(this._thumbnailConfig, Formatting.Indented); + string filename = this.GetConfigFileName(); - File.WriteAllText(this.GetConfigFileName(), rawData); + try + { + File.WriteAllText(filename, rawData); + } + catch (IOException) + { + // Ignore error if for some reason the updated config cannot be written down + } } private string GetConfigFileName()