Clear per client layouts library when the corresponding option is unset

This commit is contained in:
Anton Kasyanov
2018-03-12 21:12:06 +02:00
parent fa7c4a9bfb
commit 0e874f1640

View File

@@ -7,6 +7,10 @@ namespace EveOPreview.Configuration.Omplementation
{
sealed class ThumbnailConfiguration : IThumbnailConfiguration
{
#region Private fields
private bool _enablePerClientThumbnailLayouts;
#endregion
public ThumbnailConfiguration()
{
this.MinimizeToTray = false;
@@ -19,7 +23,7 @@ namespace EveOPreview.Configuration.Omplementation
this.MinimizeInactiveClients = false;
this.ShowThumbnailsAlwaysOnTop = true;
this.HideThumbnailsOnLostFocus = false;
this.EnablePerClientThumbnailLayouts = false;
this._enablePerClientThumbnailLayouts = false;
this.ThumbnailSize = new Size(384, 216);
this.ThumbnailMinimumSize = new Size(192, 108);
@@ -54,7 +58,18 @@ namespace EveOPreview.Configuration.Omplementation
public bool MinimizeInactiveClients { get; set; }
public bool ShowThumbnailsAlwaysOnTop { get; set; }
public bool HideThumbnailsOnLostFocus { get; set; }
public bool EnablePerClientThumbnailLayouts { get; set; }
public bool EnablePerClientThumbnailLayouts
{
get => this._enablePerClientThumbnailLayouts;
set
{
if (!value)
{
this.PerClientLayout.Clear();
}
this._enablePerClientThumbnailLayouts = value;
}
}
public Size ThumbnailSize { get; set; }
public Size ThumbnailMaximumSize { get; set; }