Skip to content
This repository has been archived by the owner on May 19, 2022. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
Anton Kasyanov committed Jul 5, 2017
2 parents 44687f9 + abf8162 commit 9d0527c
Showing 7 changed files with 56 additions and 92 deletions.
13 changes: 11 additions & 2 deletions Eve-O-Preview/Configuration/ConfigurationStorage.cs
Original file line number Diff line number Diff line change
@@ -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()
2 changes: 1 addition & 1 deletion Eve-O-Preview/Presentation/MainPresenter.cs
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ namespace EveOPreview.UI
public class MainPresenter : Presenter<IMainView>
{
#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
43 changes: 23 additions & 20 deletions Eve-O-Preview/Presentation/ThumbnailManager.cs
Original file line number Diff line number Diff line change
@@ -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
@@ -360,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)
if (!this._thumbnailViews.TryGetValue(id, out view))
{
WindowManagerNativeMethods.SendMessage(view.Id, WindowManagerNativeMethods.WM_SYSCOMMAND, WindowManagerNativeMethods.SC_MINIMIZE, 0);
}
else
{
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();
}

@@ -473,13 +465,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 +488,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);
}
}
}
4 changes: 2 additions & 2 deletions Eve-O-Preview/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -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)]
8 changes: 6 additions & 2 deletions Eve-O-Preview/UI/Implementation/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 0 additions & 60 deletions Eve-O-Preview/UI/Implementation/MainForm.resx
Original file line number Diff line number Diff line change
@@ -135,24 +135,6 @@
<metadata name="GeneralTabPage.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="OverlayTabPage.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="ClientsTabPage.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="GeneralTabPage.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="GeneralSettingsPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
@@ -162,18 +144,6 @@
<metadata name="ThumbnailSettingsPanel.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>
@@ -186,15 +156,6 @@
<metadata name="ZoomSettingsPanel.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>
@@ -207,21 +168,12 @@
<metadata name="OverlaySettingsPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="OverlaySettingsPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="ClientsTabPage.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="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>
@@ -231,18 +183,6 @@
<metadata name="AboutPanel.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="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="DocumentationLinkLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -5,10 +5,11 @@ 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
* 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.**

@@ -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
@@ -74,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 |
@@ -137,6 +140,9 @@ The following hotkey is described as `modifier+key` where `modifier` can be **Co
## Maintained by

* Phrynohyas Tig-Rah


## Previous maintainers

* Makari Aeron

@@ -150,7 +156,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/4202


## Original threads
@@ -159,6 +165,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

0 comments on commit 9d0527c

Please sign in to comment.