Merge branch 'develop'

This commit is contained in:
Anton Kasyanov
2016-08-18 21:13:18 +03:00
19 changed files with 699 additions and 365 deletions

View File

@@ -5,15 +5,15 @@ using Newtonsoft.Json;
namespace EveOPreview.Configuration namespace EveOPreview.Configuration
{ {
public class ApplicationConfiguration : IApplicationConfiguration public class AppConfig : IAppConfig
{ {
public ApplicationConfiguration() public AppConfig()
{ {
// Default values // Default values
this.MinimizeToTray = false; this.MinimizeToTray = false;
this.ThumbnailRefreshPeriod = 500; this.ThumbnailRefreshPeriod = 500;
this.ThumbnailsOpacity = 0.5; this.ThumbnailOpacity = 0.5;
this.EnableClientLayoutTracking = false; this.EnableClientLayoutTracking = false;
this.HideActiveClientThumbnail = false; this.HideActiveClientThumbnail = false;
@@ -25,13 +25,16 @@ namespace EveOPreview.Configuration
this.ThumbnailMinimumSize = new Size(100, 80); this.ThumbnailMinimumSize = new Size(100, 80);
this.ThumbnailMaximumSize = new Size(640, 400); this.ThumbnailMaximumSize = new Size(640, 400);
this.EnableThumbnailZoom = false; this.ThumbnailZoomEnabled = false;
this.ThumbnailZoomFactor = 2; this.ThumbnailZoomFactor = 2;
this.ThumbnailZoomAnchor = ZoomAnchor.NW; this.ThumbnailZoomAnchor = ZoomAnchor.NW;
this.ShowThumbnailOverlays = true; this.ShowThumbnailOverlays = true;
this.ShowThumbnailFrames = true; this.ShowThumbnailFrames = true;
this.EnableActiveClientHighlight = false;
this.ActiveClientHighlightColor = Color.Yellow;
this.PerClientLayout = new Dictionary<string, Dictionary<string, Point>>(); this.PerClientLayout = new Dictionary<string, Dictionary<string, Point>>();
this.FlatLayout = new Dictionary<string, Point>(); this.FlatLayout = new Dictionary<string, Point>();
this.ClientLayout = new Dictionary<string, ClientLayout>(); this.ClientLayout = new Dictionary<string, ClientLayout>();
@@ -41,7 +44,8 @@ namespace EveOPreview.Configuration
public bool MinimizeToTray { get; set; } public bool MinimizeToTray { get; set; }
public int ThumbnailRefreshPeriod { get; set; } public int ThumbnailRefreshPeriod { get; set; }
public double ThumbnailsOpacity { get; set; } [JsonProperty("ThumbnailsOpacity")]
public double ThumbnailOpacity { get; set; }
public bool EnableClientLayoutTracking { get; set; } public bool EnableClientLayoutTracking { get; set; }
public bool HideActiveClientThumbnail { get; set; } public bool HideActiveClientThumbnail { get; set; }
@@ -53,13 +57,17 @@ namespace EveOPreview.Configuration
public Size ThumbnailMaximumSize { get; set; } public Size ThumbnailMaximumSize { get; set; }
public Size ThumbnailMinimumSize { get; set; } public Size ThumbnailMinimumSize { get; set; }
public bool EnableThumbnailZoom { get; set; } [JsonProperty("EnableThumbnailZoom")]
public bool ThumbnailZoomEnabled { get; set; }
public int ThumbnailZoomFactor { get; set; } public int ThumbnailZoomFactor { get; set; }
public ZoomAnchor ThumbnailZoomAnchor { get; set; } public ZoomAnchor ThumbnailZoomAnchor { get; set; }
public bool ShowThumbnailOverlays { get; set; } public bool ShowThumbnailOverlays { get; set; }
public bool ShowThumbnailFrames { get; set; } public bool ShowThumbnailFrames { get; set; }
public bool EnableActiveClientHighlight { get; set; }
public Color ActiveClientHighlightColor { get; set; }
[JsonProperty] [JsonProperty]
private Dictionary<string, Dictionary<string, Point>> PerClientLayout { get; set; } private Dictionary<string, Dictionary<string, Point>> PerClientLayout { get; set; }
[JsonProperty] [JsonProperty]
@@ -149,5 +157,32 @@ namespace EveOPreview.Configuration
{ {
this.ClientHotkey[currentClient] = (new KeysConverter()).ConvertToInvariantString(hotkey); this.ClientHotkey[currentClient] = (new KeysConverter()).ConvertToInvariantString(hotkey);
} }
/// <summary>
/// Applies restrictions to different parameters of the config
/// </summary>
public void ApplyRestrictions()
{
this.ThumbnailRefreshPeriod = AppConfig.ApplyRestrictions(this.ThumbnailRefreshPeriod, 300, 1000);
this.ThumbnailSize = new Size(AppConfig.ApplyRestrictions(this.ThumbnailSize.Width, this.ThumbnailMinimumSize.Width, this.ThumbnailMaximumSize.Width),
AppConfig.ApplyRestrictions(this.ThumbnailSize.Height, this.ThumbnailMinimumSize.Height, this.ThumbnailMaximumSize.Height));
this.ThumbnailOpacity = AppConfig.ApplyRestrictions((int)(this.ThumbnailOpacity * 100.00), 20, 100) / 100.00;
this.ThumbnailZoomFactor = AppConfig.ApplyRestrictions(this.ThumbnailZoomFactor, 2, 10);
}
private static int ApplyRestrictions(int value, int minimum, int maximum)
{
if (value <= minimum)
{
return minimum;
}
if (value >= maximum)
{
return maximum;
}
return value;
}
} }
} }

View File

@@ -7,9 +7,9 @@ namespace EveOPreview.Configuration
{ {
private const string ConfigurationFileName = "EVE-O Preview.json"; private const string ConfigurationFileName = "EVE-O Preview.json";
private readonly IApplicationConfiguration _configuration; private readonly IAppConfig _configuration;
public ConfigurationStorage(IApplicationConfiguration configuration) public ConfigurationStorage(IAppConfig configuration)
{ {
this._configuration = configuration; this._configuration = configuration;
} }
@@ -24,6 +24,9 @@ namespace EveOPreview.Configuration
string rawData = File.ReadAllText(ConfigurationStorage.ConfigurationFileName); string rawData = File.ReadAllText(ConfigurationStorage.ConfigurationFileName);
JsonConvert.PopulateObject(rawData, this._configuration); JsonConvert.PopulateObject(rawData, this._configuration);
// Validate data after loading it
this._configuration.ApplyRestrictions();
} }
public void Save() public void Save()

View File

@@ -3,12 +3,12 @@ using System.Windows.Forms;
namespace EveOPreview.Configuration namespace EveOPreview.Configuration
{ {
public interface IApplicationConfiguration public interface IAppConfig
{ {
bool MinimizeToTray { get; set; } bool MinimizeToTray { get; set; }
int ThumbnailRefreshPeriod { get; set; } int ThumbnailRefreshPeriod { get; set; }
double ThumbnailsOpacity { get; set; } double ThumbnailOpacity { get; set; }
bool EnableClientLayoutTracking { get; set; } bool EnableClientLayoutTracking { get; set; }
bool HideActiveClientThumbnail { get; set; } bool HideActiveClientThumbnail { get; set; }
@@ -20,13 +20,16 @@ namespace EveOPreview.Configuration
Size ThumbnailMinimumSize { get; set; } Size ThumbnailMinimumSize { get; set; }
Size ThumbnailMaximumSize { get; set; } Size ThumbnailMaximumSize { get; set; }
bool EnableThumbnailZoom { get; set; } bool ThumbnailZoomEnabled { get; set; }
int ThumbnailZoomFactor { get; set; } int ThumbnailZoomFactor { get; set; }
ZoomAnchor ThumbnailZoomAnchor { get; set; } ZoomAnchor ThumbnailZoomAnchor { get; set; }
bool ShowThumbnailOverlays { get; set; } bool ShowThumbnailOverlays { get; set; }
bool ShowThumbnailFrames { get; set; } bool ShowThumbnailFrames { get; set; }
bool EnableActiveClientHighlight { get; set; }
Color ActiveClientHighlightColor { get; set; }
Point GetThumbnailLocation(string currentClient, string activeClient, Point defaultLocation); Point GetThumbnailLocation(string currentClient, string activeClient, Point defaultLocation);
void SetThumbnailLocation(string currentClient, string activeClient, Point location); void SetThumbnailLocation(string currentClient, string activeClient, Point location);
@@ -35,5 +38,7 @@ namespace EveOPreview.Configuration
Keys GetClientHotkey(string currentClient); Keys GetClientHotkey(string currentClient);
void SetClientHotkey(string currentClient, Keys hotkey); void SetClientHotkey(string currentClient, Keys hotkey);
void ApplyRestrictions();
} }
} }

View File

@@ -5,7 +5,7 @@ using System.Drawing;
namespace EveOPreview namespace EveOPreview
{ {
// Desktop Windows Manager APIs // Desktop Windows Manager APIs
static class DwmApiNativeMethods static class WindowManagerNativeMethods
{ {
[DllImport("user32.dll")] [DllImport("user32.dll")]
public static extern IntPtr GetForegroundWindow(); public static extern IntPtr GetForegroundWindow();

View File

@@ -97,7 +97,7 @@
<Compile Include="ApplicationBase\Presenter.cs" /> <Compile Include="ApplicationBase\Presenter.cs" />
<Compile Include="ApplicationBase\PresenterGeneric.cs" /> <Compile Include="ApplicationBase\PresenterGeneric.cs" />
<Compile Include="Configuration\ConfigurationStorage.cs" /> <Compile Include="Configuration\ConfigurationStorage.cs" />
<Compile Include="Configuration\IApplicationConfiguration.cs" /> <Compile Include="Configuration\IAppConfig.cs" />
<Compile Include="Configuration\ZoomAnchor.cs" /> <Compile Include="Configuration\ZoomAnchor.cs" />
<Compile Include="DwmAPI\DWM_BLURBEHIND.cs" /> <Compile Include="DwmAPI\DWM_BLURBEHIND.cs" />
<Compile Include="DwmAPI\DWM_THUMBNAIL_PROPERTIES.cs" /> <Compile Include="DwmAPI\DWM_THUMBNAIL_PROPERTIES.cs" />
@@ -118,7 +118,7 @@
<Compile Include="UI\Interface\IThumbnailDescriptionView.cs" /> <Compile Include="UI\Interface\IThumbnailDescriptionView.cs" />
<Compile Include="UI\Interface\IThumbnailDescriptionViewFactory.cs" /> <Compile Include="UI\Interface\IThumbnailDescriptionViewFactory.cs" />
<Compile Include="UI\Interface\ViewZoomAnchor.cs" /> <Compile Include="UI\Interface\ViewZoomAnchor.cs" />
<Compile Include="Configuration\ApplicationConfiguration.cs" /> <Compile Include="Configuration\AppConfig.cs" />
<Compile Include="Hotkeys\HotkeyHandler.cs" /> <Compile Include="Hotkeys\HotkeyHandler.cs" />
<Compile Include="Hotkeys\HotkeyHandlerNativeMethods.cs" /> <Compile Include="Hotkeys\HotkeyHandlerNativeMethods.cs" />
<Compile Include="UI\Implementation\MainForm.cs"> <Compile Include="UI\Implementation\MainForm.cs">
@@ -167,7 +167,7 @@
<Compile Include="UI\Implementation\ThumbnailView.Designer.cs"> <Compile Include="UI\Implementation\ThumbnailView.Designer.cs">
<DependentUpon>ThumbnailView.cs</DependentUpon> <DependentUpon>ThumbnailView.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="DwmAPI\DwmApiNativeMethods.cs" /> <Compile Include="DwmAPI\WindowManagerNativeMethods.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="Resources\icon.png" /> <None Include="Resources\icon.png" />

View File

@@ -11,7 +11,6 @@ namespace EveOPreview.UI
void SetThumbnailState(IntPtr thumbnailId, bool hideAlways); void SetThumbnailState(IntPtr thumbnailId, bool hideAlways);
void SetThumbnailsSize(Size size); void SetThumbnailsSize(Size size);
void RefreshThumbnails();
void SetupThumbnailFrames(); void SetupThumbnailFrames();
Action<IList<IThumbnailView>> ThumbnailsAdded { get; set; } Action<IList<IThumbnailView>> ThumbnailsAdded { get; set; }

View File

@@ -13,7 +13,7 @@ namespace EveOPreview.UI
#endregion #endregion
#region Private fields #region Private fields
private readonly IApplicationConfiguration _configuration; private readonly IAppConfig _configuration;
private readonly IConfigurationStorage _configurationStorage; private readonly IConfigurationStorage _configurationStorage;
private readonly IThumbnailDescriptionViewFactory _thumbnailDescriptionViewFactory; private readonly IThumbnailDescriptionViewFactory _thumbnailDescriptionViewFactory;
private readonly IDictionary<IntPtr, IThumbnailDescriptionView> _thumbnailDescriptionViews; private readonly IDictionary<IntPtr, IThumbnailDescriptionView> _thumbnailDescriptionViews;
@@ -22,7 +22,7 @@ namespace EveOPreview.UI
private bool _exitApplication; private bool _exitApplication;
#endregion #endregion
public MainPresenter(IApplicationController controller, IMainView view, IApplicationConfiguration configuration, IConfigurationStorage configurationStorage, public MainPresenter(IApplicationController controller, IMainView view, IAppConfig configuration, IConfigurationStorage configurationStorage,
IThumbnailManager thumbnailManager, IThumbnailDescriptionViewFactory thumbnailDescriptionViewFactory) IThumbnailManager thumbnailManager, IThumbnailDescriptionViewFactory thumbnailDescriptionViewFactory)
: base(controller, view) : base(controller, view)
{ {
@@ -98,52 +98,55 @@ namespace EveOPreview.UI
this.View.MinimizeToTray = this._configuration.MinimizeToTray; this.View.MinimizeToTray = this._configuration.MinimizeToTray;
this.View.ThumbnailsOpacity = this._configuration.ThumbnailsOpacity; this.View.ThumbnailOpacity = this._configuration.ThumbnailOpacity;
this.View.EnableClientLayoutTracking = this._configuration.EnableClientLayoutTracking; this.View.EnableClientLayoutTracking = this._configuration.EnableClientLayoutTracking;
this.View.HideActiveClientThumbnail = this._configuration.HideActiveClientThumbnail; this.View.HideActiveClientThumbnail = this._configuration.HideActiveClientThumbnail;
this.View.ShowThumbnailsAlwaysOnTop = this._configuration.ShowThumbnailsAlwaysOnTop; this.View.ShowThumbnailsAlwaysOnTop = this._configuration.ShowThumbnailsAlwaysOnTop;
this.View.HideThumbnailsOnLostFocus = this._configuration.HideThumbnailsOnLostFocus; this.View.HideThumbnailsOnLostFocus = this._configuration.HideThumbnailsOnLostFocus;
this.View.EnablePerClientThumbnailsLayouts = this._configuration.EnablePerClientThumbnailLayouts; this.View.EnablePerClientThumbnailLayouts = this._configuration.EnablePerClientThumbnailLayouts;
this.View.SetThumbnailSizeLimitations(this._configuration.ThumbnailMinimumSize, this._configuration.ThumbnailMaximumSize); this.View.SetThumbnailSizeLimitations(this._configuration.ThumbnailMinimumSize, this._configuration.ThumbnailMaximumSize);
this.View.ThumbnailSize = this._configuration.ThumbnailSize; this.View.ThumbnailSize = this._configuration.ThumbnailSize;
this.View.EnableThumbnailZoom = this._configuration.EnableThumbnailZoom; this.View.EnableThumbnailZoom = this._configuration.ThumbnailZoomEnabled;
this.View.ThumbnailZoomFactor = this._configuration.ThumbnailZoomFactor; this.View.ThumbnailZoomFactor = this._configuration.ThumbnailZoomFactor;
this.View.ThumbnailZoomAnchor = ViewZoomAnchorConverter.Convert(this._configuration.ThumbnailZoomAnchor); this.View.ThumbnailZoomAnchor = ViewZoomAnchorConverter.Convert(this._configuration.ThumbnailZoomAnchor);
this.View.ShowThumbnailOverlays = this._configuration.ShowThumbnailOverlays; this.View.ShowThumbnailOverlays = this._configuration.ShowThumbnailOverlays;
this.View.ShowThumbnailFrames = this._configuration.ShowThumbnailFrames; this.View.ShowThumbnailFrames = this._configuration.ShowThumbnailFrames;
this.View.EnableActiveClientHighlight = this._configuration.EnableActiveClientHighlight;
this.View.ActiveClientHighlightColor = this._configuration.ActiveClientHighlightColor;
} }
private void SaveApplicationSettings() private void SaveApplicationSettings()
{ {
this._configuration.MinimizeToTray = this.View.MinimizeToTray; this._configuration.MinimizeToTray = this.View.MinimizeToTray;
this._configuration.ThumbnailsOpacity = (float)this.View.ThumbnailsOpacity; this._configuration.ThumbnailOpacity = (float)this.View.ThumbnailOpacity;
this._configuration.EnableClientLayoutTracking = this.View.EnableClientLayoutTracking; this._configuration.EnableClientLayoutTracking = this.View.EnableClientLayoutTracking;
this._configuration.HideActiveClientThumbnail = this.View.HideActiveClientThumbnail; this._configuration.HideActiveClientThumbnail = this.View.HideActiveClientThumbnail;
this._configuration.ShowThumbnailsAlwaysOnTop = this.View.ShowThumbnailsAlwaysOnTop; this._configuration.ShowThumbnailsAlwaysOnTop = this.View.ShowThumbnailsAlwaysOnTop;
this._configuration.HideThumbnailsOnLostFocus = this.View.HideThumbnailsOnLostFocus; this._configuration.HideThumbnailsOnLostFocus = this.View.HideThumbnailsOnLostFocus;
this._configuration.EnablePerClientThumbnailLayouts = this.View.EnablePerClientThumbnailsLayouts; this._configuration.EnablePerClientThumbnailLayouts = this.View.EnablePerClientThumbnailLayouts;
this._configuration.ThumbnailSize = this.View.ThumbnailSize; this._configuration.ThumbnailSize = this.View.ThumbnailSize;
this._configuration.EnableThumbnailZoom = this.View.EnableThumbnailZoom; this._configuration.ThumbnailZoomEnabled = this.View.EnableThumbnailZoom;
this._configuration.ThumbnailZoomFactor = this.View.ThumbnailZoomFactor; this._configuration.ThumbnailZoomFactor = this.View.ThumbnailZoomFactor;
this._configuration.ThumbnailZoomAnchor = ViewZoomAnchorConverter.Convert(this.View.ThumbnailZoomAnchor); this._configuration.ThumbnailZoomAnchor = ViewZoomAnchorConverter.Convert(this.View.ThumbnailZoomAnchor);
this._configuration.ShowThumbnailOverlays = this.View.ShowThumbnailOverlays; this._configuration.ShowThumbnailOverlays = this.View.ShowThumbnailOverlays;
this._configuration.ShowThumbnailFrames = this.View.ShowThumbnailFrames; this._configuration.ShowThumbnailFrames = this.View.ShowThumbnailFrames;
this._configuration.EnableActiveClientHighlight = this.View.EnableActiveClientHighlight;
this._configuration.ActiveClientHighlightColor = this.View.ActiveClientHighlightColor;
this._configurationStorage.Save(); this._configurationStorage.Save();
this.View.RefreshZoomSettings(); this.View.RefreshZoomSettings();
this._thumbnailManager.SetupThumbnailFrames(); this._thumbnailManager.SetupThumbnailFrames();
this._thumbnailManager.RefreshThumbnails();
} }
private void ThumbnailsAdded(IList<IThumbnailView> thumbnails) private void ThumbnailsAdded(IList<IThumbnailView> thumbnails)

View File

@@ -11,11 +11,11 @@ namespace EveOPreview.UI
{ {
#region Private constants #region Private constants
private const string ClientProcessName = "ExeFile"; private const string ClientProcessName = "ExeFile";
private const string DefaultClientTitle = "EVE";
#endregion #endregion
#region Private fields #region Private fields
private readonly IApplicationConfiguration _configuration; private readonly IAppConfig _configuration;
private readonly IConfigurationStorage _configurationStorage;
private readonly DispatcherTimer _thumbnailUpdateTimer; private readonly DispatcherTimer _thumbnailUpdateTimer;
private readonly IThumbnailViewFactory _thumbnailViewFactory; private readonly IThumbnailViewFactory _thumbnailViewFactory;
private readonly Dictionary<IntPtr, IThumbnailView> _thumbnailViews; private readonly Dictionary<IntPtr, IThumbnailView> _thumbnailViews;
@@ -27,14 +27,13 @@ namespace EveOPreview.UI
private bool _isHoverEffectActive; private bool _isHoverEffectActive;
#endregion #endregion
public ThumbnailManager(IApplicationConfiguration configuration, IConfigurationStorage configurationStorage, IThumbnailViewFactory factory) public ThumbnailManager(IAppConfig configuration, IThumbnailViewFactory factory)
{ {
this._configuration = configuration; this._configuration = configuration;
this._configurationStorage = configurationStorage;
this._thumbnailViewFactory = factory; this._thumbnailViewFactory = factory;
this._activeClientHandle = (IntPtr)0; this._activeClientHandle = (IntPtr)0;
this._activeClientTitle = "EVE"; this._activeClientTitle = ThumbnailManager.DefaultClientTitle;
this.EnableViewEvents(); this.EnableViewEvents();
this._isHoverEffectActive = false; this._isHoverEffectActive = false;
@@ -93,10 +92,10 @@ namespace EveOPreview.UI
this.EnableViewEvents(); this.EnableViewEvents();
} }
public void RefreshThumbnails() private void RefreshThumbnails()
{ {
IntPtr foregroundWindowHandle = DwmApiNativeMethods.GetForegroundWindow(); IntPtr foregroundWindowHandle = WindowManagerNativeMethods.GetForegroundWindow();
Boolean hideAllThumbnails = (this._configuration.HideThumbnailsOnLostFocus && this.IsNonClientWindowActive(foregroundWindowHandle)) || !DwmApiNativeMethods.DwmIsCompositionEnabled(); Boolean hideAllThumbnails = (this._configuration.HideThumbnailsOnLostFocus && this.IsNonClientWindowActive(foregroundWindowHandle)) || !WindowManagerNativeMethods.DwmIsCompositionEnabled();
this.DisableViewEvents(); this.DisableViewEvents();
@@ -123,16 +122,23 @@ namespace EveOPreview.UI
continue; continue;
} }
// No need to update Thumbnails while one of them is highlighted
if (!this._isHoverEffectActive) if (!this._isHoverEffectActive)
{ {
// No need to move Thumbnails while one of them is highlighted // Do not even move thumbnails with default caption
view.ThumbnailLocation = this._configuration.GetThumbnailLocation(view.Title, this._activeClientTitle, view.ThumbnailLocation); if (view.Title != ThumbnailManager.DefaultClientTitle)
view.SetOpacity(this._configuration.ThumbnailsOpacity); {
view.ThumbnailLocation = this._configuration.GetThumbnailLocation(view.Title, this._activeClientTitle, view.ThumbnailLocation);
}
view.SetOpacity(this._configuration.ThumbnailOpacity);
view.SetTopMost(this._configuration.ShowThumbnailsAlwaysOnTop); view.SetTopMost(this._configuration.ShowThumbnailsAlwaysOnTop);
} }
view.IsOverlayEnabled = this._configuration.ShowThumbnailOverlays; view.IsOverlayEnabled = this._configuration.ShowThumbnailOverlays;
view.SetHighlight(this._configuration.EnableActiveClientHighlight && (view.Id == this._activeClientHandle), this._configuration.ActiveClientHighlightColor);
if (!view.IsActive) if (!view.IsActive)
{ {
view.Show(); view.Show();
@@ -184,7 +190,7 @@ namespace EveOPreview.UI
Process[] clientProcesses = ThumbnailManager.GetClientProcesses(); Process[] clientProcesses = ThumbnailManager.GetClientProcesses();
List<IntPtr> processHandles = new List<IntPtr>(clientProcesses.Length); List<IntPtr> processHandles = new List<IntPtr>(clientProcesses.Length);
IntPtr foregroundWindowHandle = DwmApiNativeMethods.GetForegroundWindow(); IntPtr foregroundWindowHandle = WindowManagerNativeMethods.GetForegroundWindow();
List<IThumbnailView> viewsAdded = new List<IThumbnailView>(); List<IThumbnailView> viewsAdded = new List<IThumbnailView>();
List<IThumbnailView> viewsUpdated = new List<IThumbnailView>(); List<IThumbnailView> viewsUpdated = new List<IThumbnailView>();
@@ -284,14 +290,33 @@ namespace EveOPreview.UI
this._isHoverEffectActive = true; this._isHoverEffectActive = true;
IThumbnailView view = this._thumbnailViews[id]; IThumbnailView focusedView = null;
view.SetTopMost(true); foreach (KeyValuePair<IntPtr, IThumbnailView> valuePair in this._thumbnailViews)
view.SetOpacity(1.0);
if (this._configuration.EnableThumbnailZoom)
{ {
this.ThumbnailZoomIn(view); IThumbnailView view = valuePair.Value;
if (view.Id != id)
{
view.SetTopMost(false);
}
else
{
focusedView = view;
}
}
if (focusedView == null)
{
return; // This should neve happen!
}
focusedView.SetTopMost(true);
focusedView.SetOpacity(1.0);
if (this._configuration.ThumbnailZoomEnabled)
{
this.ThumbnailZoomIn(focusedView);
} }
} }
@@ -304,30 +329,32 @@ namespace EveOPreview.UI
IThumbnailView view = this._thumbnailViews[id]; IThumbnailView view = this._thumbnailViews[id];
if (this._configuration.EnableThumbnailZoom) if (this._configuration.ThumbnailZoomEnabled)
{ {
this.ThumbnailZoomOut(view); this.ThumbnailZoomOut(view);
} }
view.SetOpacity(this._configuration.ThumbnailsOpacity); view.SetOpacity(this._configuration.ThumbnailOpacity);
this._isHoverEffectActive = false; this._isHoverEffectActive = false;
} }
private void ThumbnailActivated(IntPtr id) private void ThumbnailActivated(IntPtr id)
{ {
DwmApiNativeMethods.SetForegroundWindow(id); IThumbnailView view;
if (this._thumbnailViews.TryGetValue(id, out view))
int style = DwmApiNativeMethods.GetWindowLong(id, DwmApiNativeMethods.GWL_STYLE);
// If the window was minimized then its thumbnail should be reset
if ((style & DwmApiNativeMethods.WS_MINIMIZE) == DwmApiNativeMethods.WS_MINIMIZE)
{ {
DwmApiNativeMethods.ShowWindowAsync(id, DwmApiNativeMethods.SW_SHOWNORMAL); this._activeClientHandle = view.Id;
IThumbnailView view; this._activeClientTitle = view.Title;
if (this._thumbnailViews.TryGetValue(id, out view)) }
{
view.Refresh(true); WindowManagerNativeMethods.SetForegroundWindow(id);
}
int style = WindowManagerNativeMethods.GetWindowLong(id, WindowManagerNativeMethods.GWL_STYLE);
// If the window was minimized then its thumbnail should be reset
if ((style & WindowManagerNativeMethods.WS_MINIMIZE) == WindowManagerNativeMethods.WS_MINIMIZE)
{
WindowManagerNativeMethods.ShowWindowAsync(id, WindowManagerNativeMethods.SW_SHOWNORMAL);
} }
if (this._configuration.EnableClientLayoutTracking) if (this._configuration.EnableClientLayoutTracking)
@@ -337,7 +364,7 @@ namespace EveOPreview.UI
this.RefreshThumbnails(); this.RefreshThumbnails();
this._configurationStorage.Save(); view?.Refresh(true);
} }
private void ThumbnailViewResized(IntPtr id) private void ThumbnailViewResized(IntPtr id)
@@ -418,7 +445,7 @@ namespace EveOPreview.UI
return; return;
} }
DwmApiNativeMethods.MoveWindow(clientHandle, clientLayout.X, clientLayout.Y, clientLayout.Width, clientLayout.Height, true); WindowManagerNativeMethods.MoveWindow(clientHandle, clientLayout.X, clientLayout.Y, clientLayout.Width, clientLayout.Height, true);
} }
private void UpdateClientLayouts() private void UpdateClientLayouts()
@@ -428,7 +455,7 @@ namespace EveOPreview.UI
foreach (Process process in clientProcesses) foreach (Process process in clientProcesses)
{ {
RECT rect; RECT rect;
DwmApiNativeMethods.GetWindowRect(process.MainWindowHandle, out rect); WindowManagerNativeMethods.GetWindowRect(process.MainWindowHandle, out rect);
int left = Math.Abs(rect.Left); int left = Math.Abs(rect.Left);
int right = Math.Abs(rect.Right); int right = Math.Abs(rect.Right);

View File

@@ -29,7 +29,7 @@ namespace EveOPreview
.RegisterService<IThumbnailViewFactory, ThumbnailViewFactory>() .RegisterService<IThumbnailViewFactory, ThumbnailViewFactory>()
.RegisterService<IThumbnailDescriptionViewFactory, ThumbnailDescriptionViewFactory>() .RegisterService<IThumbnailDescriptionViewFactory, ThumbnailDescriptionViewFactory>()
.RegisterService<IConfigurationStorage, ConfigurationStorage>() .RegisterService<IConfigurationStorage, ConfigurationStorage>()
.RegisterInstance<IApplicationConfiguration>(new ApplicationConfiguration()); .RegisterInstance<IAppConfig>(new AppConfig());
controller.Run<MainPresenter>(); controller.Run<MainPresenter>();
} }

View File

@@ -12,7 +12,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
[assembly: ComVisible(false)] [assembly: ComVisible(false)]
[assembly: Guid("04f08f8d-9e98-423b-acdb-4effb31c0d35")] [assembly: Guid("04f08f8d-9e98-423b-acdb-4effb31c0d35")]
[assembly: AssemblyVersion("2.0.1.0")] [assembly: AssemblyVersion("2.1.0.0")]
[assembly: AssemblyFileVersion("2.0.1.0")] [assembly: AssemblyFileVersion("2.1.0.0")]
[assembly: CLSCompliant(true)] [assembly: CLSCompliant(true)]

View File

@@ -34,21 +34,21 @@ namespace EveOPreview.UI
System.Windows.Forms.Label OpacityLabel; System.Windows.Forms.Label OpacityLabel;
System.Windows.Forms.ToolStripMenuItem RestoreWindowMenuItem; System.Windows.Forms.ToolStripMenuItem RestoreWindowMenuItem;
System.Windows.Forms.ToolStripMenuItem ExitMenuItem; System.Windows.Forms.ToolStripMenuItem ExitMenuItem;
System.Windows.Forms.FlowLayoutPanel ContentFlowLayoutPanel; System.Windows.Forms.Panel MainOptionsPanel;
System.Windows.Forms.Panel OpacityPanel; System.Windows.Forms.Panel ThumbnailSizePanel;
System.Windows.Forms.Panel ResizeOptionsPanel;
System.Windows.Forms.Label HeigthLabel; System.Windows.Forms.Label HeigthLabel;
System.Windows.Forms.Label WidthLabel; System.Windows.Forms.Label WidthLabel;
System.Windows.Forms.Panel ZoomOptionsPanel; System.Windows.Forms.Panel ZoomOptionsPanel;
System.Windows.Forms.Label ZoomFactorLabel; System.Windows.Forms.Label ZoomFactorLabel;
System.Windows.Forms.Label ZoomAnchorLabel; System.Windows.Forms.Label ZoomAnchorLabel;
System.Windows.Forms.Panel ThumbnailsListPanel; System.Windows.Forms.Panel ThumbnailListPanel;
System.Windows.Forms.Label ThumbnailsListLabel; System.Windows.Forms.Label ThumbnailsListLabel;
System.Windows.Forms.ToolStripMenuItem TitleMenuItem; System.Windows.Forms.ToolStripMenuItem TitleMenuItem;
System.Windows.Forms.ToolStripSeparator SeparatorMenuItem; System.Windows.Forms.ToolStripSeparator SeparatorMenuItem;
System.Windows.Forms.Panel OverlayOptionsPanel;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.ThumbnailOpacityTrackBar = new System.Windows.Forms.TrackBar();
this.MinimizeToTrayCheckBox = new System.Windows.Forms.CheckBox(); this.MinimizeToTrayCheckBox = new System.Windows.Forms.CheckBox();
this.ThumbnailsOpacityScrollBar = new System.Windows.Forms.HScrollBar();
this.EnableClientLayoutTrackingCheckBox = new System.Windows.Forms.CheckBox(); this.EnableClientLayoutTrackingCheckBox = new System.Windows.Forms.CheckBox();
this.HideActiveClientThumbnailCheckBox = new System.Windows.Forms.CheckBox(); this.HideActiveClientThumbnailCheckBox = new System.Windows.Forms.CheckBox();
this.ShowThumbnailsAlwaysOnTopCheckBox = new System.Windows.Forms.CheckBox(); this.ShowThumbnailsAlwaysOnTopCheckBox = new System.Windows.Forms.CheckBox();
@@ -68,43 +68,47 @@ namespace EveOPreview.UI
this.ZoomAanchorSWRadioButton = new System.Windows.Forms.RadioButton(); this.ZoomAanchorSWRadioButton = new System.Windows.Forms.RadioButton();
this.EnableThumbnailZoomCheckBox = new System.Windows.Forms.CheckBox(); this.EnableThumbnailZoomCheckBox = new System.Windows.Forms.CheckBox();
this.ThumbnailZoomFactorNumericEdit = new System.Windows.Forms.NumericUpDown(); this.ThumbnailZoomFactorNumericEdit = new System.Windows.Forms.NumericUpDown();
this.ThumbnailsList = new System.Windows.Forms.CheckedListBox();
this.HighlightColorLabel = new System.Windows.Forms.Label();
this.ActiveClientHighlightColorButton = new System.Windows.Forms.Panel();
this.EnableActiveClientHighlightCheckBox = new System.Windows.Forms.CheckBox();
this.ShowThumbnailOverlaysCheckBox = new System.Windows.Forms.CheckBox(); this.ShowThumbnailOverlaysCheckBox = new System.Windows.Forms.CheckBox();
this.ShowThumbnailFramesCheckBox = new System.Windows.Forms.CheckBox(); this.ShowThumbnailFramesCheckBox = new System.Windows.Forms.CheckBox();
this.ThumbnailsList = new System.Windows.Forms.CheckedListBox();
this.ForumLinkLabel = new System.Windows.Forms.LinkLabel(); this.ForumLinkLabel = new System.Windows.Forms.LinkLabel();
this.NotifyIcon = new System.Windows.Forms.NotifyIcon(this.components); this.NotifyIcon = new System.Windows.Forms.NotifyIcon(this.components);
this.TrayMenu = new System.Windows.Forms.ContextMenuStrip(this.components); this.TrayMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
OpacityLabel = new System.Windows.Forms.Label(); OpacityLabel = new System.Windows.Forms.Label();
RestoreWindowMenuItem = new System.Windows.Forms.ToolStripMenuItem(); RestoreWindowMenuItem = new System.Windows.Forms.ToolStripMenuItem();
ExitMenuItem = new System.Windows.Forms.ToolStripMenuItem(); ExitMenuItem = new System.Windows.Forms.ToolStripMenuItem();
ContentFlowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel(); MainOptionsPanel = new System.Windows.Forms.Panel();
OpacityPanel = new System.Windows.Forms.Panel(); ThumbnailSizePanel = new System.Windows.Forms.Panel();
ResizeOptionsPanel = new System.Windows.Forms.Panel();
HeigthLabel = new System.Windows.Forms.Label(); HeigthLabel = new System.Windows.Forms.Label();
WidthLabel = new System.Windows.Forms.Label(); WidthLabel = new System.Windows.Forms.Label();
ZoomOptionsPanel = new System.Windows.Forms.Panel(); ZoomOptionsPanel = new System.Windows.Forms.Panel();
ZoomFactorLabel = new System.Windows.Forms.Label(); ZoomFactorLabel = new System.Windows.Forms.Label();
ZoomAnchorLabel = new System.Windows.Forms.Label(); ZoomAnchorLabel = new System.Windows.Forms.Label();
ThumbnailsListPanel = new System.Windows.Forms.Panel(); ThumbnailListPanel = new System.Windows.Forms.Panel();
ThumbnailsListLabel = new System.Windows.Forms.Label(); ThumbnailsListLabel = new System.Windows.Forms.Label();
TitleMenuItem = new System.Windows.Forms.ToolStripMenuItem(); TitleMenuItem = new System.Windows.Forms.ToolStripMenuItem();
SeparatorMenuItem = new System.Windows.Forms.ToolStripSeparator(); SeparatorMenuItem = new System.Windows.Forms.ToolStripSeparator();
ContentFlowLayoutPanel.SuspendLayout(); OverlayOptionsPanel = new System.Windows.Forms.Panel();
OpacityPanel.SuspendLayout(); MainOptionsPanel.SuspendLayout();
ResizeOptionsPanel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.ThumbnailOpacityTrackBar)).BeginInit();
ThumbnailSizePanel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.ThumbnailsWidthNumericEdit)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ThumbnailsWidthNumericEdit)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.ThumbnailsHeightNumericEdit)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ThumbnailsHeightNumericEdit)).BeginInit();
ZoomOptionsPanel.SuspendLayout(); ZoomOptionsPanel.SuspendLayout();
this.ZoomAnchorPanel.SuspendLayout(); this.ZoomAnchorPanel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.ThumbnailZoomFactorNumericEdit)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ThumbnailZoomFactorNumericEdit)).BeginInit();
ThumbnailsListPanel.SuspendLayout(); ThumbnailListPanel.SuspendLayout();
OverlayOptionsPanel.SuspendLayout();
this.TrayMenu.SuspendLayout(); this.TrayMenu.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// OpacityLabel // OpacityLabel
// //
OpacityLabel.AutoSize = true; OpacityLabel.AutoSize = true;
OpacityLabel.Location = new System.Drawing.Point(2, 5); OpacityLabel.Location = new System.Drawing.Point(0, 23);
OpacityLabel.Name = "OpacityLabel"; OpacityLabel.Name = "OpacityLabel";
OpacityLabel.Size = new System.Drawing.Size(43, 13); OpacityLabel.Size = new System.Drawing.Size(43, 13);
OpacityLabel.TabIndex = 0; OpacityLabel.TabIndex = 0;
@@ -124,27 +128,37 @@ namespace EveOPreview.UI
ExitMenuItem.Text = "Exit"; ExitMenuItem.Text = "Exit";
ExitMenuItem.Click += new System.EventHandler(this.ExitMenuItemClick_Handler); ExitMenuItem.Click += new System.EventHandler(this.ExitMenuItemClick_Handler);
// //
// ContentFlowLayoutPanel // MainOptionsPanel
// //
ContentFlowLayoutPanel.BackColor = System.Drawing.SystemColors.Control; MainOptionsPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
ContentFlowLayoutPanel.Controls.Add(this.MinimizeToTrayCheckBox); | System.Windows.Forms.AnchorStyles.Right)));
ContentFlowLayoutPanel.Controls.Add(OpacityPanel); MainOptionsPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
ContentFlowLayoutPanel.Controls.Add(this.EnableClientLayoutTrackingCheckBox); MainOptionsPanel.Controls.Add(this.ThumbnailOpacityTrackBar);
ContentFlowLayoutPanel.Controls.Add(this.HideActiveClientThumbnailCheckBox); MainOptionsPanel.Controls.Add(this.MinimizeToTrayCheckBox);
ContentFlowLayoutPanel.Controls.Add(this.ShowThumbnailsAlwaysOnTopCheckBox); MainOptionsPanel.Controls.Add(this.EnableClientLayoutTrackingCheckBox);
ContentFlowLayoutPanel.Controls.Add(this.HideThumbnailsOnLostFocusCheckBox); MainOptionsPanel.Controls.Add(this.HideActiveClientThumbnailCheckBox);
ContentFlowLayoutPanel.Controls.Add(this.EnablePerClientThumbnailsLayoutsCheckBox); MainOptionsPanel.Controls.Add(this.ShowThumbnailsAlwaysOnTopCheckBox);
ContentFlowLayoutPanel.Controls.Add(ResizeOptionsPanel); MainOptionsPanel.Controls.Add(this.HideThumbnailsOnLostFocusCheckBox);
ContentFlowLayoutPanel.Controls.Add(ZoomOptionsPanel); MainOptionsPanel.Controls.Add(this.EnablePerClientThumbnailsLayoutsCheckBox);
ContentFlowLayoutPanel.Controls.Add(this.ShowThumbnailOverlaysCheckBox); MainOptionsPanel.Controls.Add(OpacityLabel);
ContentFlowLayoutPanel.Controls.Add(this.ShowThumbnailFramesCheckBox); MainOptionsPanel.Location = new System.Drawing.Point(3, 3);
ContentFlowLayoutPanel.Controls.Add(ThumbnailsListPanel); MainOptionsPanel.Name = "MainOptionsPanel";
ContentFlowLayoutPanel.Controls.Add(this.ForumLinkLabel); MainOptionsPanel.Size = new System.Drawing.Size(264, 164);
ContentFlowLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; MainOptionsPanel.TabIndex = 0;
ContentFlowLayoutPanel.Location = new System.Drawing.Point(0, 0); //
ContentFlowLayoutPanel.Name = "ContentFlowLayoutPanel"; // ThumbnailOpacityTrackBar
ContentFlowLayoutPanel.Size = new System.Drawing.Size(252, 481); //
ContentFlowLayoutPanel.TabIndex = 25; this.ThumbnailOpacityTrackBar.AutoSize = false;
this.ThumbnailOpacityTrackBar.LargeChange = 10;
this.ThumbnailOpacityTrackBar.Location = new System.Drawing.Point(51, 22);
this.ThumbnailOpacityTrackBar.Maximum = 100;
this.ThumbnailOpacityTrackBar.Minimum = 20;
this.ThumbnailOpacityTrackBar.Name = "ThumbnailOpacityTrackBar";
this.ThumbnailOpacityTrackBar.Size = new System.Drawing.Size(208, 22);
this.ThumbnailOpacityTrackBar.TabIndex = 1;
this.ThumbnailOpacityTrackBar.TickFrequency = 10;
this.ThumbnailOpacityTrackBar.Value = 20;
this.ThumbnailOpacityTrackBar.ValueChanged += new System.EventHandler(this.OptionChanged_Handler);
// //
// MinimizeToTrayCheckBox // MinimizeToTrayCheckBox
// //
@@ -152,37 +166,18 @@ namespace EveOPreview.UI
this.MinimizeToTrayCheckBox.Location = new System.Drawing.Point(3, 3); this.MinimizeToTrayCheckBox.Location = new System.Drawing.Point(3, 3);
this.MinimizeToTrayCheckBox.Name = "MinimizeToTrayCheckBox"; this.MinimizeToTrayCheckBox.Name = "MinimizeToTrayCheckBox";
this.MinimizeToTrayCheckBox.Size = new System.Drawing.Size(139, 17); this.MinimizeToTrayCheckBox.Size = new System.Drawing.Size(139, 17);
this.MinimizeToTrayCheckBox.TabIndex = 34; this.MinimizeToTrayCheckBox.TabIndex = 0;
this.MinimizeToTrayCheckBox.Text = "Minimize to System Tray"; this.MinimizeToTrayCheckBox.Text = "Minimize to System Tray";
this.MinimizeToTrayCheckBox.UseVisualStyleBackColor = true; this.MinimizeToTrayCheckBox.UseVisualStyleBackColor = true;
this.MinimizeToTrayCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler); this.MinimizeToTrayCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
// //
// OpacityPanel
//
OpacityPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
OpacityPanel.Controls.Add(this.ThumbnailsOpacityScrollBar);
OpacityPanel.Controls.Add(OpacityLabel);
OpacityPanel.Location = new System.Drawing.Point(3, 26);
OpacityPanel.Name = "OpacityPanel";
OpacityPanel.Size = new System.Drawing.Size(246, 26);
OpacityPanel.TabIndex = 33;
//
// ThumbnailsOpacityScrollBar
//
this.ThumbnailsOpacityScrollBar.Location = new System.Drawing.Point(48, 1);
this.ThumbnailsOpacityScrollBar.Maximum = 120;
this.ThumbnailsOpacityScrollBar.Name = "ThumbnailsOpacityScrollBar";
this.ThumbnailsOpacityScrollBar.Size = new System.Drawing.Size(195, 23);
this.ThumbnailsOpacityScrollBar.TabIndex = 1;
this.ThumbnailsOpacityScrollBar.Scroll += new System.Windows.Forms.ScrollEventHandler(this.OptionChanged_Handler);
//
// EnableClientLayoutTrackingCheckBox // EnableClientLayoutTrackingCheckBox
// //
this.EnableClientLayoutTrackingCheckBox.AutoSize = true; this.EnableClientLayoutTrackingCheckBox.AutoSize = true;
this.EnableClientLayoutTrackingCheckBox.Location = new System.Drawing.Point(3, 58); this.EnableClientLayoutTrackingCheckBox.Location = new System.Drawing.Point(3, 50);
this.EnableClientLayoutTrackingCheckBox.Name = "EnableClientLayoutTrackingCheckBox"; this.EnableClientLayoutTrackingCheckBox.Name = "EnableClientLayoutTrackingCheckBox";
this.EnableClientLayoutTrackingCheckBox.Size = new System.Drawing.Size(127, 17); this.EnableClientLayoutTrackingCheckBox.Size = new System.Drawing.Size(127, 17);
this.EnableClientLayoutTrackingCheckBox.TabIndex = 32; this.EnableClientLayoutTrackingCheckBox.TabIndex = 2;
this.EnableClientLayoutTrackingCheckBox.Text = "Track client locations"; this.EnableClientLayoutTrackingCheckBox.Text = "Track client locations";
this.EnableClientLayoutTrackingCheckBox.UseVisualStyleBackColor = true; this.EnableClientLayoutTrackingCheckBox.UseVisualStyleBackColor = true;
this.EnableClientLayoutTrackingCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler); this.EnableClientLayoutTrackingCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
@@ -192,10 +187,10 @@ namespace EveOPreview.UI
this.HideActiveClientThumbnailCheckBox.AutoSize = true; this.HideActiveClientThumbnailCheckBox.AutoSize = true;
this.HideActiveClientThumbnailCheckBox.Checked = true; this.HideActiveClientThumbnailCheckBox.Checked = true;
this.HideActiveClientThumbnailCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; this.HideActiveClientThumbnailCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.HideActiveClientThumbnailCheckBox.Location = new System.Drawing.Point(3, 81); this.HideActiveClientThumbnailCheckBox.Location = new System.Drawing.Point(3, 73);
this.HideActiveClientThumbnailCheckBox.Name = "HideActiveClientThumbnailCheckBox"; this.HideActiveClientThumbnailCheckBox.Name = "HideActiveClientThumbnailCheckBox";
this.HideActiveClientThumbnailCheckBox.Size = new System.Drawing.Size(184, 17); this.HideActiveClientThumbnailCheckBox.Size = new System.Drawing.Size(184, 17);
this.HideActiveClientThumbnailCheckBox.TabIndex = 1; this.HideActiveClientThumbnailCheckBox.TabIndex = 3;
this.HideActiveClientThumbnailCheckBox.Text = "Hide preview of active EVE client"; this.HideActiveClientThumbnailCheckBox.Text = "Hide preview of active EVE client";
this.HideActiveClientThumbnailCheckBox.UseVisualStyleBackColor = true; this.HideActiveClientThumbnailCheckBox.UseVisualStyleBackColor = true;
this.HideActiveClientThumbnailCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler); this.HideActiveClientThumbnailCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
@@ -205,11 +200,11 @@ namespace EveOPreview.UI
this.ShowThumbnailsAlwaysOnTopCheckBox.AutoSize = true; this.ShowThumbnailsAlwaysOnTopCheckBox.AutoSize = true;
this.ShowThumbnailsAlwaysOnTopCheckBox.Checked = true; this.ShowThumbnailsAlwaysOnTopCheckBox.Checked = true;
this.ShowThumbnailsAlwaysOnTopCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; this.ShowThumbnailsAlwaysOnTopCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.ShowThumbnailsAlwaysOnTopCheckBox.Location = new System.Drawing.Point(3, 104); this.ShowThumbnailsAlwaysOnTopCheckBox.Location = new System.Drawing.Point(3, 96);
this.ShowThumbnailsAlwaysOnTopCheckBox.Name = "ShowThumbnailsAlwaysOnTopCheckBox"; this.ShowThumbnailsAlwaysOnTopCheckBox.Name = "ShowThumbnailsAlwaysOnTopCheckBox";
this.ShowThumbnailsAlwaysOnTopCheckBox.RightToLeft = System.Windows.Forms.RightToLeft.No; this.ShowThumbnailsAlwaysOnTopCheckBox.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.ShowThumbnailsAlwaysOnTopCheckBox.Size = new System.Drawing.Size(137, 17); this.ShowThumbnailsAlwaysOnTopCheckBox.Size = new System.Drawing.Size(137, 17);
this.ShowThumbnailsAlwaysOnTopCheckBox.TabIndex = 8; this.ShowThumbnailsAlwaysOnTopCheckBox.TabIndex = 4;
this.ShowThumbnailsAlwaysOnTopCheckBox.Text = "Previews always on top"; this.ShowThumbnailsAlwaysOnTopCheckBox.Text = "Previews always on top";
this.ShowThumbnailsAlwaysOnTopCheckBox.UseVisualStyleBackColor = true; this.ShowThumbnailsAlwaysOnTopCheckBox.UseVisualStyleBackColor = true;
this.ShowThumbnailsAlwaysOnTopCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler); this.ShowThumbnailsAlwaysOnTopCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
@@ -219,10 +214,10 @@ namespace EveOPreview.UI
this.HideThumbnailsOnLostFocusCheckBox.AutoSize = true; this.HideThumbnailsOnLostFocusCheckBox.AutoSize = true;
this.HideThumbnailsOnLostFocusCheckBox.Checked = true; this.HideThumbnailsOnLostFocusCheckBox.Checked = true;
this.HideThumbnailsOnLostFocusCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; this.HideThumbnailsOnLostFocusCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.HideThumbnailsOnLostFocusCheckBox.Location = new System.Drawing.Point(3, 127); this.HideThumbnailsOnLostFocusCheckBox.Location = new System.Drawing.Point(3, 119);
this.HideThumbnailsOnLostFocusCheckBox.Name = "HideThumbnailsOnLostFocusCheckBox"; this.HideThumbnailsOnLostFocusCheckBox.Name = "HideThumbnailsOnLostFocusCheckBox";
this.HideThumbnailsOnLostFocusCheckBox.Size = new System.Drawing.Size(234, 17); this.HideThumbnailsOnLostFocusCheckBox.Size = new System.Drawing.Size(234, 17);
this.HideThumbnailsOnLostFocusCheckBox.TabIndex = 2; this.HideThumbnailsOnLostFocusCheckBox.TabIndex = 5;
this.HideThumbnailsOnLostFocusCheckBox.Text = "Hide previews when EVE client is not active"; this.HideThumbnailsOnLostFocusCheckBox.Text = "Hide previews when EVE client is not active";
this.HideThumbnailsOnLostFocusCheckBox.UseVisualStyleBackColor = true; this.HideThumbnailsOnLostFocusCheckBox.UseVisualStyleBackColor = true;
this.HideThumbnailsOnLostFocusCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler); this.HideThumbnailsOnLostFocusCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
@@ -232,30 +227,32 @@ namespace EveOPreview.UI
this.EnablePerClientThumbnailsLayoutsCheckBox.AutoSize = true; this.EnablePerClientThumbnailsLayoutsCheckBox.AutoSize = true;
this.EnablePerClientThumbnailsLayoutsCheckBox.Checked = true; this.EnablePerClientThumbnailsLayoutsCheckBox.Checked = true;
this.EnablePerClientThumbnailsLayoutsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; this.EnablePerClientThumbnailsLayoutsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.EnablePerClientThumbnailsLayoutsCheckBox.Location = new System.Drawing.Point(3, 150); this.EnablePerClientThumbnailsLayoutsCheckBox.Location = new System.Drawing.Point(3, 142);
this.EnablePerClientThumbnailsLayoutsCheckBox.Name = "EnablePerClientThumbnailsLayoutsCheckBox"; this.EnablePerClientThumbnailsLayoutsCheckBox.Name = "EnablePerClientThumbnailsLayoutsCheckBox";
this.EnablePerClientThumbnailsLayoutsCheckBox.Size = new System.Drawing.Size(185, 17); this.EnablePerClientThumbnailsLayoutsCheckBox.Size = new System.Drawing.Size(185, 17);
this.EnablePerClientThumbnailsLayoutsCheckBox.TabIndex = 3; this.EnablePerClientThumbnailsLayoutsCheckBox.TabIndex = 6;
this.EnablePerClientThumbnailsLayoutsCheckBox.Text = "Unique layout for each EVE client"; this.EnablePerClientThumbnailsLayoutsCheckBox.Text = "Unique layout for each EVE client";
this.EnablePerClientThumbnailsLayoutsCheckBox.UseVisualStyleBackColor = true; this.EnablePerClientThumbnailsLayoutsCheckBox.UseVisualStyleBackColor = true;
this.EnablePerClientThumbnailsLayoutsCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler); this.EnablePerClientThumbnailsLayoutsCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
// //
// ResizeOptionsPanel // ThumbnailSizePanel
// //
ResizeOptionsPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; ThumbnailSizePanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
ResizeOptionsPanel.Controls.Add(HeigthLabel); | System.Windows.Forms.AnchorStyles.Right)));
ResizeOptionsPanel.Controls.Add(WidthLabel); ThumbnailSizePanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
ResizeOptionsPanel.Controls.Add(this.ThumbnailsWidthNumericEdit); ThumbnailSizePanel.Controls.Add(HeigthLabel);
ResizeOptionsPanel.Controls.Add(this.ThumbnailsHeightNumericEdit); ThumbnailSizePanel.Controls.Add(WidthLabel);
ResizeOptionsPanel.Location = new System.Drawing.Point(3, 173); ThumbnailSizePanel.Controls.Add(this.ThumbnailsWidthNumericEdit);
ResizeOptionsPanel.Name = "ResizeOptionsPanel"; ThumbnailSizePanel.Controls.Add(this.ThumbnailsHeightNumericEdit);
ResizeOptionsPanel.Size = new System.Drawing.Size(246, 28); ThumbnailSizePanel.Location = new System.Drawing.Point(3, 173);
ResizeOptionsPanel.TabIndex = 26; ThumbnailSizePanel.Name = "ThumbnailSizePanel";
ThumbnailSizePanel.Size = new System.Drawing.Size(264, 28);
ThumbnailSizePanel.TabIndex = 1;
// //
// HeigthLabel // HeigthLabel
// //
HeigthLabel.AutoSize = true; HeigthLabel.AutoSize = true;
HeigthLabel.Location = new System.Drawing.Point(152, 5); HeigthLabel.Location = new System.Drawing.Point(150, 5);
HeigthLabel.Name = "HeigthLabel"; HeigthLabel.Name = "HeigthLabel";
HeigthLabel.Size = new System.Drawing.Size(38, 13); HeigthLabel.Size = new System.Drawing.Size(38, 13);
HeigthLabel.TabIndex = 14; HeigthLabel.TabIndex = 14;
@@ -264,7 +261,7 @@ namespace EveOPreview.UI
// WidthLabel // WidthLabel
// //
WidthLabel.AutoSize = true; WidthLabel.AutoSize = true;
WidthLabel.Location = new System.Drawing.Point(2, 5); WidthLabel.Location = new System.Drawing.Point(0, 5);
WidthLabel.Name = "WidthLabel"; WidthLabel.Name = "WidthLabel";
WidthLabel.Size = new System.Drawing.Size(87, 13); WidthLabel.Size = new System.Drawing.Size(87, 13);
WidthLabel.TabIndex = 13; WidthLabel.TabIndex = 13;
@@ -276,24 +273,24 @@ namespace EveOPreview.UI
this.ThumbnailsWidthNumericEdit.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.ThumbnailsWidthNumericEdit.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ThumbnailsWidthNumericEdit.CausesValidation = false; this.ThumbnailsWidthNumericEdit.CausesValidation = false;
this.ThumbnailsWidthNumericEdit.Increment = new decimal(new int[] { this.ThumbnailsWidthNumericEdit.Increment = new decimal(new int[] {
10, 10,
0, 0,
0, 0,
0}); 0});
this.ThumbnailsWidthNumericEdit.Location = new System.Drawing.Point(95, 3); this.ThumbnailsWidthNumericEdit.Location = new System.Drawing.Point(92, 3);
this.ThumbnailsWidthNumericEdit.Maximum = new decimal(new int[] { this.ThumbnailsWidthNumericEdit.Maximum = new decimal(new int[] {
999999, 999999,
0, 0,
0, 0,
0}); 0});
this.ThumbnailsWidthNumericEdit.Name = "ThumbnailsWidthNumericEdit"; this.ThumbnailsWidthNumericEdit.Name = "ThumbnailsWidthNumericEdit";
this.ThumbnailsWidthNumericEdit.Size = new System.Drawing.Size(48, 20); this.ThumbnailsWidthNumericEdit.Size = new System.Drawing.Size(48, 20);
this.ThumbnailsWidthNumericEdit.TabIndex = 11; this.ThumbnailsWidthNumericEdit.TabIndex = 0;
this.ThumbnailsWidthNumericEdit.Value = new decimal(new int[] { this.ThumbnailsWidthNumericEdit.Value = new decimal(new int[] {
100, 100,
0, 0,
0, 0,
0}); 0});
this.ThumbnailsWidthNumericEdit.ValueChanged += new System.EventHandler(this.ThumbnailSizeChanged_Handler); this.ThumbnailsWidthNumericEdit.ValueChanged += new System.EventHandler(this.ThumbnailSizeChanged_Handler);
// //
// ThumbnailsHeightNumericEdit // ThumbnailsHeightNumericEdit
@@ -302,28 +299,30 @@ namespace EveOPreview.UI
this.ThumbnailsHeightNumericEdit.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.ThumbnailsHeightNumericEdit.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ThumbnailsHeightNumericEdit.CausesValidation = false; this.ThumbnailsHeightNumericEdit.CausesValidation = false;
this.ThumbnailsHeightNumericEdit.Increment = new decimal(new int[] { this.ThumbnailsHeightNumericEdit.Increment = new decimal(new int[] {
10, 10,
0, 0,
0, 0,
0}); 0});
this.ThumbnailsHeightNumericEdit.Location = new System.Drawing.Point(196, 3); this.ThumbnailsHeightNumericEdit.Location = new System.Drawing.Point(217, 3);
this.ThumbnailsHeightNumericEdit.Maximum = new decimal(new int[] { this.ThumbnailsHeightNumericEdit.Maximum = new decimal(new int[] {
99999999, 99999999,
0, 0,
0, 0,
0}); 0});
this.ThumbnailsHeightNumericEdit.Name = "ThumbnailsHeightNumericEdit"; this.ThumbnailsHeightNumericEdit.Name = "ThumbnailsHeightNumericEdit";
this.ThumbnailsHeightNumericEdit.Size = new System.Drawing.Size(42, 20); this.ThumbnailsHeightNumericEdit.Size = new System.Drawing.Size(42, 20);
this.ThumbnailsHeightNumericEdit.TabIndex = 12; this.ThumbnailsHeightNumericEdit.TabIndex = 1;
this.ThumbnailsHeightNumericEdit.Value = new decimal(new int[] { this.ThumbnailsHeightNumericEdit.Value = new decimal(new int[] {
70, 70,
0, 0,
0, 0,
0}); 0});
this.ThumbnailsHeightNumericEdit.ValueChanged += new System.EventHandler(this.ThumbnailSizeChanged_Handler); this.ThumbnailsHeightNumericEdit.ValueChanged += new System.EventHandler(this.ThumbnailSizeChanged_Handler);
// //
// ZoomOptionsPanel // ZoomOptionsPanel
// //
ZoomOptionsPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
ZoomOptionsPanel.BackColor = System.Drawing.SystemColors.Control; ZoomOptionsPanel.BackColor = System.Drawing.SystemColors.Control;
ZoomOptionsPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; ZoomOptionsPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
ZoomOptionsPanel.Controls.Add(ZoomFactorLabel); ZoomOptionsPanel.Controls.Add(ZoomFactorLabel);
@@ -333,13 +332,13 @@ namespace EveOPreview.UI
ZoomOptionsPanel.Controls.Add(this.ThumbnailZoomFactorNumericEdit); ZoomOptionsPanel.Controls.Add(this.ThumbnailZoomFactorNumericEdit);
ZoomOptionsPanel.Location = new System.Drawing.Point(3, 207); ZoomOptionsPanel.Location = new System.Drawing.Point(3, 207);
ZoomOptionsPanel.Name = "ZoomOptionsPanel"; ZoomOptionsPanel.Name = "ZoomOptionsPanel";
ZoomOptionsPanel.Size = new System.Drawing.Size(246, 82); ZoomOptionsPanel.Size = new System.Drawing.Size(264, 82);
ZoomOptionsPanel.TabIndex = 27; ZoomOptionsPanel.TabIndex = 2;
// //
// ZoomFactorLabel // ZoomFactorLabel
// //
ZoomFactorLabel.AutoSize = true; ZoomFactorLabel.AutoSize = true;
ZoomFactorLabel.Location = new System.Drawing.Point(8, 43); ZoomFactorLabel.Location = new System.Drawing.Point(0, 43);
ZoomFactorLabel.Name = "ZoomFactorLabel"; ZoomFactorLabel.Name = "ZoomFactorLabel";
ZoomFactorLabel.Size = new System.Drawing.Size(67, 13); ZoomFactorLabel.Size = new System.Drawing.Size(67, 13);
ZoomFactorLabel.TabIndex = 29; ZoomFactorLabel.TabIndex = 29;
@@ -356,10 +355,10 @@ namespace EveOPreview.UI
this.ZoomAnchorPanel.Controls.Add(this.ZoomAanchorSRadioButton); this.ZoomAnchorPanel.Controls.Add(this.ZoomAanchorSRadioButton);
this.ZoomAnchorPanel.Controls.Add(this.ZoomAanchorERadioButton); this.ZoomAnchorPanel.Controls.Add(this.ZoomAanchorERadioButton);
this.ZoomAnchorPanel.Controls.Add(this.ZoomAanchorSWRadioButton); this.ZoomAnchorPanel.Controls.Add(this.ZoomAanchorSWRadioButton);
this.ZoomAnchorPanel.Location = new System.Drawing.Point(182, 21); this.ZoomAnchorPanel.Location = new System.Drawing.Point(199, 20);
this.ZoomAnchorPanel.Name = "ZoomAnchorPanel"; this.ZoomAnchorPanel.Name = "ZoomAnchorPanel";
this.ZoomAnchorPanel.Size = new System.Drawing.Size(60, 57); this.ZoomAnchorPanel.Size = new System.Drawing.Size(60, 57);
this.ZoomAnchorPanel.TabIndex = 28; this.ZoomAnchorPanel.TabIndex = 2;
// //
// ZoomAanchorNWRadioButton // ZoomAanchorNWRadioButton
// //
@@ -367,7 +366,7 @@ namespace EveOPreview.UI
this.ZoomAanchorNWRadioButton.Location = new System.Drawing.Point(3, 3); this.ZoomAanchorNWRadioButton.Location = new System.Drawing.Point(3, 3);
this.ZoomAanchorNWRadioButton.Name = "ZoomAanchorNWRadioButton"; this.ZoomAanchorNWRadioButton.Name = "ZoomAanchorNWRadioButton";
this.ZoomAanchorNWRadioButton.Size = new System.Drawing.Size(14, 13); this.ZoomAanchorNWRadioButton.Size = new System.Drawing.Size(14, 13);
this.ZoomAanchorNWRadioButton.TabIndex = 15; this.ZoomAanchorNWRadioButton.TabIndex = 0;
this.ZoomAanchorNWRadioButton.TabStop = true; this.ZoomAanchorNWRadioButton.TabStop = true;
this.ZoomAanchorNWRadioButton.UseVisualStyleBackColor = true; this.ZoomAanchorNWRadioButton.UseVisualStyleBackColor = true;
this.ZoomAanchorNWRadioButton.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler); this.ZoomAanchorNWRadioButton.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
@@ -378,7 +377,7 @@ namespace EveOPreview.UI
this.ZoomAanchorNRadioButton.Location = new System.Drawing.Point(23, 3); this.ZoomAanchorNRadioButton.Location = new System.Drawing.Point(23, 3);
this.ZoomAanchorNRadioButton.Name = "ZoomAanchorNRadioButton"; this.ZoomAanchorNRadioButton.Name = "ZoomAanchorNRadioButton";
this.ZoomAanchorNRadioButton.Size = new System.Drawing.Size(14, 13); this.ZoomAanchorNRadioButton.Size = new System.Drawing.Size(14, 13);
this.ZoomAanchorNRadioButton.TabIndex = 16; this.ZoomAanchorNRadioButton.TabIndex = 1;
this.ZoomAanchorNRadioButton.TabStop = true; this.ZoomAanchorNRadioButton.TabStop = true;
this.ZoomAanchorNRadioButton.UseVisualStyleBackColor = true; this.ZoomAanchorNRadioButton.UseVisualStyleBackColor = true;
this.ZoomAanchorNRadioButton.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler); this.ZoomAanchorNRadioButton.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
@@ -389,7 +388,7 @@ namespace EveOPreview.UI
this.ZoomAanchorNERadioButton.Location = new System.Drawing.Point(43, 3); this.ZoomAanchorNERadioButton.Location = new System.Drawing.Point(43, 3);
this.ZoomAanchorNERadioButton.Name = "ZoomAanchorNERadioButton"; this.ZoomAanchorNERadioButton.Name = "ZoomAanchorNERadioButton";
this.ZoomAanchorNERadioButton.Size = new System.Drawing.Size(14, 13); this.ZoomAanchorNERadioButton.Size = new System.Drawing.Size(14, 13);
this.ZoomAanchorNERadioButton.TabIndex = 17; this.ZoomAanchorNERadioButton.TabIndex = 2;
this.ZoomAanchorNERadioButton.TabStop = true; this.ZoomAanchorNERadioButton.TabStop = true;
this.ZoomAanchorNERadioButton.UseVisualStyleBackColor = true; this.ZoomAanchorNERadioButton.UseVisualStyleBackColor = true;
this.ZoomAanchorNERadioButton.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler); this.ZoomAanchorNERadioButton.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
@@ -400,7 +399,7 @@ namespace EveOPreview.UI
this.ZoomAanchorWRadioButton.Location = new System.Drawing.Point(3, 22); this.ZoomAanchorWRadioButton.Location = new System.Drawing.Point(3, 22);
this.ZoomAanchorWRadioButton.Name = "ZoomAanchorWRadioButton"; this.ZoomAanchorWRadioButton.Name = "ZoomAanchorWRadioButton";
this.ZoomAanchorWRadioButton.Size = new System.Drawing.Size(14, 13); this.ZoomAanchorWRadioButton.Size = new System.Drawing.Size(14, 13);
this.ZoomAanchorWRadioButton.TabIndex = 18; this.ZoomAanchorWRadioButton.TabIndex = 3;
this.ZoomAanchorWRadioButton.TabStop = true; this.ZoomAanchorWRadioButton.TabStop = true;
this.ZoomAanchorWRadioButton.UseVisualStyleBackColor = true; this.ZoomAanchorWRadioButton.UseVisualStyleBackColor = true;
this.ZoomAanchorWRadioButton.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler); this.ZoomAanchorWRadioButton.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
@@ -411,7 +410,7 @@ namespace EveOPreview.UI
this.ZoomAanchorSERadioButton.Location = new System.Drawing.Point(43, 41); this.ZoomAanchorSERadioButton.Location = new System.Drawing.Point(43, 41);
this.ZoomAanchorSERadioButton.Name = "ZoomAanchorSERadioButton"; this.ZoomAanchorSERadioButton.Name = "ZoomAanchorSERadioButton";
this.ZoomAanchorSERadioButton.Size = new System.Drawing.Size(14, 13); this.ZoomAanchorSERadioButton.Size = new System.Drawing.Size(14, 13);
this.ZoomAanchorSERadioButton.TabIndex = 23; this.ZoomAanchorSERadioButton.TabIndex = 8;
this.ZoomAanchorSERadioButton.TabStop = true; this.ZoomAanchorSERadioButton.TabStop = true;
this.ZoomAanchorSERadioButton.UseVisualStyleBackColor = true; this.ZoomAanchorSERadioButton.UseVisualStyleBackColor = true;
this.ZoomAanchorSERadioButton.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler); this.ZoomAanchorSERadioButton.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
@@ -422,7 +421,7 @@ namespace EveOPreview.UI
this.ZoomAanchorCRadioButton.Location = new System.Drawing.Point(23, 22); this.ZoomAanchorCRadioButton.Location = new System.Drawing.Point(23, 22);
this.ZoomAanchorCRadioButton.Name = "ZoomAanchorCRadioButton"; this.ZoomAanchorCRadioButton.Name = "ZoomAanchorCRadioButton";
this.ZoomAanchorCRadioButton.Size = new System.Drawing.Size(14, 13); this.ZoomAanchorCRadioButton.Size = new System.Drawing.Size(14, 13);
this.ZoomAanchorCRadioButton.TabIndex = 19; this.ZoomAanchorCRadioButton.TabIndex = 4;
this.ZoomAanchorCRadioButton.TabStop = true; this.ZoomAanchorCRadioButton.TabStop = true;
this.ZoomAanchorCRadioButton.UseVisualStyleBackColor = true; this.ZoomAanchorCRadioButton.UseVisualStyleBackColor = true;
this.ZoomAanchorCRadioButton.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler); this.ZoomAanchorCRadioButton.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
@@ -433,7 +432,7 @@ namespace EveOPreview.UI
this.ZoomAanchorSRadioButton.Location = new System.Drawing.Point(23, 41); this.ZoomAanchorSRadioButton.Location = new System.Drawing.Point(23, 41);
this.ZoomAanchorSRadioButton.Name = "ZoomAanchorSRadioButton"; this.ZoomAanchorSRadioButton.Name = "ZoomAanchorSRadioButton";
this.ZoomAanchorSRadioButton.Size = new System.Drawing.Size(14, 13); this.ZoomAanchorSRadioButton.Size = new System.Drawing.Size(14, 13);
this.ZoomAanchorSRadioButton.TabIndex = 22; this.ZoomAanchorSRadioButton.TabIndex = 7;
this.ZoomAanchorSRadioButton.TabStop = true; this.ZoomAanchorSRadioButton.TabStop = true;
this.ZoomAanchorSRadioButton.UseVisualStyleBackColor = true; this.ZoomAanchorSRadioButton.UseVisualStyleBackColor = true;
this.ZoomAanchorSRadioButton.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler); this.ZoomAanchorSRadioButton.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
@@ -444,7 +443,7 @@ namespace EveOPreview.UI
this.ZoomAanchorERadioButton.Location = new System.Drawing.Point(43, 22); this.ZoomAanchorERadioButton.Location = new System.Drawing.Point(43, 22);
this.ZoomAanchorERadioButton.Name = "ZoomAanchorERadioButton"; this.ZoomAanchorERadioButton.Name = "ZoomAanchorERadioButton";
this.ZoomAanchorERadioButton.Size = new System.Drawing.Size(14, 13); this.ZoomAanchorERadioButton.Size = new System.Drawing.Size(14, 13);
this.ZoomAanchorERadioButton.TabIndex = 20; this.ZoomAanchorERadioButton.TabIndex = 5;
this.ZoomAanchorERadioButton.TabStop = true; this.ZoomAanchorERadioButton.TabStop = true;
this.ZoomAanchorERadioButton.UseVisualStyleBackColor = true; this.ZoomAanchorERadioButton.UseVisualStyleBackColor = true;
this.ZoomAanchorERadioButton.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler); this.ZoomAanchorERadioButton.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
@@ -455,7 +454,7 @@ namespace EveOPreview.UI
this.ZoomAanchorSWRadioButton.Location = new System.Drawing.Point(3, 41); this.ZoomAanchorSWRadioButton.Location = new System.Drawing.Point(3, 41);
this.ZoomAanchorSWRadioButton.Name = "ZoomAanchorSWRadioButton"; this.ZoomAanchorSWRadioButton.Name = "ZoomAanchorSWRadioButton";
this.ZoomAanchorSWRadioButton.Size = new System.Drawing.Size(14, 13); this.ZoomAanchorSWRadioButton.Size = new System.Drawing.Size(14, 13);
this.ZoomAanchorSWRadioButton.TabIndex = 21; this.ZoomAanchorSWRadioButton.TabIndex = 6;
this.ZoomAanchorSWRadioButton.TabStop = true; this.ZoomAanchorSWRadioButton.TabStop = true;
this.ZoomAanchorSWRadioButton.UseVisualStyleBackColor = true; this.ZoomAanchorSWRadioButton.UseVisualStyleBackColor = true;
this.ZoomAanchorSWRadioButton.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler); this.ZoomAanchorSWRadioButton.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
@@ -463,7 +462,7 @@ namespace EveOPreview.UI
// ZoomAnchorLabel // ZoomAnchorLabel
// //
ZoomAnchorLabel.AutoSize = true; ZoomAnchorLabel.AutoSize = true;
ZoomAnchorLabel.Location = new System.Drawing.Point(138, 43); ZoomAnchorLabel.Location = new System.Drawing.Point(150, 43);
ZoomAnchorLabel.Name = "ZoomAnchorLabel"; ZoomAnchorLabel.Name = "ZoomAnchorLabel";
ZoomAnchorLabel.Size = new System.Drawing.Size(41, 13); ZoomAnchorLabel.Size = new System.Drawing.Size(41, 13);
ZoomAnchorLabel.TabIndex = 30; ZoomAnchorLabel.TabIndex = 30;
@@ -474,11 +473,11 @@ namespace EveOPreview.UI
this.EnableThumbnailZoomCheckBox.AutoSize = true; this.EnableThumbnailZoomCheckBox.AutoSize = true;
this.EnableThumbnailZoomCheckBox.Checked = true; this.EnableThumbnailZoomCheckBox.Checked = true;
this.EnableThumbnailZoomCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; this.EnableThumbnailZoomCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.EnableThumbnailZoomCheckBox.Location = new System.Drawing.Point(1, 5); this.EnableThumbnailZoomCheckBox.Location = new System.Drawing.Point(3, 5);
this.EnableThumbnailZoomCheckBox.Name = "EnableThumbnailZoomCheckBox"; this.EnableThumbnailZoomCheckBox.Name = "EnableThumbnailZoomCheckBox";
this.EnableThumbnailZoomCheckBox.RightToLeft = System.Windows.Forms.RightToLeft.No; this.EnableThumbnailZoomCheckBox.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.EnableThumbnailZoomCheckBox.Size = new System.Drawing.Size(98, 17); this.EnableThumbnailZoomCheckBox.Size = new System.Drawing.Size(98, 17);
this.EnableThumbnailZoomCheckBox.TabIndex = 13; this.EnableThumbnailZoomCheckBox.TabIndex = 0;
this.EnableThumbnailZoomCheckBox.Text = "Zoom on hover"; this.EnableThumbnailZoomCheckBox.Text = "Zoom on hover";
this.EnableThumbnailZoomCheckBox.UseVisualStyleBackColor = true; this.EnableThumbnailZoomCheckBox.UseVisualStyleBackColor = true;
this.EnableThumbnailZoomCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler); this.EnableThumbnailZoomCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
@@ -487,98 +486,64 @@ namespace EveOPreview.UI
// //
this.ThumbnailZoomFactorNumericEdit.BackColor = System.Drawing.SystemColors.Window; this.ThumbnailZoomFactorNumericEdit.BackColor = System.Drawing.SystemColors.Window;
this.ThumbnailZoomFactorNumericEdit.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.ThumbnailZoomFactorNumericEdit.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ThumbnailZoomFactorNumericEdit.Location = new System.Drawing.Point(81, 41); this.ThumbnailZoomFactorNumericEdit.Location = new System.Drawing.Point(94, 41);
this.ThumbnailZoomFactorNumericEdit.Maximum = new decimal(new int[] { this.ThumbnailZoomFactorNumericEdit.Maximum = new decimal(new int[] {
10, 10,
0, 0,
0, 0,
0}); 0});
this.ThumbnailZoomFactorNumericEdit.Minimum = new decimal(new int[] { this.ThumbnailZoomFactorNumericEdit.Minimum = new decimal(new int[] {
1, 2,
0, 0,
0, 0,
0}); 0});
this.ThumbnailZoomFactorNumericEdit.Name = "ThumbnailZoomFactorNumericEdit"; this.ThumbnailZoomFactorNumericEdit.Name = "ThumbnailZoomFactorNumericEdit";
this.ThumbnailZoomFactorNumericEdit.Size = new System.Drawing.Size(34, 20); this.ThumbnailZoomFactorNumericEdit.Size = new System.Drawing.Size(38, 20);
this.ThumbnailZoomFactorNumericEdit.TabIndex = 24; this.ThumbnailZoomFactorNumericEdit.TabIndex = 1;
this.ThumbnailZoomFactorNumericEdit.Value = new decimal(new int[] { this.ThumbnailZoomFactorNumericEdit.Value = new decimal(new int[] {
1, 2,
0, 0,
0, 0,
0}); 0});
this.ThumbnailZoomFactorNumericEdit.ValueChanged += new System.EventHandler(this.OptionChanged_Handler); this.ThumbnailZoomFactorNumericEdit.ValueChanged += new System.EventHandler(this.OptionChanged_Handler);
// //
// ShowThumbnailOverlaysCheckBox // ThumbnailListPanel
// //
this.ShowThumbnailOverlaysCheckBox.AutoSize = true; ThumbnailListPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
this.ShowThumbnailOverlaysCheckBox.Checked = true; | System.Windows.Forms.AnchorStyles.Left)
this.ShowThumbnailOverlaysCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; | System.Windows.Forms.AnchorStyles.Right)));
this.ShowThumbnailOverlaysCheckBox.Location = new System.Drawing.Point(3, 295); ThumbnailListPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ShowThumbnailOverlaysCheckBox.Name = "ShowThumbnailOverlaysCheckBox"; ThumbnailListPanel.Controls.Add(this.ThumbnailsList);
this.ShowThumbnailOverlaysCheckBox.RightToLeft = System.Windows.Forms.RightToLeft.No; ThumbnailListPanel.Controls.Add(ThumbnailsListLabel);
this.ShowThumbnailOverlaysCheckBox.Size = new System.Drawing.Size(90, 17); ThumbnailListPanel.Location = new System.Drawing.Point(3, 350);
this.ShowThumbnailOverlaysCheckBox.TabIndex = 14; ThumbnailListPanel.Name = "ThumbnailListPanel";
this.ShowThumbnailOverlaysCheckBox.Text = "Show overlay"; ThumbnailListPanel.Size = new System.Drawing.Size(264, 125);
this.ShowThumbnailOverlaysCheckBox.UseVisualStyleBackColor = true; ThumbnailListPanel.TabIndex = 5;
this.ShowThumbnailOverlaysCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
//
// ShowThumbnailFramesCheckBox
//
this.ShowThumbnailFramesCheckBox.AutoSize = true;
this.ShowThumbnailFramesCheckBox.Checked = true;
this.ShowThumbnailFramesCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.ShowThumbnailFramesCheckBox.Location = new System.Drawing.Point(99, 295);
this.ShowThumbnailFramesCheckBox.Name = "ShowThumbnailFramesCheckBox";
this.ShowThumbnailFramesCheckBox.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.ShowThumbnailFramesCheckBox.Size = new System.Drawing.Size(127, 17);
this.ShowThumbnailFramesCheckBox.TabIndex = 9;
this.ShowThumbnailFramesCheckBox.Text = "Show preview frames";
this.ShowThumbnailFramesCheckBox.UseVisualStyleBackColor = true;
this.ShowThumbnailFramesCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
//
// ThumbnailsListPanel
//
ThumbnailsListPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
ThumbnailsListPanel.Controls.Add(this.ThumbnailsList);
ThumbnailsListPanel.Controls.Add(ThumbnailsListLabel);
ThumbnailsListPanel.Location = new System.Drawing.Point(3, 318);
ThumbnailsListPanel.Name = "ThumbnailsListPanel";
ThumbnailsListPanel.Size = new System.Drawing.Size(246, 125);
ThumbnailsListPanel.TabIndex = 31;
// //
// ThumbnailsList // ThumbnailsList
// //
this.ThumbnailsList.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ThumbnailsList.BackColor = System.Drawing.SystemColors.Window; this.ThumbnailsList.BackColor = System.Drawing.SystemColors.Window;
this.ThumbnailsList.BorderStyle = System.Windows.Forms.BorderStyle.None; this.ThumbnailsList.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.ThumbnailsList.FormattingEnabled = true; this.ThumbnailsList.FormattingEnabled = true;
this.ThumbnailsList.IntegralHeight = false; this.ThumbnailsList.IntegralHeight = false;
this.ThumbnailsList.Location = new System.Drawing.Point(3, 18); this.ThumbnailsList.Location = new System.Drawing.Point(3, 18);
this.ThumbnailsList.Name = "ThumbnailsList"; this.ThumbnailsList.Name = "ThumbnailsList";
this.ThumbnailsList.Size = new System.Drawing.Size(240, 100); this.ThumbnailsList.Size = new System.Drawing.Size(256, 100);
this.ThumbnailsList.TabIndex = 28; this.ThumbnailsList.TabIndex = 0;
this.ThumbnailsList.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.ThumbnailsList_ItemCheck_Handler); this.ThumbnailsList.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.ThumbnailsList_ItemCheck_Handler);
// //
// ThumbnailsListLabel // ThumbnailsListLabel
// //
ThumbnailsListLabel.AutoSize = true; ThumbnailsListLabel.AutoSize = true;
ThumbnailsListLabel.Location = new System.Drawing.Point(3, 0); ThumbnailsListLabel.Location = new System.Drawing.Point(0, 0);
ThumbnailsListLabel.Name = "ThumbnailsListLabel"; ThumbnailsListLabel.Name = "ThumbnailsListLabel";
ThumbnailsListLabel.Size = new System.Drawing.Size(162, 13); ThumbnailsListLabel.Size = new System.Drawing.Size(162, 13);
ThumbnailsListLabel.TabIndex = 29; ThumbnailsListLabel.TabIndex = 29;
ThumbnailsListLabel.Text = "Thumbnails (check to force hide)"; ThumbnailsListLabel.Text = "Thumbnails (check to force hide)";
// //
// ForumLinkLabel
//
this.ForumLinkLabel.AutoSize = true;
this.ForumLinkLabel.Location = new System.Drawing.Point(3, 446);
this.ForumLinkLabel.Name = "ForumLinkLabel";
this.ForumLinkLabel.Size = new System.Drawing.Size(241, 26);
this.ForumLinkLabel.TabIndex = 10;
this.ForumLinkLabel.TabStop = true;
this.ForumLinkLabel.Text = "to be set from prresenter to be set from prresenter to be set from prresenter to " +
"be set from prresenter";
this.ForumLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.ForumLinkLabelClicked_Handler);
//
// TitleMenuItem // TitleMenuItem
// //
TitleMenuItem.Enabled = false; TitleMenuItem.Enabled = false;
@@ -591,6 +556,94 @@ namespace EveOPreview.UI
SeparatorMenuItem.Name = "SeparatorMenuItem"; SeparatorMenuItem.Name = "SeparatorMenuItem";
SeparatorMenuItem.Size = new System.Drawing.Size(148, 6); SeparatorMenuItem.Size = new System.Drawing.Size(148, 6);
// //
// OverlayOptionsPanel
//
OverlayOptionsPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
OverlayOptionsPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
OverlayOptionsPanel.Controls.Add(this.HighlightColorLabel);
OverlayOptionsPanel.Controls.Add(this.ActiveClientHighlightColorButton);
OverlayOptionsPanel.Controls.Add(this.EnableActiveClientHighlightCheckBox);
OverlayOptionsPanel.Controls.Add(this.ShowThumbnailOverlaysCheckBox);
OverlayOptionsPanel.Controls.Add(this.ShowThumbnailFramesCheckBox);
OverlayOptionsPanel.Location = new System.Drawing.Point(3, 295);
OverlayOptionsPanel.Name = "OverlayOptionsPanel";
OverlayOptionsPanel.Size = new System.Drawing.Size(264, 49);
OverlayOptionsPanel.TabIndex = 3;
//
// HighlightColorLabel
//
this.HighlightColorLabel.AutoSize = true;
this.HighlightColorLabel.Location = new System.Drawing.Point(150, 28);
this.HighlightColorLabel.Name = "HighlightColorLabel";
this.HighlightColorLabel.Size = new System.Drawing.Size(31, 13);
this.HighlightColorLabel.TabIndex = 19;
this.HighlightColorLabel.Text = "Color";
//
// ActiveClientHighlightColorButton
//
this.ActiveClientHighlightColorButton.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ActiveClientHighlightColorButton.Location = new System.Drawing.Point(199, 27);
this.ActiveClientHighlightColorButton.Name = "ActiveClientHighlightColorButton";
this.ActiveClientHighlightColorButton.Size = new System.Drawing.Size(60, 17);
this.ActiveClientHighlightColorButton.TabIndex = 3;
this.ActiveClientHighlightColorButton.Click += new System.EventHandler(this.ActiveClientHighlightColorButton_Click);
//
// EnableActiveClientHighlightCheckBox
//
this.EnableActiveClientHighlightCheckBox.AutoSize = true;
this.EnableActiveClientHighlightCheckBox.Checked = true;
this.EnableActiveClientHighlightCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.EnableActiveClientHighlightCheckBox.Location = new System.Drawing.Point(3, 27);
this.EnableActiveClientHighlightCheckBox.Name = "EnableActiveClientHighlightCheckBox";
this.EnableActiveClientHighlightCheckBox.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.EnableActiveClientHighlightCheckBox.Size = new System.Drawing.Size(127, 17);
this.EnableActiveClientHighlightCheckBox.TabIndex = 2;
this.EnableActiveClientHighlightCheckBox.Text = "Highlight active client";
this.EnableActiveClientHighlightCheckBox.UseVisualStyleBackColor = true;
this.EnableActiveClientHighlightCheckBox.CheckStateChanged += new System.EventHandler(this.OptionChanged_Handler);
//
// ShowThumbnailOverlaysCheckBox
//
this.ShowThumbnailOverlaysCheckBox.AutoSize = true;
this.ShowThumbnailOverlaysCheckBox.Checked = true;
this.ShowThumbnailOverlaysCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.ShowThumbnailOverlaysCheckBox.Location = new System.Drawing.Point(3, 4);
this.ShowThumbnailOverlaysCheckBox.Name = "ShowThumbnailOverlaysCheckBox";
this.ShowThumbnailOverlaysCheckBox.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.ShowThumbnailOverlaysCheckBox.Size = new System.Drawing.Size(90, 17);
this.ShowThumbnailOverlaysCheckBox.TabIndex = 0;
this.ShowThumbnailOverlaysCheckBox.Text = "Show overlay";
this.ShowThumbnailOverlaysCheckBox.UseVisualStyleBackColor = true;
this.ShowThumbnailOverlaysCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
//
// ShowThumbnailFramesCheckBox
//
this.ShowThumbnailFramesCheckBox.AutoSize = true;
this.ShowThumbnailFramesCheckBox.Checked = true;
this.ShowThumbnailFramesCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.ShowThumbnailFramesCheckBox.Location = new System.Drawing.Point(153, 4);
this.ShowThumbnailFramesCheckBox.Name = "ShowThumbnailFramesCheckBox";
this.ShowThumbnailFramesCheckBox.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.ShowThumbnailFramesCheckBox.Size = new System.Drawing.Size(87, 17);
this.ShowThumbnailFramesCheckBox.TabIndex = 1;
this.ShowThumbnailFramesCheckBox.Text = "Show frames";
this.ShowThumbnailFramesCheckBox.UseVisualStyleBackColor = true;
this.ShowThumbnailFramesCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
//
// ForumLinkLabel
//
this.ForumLinkLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ForumLinkLabel.Location = new System.Drawing.Point(4, 478);
this.ForumLinkLabel.Name = "ForumLinkLabel";
this.ForumLinkLabel.Size = new System.Drawing.Size(264, 33);
this.ForumLinkLabel.TabIndex = 0;
this.ForumLinkLabel.TabStop = true;
this.ForumLinkLabel.Text = "to be set from prresenter to be set from prresenter to be set from prresenter to " +
"be set from prresenter";
this.ForumLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.ForumLinkLabelClicked_Handler);
//
// NotifyIcon // NotifyIcon
// //
this.NotifyIcon.ContextMenuStrip = this.TrayMenu; this.NotifyIcon.ContextMenuStrip = this.TrayMenu;
@@ -602,10 +655,10 @@ namespace EveOPreview.UI
// TrayMenu // TrayMenu
// //
this.TrayMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.TrayMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
TitleMenuItem, TitleMenuItem,
RestoreWindowMenuItem, RestoreWindowMenuItem,
SeparatorMenuItem, SeparatorMenuItem,
ExitMenuItem}); ExitMenuItem});
this.TrayMenu.Name = "contextMenuStrip1"; this.TrayMenu.Name = "contextMenuStrip1";
this.TrayMenu.Size = new System.Drawing.Size(152, 76); this.TrayMenu.Size = new System.Drawing.Size(152, 76);
// //
@@ -613,9 +666,14 @@ namespace EveOPreview.UI
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.ControlDarkDark; this.BackColor = System.Drawing.SystemColors.Control;
this.ClientSize = new System.Drawing.Size(252, 481); this.ClientSize = new System.Drawing.Size(270, 511);
this.Controls.Add(ContentFlowLayoutPanel); this.Controls.Add(OverlayOptionsPanel);
this.Controls.Add(MainOptionsPanel);
this.Controls.Add(ThumbnailSizePanel);
this.Controls.Add(ZoomOptionsPanel);
this.Controls.Add(ThumbnailListPanel);
this.Controls.Add(this.ForumLinkLabel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(0); this.Margin = new System.Windows.Forms.Padding(0);
@@ -626,12 +684,11 @@ namespace EveOPreview.UI
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainFormClosing_Handler); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainFormClosing_Handler);
this.Load += new System.EventHandler(this.MainFormResize_Handler); this.Load += new System.EventHandler(this.MainFormResize_Handler);
this.Resize += new System.EventHandler(this.MainFormResize_Handler); this.Resize += new System.EventHandler(this.MainFormResize_Handler);
ContentFlowLayoutPanel.ResumeLayout(false); MainOptionsPanel.ResumeLayout(false);
ContentFlowLayoutPanel.PerformLayout(); MainOptionsPanel.PerformLayout();
OpacityPanel.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.ThumbnailOpacityTrackBar)).EndInit();
OpacityPanel.PerformLayout(); ThumbnailSizePanel.ResumeLayout(false);
ResizeOptionsPanel.ResumeLayout(false); ThumbnailSizePanel.PerformLayout();
ResizeOptionsPanel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.ThumbnailsWidthNumericEdit)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ThumbnailsWidthNumericEdit)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.ThumbnailsHeightNumericEdit)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ThumbnailsHeightNumericEdit)).EndInit();
ZoomOptionsPanel.ResumeLayout(false); ZoomOptionsPanel.ResumeLayout(false);
@@ -639,25 +696,20 @@ namespace EveOPreview.UI
this.ZoomAnchorPanel.ResumeLayout(false); this.ZoomAnchorPanel.ResumeLayout(false);
this.ZoomAnchorPanel.PerformLayout(); this.ZoomAnchorPanel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.ThumbnailZoomFactorNumericEdit)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ThumbnailZoomFactorNumericEdit)).EndInit();
ThumbnailsListPanel.ResumeLayout(false); ThumbnailListPanel.ResumeLayout(false);
ThumbnailsListPanel.PerformLayout(); ThumbnailListPanel.PerformLayout();
OverlayOptionsPanel.ResumeLayout(false);
OverlayOptionsPanel.PerformLayout();
this.TrayMenu.ResumeLayout(false); this.TrayMenu.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
} }
#endregion #endregion
private CheckBox HideActiveClientThumbnailCheckBox;
private CheckBox HideThumbnailsOnLostFocusCheckBox;
private CheckBox EnablePerClientThumbnailsLayoutsCheckBox;
private CheckBox ShowThumbnailsAlwaysOnTopCheckBox;
private CheckBox ShowThumbnailFramesCheckBox;
private LinkLabel ForumLinkLabel; private LinkLabel ForumLinkLabel;
private NumericUpDown ThumbnailsWidthNumericEdit; private NumericUpDown ThumbnailsWidthNumericEdit;
private NumericUpDown ThumbnailsHeightNumericEdit; private NumericUpDown ThumbnailsHeightNumericEdit;
private CheckBox EnableThumbnailZoomCheckBox; private CheckBox EnableThumbnailZoomCheckBox;
private CheckBox ShowThumbnailOverlaysCheckBox;
private RadioButton ZoomAanchorNWRadioButton; private RadioButton ZoomAanchorNWRadioButton;
private RadioButton ZoomAanchorNRadioButton; private RadioButton ZoomAanchorNRadioButton;
private RadioButton ZoomAanchorNERadioButton; private RadioButton ZoomAanchorNERadioButton;
@@ -670,10 +722,19 @@ namespace EveOPreview.UI
private NumericUpDown ThumbnailZoomFactorNumericEdit; private NumericUpDown ThumbnailZoomFactorNumericEdit;
private Panel ZoomAnchorPanel; private Panel ZoomAnchorPanel;
private CheckedListBox ThumbnailsList; private CheckedListBox ThumbnailsList;
private CheckBox EnableClientLayoutTrackingCheckBox;
private HScrollBar ThumbnailsOpacityScrollBar;
private CheckBox MinimizeToTrayCheckBox;
private NotifyIcon NotifyIcon; private NotifyIcon NotifyIcon;
private ContextMenuStrip TrayMenu; private ContextMenuStrip TrayMenu;
private CheckBox EnableClientLayoutTrackingCheckBox;
private CheckBox HideActiveClientThumbnailCheckBox;
private CheckBox ShowThumbnailsAlwaysOnTopCheckBox;
private CheckBox HideThumbnailsOnLostFocusCheckBox;
private CheckBox EnablePerClientThumbnailsLayoutsCheckBox;
private CheckBox ShowThumbnailOverlaysCheckBox;
private CheckBox ShowThumbnailFramesCheckBox;
private CheckBox MinimizeToTrayCheckBox;
private TrackBar ThumbnailOpacityTrackBar;
private CheckBox EnableActiveClientHighlightCheckBox;
private Label HighlightColorLabel;
private Panel ActiveClientHighlightColorButton;
} }
} }

