Always create thumbnail of the not-yet-logged-in client in the upper left corner of the screen

This commit is contained in:
Anton Kasyanov
2017-06-17 19:43:00 +03:00
parent 5277a52bae
commit 12eb5c3d0a
3 changed files with 13 additions and 1 deletions

View File

@@ -34,6 +34,7 @@ namespace EveOPreview.Configuration
Color ActiveClientHighlightColor { get; set; }
int ActiveClientHighlightThickness { get; set; }
Point GetDefaultThumbnailLocation();
Point GetThumbnailLocation(string currentClient, string activeClient, Point defaultLocation);
void SetThumbnailLocation(string currentClient, string activeClient, Point location);

View File

@@ -80,6 +80,14 @@ namespace EveOPreview.Configuration
[JsonProperty]
private Dictionary<string, string> ClientHotkey { get; set; }
public Point GetDefaultThumbnailLocation()
{
// Returns default thumbnail location
// This location can be used for f.e. EVE clients sitting on the login screen
// Can be made configurable later (that's why it was moved out here)
return new Point(5, 5);
}
public Point GetThumbnailLocation(string currentClient, string activeClient, Point defaultLocation)
{
Point location;

View File

@@ -218,7 +218,10 @@ namespace EveOPreview.UI
// Otherwise thumbnail window will be unnecessary resized
view.SetSizeLimitations(this._configuration.ThumbnailMinimumSize, this._configuration.ThumbnailMaximumSize);
view.SetTopMost(this._configuration.ShowThumbnailsAlwaysOnTop);
view.ThumbnailLocation = this._configuration.GetThumbnailLocation(processTitle, this._activeClientTitle, view.ThumbnailLocation);
view.ThumbnailLocation = processTitle == ThumbnailManager.DefaultClientTitle
? this._configuration.GetDefaultThumbnailLocation()
: this._configuration.GetThumbnailLocation(processTitle, this._activeClientTitle, view.ThumbnailLocation);
this._thumbnailViews.Add(processHandle, view);