View File

@@ -44,15 +44,25 @@ namespace EveOPreview.UI
} }
} }
public double ThumbnailsOpacity public double ThumbnailOpacity
{ {
get get
{ {
return Math.Min(this.ThumbnailsOpacityScrollBar.Value / 100.00, 1.00); return Math.Min(this.ThumbnailOpacityTrackBar.Value / 100.00, 1.00);
} }
set set
{ {
this.ThumbnailsOpacityScrollBar.Value = Math.Min(100, (int)(100.0 * value)); int barValue = (int)(100.0 * value);
if (barValue > 100)
{
barValue = 100;
}
else if (barValue < 10)
{
barValue = 10;
}
this.ThumbnailOpacityTrackBar.Value = barValue;
} }
} }
@@ -104,7 +114,7 @@ namespace EveOPreview.UI
} }
} }
public bool EnablePerClientThumbnailsLayouts public bool EnablePerClientThumbnailLayouts
{ {
get get
{ {
@@ -208,6 +218,32 @@ namespace EveOPreview.UI
} }
} }
public bool EnableActiveClientHighlight
{
get
{
return this.EnableActiveClientHighlightCheckBox.Checked;
}
set
{
this.EnableActiveClientHighlightCheckBox.Checked = value;
}
}
public Color ActiveClientHighlightColor
{
get
{
return this._activeClientHighlightColor;
}
set
{
this._activeClientHighlightColor = value;
this.ActiveClientHighlightColorButton.BackColor = value;
}
}
private Color _activeClientHighlightColor;
public new void Show() public new void Show()
{ {
// Registers the current instance as the application's Main Form // Registers the current instance as the application's Main Form
@@ -331,6 +367,23 @@ namespace EveOPreview.UI
this.ThumbnailsSizeChanged?.Invoke(); this.ThumbnailsSizeChanged?.Invoke();
} }
private void ActiveClientHighlightColorButton_Click(object sender, EventArgs e)
{
using (ColorDialog dialog = new ColorDialog())
{
dialog.Color = this.ActiveClientHighlightColor;
if (dialog.ShowDialog() != DialogResult.OK)
{
return;
}
this.ActiveClientHighlightColor = dialog.Color;
}
this.OptionChanged_Handler(sender, e);
}
private void ThumbnailsList_ItemCheck_Handler(object sender, ItemCheckEventArgs e) private void ThumbnailsList_ItemCheck_Handler(object sender, ItemCheckEventArgs e)
{ {
IThumbnailDescriptionView selectedItem = this.ThumbnailsList.Items[e.Index] as IThumbnailDescriptionView; IThumbnailDescriptionView selectedItem = this.ThumbnailsList.Items[e.Index] as IThumbnailDescriptionView;

View File

@@ -129,24 +129,18 @@
<metadata name="ExitMenuItem.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="ExitMenuItem.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value> <value>False</value>
</metadata> </metadata>
<metadata name="ContentFlowLayoutPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="MainOptionsPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value> <value>False</value>
</metadata> </metadata>
<metadata name="ContentFlowLayoutPanel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="MainOptionsPanel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ThumbnailOpacityTrackBar.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="MinimizeToTrayCheckBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="MinimizeToTrayCheckBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="OpacityPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="OpacityPanel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ThumbnailsOpacityScrollBar.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="EnableClientLayoutTrackingCheckBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="EnableClientLayoutTrackingCheckBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
@@ -162,10 +156,10 @@
<metadata name="EnablePerClientThumbnailsLayoutsCheckBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="EnablePerClientThumbnailsLayoutsCheckBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="ResizeOptionsPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="ThumbnailSizePanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value> <value>False</value>
</metadata> </metadata>
<metadata name="ResizeOptionsPanel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="ThumbnailSizePanel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="HeigthLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="HeigthLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@@ -240,16 +234,10 @@
<metadata name="ThumbnailZoomFactorNumericEdit.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="ThumbnailZoomFactorNumericEdit.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="ShowThumbnailOverlaysCheckBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="ThumbnailListPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ShowThumbnailFramesCheckBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ThumbnailsListPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value> <value>False</value>
</metadata> </metadata>
<metadata name="ThumbnailsListPanel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="ThumbnailListPanel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="ThumbnailsList.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="ThumbnailsList.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@@ -261,15 +249,36 @@
<metadata name="ThumbnailsListLabel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="ThumbnailsListLabel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="ForumLinkLabel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TitleMenuItem.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="TitleMenuItem.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value> <value>False</value>
</metadata> </metadata>
<metadata name="SeparatorMenuItem.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="SeparatorMenuItem.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value> <value>False</value>
</metadata> </metadata>
<metadata name="OverlayOptionsPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="OverlayOptionsPanel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="HighlightColorLabel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ActiveClientHighlightColorButton.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="EnableActiveClientHighlightCheckBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ShowThumbnailOverlaysCheckBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ShowThumbnailFramesCheckBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ForumLinkLabel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="NotifyIcon.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="NotifyIcon.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
@@ -860,7 +869,7 @@
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>86</value> <value>36</value>
</metadata> </metadata>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>

View File

@@ -50,10 +50,9 @@
// OverlayLabel // OverlayLabel
// //
this.OverlayLabel.AutoSize = true; this.OverlayLabel.AutoSize = true;
this.OverlayLabel.Dock = System.Windows.Forms.DockStyle.Top;
this.OverlayLabel.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.OverlayLabel.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.OverlayLabel.ForeColor = System.Drawing.Color.DarkGray; this.OverlayLabel.ForeColor = System.Drawing.Color.DarkGray;
this.OverlayLabel.Location = new System.Drawing.Point(0, 0); this.OverlayLabel.Location = new System.Drawing.Point(8, 8);
this.OverlayLabel.Name = "OverlayLabel"; this.OverlayLabel.Name = "OverlayLabel";
this.OverlayLabel.Size = new System.Drawing.Size(25, 13); this.OverlayLabel.Size = new System.Drawing.Size(25, 13);
this.OverlayLabel.TabIndex = 1; this.OverlayLabel.TabIndex = 1;

View File

@@ -1,4 +1,5 @@
using System; using System;
using System.Drawing;
using System.Windows.Forms; using System.Windows.Forms;
namespace EveOPreview.UI namespace EveOPreview.UI
@@ -7,6 +8,8 @@ namespace EveOPreview.UI
{ {
#region Private fields #region Private fields
private readonly Action<object, MouseEventArgs> _areaClickAction; private readonly Action<object, MouseEventArgs> _areaClickAction;
private bool _highlightEnabled;
private Color _highlightColor;
#endregion #endregion
public ThumbnailOverlay(Form owner, Action<object, MouseEventArgs> areaClickAction) public ThumbnailOverlay(Form owner, Action<object, MouseEventArgs> areaClickAction)
@@ -14,6 +17,9 @@ namespace EveOPreview.UI
this.Owner = owner; this.Owner = owner;
this._areaClickAction = areaClickAction; this._areaClickAction = areaClickAction;
this._highlightEnabled = false;
this._highlightColor = Color.Red;
InitializeComponent(); InitializeComponent();
} }
@@ -27,14 +33,46 @@ namespace EveOPreview.UI
this.OverlayLabel.Text = label; this.OverlayLabel.Text = label;
} }
public void EnableOverlayLabel(bool enable)
{
this.OverlayLabel.Visible = enable;
}
public void EnableHighlight(bool enabled, Color color)
{
if (enabled == this._highlightEnabled)
{
// Nothing to do here
return;
}
this._highlightEnabled = enabled;
this._highlightColor = color;
this.Refresh();
}
protected override CreateParams CreateParams protected override CreateParams CreateParams
{ {
get get
{ {
var Params = base.CreateParams; var Params = base.CreateParams;
Params.ExStyle |= (int)DwmApiNativeMethods.WS_EX_TOOLWINDOW; Params.ExStyle |= (int)WindowManagerNativeMethods.WS_EX_TOOLWINDOW;
return Params; return Params;
} }
} }
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
if (this._highlightEnabled)
{
ControlPaint.DrawBorder(e.Graphics, this.ClientRectangle,
this._highlightColor, 4, ButtonBorderStyle.Solid,
this._highlightColor, 4, ButtonBorderStyle.Solid,
this._highlightColor, 4, ButtonBorderStyle.Solid,
this._highlightColor, 4, ButtonBorderStyle.Solid);
}
}
} }
} }

View File

@@ -33,9 +33,11 @@ namespace EveOPreview.UI
this.ShowInTaskbar = false; this.ShowInTaskbar = false;
this.Text = "Preview"; this.Text = "Preview";
this.TopMost = true; this.TopMost = true;
this.MouseLeave += new System.EventHandler(this.LostFocus_Handler); this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.MouseDown_Handler);
this.MouseHover += new System.EventHandler(this.Focused_Handler); this.MouseEnter += new System.EventHandler(this.MouseEnter_Handler);
this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.ThumbnailActivated_Handler); this.MouseLeave += new System.EventHandler(this.MouseLeave_Handler);
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.MouseMove_Handler);
this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.MouseUp_Handler);
this.Move += new System.EventHandler(this.Move_Handler); this.Move += new System.EventHandler(this.Move_Handler);
this.Resize += new System.EventHandler(this.Resize_Handler); this.Resize += new System.EventHandler(this.Resize_Handler);
this.ResumeLayout(false); this.ResumeLayout(false);

View File

@@ -8,21 +8,24 @@ namespace EveOPreview.UI
public partial class ThumbnailView : Form, IThumbnailView public partial class ThumbnailView : Form, IThumbnailView
{ {
#region Private fields #region Private fields
//private readonly IThumbnailManager _manager;
private readonly ThumbnailOverlay _overlay; private readonly ThumbnailOverlay _overlay;
// This is pure brainless View // Part of the logic (namely current size / position management)
// Just somewhat more complex than usual // was moved to the view due to the performance reasons
private bool _isThumbnailSetUp; private bool _isThumbnailSetUp;
private bool _isOverlayVisible; private bool _isOverlayVisible;
private bool _isTopMost;
private bool _isPositionChanged; private bool _isPositionChanged;
private bool _isSizeChanged; private bool _isSizeChanged;
private bool _isCustomMouseModeActive;
private DateTime _suppressResizeEventsTimestamp; private DateTime _suppressResizeEventsTimestamp;
private DWM_THUMBNAIL_PROPERTIES _thumbnail; private DWM_THUMBNAIL_PROPERTIES _thumbnail;
private IntPtr _thumbnailHandle; private IntPtr _thumbnailHandle;
private Size _baseSize; private Size _baseZoomSize;
private Point _baseLocation; private Point _baseZoomLocation;
private Point _baseMousePosition;
private Size _baseZoomMaximumSize;
private HotkeyHandler _hotkeyHandler; private HotkeyHandler _hotkeyHandler;
#endregion #endregion
@@ -34,15 +37,17 @@ namespace EveOPreview.UI
this.IsOverlayEnabled = false; this.IsOverlayEnabled = false;
this._isThumbnailSetUp = false; this._isThumbnailSetUp = false;
this._isOverlayVisible = false; this._isOverlayVisible = false;
this._isTopMost = false;
this._isPositionChanged = true; this._isPositionChanged = true;
this._isSizeChanged = true; this._isSizeChanged = true;
this._isCustomMouseModeActive = false;
this._suppressResizeEventsTimestamp = DateTime.UtcNow; this._suppressResizeEventsTimestamp = DateTime.UtcNow;
InitializeComponent(); InitializeComponent();
this._overlay = new ThumbnailOverlay(this, this.ThumbnailActivated_Handler); this._overlay = new ThumbnailOverlay(this, this.MouseDown_Handler);
} }
public IntPtr Id { get; set; } public IntPtr Id { get; set; }
@@ -108,7 +113,11 @@ namespace EveOPreview.UI
{ {
base.Show(); base.Show();
// Thumbnail will be registered during the Refresh cycle this._isPositionChanged = true;
this._isSizeChanged = true;
this._isOverlayVisible = false;
// Thumbnail will be properly registered during the Manager's Refresh cycle
this.Refresh(); this.Refresh();
this.IsActive = true; this.IsActive = true;
@@ -147,14 +156,28 @@ namespace EveOPreview.UI
public void SetOpacity(double opacity) public void SetOpacity(double opacity)
{ {
this.Opacity = opacity; this.Opacity = opacity;
// Overlay opacity settings
// Of the thumbnail's opacity is almost full then set the overlay's one to
// full. Otherwise set it to half of the thumnail opacity
// Opacity value is stored even if the overlay is not displayed atm
this._overlay.Opacity = this.Opacity > 0.9 ? 1.0 : 1.0 - (1.0 - this.Opacity) / 2;
} }
public void SetFrames(bool enable) public void SetFrames(bool enable)
{ {
FormBorderStyle style = enable ? FormBorderStyle.SizableToolWindow : FormBorderStyle.None;
// No need to change the borders style if it is ALREADY correct
if (this.FormBorderStyle == style)
{
return;
}
// Fix for WinForms issue with the Resize event being fired with inconsistent ClientSize value // Fix for WinForms issue with the Resize event being fired with inconsistent ClientSize value
// Any Resize events fired before this timestamp will be ignored // Any Resize events fired before this timestamp will be ignored
this._suppressResizeEventsTimestamp = DateTime.UtcNow.AddMilliseconds(450); this._suppressResizeEventsTimestamp = DateTime.UtcNow.AddMilliseconds(450);
this.FormBorderStyle = enable ? FormBorderStyle.SizableToolWindow : FormBorderStyle.None; this.FormBorderStyle = style;
// Notify about possible contents position change // Notify about possible contents position change
this._isSizeChanged = true; this._isSizeChanged = true;
@@ -162,17 +185,27 @@ namespace EveOPreview.UI
public void SetTopMost(bool enableTopmost) public void SetTopMost(bool enableTopmost)
{ {
// IMO WinForms could check this too
if (this._isTopMost == enableTopmost)
{
return;
}
this.TopMost = enableTopmost; this.TopMost = enableTopmost;
this._overlay.TopMost = enableTopmost; this._overlay.TopMost = enableTopmost;
this._isTopMost = enableTopmost;
}
public void SetHighlight(bool enabled, Color color)
{
this._overlay.EnableHighlight(enabled, color);
} }
public void ZoomIn(ViewZoomAnchor anchor, int zoomFactor) public void ZoomIn(ViewZoomAnchor anchor, int zoomFactor)
{ {
this._baseSize = this.Size; int oldWidth = this._baseZoomSize.Width;
this._baseLocation = this.Location; int oldHeight = this._baseZoomSize.Height;
int oldWidth = this._baseSize.Width;
int oldHeight = this._baseSize.Height;
int locationX = this.Location.X; int locationX = this.Location.X;
int locationY = this.Location.Y; int locationY = this.Location.Y;
@@ -183,6 +216,7 @@ namespace EveOPreview.UI
// First change size, THEN move the window // First change size, THEN move the window
// Otherwise there is a chance to fail in a loop // Otherwise there is a chance to fail in a loop
// Zoom requied -> Moved the windows 1st -> Focus is lost -> Window is moved back -> Focus is back on -> Zoom required -> ... // Zoom requied -> Moved the windows 1st -> Focus is lost -> Window is moved back -> Focus is back on -> Zoom required -> ...
this.MaximumSize = new Size(0, 0);
this.Size = new Size(newWidth, newHeight); this.Size = new Size(newWidth, newHeight);
switch (anchor) switch (anchor)
@@ -207,7 +241,7 @@ namespace EveOPreview.UI
break; break;
case ViewZoomAnchor.SW: case ViewZoomAnchor.SW:
this.Location = new Point(locationX, locationY - newHeight + this._baseSize.Height); this.Location = new Point(locationX, locationY - newHeight + this._baseZoomSize.Height);
break; break;
case ViewZoomAnchor.S: case ViewZoomAnchor.S:
this.Location = new Point(locationX - newWidth / 2 + oldWidth / 2, locationY - newHeight + oldHeight); this.Location = new Point(locationX - newWidth / 2 + oldWidth / 2, locationY - newHeight + oldHeight);
@@ -220,8 +254,7 @@ namespace EveOPreview.UI
public void ZoomOut() public void ZoomOut()
{ {
this.Size = this._baseSize; this.RestoreWindowSizeAndLocation();
this.Location = this._baseLocation;
} }
public void RegisterHotkey(Keys hotkey) public void RegisterHotkey(Keys hotkey)
@@ -247,7 +280,6 @@ namespace EveOPreview.UI
// There can be a lot of possible exception reasons here // There can be a lot of possible exception reasons here
// In case of any of them the hotkey setting is silently ignored // In case of any of them the hotkey setting is silently ignored
} }
} }
public void UnregisterHotkey() public void UnregisterHotkey()
@@ -281,7 +313,7 @@ namespace EveOPreview.UI
this._thumbnail.rcDestination = new RECT(0, 0, this.ClientSize.Width, this.ClientSize.Height); this._thumbnail.rcDestination = new RECT(0, 0, this.ClientSize.Width, this.ClientSize.Height);
try try
{ {
DwmApiNativeMethods.DwmUpdateThumbnailProperties(this._thumbnailHandle, this._thumbnail); WindowManagerNativeMethods.DwmUpdateThumbnailProperties(this._thumbnailHandle, this._thumbnail);
} }
catch (ArgumentException) catch (ArgumentException)
{ {
@@ -295,40 +327,34 @@ namespace EveOPreview.UI
this.UnregisterThumbnail(obsoleteThumbnailHanlde); this.UnregisterThumbnail(obsoleteThumbnailHanlde);
} }
if (!this.IsOverlayEnabled) this._overlay.EnableOverlayLabel(this.IsOverlayEnabled);
{
if (this._isOverlayVisible)
{
this._overlay.Hide();
this._isOverlayVisible = false;
}
return;
}
if (!this._isOverlayVisible) if (!this._isOverlayVisible)
{ {
// One-time action to show the Overlay before it is set up
// Otherwise its position won't be set
this._overlay.Show(); this._overlay.Show();
this._isOverlayVisible = true; this._isOverlayVisible = true;
} }
else if (!(sizeChanged || locationChanged)) else
{ {
// No need to adjust in the overlay location if it is already visible and properly set if (!(sizeChanged || locationChanged))
return; {
// No need to adjust in the overlay location if it is already visible and properly set
return;
}
} }
Size overlaySize = this.ClientSize; Size overlaySize = this.ClientSize;
overlaySize.Width -= 2 * 5;
overlaySize.Height -= 2 * 5;
Point overlayLocation = this.Location; Point overlayLocation = this.Location;
overlayLocation.X += 5 + (this.Size.Width - this.ClientSize.Width) / 2; overlayLocation.X += (this.Size.Width - this.ClientSize.Width) / 2;
overlayLocation.Y += 5 + (this.Size.Height - this.ClientSize.Height) - (this.Size.Width - this.ClientSize.Width) / 2; overlayLocation.Y += (this.Size.Height - this.ClientSize.Height) - (this.Size.Width - this.ClientSize.Width) / 2;
this._isPositionChanged = false; this._isPositionChanged = false;
this._overlay.Size = overlaySize; this._overlay.Size = overlaySize;
this._overlay.Location = overlayLocation; this._overlay.Location = overlayLocation;
this._overlay.Refresh();
} }
#region GUI events #region GUI events
@@ -337,7 +363,7 @@ namespace EveOPreview.UI
get get
{ {
var Params = base.CreateParams; var Params = base.CreateParams;
Params.ExStyle |= (int)DwmApiNativeMethods.WS_EX_TOOLWINDOW; Params.ExStyle |= (int)WindowManagerNativeMethods.WS_EX_TOOLWINDOW;
return Params; return Params;
} }
} }
@@ -360,34 +386,46 @@ namespace EveOPreview.UI
this.ThumbnailResized?.Invoke(this.Id); this.ThumbnailResized?.Invoke(this.Id);
} }
private void Focused_Handler(object sender, EventArgs e) private void MouseEnter_Handler(object sender, EventArgs e)
{ {
this.ExitCustomMouseMode();
this.SaveWindowSizeAndLocation();
this.ThumbnailFocused?.Invoke(this.Id); this.ThumbnailFocused?.Invoke(this.Id);
} }
private void LostFocus_Handler(object sender, EventArgs e) private void MouseLeave_Handler(object sender, EventArgs e)
{ {
this.ThumbnailLostFocus?.Invoke(this.Id); this.ThumbnailLostFocus?.Invoke(this.Id);
} }
private void ThumbnailActivated_Handler(object sender, MouseEventArgs e) private void MouseDown_Handler(object sender, MouseEventArgs e)
{ {
if (e.Button == MouseButtons.Left) if (e.Button == MouseButtons.Left)
{ {
this.ThumbnailActivated?.Invoke(this.Id); this.ThumbnailActivated?.Invoke(this.Id);
} }
//if (e.Button == MouseButtons.Right) if ((e.Button == MouseButtons.Right) || (e.Button == (MouseButtons.Left | MouseButtons.Right)))
//{ {
// // do smth cool? this.EnterCustomMouseMode();
//} }
}
//if (e.Button == MouseButtons.Middle) private void MouseMove_Handler(object sender, MouseEventArgs e)
//{ {
//// Trigger full thumbnail refresh if (this._isCustomMouseModeActive)
//this.UnregisterThumbnail(); {
//this.Refresh(); this.ProcessCustomMouseMode(e.Button.HasFlag(MouseButtons.Left), e.Button.HasFlag(MouseButtons.Right));
//} }
}
private void MouseUp_Handler(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
this.ExitCustomMouseMode();
}
} }
private void HotkeyPressed_Handler(object sender, HandledEventArgs e) private void HotkeyPressed_Handler(object sender, HandledEventArgs e)
@@ -398,9 +436,10 @@ namespace EveOPreview.UI
} }
#endregion #endregion
#region Thumbnail management
private void RegisterThumbnail() private void RegisterThumbnail()
{ {
this._thumbnailHandle = DwmApiNativeMethods.DwmRegisterThumbnail(this.Handle, this.Id); this._thumbnailHandle = WindowManagerNativeMethods.DwmRegisterThumbnail(this.Handle, this.Id);
this._thumbnail = new DWM_THUMBNAIL_PROPERTIES(); this._thumbnail = new DWM_THUMBNAIL_PROPERTIES();
this._thumbnail.dwFlags = DWM_TNP_CONSTANTS.DWM_TNP_VISIBLE this._thumbnail.dwFlags = DWM_TNP_CONSTANTS.DWM_TNP_VISIBLE
@@ -418,11 +457,68 @@ namespace EveOPreview.UI
{ {
try try
{ {
DwmApiNativeMethods.DwmUnregisterThumbnail(thumbnailHandle); WindowManagerNativeMethods.DwmUnregisterThumbnail(thumbnailHandle);
} }
catch (ArgumentException) catch (ArgumentException)
{ {
} }
} }
#endregion
#region Custom Mouse mode
// This pair of methods saves/restores certain window propeties
// Methods are used to remove the 'Zoom' effect (if any) when the
// custom resize/move mode is activated
// Methods are kept on this level because moving to the presenter
// the code that responds to the mouse events like movement
// seems like a huge overkill
private void SaveWindowSizeAndLocation()
{
this._baseZoomSize = this.Size;
this._baseZoomLocation = this.Location;
this._baseZoomMaximumSize = this.MaximumSize;
}
private void RestoreWindowSizeAndLocation()
{
this.Size = this._baseZoomSize;
this.MaximumSize = this._baseZoomMaximumSize;
this.Location = this._baseZoomLocation;
}
private void EnterCustomMouseMode()
{
this.RestoreWindowSizeAndLocation();
this._isCustomMouseModeActive = true;
this._baseMousePosition = Control.MousePosition;
}
private void ProcessCustomMouseMode(bool leftButton, bool rightButton)
{
Point mousePosition = Control.MousePosition;
int offsetX = mousePosition.X - this._baseMousePosition.X;
int offsetY = mousePosition.Y - this._baseMousePosition.Y;
this._baseMousePosition = mousePosition;
// Left + Right buttons trigger thumbnail resize
// Right button only trigger thumbnail movement
if (leftButton && rightButton)
{
this.Size = new Size(this.Size.Width + offsetX, this.Size.Height + offsetY);
this._baseZoomSize = this.Size;
}
else
{
this.Location = new Point(this.Location.X + offsetX, this.Location.Y + offsetY);
this._baseZoomLocation = this.Location;
}
}
private void ExitCustomMouseMode()
{
this._isCustomMouseModeActive = false;
}
#endregion
} }
} }

View File

@@ -12,13 +12,13 @@ namespace EveOPreview.UI
{ {
bool MinimizeToTray { get; set; } bool MinimizeToTray { get; set; }
double ThumbnailsOpacity { get; set; } double ThumbnailOpacity { get; set; }
bool EnableClientLayoutTracking { get; set; } bool EnableClientLayoutTracking { get; set; }
bool HideActiveClientThumbnail { get; set; } bool HideActiveClientThumbnail { get; set; }
bool ShowThumbnailsAlwaysOnTop { get; set; } bool ShowThumbnailsAlwaysOnTop { get; set; }
bool HideThumbnailsOnLostFocus { get; set; } bool HideThumbnailsOnLostFocus { get; set; }
bool EnablePerClientThumbnailsLayouts { get; set; } bool EnablePerClientThumbnailLayouts { get; set; }
Size ThumbnailSize { get; set; } Size ThumbnailSize { get; set; }
@@ -29,6 +29,9 @@ namespace EveOPreview.UI
bool ShowThumbnailOverlays { get; set; } bool ShowThumbnailOverlays { get; set; }
bool ShowThumbnailFrames { get; set; } bool ShowThumbnailFrames { get; set; }
bool EnableActiveClientHighlight { get; set; }
Color ActiveClientHighlightColor { get; set; }
void SetForumUrl(string url); void SetForumUrl(string url);
void SetThumbnailSizeLimitations(Size minimumSize, Size maximumSize); void SetThumbnailSizeLimitations(Size minimumSize, Size maximumSize);

View File

@@ -21,6 +21,7 @@ namespace EveOPreview.UI
void SetOpacity(double opacity); void SetOpacity(double opacity);
void SetFrames(bool enable); void SetFrames(bool enable);
void SetTopMost(bool enableTopmost); void SetTopMost(bool enableTopmost);
void SetHighlight(bool enabled, Color color);
void ZoomIn(ViewZoomAnchor anchor, int zoomFactor); void ZoomIn(ViewZoomAnchor anchor, int zoomFactor);
void ZoomOut(); void ZoomOut();