Switch to MVP pattern

This commit is contained in:
Anton Kasyanov
2016-05-22 18:37:04 +03:00
parent 5e276b7a98
commit 362fd0b8d4
41 changed files with 2060 additions and 1265 deletions

View File

@@ -0,0 +1,69 @@
namespace EveOPreview
{
public class ApplicationController : IApplicationController
{
private readonly IIocContainer _container;
public ApplicationController(IIocContainer container)
{
this._container = container;
this._container.RegisterInstance<IApplicationController>(this);
}
public IApplicationController RegisterView<TView, TImplementation>()
where TView : IView
where TImplementation : class, TView
{
this._container.Register<TView, TImplementation>();
return this;
}
public IApplicationController RegisterInstance<TArgument>(TArgument instance)
{
this._container.RegisterInstance(instance);
return this;
}
public IApplicationController RegisterService<TService, TImplementation>()
where TImplementation : class, TService
{
this._container.Register<TService, TImplementation>();
return this;
}
public void Run<TPresenter>()
where TPresenter : class, IPresenter
{
if (!this._container.IsRegistered<TPresenter>())
{
this._container.Register<TPresenter>();
}
TPresenter presenter = this._container.Resolve<TPresenter>();
presenter.Run();
}
public void Run<TPresenter, TParameter>(TParameter args)
where TPresenter : class, IPresenter<TParameter>
{
if (!this._container.IsRegistered<TPresenter>())
{
this._container.Register<TPresenter>();
}
TPresenter presenter = this._container.Resolve<TPresenter>();
presenter.Run(args);
}
public TService Create<TService>()
where TService : class
{
if (!this._container.IsRegistered<TService>())
{
this._container.Register<TService>();
}
return this._container.Resolve<TService>();
}
}
}

View File

@@ -0,0 +1,26 @@
namespace EveOPreview
{
/// <summary>
/// Application controller
/// </summary>
public interface IApplicationController
{
IApplicationController RegisterView<TView, TPresenter>()
where TPresenter : class, TView
where TView : IView;
IApplicationController RegisterInstance<T>(T instance);
IApplicationController RegisterService<TService, TImplementation>()
where TImplementation : class, TService;
void Run<TPresenter>()
where TPresenter : class, IPresenter;
void Run<TPresenter, TArgument>(TArgument args)
where TPresenter : class, IPresenter<TArgument>;
TService Create<TService>()
where TService : class;
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Linq.Expressions;
namespace EveOPreview
{
/// <summary>
/// Generic interface for an Inversion Of Control container
/// </summary>
public interface IIocContainer
{
void Register<TService, TImplementation>() where TImplementation : TService;
void Register<TService>();
void RegisterInstance<T>(T instance);
TService Resolve<TService>();
bool IsRegistered<TService>();
void Register<TService, TArgument>(Expression<Func<TArgument, TService>> factory);
}
}

View File

@@ -0,0 +1,7 @@
namespace EveOPreview
{
public interface IPresenter
{
void Run();
}
}

View File

@@ -0,0 +1,7 @@
namespace EveOPreview
{
public interface IPresenter<in TArgument>
{
void Run(TArgument args);
}
}

View File

@@ -0,0 +1,12 @@
namespace EveOPreview
{
/// <summary>
/// Properties and methods that are common for all views
/// </summary>
public interface IView
{
void Show();
void Hide();
void Close();
}
}

View File

@@ -0,0 +1,48 @@
using System;
using System.Linq.Expressions;
using LightInject;
namespace EveOPreview
{
// Adapts LighInject to the generic IoC interface
sealed class LightInjectContainer : IIocContainer
{
private readonly ServiceContainer _container;
public LightInjectContainer()
{
this._container = new ServiceContainer(ContainerOptions.Default);
}
public bool IsRegistered<TService>()
{
return this._container.CanGetInstance(typeof(TService), "");
}
public void Register<TService>()
{
this._container.Register<TService>();
}
public void Register<TService, TImplementation>()
where TImplementation : TService
{
this._container.Register<TService, TImplementation>();
}
public void Register<TService, TArgument>(Expression<Func<TArgument, TService>> factory)
{
this._container.Register(f => factory);
}
public void RegisterInstance<T>(T instance)
{
this._container.RegisterInstance(instance);
}
public TService Resolve<TService>()
{
return this._container.GetInstance<TService>();
}
}
}

View File

@@ -0,0 +1,22 @@
namespace EveOPreview
{
public abstract class Presenter<TView> : IPresenter
where TView : IView
{
// Properties are used instead of fields so the code remains CLS compliant
// 'protected readonly' fields would result in non-CLS compliant code
protected TView View { get; private set; }
protected IApplicationController Controller { get; private set; }
protected Presenter(IApplicationController controller, TView view)
{
this.Controller = controller;
this.View = view;
}
public void Run()
{
this.View.Show();
}
}
}

View File

@@ -0,0 +1,19 @@
namespace EveOPreview
{
public abstract class Presenter<TView, TArgument> : IPresenter<TArgument>
where TView : IView
{
// Properties are used instead of fields so the code remains CLS compliant
// 'protected readonly' fields would result in non-CLS compliant code
protected TView View { get; private set; }
protected IApplicationController Controller { get; private set; }
protected Presenter(IApplicationController controller, TView view)
{
this.Controller = controller;
this.View = view;
}
public abstract void Run(TArgument args);
}
}

View File

@@ -1,4 +1,4 @@
namespace EveOPreview namespace EveOPreview.Configuration
{ {
public class Configuration public class Configuration
{ {

View File

@@ -1,4 +1,4 @@
namespace EveOPreview.Managers namespace EveOPreview.Configuration
{ {
public class ConfigurationStorage public class ConfigurationStorage
{ {

View File

@@ -90,10 +90,11 @@
</AssemblyOriginatorKeyFile> </AssemblyOriginatorKeyFile>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="PresentationCore" /> <Reference Include="LightInject, Version=4.0.9.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="PresentationFramework" /> <HintPath>..\packages\LightInject.4.0.9\lib\net45\LightInject.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" /> <Reference Include="System.Deployment" />
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
@@ -103,39 +104,57 @@
<Reference Include="WindowsBase" /> <Reference Include="WindowsBase" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="ApplicationBase\ApplicationController.cs" />
<Compile Include="ApplicationBase\IApplicationController.cs" />
<Compile Include="ApplicationBase\IIocContainer.cs" />
<Compile Include="ApplicationBase\IPresenterGeneric.cs" />
<Compile Include="ApplicationBase\LightInjectContainer.cs" />
<Compile Include="ApplicationBase\Presenter.cs" />
<Compile Include="ApplicationBase\PresenterGeneric.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" />
<Compile Include="DwmAPI\DWM_TNP_CONSTANTS.cs" /> <Compile Include="DwmAPI\DWM_TNP_CONSTANTS.cs" />
<Compile Include="DwmAPI\MARGINS.cs" /> <Compile Include="DwmAPI\MARGINS.cs" />
<Compile Include="DwmAPI\RECT.cs" /> <Compile Include="DwmAPI\RECT.cs" />
<Compile Include="GUI\ClientLocation.cs" /> <Compile Include="GUI\ClientLocation.cs" />
<Compile Include="GUI\ZoomAnchor.cs" /> <Compile Include="ApplicationBase\IPresenter.cs" />
<Compile Include="Presentation\MainPresenter.cs" />
<Compile Include="Presentation\ViewCloseRequest.cs" />
<Compile Include="Thumbnail\Interface\IThumbnailFactory.cs" />
<Compile Include="Thumbnail\Interface\IThumbnailManager.cs" />
<Compile Include="UI\Implementation\ThumbnailDescriptionView.cs" />
<Compile Include="UI\Implementation\ThumbnailDescriptionViewFactory.cs" />
<Compile Include="UI\Interface\IMainView.cs" />
<Compile Include="ApplicationBase\IView.cs" />
<Compile Include="UI\Interface\IThumbnailDescriptionView.cs" />
<Compile Include="UI\Interface\IThumbnailDescriptionViewFactory.cs" />
<Compile Include="UI\Interface\ZoomAnchor.cs" />
<Compile Include="Configuration\Configuration.cs" /> <Compile Include="Configuration\Configuration.cs" />
<Compile Include="Hotkeys\Hotkey.cs" /> <Compile Include="Hotkeys\Hotkey.cs" />
<Compile Include="Hotkeys\HotkeyNativeMethods.cs" /> <Compile Include="Hotkeys\HotkeyNativeMethods.cs" />
<Compile Include="GUI\MainForm.cs"> <Compile Include="UI\Implementation\MainForm.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="GUI\MainForm.Designer.cs"> <Compile Include="UI\Implementation\MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon> <DependentUpon>MainForm.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Configuration\ConfigurationStorage.cs" /> <Compile Include="Configuration\ConfigurationStorage.cs" />
<Compile Include="Thumbnail\IThumbnail.cs" /> <Compile Include="Thumbnail\Interface\IThumbnail.cs" />
<Compile Include="Thumbnail\ThumbnailFactory.cs" /> <Compile Include="Thumbnail\Implementation\ThumbnailFactory.cs" />
<Compile Include="Thumbnail\ThumbnailManager.cs" /> <Compile Include="Thumbnail\Implementation\ThumbnailManager.cs" />
<Compile Include="Thumbnail\ThumbnailOverlay.cs"> <Compile Include="Thumbnail\Implementation\ThumbnailOverlay.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="Thumbnail\ThumbnailOverlay.Designer.cs"> <Compile Include="Thumbnail\Implementation\ThumbnailOverlay.Designer.cs">
<DependentUpon>ThumbnailOverlay.cs</DependentUpon> <DependentUpon>ThumbnailOverlay.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Program.cs" /> <Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="GUI\MainForm.resx"> <EmbeddedResource Include="UI\Implementation\MainForm.resx">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<DependentUpon>MainForm.cs</DependentUpon> <DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Thumbnail\ThumbnailOverlay.resx"> <EmbeddedResource Include="Thumbnail\Implementation\ThumbnailOverlay.resx">
<DependentUpon>ThumbnailOverlay.cs</DependentUpon> <DependentUpon>ThumbnailOverlay.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx"> <EmbeddedResource Include="Properties\Resources.resx">
@@ -143,7 +162,7 @@
<LastGenOutput>Resources.Designer.cs</LastGenOutput> <LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Thumbnail\ThumbnailWindow.resx"> <EmbeddedResource Include="Thumbnail\Implementation\ThumbnailWindow.resx">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<DependentUpon>ThumbnailWindow.cs</DependentUpon> <DependentUpon>ThumbnailWindow.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@@ -155,6 +174,7 @@
<None Include="app.config"> <None Include="app.config">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<None Include="packages.config" />
<None Include="Properties\Settings.settings"> <None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput> <LastGenOutput>Settings.Designer.cs</LastGenOutput>
@@ -164,10 +184,10 @@
<DependentUpon>Settings.settings</DependentUpon> <DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput> <DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile> </Compile>
<Compile Include="Thumbnail\ThumbnailWindow.cs"> <Compile Include="Thumbnail\Implementation\ThumbnailWindow.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="Thumbnail\ThumbnailWindow.Designer.cs"> <Compile Include="Thumbnail\Implementation\ThumbnailWindow.Designer.cs">
<DependentUpon>ThumbnailWindow.cs</DependentUpon> <DependentUpon>ThumbnailWindow.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="DwmAPI\DwmApiNativeMethods.cs" /> <Compile Include="DwmAPI\DwmApiNativeMethods.cs" />
@@ -200,6 +220,7 @@
<ItemGroup> <ItemGroup>
<Content Include="icon.ico" /> <Content Include="icon.ico" />
</ItemGroup> </ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

View File

@@ -0,0 +1,12 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=gui/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=gui_005Cpresenter_005Cinterface/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=gui_005Cview/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=presentation/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=presentation_005Cinterface/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=thumbnail/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=thumbnail_005Cimplementation/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=thumbnail_005Cinterface/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=ui/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=ui_005Cimplementation/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=ui_005Cinterface/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

View File

@@ -1,642 +0,0 @@
using System;
//using System.Collections.Generic;
//using System.ComponentModel;
//using System.Drawing;
//using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
namespace EveOPreview
{
partial class MainForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>s
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.option_hide_active = new System.Windows.Forms.CheckBox();
this.option_hide_all_if_not_right_type = new System.Windows.Forms.CheckBox();
this.option_unique_layout = new System.Windows.Forms.CheckBox();
this.option_sync_size = new System.Windows.Forms.CheckBox();
this.option_always_on_top = new System.Windows.Forms.CheckBox();
this.option_show_thumbnail_frames = new System.Windows.Forms.CheckBox();
this.forum_url = new System.Windows.Forms.LinkLabel();
this.option_sync_size_x = new System.Windows.Forms.TextBox();
this.option_sync_size_y = new System.Windows.Forms.TextBox();
this.option_zoom_on_hover = new System.Windows.Forms.CheckBox();
this.option_show_overlay = new System.Windows.Forms.CheckBox();
this.option_zoom_anchor_NW = new System.Windows.Forms.RadioButton();
this.option_zoom_anchor_N = new System.Windows.Forms.RadioButton();
this.option_zoom_anchor_NE = new System.Windows.Forms.RadioButton();
this.option_zoom_anchor_W = new System.Windows.Forms.RadioButton();
this.option_zoom_anchor_C = new System.Windows.Forms.RadioButton();
this.option_zoom_anchor_E = new System.Windows.Forms.RadioButton();
this.option_zoom_anchor_SW = new System.Windows.Forms.RadioButton();
this.option_zoom_anchor_S = new System.Windows.Forms.RadioButton();
this.option_zoom_anchor_SE = new System.Windows.Forms.RadioButton();
this.option_zoom_factor = new System.Windows.Forms.TextBox();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.option_minToTray = new System.Windows.Forms.CheckBox();
this.panel6 = new System.Windows.Forms.Panel();
this.opacity_bar = new System.Windows.Forms.HScrollBar();
this.opacity_label = new System.Windows.Forms.Label();
this.option_track_client_windows = new System.Windows.Forms.CheckBox();
this.panel1 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
this.label2 = new System.Windows.Forms.Label();
this.panel3 = new System.Windows.Forms.Panel();
this.zoom_anchor_lable = new System.Windows.Forms.Label();
this.panel5 = new System.Windows.Forms.Panel();
this.previews_check_listbox = new System.Windows.Forms.CheckedListBox();
this.label1 = new System.Windows.Forms.Label();
this.panel4 = new System.Windows.Forms.Panel();
this.aero_status_label = new System.Windows.Forms.Label();
this.previewToyMainBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.restoreToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.flowLayoutPanel1.SuspendLayout();
this.panel6.SuspendLayout();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.panel3.SuspendLayout();
this.panel5.SuspendLayout();
this.panel4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.previewToyMainBindingSource)).BeginInit();
this.contextMenuStrip1.SuspendLayout();
this.SuspendLayout();
//
// option_hide_active
//
this.option_hide_active.AutoSize = true;
this.option_hide_active.Checked = true;
this.option_hide_active.CheckState = System.Windows.Forms.CheckState.Checked;
this.option_hide_active.Location = new System.Drawing.Point(3, 81);
this.option_hide_active.Name = "option_hide_active";
this.option_hide_active.Size = new System.Drawing.Size(184, 17);
this.option_hide_active.TabIndex = 1;
this.option_hide_active.Text = "Hide preview of active EVE client";
this.option_hide_active.UseVisualStyleBackColor = true;
this.option_hide_active.CheckedChanged += new System.EventHandler(this.option_hide_active_CheckedChanged);
//
// option_hide_all_if_not_right_type
//
this.option_hide_all_if_not_right_type.AutoSize = true;
this.option_hide_all_if_not_right_type.Checked = true;
this.option_hide_all_if_not_right_type.CheckState = System.Windows.Forms.CheckState.Checked;
this.option_hide_all_if_not_right_type.Location = new System.Drawing.Point(3, 127);
this.option_hide_all_if_not_right_type.Name = "option_hide_all_if_not_right_type";
this.option_hide_all_if_not_right_type.Size = new System.Drawing.Size(242, 17);
this.option_hide_all_if_not_right_type.TabIndex = 2;
this.option_hide_all_if_not_right_type.Text = "Hide previews if active window not EVE client";
this.option_hide_all_if_not_right_type.UseVisualStyleBackColor = true;
this.option_hide_all_if_not_right_type.CheckedChanged += new System.EventHandler(this.option_hide_all_if_noneve_CheckedChanged);
//
// option_unique_layout
//
this.option_unique_layout.AutoSize = true;
this.option_unique_layout.Checked = true;
this.option_unique_layout.CheckState = System.Windows.Forms.CheckState.Checked;
this.option_unique_layout.Location = new System.Drawing.Point(3, 150);
this.option_unique_layout.Name = "option_unique_layout";
this.option_unique_layout.Size = new System.Drawing.Size(185, 17);
this.option_unique_layout.TabIndex = 3;
this.option_unique_layout.Text = "Unique layout for each EVE client";
this.option_unique_layout.UseVisualStyleBackColor = true;
this.option_unique_layout.CheckedChanged += new System.EventHandler(this.option_unique_layout_CheckedChanged);
//
// option_sync_size
//
this.option_sync_size.AutoSize = true;
this.option_sync_size.Checked = true;
this.option_sync_size.CheckState = System.Windows.Forms.CheckState.Checked;
this.option_sync_size.Location = new System.Drawing.Point(1, 3);
this.option_sync_size.Name = "option_sync_size";
this.option_sync_size.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.option_sync_size.Size = new System.Drawing.Size(108, 17);
this.option_sync_size.TabIndex = 4;
this.option_sync_size.Text = "Syncronize resize";
this.option_sync_size.UseVisualStyleBackColor = true;
this.option_sync_size.CheckedChanged += new System.EventHandler(this.option_sync_size_CheckedChanged);
//
// option_always_on_top
//
this.option_always_on_top.AutoSize = true;
this.option_always_on_top.Checked = true;
this.option_always_on_top.CheckState = System.Windows.Forms.CheckState.Checked;
this.option_always_on_top.Location = new System.Drawing.Point(3, 104);
this.option_always_on_top.Name = "option_always_on_top";
this.option_always_on_top.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.option_always_on_top.Size = new System.Drawing.Size(137, 17);
this.option_always_on_top.TabIndex = 8;
this.option_always_on_top.Text = "Previews always on top";
this.option_always_on_top.UseVisualStyleBackColor = true;
this.option_always_on_top.CheckedChanged += new System.EventHandler(this.option_always_on_top_CheckedChanged);
//
// option_show_thumbnail_frames
//
this.option_show_thumbnail_frames.AutoSize = true;
this.option_show_thumbnail_frames.Checked = true;
this.option_show_thumbnail_frames.CheckState = System.Windows.Forms.CheckState.Checked;
this.option_show_thumbnail_frames.Location = new System.Drawing.Point(99, 277);
this.option_show_thumbnail_frames.Name = "option_show_thumbnail_frames";
this.option_show_thumbnail_frames.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.option_show_thumbnail_frames.Size = new System.Drawing.Size(127, 17);
this.option_show_thumbnail_frames.TabIndex = 9;
this.option_show_thumbnail_frames.Text = "Show preview frames";
this.option_show_thumbnail_frames.UseVisualStyleBackColor = true;
this.option_show_thumbnail_frames.CheckedChanged += new System.EventHandler(this.option_show_thumbnail_frames_CheckedChanged);
//
// forum_url
//
this.forum_url.AutoSize = true;
this.forum_url.Location = new System.Drawing.Point(3, 430);
this.forum_url.Name = "forum_url";
this.forum_url.Size = new System.Drawing.Size(216, 13);
this.forum_url.TabIndex = 10;
this.forum_url.TabStop = true;
this.forum_url.Text = "https://bitbucket.org/ulph/eve-o-preview-git";
this.forum_url.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
//
// option_sync_size_x
//
this.option_sync_size_x.BackColor = System.Drawing.SystemColors.Window;
this.option_sync_size_x.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.option_sync_size_x.Location = new System.Drawing.Point(137, 3);
this.option_sync_size_x.Name = "option_sync_size_x";
this.option_sync_size_x.Size = new System.Drawing.Size(42, 20);
this.option_sync_size_x.TabIndex = 11;
this.option_sync_size_x.TextChanged += new System.EventHandler(this.option_sync_size_x_TextChanged);
//
// option_sync_size_y
//
this.option_sync_size_y.BackColor = System.Drawing.SystemColors.Window;
this.option_sync_size_y.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.option_sync_size_y.Location = new System.Drawing.Point(196, 3);
this.option_sync_size_y.Name = "option_sync_size_y";
this.option_sync_size_y.Size = new System.Drawing.Size(42, 20);
this.option_sync_size_y.TabIndex = 12;
this.option_sync_size_y.TextChanged += new System.EventHandler(this.option_sync_size_y_TextChanged);
//
// option_zoom_on_hover
//
this.option_zoom_on_hover.AutoSize = true;
this.option_zoom_on_hover.Checked = true;
this.option_zoom_on_hover.CheckState = System.Windows.Forms.CheckState.Checked;
this.option_zoom_on_hover.Location = new System.Drawing.Point(1, 5);
this.option_zoom_on_hover.Name = "option_zoom_on_hover";
this.option_zoom_on_hover.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.option_zoom_on_hover.Size = new System.Drawing.Size(98, 17);
this.option_zoom_on_hover.TabIndex = 13;
this.option_zoom_on_hover.Text = "Zoom on hover";
this.option_zoom_on_hover.UseVisualStyleBackColor = true;
this.option_zoom_on_hover.CheckedChanged += new System.EventHandler(this.option_zoom_on_hover_CheckedChanged);
//
// option_show_overlay
//
this.option_show_overlay.AutoSize = true;
this.option_show_overlay.Checked = true;
this.option_show_overlay.CheckState = System.Windows.Forms.CheckState.Checked;
this.option_show_overlay.Location = new System.Drawing.Point(3, 277);
this.option_show_overlay.Name = "option_show_overlay";
this.option_show_overlay.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.option_show_overlay.Size = new System.Drawing.Size(90, 17);
this.option_show_overlay.TabIndex = 14;
this.option_show_overlay.Text = "Show overlay";
this.option_show_overlay.UseVisualStyleBackColor = true;
this.option_show_overlay.CheckedChanged += new System.EventHandler(this.option_show_overlay_CheckedChanged);
//
// option_zoom_anchor_NW
//
this.option_zoom_anchor_NW.AutoSize = true;
this.option_zoom_anchor_NW.Location = new System.Drawing.Point(3, 3);
this.option_zoom_anchor_NW.Name = "option_zoom_anchor_NW";
this.option_zoom_anchor_NW.Size = new System.Drawing.Size(14, 13);
this.option_zoom_anchor_NW.TabIndex = 15;
this.option_zoom_anchor_NW.TabStop = true;
this.option_zoom_anchor_NW.UseVisualStyleBackColor = true;
this.option_zoom_anchor_NW.CheckedChanged += new System.EventHandler(this.option_zoom_anchor_X_CheckedChanged);
//
// option_zoom_anchor_N
//
this.option_zoom_anchor_N.AutoSize = true;
this.option_zoom_anchor_N.Location = new System.Drawing.Point(23, 3);
this.option_zoom_anchor_N.Name = "option_zoom_anchor_N";
this.option_zoom_anchor_N.Size = new System.Drawing.Size(14, 13);
this.option_zoom_anchor_N.TabIndex = 16;
this.option_zoom_anchor_N.TabStop = true;
this.option_zoom_anchor_N.UseVisualStyleBackColor = true;
this.option_zoom_anchor_N.CheckedChanged += new System.EventHandler(this.option_zoom_anchor_X_CheckedChanged);
//
// option_zoom_anchor_NE
//
this.option_zoom_anchor_NE.AutoSize = true;
this.option_zoom_anchor_NE.Location = new System.Drawing.Point(43, 3);
this.option_zoom_anchor_NE.Name = "option_zoom_anchor_NE";
this.option_zoom_anchor_NE.Size = new System.Drawing.Size(14, 13);
this.option_zoom_anchor_NE.TabIndex = 17;
this.option_zoom_anchor_NE.TabStop = true;
this.option_zoom_anchor_NE.UseVisualStyleBackColor = true;
this.option_zoom_anchor_NE.CheckedChanged += new System.EventHandler(this.option_zoom_anchor_X_CheckedChanged);
//
// option_zoom_anchor_W
//
this.option_zoom_anchor_W.AutoSize = true;
this.option_zoom_anchor_W.Location = new System.Drawing.Point(3, 22);
this.option_zoom_anchor_W.Name = "option_zoom_anchor_W";
this.option_zoom_anchor_W.Size = new System.Drawing.Size(14, 13);
this.option_zoom_anchor_W.TabIndex = 18;
this.option_zoom_anchor_W.TabStop = true;
this.option_zoom_anchor_W.UseVisualStyleBackColor = true;
this.option_zoom_anchor_W.CheckedChanged += new System.EventHandler(this.option_zoom_anchor_X_CheckedChanged);
//
// option_zoom_anchor_C
//
this.option_zoom_anchor_C.AutoSize = true;
this.option_zoom_anchor_C.Location = new System.Drawing.Point(23, 22);
this.option_zoom_anchor_C.Name = "option_zoom_anchor_C";
this.option_zoom_anchor_C.Size = new System.Drawing.Size(14, 13);
this.option_zoom_anchor_C.TabIndex = 19;
this.option_zoom_anchor_C.TabStop = true;
this.option_zoom_anchor_C.UseVisualStyleBackColor = true;
this.option_zoom_anchor_C.CheckedChanged += new System.EventHandler(this.option_zoom_anchor_X_CheckedChanged);
//
// option_zoom_anchor_E
//
this.option_zoom_anchor_E.AutoSize = true;
this.option_zoom_anchor_E.Location = new System.Drawing.Point(43, 22);
this.option_zoom_anchor_E.Name = "option_zoom_anchor_E";
this.option_zoom_anchor_E.Size = new System.Drawing.Size(14, 13);
this.option_zoom_anchor_E.TabIndex = 20;
this.option_zoom_anchor_E.TabStop = true;
this.option_zoom_anchor_E.UseVisualStyleBackColor = true;
this.option_zoom_anchor_E.CheckedChanged += new System.EventHandler(this.option_zoom_anchor_X_CheckedChanged);
//
// option_zoom_anchor_SW
//
this.option_zoom_anchor_SW.AutoSize = true;
this.option_zoom_anchor_SW.Location = new System.Drawing.Point(3, 41);
this.option_zoom_anchor_SW.Name = "option_zoom_anchor_SW";
this.option_zoom_anchor_SW.Size = new System.Drawing.Size(14, 13);
this.option_zoom_anchor_SW.TabIndex = 21;
this.option_zoom_anchor_SW.TabStop = true;
this.option_zoom_anchor_SW.UseVisualStyleBackColor = true;
this.option_zoom_anchor_SW.CheckedChanged += new System.EventHandler(this.option_zoom_anchor_X_CheckedChanged);
//
// option_zoom_anchor_S
//
this.option_zoom_anchor_S.AutoSize = true;
this.option_zoom_anchor_S.Location = new System.Drawing.Point(23, 41);
this.option_zoom_anchor_S.Name = "option_zoom_anchor_S";
this.option_zoom_anchor_S.Size = new System.Drawing.Size(14, 13);
this.option_zoom_anchor_S.TabIndex = 22;
this.option_zoom_anchor_S.TabStop = true;
this.option_zoom_anchor_S.UseVisualStyleBackColor = true;
this.option_zoom_anchor_S.CheckedChanged += new System.EventHandler(this.option_zoom_anchor_X_CheckedChanged);
//
// option_zoom_anchor_SE
//
this.option_zoom_anchor_SE.AutoSize = true;
this.option_zoom_anchor_SE.Location = new System.Drawing.Point(43, 41);
this.option_zoom_anchor_SE.Name = "option_zoom_anchor_SE";
this.option_zoom_anchor_SE.Size = new System.Drawing.Size(14, 13);
this.option_zoom_anchor_SE.TabIndex = 23;
this.option_zoom_anchor_SE.TabStop = true;
this.option_zoom_anchor_SE.UseVisualStyleBackColor = true;
this.option_zoom_anchor_SE.CheckedChanged += new System.EventHandler(this.option_zoom_anchor_X_CheckedChanged);
//
// option_zoom_factor
//
this.option_zoom_factor.BackColor = System.Drawing.SystemColors.Window;
this.option_zoom_factor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.option_zoom_factor.Location = new System.Drawing.Point(9, 28);
this.option_zoom_factor.Name = "option_zoom_factor";
this.option_zoom_factor.Size = new System.Drawing.Size(28, 20);
this.option_zoom_factor.TabIndex = 24;
this.option_zoom_factor.TextChanged += new System.EventHandler(this.option_zoom_factor_TextChanged);
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.BackColor = System.Drawing.SystemColors.Control;
this.flowLayoutPanel1.Controls.Add(this.option_minToTray);
this.flowLayoutPanel1.Controls.Add(this.panel6);
this.flowLayoutPanel1.Controls.Add(this.option_track_client_windows);
this.flowLayoutPanel1.Controls.Add(this.option_hide_active);
this.flowLayoutPanel1.Controls.Add(this.option_always_on_top);
this.flowLayoutPanel1.Controls.Add(this.option_hide_all_if_not_right_type);
this.flowLayoutPanel1.Controls.Add(this.option_unique_layout);
this.flowLayoutPanel1.Controls.Add(this.panel1);
this.flowLayoutPanel1.Controls.Add(this.panel2);
this.flowLayoutPanel1.Controls.Add(this.option_show_overlay);
this.flowLayoutPanel1.Controls.Add(this.option_show_thumbnail_frames);
this.flowLayoutPanel1.Controls.Add(this.panel5);
this.flowLayoutPanel1.Controls.Add(this.panel4);
this.flowLayoutPanel1.Controls.Add(this.forum_url);
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(252, 448);
this.flowLayoutPanel1.TabIndex = 25;
this.flowLayoutPanel1.Paint += new System.Windows.Forms.PaintEventHandler(this.flowLayoutPanel1_Paint);
//
// option_minToTray
//
this.option_minToTray.AutoSize = true;
this.option_minToTray.Location = new System.Drawing.Point(3, 3);
this.option_minToTray.Name = "option_minToTray";
this.option_minToTray.Size = new System.Drawing.Size(139, 17);
this.option_minToTray.TabIndex = 34;
this.option_minToTray.Text = "Minimize to System Tray";
this.option_minToTray.UseVisualStyleBackColor = true;
this.option_minToTray.CheckedChanged += new System.EventHandler(this.option_minToTray_CheckedChanged);
//
// panel6
//
this.panel6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel6.Controls.Add(this.opacity_bar);
this.panel6.Controls.Add(this.opacity_label);
this.panel6.Location = new System.Drawing.Point(3, 26);
this.panel6.Name = "panel6";
this.panel6.Size = new System.Drawing.Size(246, 26);
this.panel6.TabIndex = 33;
//
// opacity_bar
//
this.opacity_bar.Location = new System.Drawing.Point(48, 1);
this.opacity_bar.Maximum = 120;
this.opacity_bar.Name = "opacity_bar";
this.opacity_bar.Size = new System.Drawing.Size(195, 23);
this.opacity_bar.TabIndex = 1;
this.opacity_bar.Scroll += new System.Windows.Forms.ScrollEventHandler(this.opacity_bar_Scroll);
//
// opacity_label
//
this.opacity_label.AutoSize = true;
this.opacity_label.Location = new System.Drawing.Point(2, 5);
this.opacity_label.Name = "opacity_label";
this.opacity_label.Size = new System.Drawing.Size(43, 13);
this.opacity_label.TabIndex = 0;
this.opacity_label.Text = "Opacity";
//
// option_track_client_windows
//
this.option_track_client_windows.AutoSize = true;
this.option_track_client_windows.Location = new System.Drawing.Point(3, 58);
this.option_track_client_windows.Name = "option_track_client_windows";
this.option_track_client_windows.Size = new System.Drawing.Size(127, 17);
this.option_track_client_windows.TabIndex = 32;
this.option_track_client_windows.Text = "Track client locations";
this.option_track_client_windows.UseVisualStyleBackColor = true;
this.option_track_client_windows.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
//
// panel1
//
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel1.Controls.Add(this.option_sync_size);
this.panel1.Controls.Add(this.option_sync_size_x);
this.panel1.Controls.Add(this.option_sync_size_y);
this.panel1.Location = new System.Drawing.Point(3, 173);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(246, 30);
this.panel1.TabIndex = 26;
//
// panel2
//
this.panel2.BackColor = System.Drawing.SystemColors.Control;
this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel2.Controls.Add(this.label2);
this.panel2.Controls.Add(this.panel3);
this.panel2.Controls.Add(this.zoom_anchor_lable);
this.panel2.Controls.Add(this.option_zoom_on_hover);
this.panel2.Controls.Add(this.option_zoom_factor);
this.panel2.Location = new System.Drawing.Point(3, 209);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(246, 62);
this.panel2.TabIndex = 27;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(43, 31);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(37, 13);
this.label2.TabIndex = 29;
this.label2.Text = "Factor";
//
// panel3
//
this.panel3.Controls.Add(this.option_zoom_anchor_NW);
this.panel3.Controls.Add(this.option_zoom_anchor_N);
this.panel3.Controls.Add(this.option_zoom_anchor_NE);
this.panel3.Controls.Add(this.option_zoom_anchor_W);
this.panel3.Controls.Add(this.option_zoom_anchor_SE);
this.panel3.Controls.Add(this.option_zoom_anchor_C);
this.panel3.Controls.Add(this.option_zoom_anchor_S);
this.panel3.Controls.Add(this.option_zoom_anchor_E);
this.panel3.Controls.Add(this.option_zoom_anchor_SW);
this.panel3.Location = new System.Drawing.Point(182, 3);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(60, 57);
this.panel3.TabIndex = 28;
//
// zoom_anchor_lable
//
this.zoom_anchor_lable.AutoSize = true;
this.zoom_anchor_lable.Location = new System.Drawing.Point(134, 31);
this.zoom_anchor_lable.Name = "zoom_anchor_lable";
this.zoom_anchor_lable.Size = new System.Drawing.Size(41, 13);
this.zoom_anchor_lable.TabIndex = 30;
this.zoom_anchor_lable.Text = "Anchor";
//
// panel5
//
this.panel5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel5.Controls.Add(this.previews_check_listbox);
this.panel5.Controls.Add(this.label1);
this.panel5.Location = new System.Drawing.Point(3, 300);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(246, 100);
this.panel5.TabIndex = 31;
//
// previews_check_listbox
//
this.previews_check_listbox.BackColor = System.Drawing.SystemColors.Window;
this.previews_check_listbox.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.previews_check_listbox.FormattingEnabled = true;
this.previews_check_listbox.Location = new System.Drawing.Point(3, 18);
this.previews_check_listbox.Name = "previews_check_listbox";
this.previews_check_listbox.Size = new System.Drawing.Size(240, 75);
this.previews_check_listbox.TabIndex = 28;
this.previews_check_listbox.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.checkedListBox1_SelectedIndexChanged2);
this.previews_check_listbox.SelectedIndexChanged += new System.EventHandler(this.checkedListBox1_SelectedIndexChanged);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(3, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(151, 13);
this.label1.TabIndex = 29;
this.label1.Text = "Previews (check to force hide)";
//
// panel4
//
this.panel4.Controls.Add(this.aero_status_label);
this.panel4.Location = new System.Drawing.Point(3, 406);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(246, 21);
this.panel4.TabIndex = 30;
//
// aero_status_label
//
this.aero_status_label.AutoSize = true;
this.aero_status_label.Location = new System.Drawing.Point(3, 4);
this.aero_status_label.Name = "aero_status_label";
this.aero_status_label.Size = new System.Drawing.Size(35, 13);
this.aero_status_label.TabIndex = 0;
this.aero_status_label.Text = "label4";
//
// previewToyMainBindingSource
//
this.previewToyMainBindingSource.CurrentChanged += new System.EventHandler(this.previewToyMainBindingSource_CurrentChanged);
//
// notifyIcon1
//
this.notifyIcon1.ContextMenuStrip = this.contextMenuStrip1;
this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon1.Icon")));
this.notifyIcon1.Text = "EVE-O Preview";
this.notifyIcon1.Visible = true;
this.notifyIcon1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon1_MouseDoubleClick);
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.restoreToolStripMenuItem,
this.exitToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(114, 48);
//
// restoreToolStripMenuItem
//
this.restoreToolStripMenuItem.Name = "restoreToolStripMenuItem";
this.restoreToolStripMenuItem.Size = new System.Drawing.Size(113, 22);
this.restoreToolStripMenuItem.Text = "Restore";
this.restoreToolStripMenuItem.Click += new System.EventHandler(this.restoreToolStripMenuItem_Click);
//
// exitToolStripMenuItem
//
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.Size = new System.Drawing.Size(113, 22);
this.exitToolStripMenuItem.Text = "Exit";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
//
// PreviewToyHandler
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.ControlDarkDark;
this.ClientSize = new System.Drawing.Size(252, 448);
this.Controls.Add(this.flowLayoutPanel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(0);
this.MaximizeBox = false;
this.Name = "MainForm";
this.Text = "EVE Online previewer";
this.TopMost = true;
this.WindowState = System.Windows.Forms.FormWindowState.Minimized;
this.Load += new System.EventHandler(this.GlassForm_Load);
this.flowLayoutPanel1.ResumeLayout(false);
this.flowLayoutPanel1.PerformLayout();
this.panel6.ResumeLayout(false);
this.panel6.PerformLayout();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
this.panel5.ResumeLayout(false);
this.panel5.PerformLayout();
this.panel4.ResumeLayout(false);
this.panel4.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.previewToyMainBindingSource)).EndInit();
this.contextMenuStrip1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private CheckBox option_hide_active;
private CheckBox option_hide_all_if_not_right_type;
private CheckBox option_unique_layout;
private CheckBox option_sync_size;
private BindingSource previewToyMainBindingSource;
private CheckBox option_always_on_top;
private CheckBox option_show_thumbnail_frames;
private LinkLabel forum_url;
private TextBox option_sync_size_x;
private TextBox option_sync_size_y;
private CheckBox option_zoom_on_hover;
private CheckBox option_show_overlay;
private RadioButton option_zoom_anchor_NW;
private RadioButton option_zoom_anchor_N;
private RadioButton option_zoom_anchor_NE;
private RadioButton option_zoom_anchor_W;
private RadioButton option_zoom_anchor_C;
private RadioButton option_zoom_anchor_E;
private RadioButton option_zoom_anchor_SW;
private RadioButton option_zoom_anchor_S;
private RadioButton option_zoom_anchor_SE;
private TextBox option_zoom_factor;
private FlowLayoutPanel flowLayoutPanel1;
private Panel panel1;
private Panel panel2;
private Label label2;
private Panel panel3;
private Label zoom_anchor_lable;
private CheckedListBox previews_check_listbox;
private Label label1;
private Panel panel4;
private Label aero_status_label;
private Panel panel5;
private CheckBox option_track_client_windows;
private Panel panel6;
private Label opacity_label;
private HScrollBar opacity_bar;
private CheckBox option_minToTray;
private NotifyIcon notifyIcon1;
private ContextMenuStrip contextMenuStrip1;
private ToolStripMenuItem restoreToolStripMenuItem;
private ToolStripMenuItem exitToolStripMenuItem;
}
}

View File

@@ -1,482 +0,0 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using System.Diagnostics;
using System.Globalization;
using System.Windows.Threading;
using System.Xml.Linq;
using System.IO;
namespace EveOPreview
{
public partial class MainForm : Form
{
public event EventHandler Minimized;
public event EventHandler Maximized;
public event EventHandler Restored;
private readonly bool _isInitialized;
private readonly ThumbnailManager _manager;
private Dictionary<ZoomAnchor, RadioButton> _zoomAnchorButtonMap;
public MainForm()
{
_isInitialized = false;
InitializeComponent();
init_options();
// TODO Fix this
previews_check_listbox.DisplayMember = "Text";
this._manager = new ThumbnailManager(add_thumbnail,remove_thumbnail, set_aero_status, set_size);
_isInitialized = true;
this._manager.Activate();
}
private void add_thumbnail(IList<string> thumbnails)
{
this.previews_check_listbox.BeginUpdate();
foreach (string th in thumbnails)
{
previews_check_listbox.Items.Add(th);
}
this.previews_check_listbox.EndUpdate();
}
private void remove_thumbnail(IList<string> thumbnails)
{
this.previews_check_listbox.BeginUpdate();
foreach (string th in thumbnails)
{
previews_check_listbox.Items.Remove(th);
}
this.previews_check_listbox.EndUpdate();
}
private void set_aero_status(bool value)
{
if (value)
{
aero_status_label.Text = "AERO is ON";
aero_status_label.ForeColor = Color.Black;
}
else
{
aero_status_label.Text = "AERO is OFF";
aero_status_label.ForeColor = Color.Red;
}
}
private void set_size(int x, int y)
{
option_sync_size_x.Text = x.ToString();
option_sync_size_y.Text = y.ToString();
}
private void GlassForm_Load(object sender, EventArgs e)
{
this._manager.refresh_thumbnails();
}
private void init_options()
{
this.Minimized += MainForm_Minimized;
option_zoom_on_hover.Checked = Properties.Settings.Default.zoom_on_hover;
_zoomAnchorButtonMap = new Dictionary<ZoomAnchor, RadioButton>();
_zoomAnchorButtonMap[ZoomAnchor.NW] = option_zoom_anchor_NW;
_zoomAnchorButtonMap[ZoomAnchor.N] = option_zoom_anchor_N;
_zoomAnchorButtonMap[ZoomAnchor.NE] = option_zoom_anchor_NE;
_zoomAnchorButtonMap[ZoomAnchor.W] = option_zoom_anchor_W;
_zoomAnchorButtonMap[ZoomAnchor.C] = option_zoom_anchor_C;
_zoomAnchorButtonMap[ZoomAnchor.E] = option_zoom_anchor_E;
_zoomAnchorButtonMap[ZoomAnchor.SW] = option_zoom_anchor_SW;
_zoomAnchorButtonMap[ZoomAnchor.S] = option_zoom_anchor_S;
_zoomAnchorButtonMap[ZoomAnchor.SE] = option_zoom_anchor_SE;
_zoomAnchorButtonMap[(ZoomAnchor)Properties.Settings.Default.zoom_anchor].Checked = true;
option_zoom_factor.Text = Properties.Settings.Default.zoom_amount.ToString(CultureInfo.InvariantCulture);
option_always_on_top.Checked = Properties.Settings.Default.always_on_top;
option_hide_active.Checked = Properties.Settings.Default.hide_active;
option_hide_all_if_not_right_type.Checked = Properties.Settings.Default.hide_all;
option_unique_layout.Checked = Properties.Settings.Default.unique_layout;
option_sync_size.Checked = Properties.Settings.Default.sync_resize;
option_sync_size_x.Text = Properties.Settings.Default.sync_resize_x.ToString();
option_sync_size_y.Text = Properties.Settings.Default.sync_resize_y.ToString();
option_show_thumbnail_frames.Checked = Properties.Settings.Default.show_thumb_frames;
option_show_overlay.Checked = Properties.Settings.Default.show_overlay;
option_track_client_windows.Checked = Properties.Settings.Default.track_client_windows;
option_minToTray.Checked = Properties.Settings.Default.minimizeToTray;
// disable/enable zoom suboptions
option_zoom_factor.Enabled = Properties.Settings.Default.zoom_on_hover;
foreach (var kv in _zoomAnchorButtonMap)
{
kv.Value.Enabled = Properties.Settings.Default.zoom_on_hover;
}
opacity_bar.Value = Math.Min(100, (int)(100.0 * Properties.Settings.Default.opacity));
}
private void option_hide_all_if_noneve_CheckedChanged(object sender, EventArgs e)
{
if (!_isInitialized)
{
return;
}
Properties.Settings.Default.hide_all = option_hide_all_if_not_right_type.Checked;
Properties.Settings.Default.Save();
this._manager.refresh_thumbnails();
}
private void option_unique_layout_CheckedChanged(object sender, EventArgs e)
{
if (!_isInitialized)
{
return;
}
Properties.Settings.Default.unique_layout = option_unique_layout.Checked;
Properties.Settings.Default.Save();
this._manager.refresh_thumbnails();
}
private void option_hide_active_CheckedChanged(object sender, EventArgs e)
{
if (!_isInitialized)
{
return;
}
Properties.Settings.Default.hide_active = option_hide_active.Checked;
Properties.Settings.Default.Save();
this._manager.refresh_thumbnails();
}
private void option_sync_size_CheckedChanged(object sender, EventArgs e)
{
if (!_isInitialized)
{
return;
}
Properties.Settings.Default.sync_resize = option_sync_size.Checked;
Properties.Settings.Default.Save();
this._manager.refresh_thumbnails();
}
private void parse_size_entry()
{
UInt32 x = 0, y = 0;
try
{
y = Convert.ToUInt32(option_sync_size_y.Text);
x = Convert.ToUInt32(option_sync_size_x.Text);
}
catch (System.FormatException)
{
return;
}
if (x < 64 || y < 64)
{
return;
}
Properties.Settings.Default.sync_resize_y = y;
Properties.Settings.Default.sync_resize_x = x;
Properties.Settings.Default.Save();
// resize
this._manager.SyncPreviewSize(new Size((int)Properties.Settings.Default.sync_resize_x,
(int)Properties.Settings.Default.sync_resize_y));
}
private void option_sync_size_x_TextChanged(object sender, EventArgs e)
{
if (!_isInitialized)
{
return;
}
parse_size_entry();
}
private void option_sync_size_y_TextChanged(object sender, EventArgs e)
{
if (!_isInitialized)
{
return;
}
parse_size_entry();
}
private void option_always_on_top_CheckedChanged(object sender, EventArgs e)
{
if (!_isInitialized)
{
return;
}
Properties.Settings.Default.always_on_top = option_always_on_top.Checked;
Properties.Settings.Default.Save();
this._manager.refresh_thumbnails();
}
private void option_show_thumbnail_frames_CheckedChanged(object sender, EventArgs e)
{
if (!_isInitialized)
{
return;
}
Properties.Settings.Default.show_thumb_frames = option_show_thumbnail_frames.Checked;
Properties.Settings.Default.Save();
this._manager.set_frames();
}
private void list_running_clients_SelectedIndexChanged(object sender, EventArgs e) { }
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
string url = "https://bitbucket.org/ulph/eve-o-preview-git";
ProcessStartInfo sInfo = new ProcessStartInfo(new Uri(url).AbsoluteUri);
Process.Start(sInfo);
}
private void previewToyMainBindingSource_CurrentChanged(object sender, EventArgs e)
{
}
private void option_zoom_on_hover_CheckedChanged(object sender, EventArgs e)
{
if (!_isInitialized) return;
Properties.Settings.Default.zoom_on_hover = option_zoom_on_hover.Checked;
Properties.Settings.Default.Save();
this._manager.refresh_thumbnails();
option_zoom_factor.Enabled = Properties.Settings.Default.zoom_on_hover;
foreach (var kv in _zoomAnchorButtonMap)
{
kv.Value.Enabled = Properties.Settings.Default.zoom_on_hover;
}
}
private void option_show_overlay_CheckedChanged(object sender, EventArgs e)
{
Properties.Settings.Default.show_overlay = option_show_overlay.Checked;
Properties.Settings.Default.Save();
this._manager.refresh_thumbnails();
}
private void handle_zoom_anchor_setting()
{
foreach (var kv in _zoomAnchorButtonMap)
{
if (kv.Value.Checked == true)
Properties.Settings.Default.zoom_anchor = (byte)kv.Key;
}
}
private void option_zoom_anchor_X_CheckedChanged(object sender, EventArgs e)
{
handle_zoom_anchor_setting();
Properties.Settings.Default.Save();
}
private void option_zoom_factor_TextChanged(object sender, EventArgs e)
{
try
{
float tmp = (float)Convert.ToDouble(option_zoom_factor.Text);
if (tmp < 1)
{
tmp = 1;
}
else if (tmp > 10)
{
tmp = 10;
}
Properties.Settings.Default.zoom_amount = tmp;
option_zoom_factor.Text = tmp.ToString();
Properties.Settings.Default.Save();
}
catch
{
// do naught
}
}
private void checkedListBox1_SelectedIndexChanged(object sender, EventArgs e)
{
this._manager.refresh_thumbnails();
}
private void checkedListBox1_SelectedIndexChanged2(object sender, EventArgs e)
{
System.Windows.Forms.ItemCheckEventArgs arg = (System.Windows.Forms.ItemCheckEventArgs)e;
((ThumbnailWindow)this.previews_check_listbox.Items[arg.Index]).IsPreviewEnabled = (arg.NewValue != System.Windows.Forms.CheckState.Checked);
this._manager.refresh_thumbnails();
}
private void flowLayoutPanel1_Paint(object sender, PaintEventArgs e)
{
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
if (!_isInitialized)
{
return;
}
Properties.Settings.Default.track_client_windows = option_track_client_windows.Checked;
Properties.Settings.Default.Save();
this._manager.refresh_thumbnails();
}
private void opacity_bar_Scroll(object sender, ScrollEventArgs e)
{
if (!_isInitialized)
{
return;
}
// fire off opacity change
Properties.Settings.Default.opacity = Math.Min((float)e.NewValue / 100.0f, 1.0f);
Properties.Settings.Default.Save();
this._manager.refresh_thumbnails();
}
private void OnMinimized(EventArgs e)
{
if (Minimized != null && Properties.Settings.Default.minimizeToTray)
{
this.Hide();
}
else if (Minimized != null && !Properties.Settings.Default.minimizeToTray)
{
Minimized(this, e);
}
}
private void OnMaximized(EventArgs e)
{
if (Maximized != null)
{
Maximized(this, e);
}
}
private void OnRestored(EventArgs e)
{
Restored?.Invoke(this, e);
}
protected override void WndProc(ref Message m)
{
switch (m.Msg)
{
case DwmApiNativeMethods.WM_SIZE:
switch (m.WParam.ToInt32())
{
case DwmApiNativeMethods.SIZE_RESTORED:
OnRestored(EventArgs.Empty);
break;
case DwmApiNativeMethods.SIZE_MINIMIZED:
OnMinimized(EventArgs.Empty);
break;
case DwmApiNativeMethods.SIZE_MAXIMIZED:
OnMaximized(EventArgs.Empty);
break;
}
break;
}
base.WndProc(ref m);
}
void MainForm_Minimized(object sender, EventArgs e)
{
// TODO: do something here
}
private void option_minToTray_CheckedChanged(object sender, EventArgs e)
{
Properties.Settings.Default.minimizeToTray = option_minToTray.Checked;
Properties.Settings.Default.Save();
}
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void restoreToolStripMenuItem_Click(object sender, EventArgs e)
{
if (!this.Visible)
{
this.Show();
}
else if (Restored != null)
{
Restored(this, e);
}
else
{
this.BringToFront();
}
}
private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
{
if (!this.Visible)
{
this.Show();
}
else if (Restored != null)
{
Restored(this, e);
}
else
{
this.BringToFront();
}
}
}
}

View File

@@ -0,0 +1,210 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using EveOPreview.Thumbnails;
namespace EveOPreview.UI
{
public class MainPresenter : Presenter<IMainView>
{
private const string ForumUrl = @"https://forums.eveonline.com/default.aspx?g=posts&t=389086";
private readonly IThumbnailDescriptionViewFactory _thumbnailDescriptionViewFactory;
private readonly IThumbnailManager _manager;
private readonly IDictionary<IntPtr, IThumbnailDescriptionView> _thumbnailViews;
private bool _exitApplication;
public MainPresenter(IApplicationController controller, IMainView view, IThumbnailDescriptionViewFactory thumbnailDescriptionViewFactory, IThumbnailManager manager)
: base(controller, view)
{
this._thumbnailDescriptionViewFactory = thumbnailDescriptionViewFactory;
this._manager = manager;
this._thumbnailViews = new Dictionary<IntPtr, IThumbnailDescriptionView>();
this._exitApplication = false;
this.View.ApplicationExitRequested += ExitApplication;
this.View.FormActivated += Activate;
this.View.FormMinimized += Minimize;
this.View.FormCloseRequested += Close;
this.View.ApplicationSettingsChanged += SaveApplicationSettings;
this.View.ThumbnailsSizeChanged += UpdateThumbnailsSize;
this.View.ThumbnailStateChanged += UpdateThumbnailState;
this.View.ForumUrlLinkActivated += OpenForumUrlLink;
this._manager.ThumbnailsAdded += ThumbnailsAdded;
this._manager.ThumbnailsUpdated += ThumbnailsUpdated;
this._manager.ThumbnailsRemoved += ThumbnailsRemoved;
this._manager.ThumbnailSizeChanged += ThumbnailSizeChanged;
}
private void ExitApplication()
{
this._exitApplication = true;
this.View.Close();
}
private void Activate()
{
this.LoadApplicationSettings();
this.View.SetForumUrl(MainPresenter.ForumUrl);
this._manager.Activate();
}
private void Minimize()
{
if (!this.View.MinimizeToTray)
{
return;
}
this.View.Hide();
}
private void Close(ViewCloseRequest request)
{
if (this._exitApplication || !this.View.MinimizeToTray)
{
request.Allow = true;
return;
}
request.Allow = false;
this.View.Minimize();
}
private void UpdateThumbnailsSize()
{
this._manager.SyncPreviewSize(new Size(this.View.ThumbnailsWidth, this.View.ThumbnailsHeight));
this.SaveApplicationSettings();
}
private void LoadApplicationSettings()
{
this.View.MinimizeToTray = Properties.Settings.Default.minimizeToTray;
this.View.ThumbnailsOpacity = Properties.Settings.Default.opacity;
this.View.TrackClientLocations = Properties.Settings.Default.track_client_windows;
this.View.HideActiveClientThumbnail = Properties.Settings.Default.hide_active;
this.View.ShowThumbnailsAlwaysOnTop = Properties.Settings.Default.always_on_top;
this.View.HideAllThumbnailsIfClientIsNotActive = Properties.Settings.Default.hide_all;
this.View.EnableUniqueThumbnailsLayouts = Properties.Settings.Default.unique_layout;
this.View.SyncThumbnailsSize = Properties.Settings.Default.sync_resize;
this.View.ThumbnailsWidth = (int)Properties.Settings.Default.sync_resize_x;
this.View.ThumbnailsHeight = (int)Properties.Settings.Default.sync_resize_y;
this.View.EnableZoomOnHover = Properties.Settings.Default.zoom_on_hover;
this.View.ZoomFactor = (int)Properties.Settings.Default.zoom_amount;
this.View.ZoomAnchor = (ZoomAnchor)Properties.Settings.Default.zoom_anchor;
this.View.ShowThumbnailFrames = Properties.Settings.Default.show_thumb_frames;
this.View.ShowThumbnailOverlays = Properties.Settings.Default.show_overlay;
}
private void SaveApplicationSettings()
{
Properties.Settings.Default.minimizeToTray = this.View.MinimizeToTray;
Properties.Settings.Default.opacity = (float)this.View.ThumbnailsOpacity;
Properties.Settings.Default.track_client_windows = this.View.TrackClientLocations;
Properties.Settings.Default.hide_active = this.View.HideActiveClientThumbnail;
Properties.Settings.Default.always_on_top = this.View.ShowThumbnailsAlwaysOnTop;
Properties.Settings.Default.hide_all = this.View.HideAllThumbnailsIfClientIsNotActive;
Properties.Settings.Default.unique_layout = this.View.EnableUniqueThumbnailsLayouts;
Properties.Settings.Default.sync_resize = this.View.SyncThumbnailsSize;
Properties.Settings.Default.sync_resize_x = (uint)this.View.ThumbnailsWidth;
Properties.Settings.Default.sync_resize_y = (uint)this.View.ThumbnailsHeight;
Properties.Settings.Default.zoom_on_hover = this.View.EnableZoomOnHover;
Properties.Settings.Default.zoom_amount = this.View.ZoomFactor;
Properties.Settings.Default.zoom_anchor = (byte)this.View.ZoomAnchor;
Properties.Settings.Default.show_overlay = this.View.ShowThumbnailOverlays;
Properties.Settings.Default.show_thumb_frames = this.View.ShowThumbnailFrames;
Properties.Settings.Default.Save();
this.View.UpdateZoomSettingsView();
this._manager.SetupThumbnailFrames();
this._manager.RefreshThumbnails();
}
private void ThumbnailsAdded(IList<IThumbnail> thumbnails)
{
this.View.AddThumbnails(this.GetThumbnailViews(thumbnails, false));
}
private void ThumbnailsUpdated(IList<IThumbnail> thumbnails)
{
this.View.UpdateThumbnails(this.GetThumbnailViews(thumbnails, false));
}
private void ThumbnailsRemoved(IList<IThumbnail> thumbnails)
{
this.View.RemoveThumbnails(this.GetThumbnailViews(thumbnails, true));
}
private IList<IThumbnailDescriptionView> GetThumbnailViews(IList<IThumbnail> thumbnails, bool removeFromCache)
{
IList<IThumbnailDescriptionView> thumbnailViews = new List<IThumbnailDescriptionView>(thumbnails.Count);
// Time for some thread safety
lock (this._thumbnailViews)
{
foreach (IThumbnail thumbnail in thumbnails)
{
IThumbnailDescriptionView thumbnailView;
bool foundInCache = this._thumbnailViews.TryGetValue(thumbnail.Id, out thumbnailView);
if (!foundInCache)
{
if (removeFromCache)
{
// This item was not even cached
continue;
}
thumbnailView = this._thumbnailDescriptionViewFactory.Create(thumbnail.Id, thumbnail.GetLabel());
this._thumbnailViews.Add(thumbnail.Id, thumbnailView);
}
else
{
if (removeFromCache)
{
this._thumbnailViews.Remove(thumbnail.Id);
}
else
{
thumbnailView.Title = thumbnail.GetLabel();
}
}
thumbnailViews.Add(thumbnailView);
}
}
return thumbnailViews;
}
private void ThumbnailSizeChanged(Size size)
{
this.View.UpdateThumbnailsSizeView(size);
}
private void UpdateThumbnailState(IntPtr thumbnailId, bool hideAlways)
{
this._manager.SetThumbnailState(thumbnailId, hideAlways);
}
private void OpenForumUrlLink()
{
ProcessStartInfo processStartInfo = new ProcessStartInfo(new Uri(MainPresenter.ForumUrl).AbsoluteUri);
Process.Start(processStartInfo);
}
}
}

View File

@@ -0,0 +1,12 @@
namespace EveOPreview.UI
{
public class ViewCloseRequest
{
public ViewCloseRequest()
{
this.Allow = true;
}
public bool Allow { get; set; }
}
}

View File

@@ -1,5 +1,6 @@
using System; using System;
using System.Windows.Forms; using System.Windows.Forms;
using EveOPreview.UI;
namespace EveOPreview namespace EveOPreview
{ {
@@ -11,7 +12,22 @@ namespace EveOPreview
{ {
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(true); Application.SetCompatibleTextRenderingDefault(true);
Application.Run(new MainForm());
// TODO Switch to another container that provides signed assemblies
IIocContainer container = new LightInjectContainer();
// UI classes
IApplicationController controller = new ApplicationController(container)
.RegisterView<IMainView, MainForm>()
.RegisterView<IThumbnailDescriptionView, ThumbnailDescriptionView>()
.RegisterInstance(new ApplicationContext());
// Application services
controller.RegisterService<EveOPreview.Thumbnails.IThumbnailFactory, EveOPreview.Thumbnails.ThumbnailFactory>()
.RegisterService<EveOPreview.Thumbnails.IThumbnailManager, EveOPreview.Thumbnails.ThumbnailManager>()
.RegisterService<IThumbnailDescriptionViewFactory, ThumbnailDescriptionViewFactory>();
controller.Run<EveOPreview.UI.MainPresenter>();
} }
} }
} }

View File

@@ -12,10 +12,11 @@ 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("1.18.0.0")] [assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyFileVersion("1.18.0.0")] [assembly: AssemblyFileVersion("2.0.0.0")]
// Provide your own key name to build the app locally // Provide your own key name to build the app locally
[assembly: AssemblyKeyName("Phrynohyas")] // TODO Reenable signing
//[assembly: AssemblyKeyName("Phrynohyas")]
[assembly: CLSCompliant(true)] [assembly: CLSCompliant(true)]

View File

@@ -0,0 +1,13 @@
using System;
using System.Drawing;
namespace EveOPreview.Thumbnails
{
public class ThumbnailFactory : IThumbnailFactory
{
public IThumbnail Create(IThumbnailManager manager, IntPtr sourceWindow, string title, Size size)
{
return new ThumbnailWindow(manager, sourceWindow, title, size);
}
}
}

View File

@@ -6,9 +6,9 @@ using System.IO;
using System.Windows.Threading; using System.Windows.Threading;
using System.Xml.Linq; using System.Xml.Linq;
namespace EveOPreview namespace EveOPreview.Thumbnails
{ {
public class ThumbnailManager public class ThumbnailManager : IThumbnailManager
{ {
private readonly Stopwatch _ignoringSizeSync; private readonly Stopwatch _ignoringSizeSync;
private DispatcherTimer _dispatcherTimer; private DispatcherTimer _dispatcherTimer;
@@ -25,18 +25,8 @@ namespace EveOPreview
private readonly Dictionary<string, string> _xmlBadToOkChars; private readonly Dictionary<string, string> _xmlBadToOkChars;
private readonly Action<IList<string>> _addThumbnail; public ThumbnailManager(IThumbnailFactory factory)
private readonly Action<IList<string>> _removeThumbnail;
private readonly Action<bool> _setAeroStatus;
private readonly Action<int,int> _sizeChange;
public ThumbnailManager(Action<IList<string>> addThumbnail, Action<IList<string>> removeThumbnail, Action<bool> setAeroStatus, Action<int,int> sizeChange)
{ {
_addThumbnail = addThumbnail;
_removeThumbnail = removeThumbnail;
_setAeroStatus = setAeroStatus;
_sizeChange = sizeChange;
_ignoringSizeSync = new Stopwatch(); _ignoringSizeSync = new Stopwatch();
_ignoringSizeSync.Start(); _ignoringSizeSync.Start();
@@ -67,10 +57,16 @@ namespace EveOPreview
this._thumbnailFactory = new ThumbnailFactory(); this._thumbnailFactory = new ThumbnailFactory();
} }
public event Action<IList<IThumbnail>> ThumbnailsAdded;
public event Action<IList<IThumbnail>> ThumbnailsUpdated;
public event Action<IList<IThumbnail>> ThumbnailsRemoved;
public event Action<Size> ThumbnailSizeChanged;
public void Activate() public void Activate()
{ {
this.load_layout(); this.load_layout();
this._dispatcherTimer.Start(); this._dispatcherTimer.Start();
this.RefreshThumbnails();
} }
public void Deactivate() public void Deactivate()
@@ -78,13 +74,25 @@ namespace EveOPreview
this._dispatcherTimer.Stop(); this._dispatcherTimer.Stop();
} }
public void SetThumbnailState(IntPtr thumbnailId, bool hideAlways)
{
IThumbnail thumbnail;
if (!this._previews.TryGetValue(thumbnailId, out thumbnail))
{
return;
}
thumbnail.IsPreviewEnabled = !hideAlways;
}
private void spawn_and_kill_previews() private void spawn_and_kill_previews()
{ {
// TODO Extract this! // TODO Extract this!
Process[] processes = Process.GetProcessesByName("ExeFile"); Process[] processes = Process.GetProcessesByName("ExeFile");
List<IntPtr> processHandles = new List<IntPtr>(); List<IntPtr> processHandles = new List<IntPtr>();
List<string> addedList=new List<string>(); List<IThumbnail> addedList = new List<IThumbnail>();
List<string> removedList = new List<string>(); List<IThumbnail> updatedList = new List<IThumbnail>();
List<IThumbnail> removedList = new List<IThumbnail>();
// pop new previews // pop new previews
foreach (Process process in processes) foreach (Process process in processes)
@@ -104,7 +112,7 @@ namespace EveOPreview
_previews[process.MainWindowHandle].SetWindowFrames(Properties.Settings.Default.show_thumb_frames); _previews[process.MainWindowHandle].SetWindowFrames(Properties.Settings.Default.show_thumb_frames);
// add a preview also // add a preview also
addedList.Add(_previews[process.MainWindowHandle].GetLabel()); addedList.Add(_previews[process.MainWindowHandle]);
refresh_client_window_locations(process); refresh_client_window_locations(process);
} }
@@ -118,6 +126,7 @@ namespace EveOPreview
{ {
_previews[process.MainWindowHandle].RegisterShortcut(value); _previews[process.MainWindowHandle].RegisterShortcut(value);
} }
updatedList.Add(_previews[process.MainWindowHandle]);
refresh_client_window_locations(process); refresh_client_window_locations(process);
} }
@@ -129,8 +138,9 @@ namespace EveOPreview
} }
// TODO Check for empty list // TODO Check for null list
_addThumbnail(addedList); this.ThumbnailsAdded?.Invoke(addedList);
this.ThumbnailsUpdated?.Invoke(updatedList);
// clean up old previews // clean up old previews
List<IntPtr> to_be_pruned = new List<IntPtr>(); List<IntPtr> to_be_pruned = new List<IntPtr>();
@@ -144,13 +154,14 @@ namespace EveOPreview
foreach (IntPtr processHandle in to_be_pruned) foreach (IntPtr processHandle in to_be_pruned)
{ {
removedList.Add(_previews[processHandle].GetLabel()); removedList.Add(_previews[processHandle]);
_previews[processHandle].CloseThumbnail(); _previews[processHandle].CloseThumbnail();
_previews.Remove(processHandle); _previews.Remove(processHandle);
} }
_removeThumbnail(removedList); // TODO Check for null list
this.ThumbnailsRemoved?.Invoke(removedList);
} }
private void refresh_client_window_locations(Process process) private void refresh_client_window_locations(Process process)
@@ -166,11 +177,8 @@ namespace EveOPreview
private void dispatcherTimer_Tick(object sender, EventArgs e) private void dispatcherTimer_Tick(object sender, EventArgs e)
{ {
spawn_and_kill_previews(); spawn_and_kill_previews();
refresh_thumbnails(); RefreshThumbnails();
if (_ignoringSizeSync.ElapsedMilliseconds > 500) { _ignoringSizeSync.Stop(); }; if (_ignoringSizeSync.ElapsedMilliseconds > 500) { _ignoringSizeSync.Stop(); };
// TODO Do this once in 10 seconds
_setAeroStatus(DwmApiNativeMethods.DwmIsCompositionEnabled());
} }
public void NotifyPreviewSwitch() public void NotifyPreviewSwitch()
@@ -184,21 +192,19 @@ namespace EveOPreview
} }
public void SyncPreviewSize(Size sync_size) public void SyncPreviewSize(Size size)
{ {
if (Properties.Settings.Default.sync_resize && if (Properties.Settings.Default.sync_resize && _ignoringSizeSync.ElapsedMilliseconds > 500)
Properties.Settings.Default.show_thumb_frames &&
_ignoringSizeSync.ElapsedMilliseconds > 500)
{ {
_ignoringSizeSync.Stop(); _ignoringSizeSync.Stop();
_sizeChange(sync_size.Width, sync_size.Height); this.ThumbnailSizeChanged?.Invoke(size);
foreach (KeyValuePair<IntPtr, IThumbnail> entry in _previews) foreach (KeyValuePair<IntPtr, IThumbnail> entry in _previews)
{ {
if (entry.Value.IsPreviewHandle(DwmApiNativeMethods.GetForegroundWindow())) if (entry.Value.IsPreviewHandle(DwmApiNativeMethods.GetForegroundWindow()))
{ {
entry.Value.SetSize(sync_size); entry.Value.SetSize(size);
} }
} }
@@ -206,8 +212,55 @@ namespace EveOPreview
} }
public void RefreshThumbnails()
{
IntPtr active_window = DwmApiNativeMethods.GetForegroundWindow();
public void UpdatePreviewPosition(string preview_title, Point position) // hide, show, resize and move
foreach (KeyValuePair<IntPtr, IThumbnail> entry in _previews)
{
if (!window_is_preview_or_client(active_window) && Properties.Settings.Default.hide_all)
{
entry.Value.HideThumbnail();
}
else if (entry.Key == _activeClientHandle && Properties.Settings.Default.hide_active)
{
entry.Value.HideThumbnail();
}
else
{
entry.Value.ShowThumbnail();
if (Properties.Settings.Default.unique_layout)
{
handle_unique_layout(entry.Value, _activeClientTitle);
}
else
{
handle_flat_layout(entry.Value);
}
}
entry.Value.IsZoomEnabled = Properties.Settings.Default.zoom_on_hover;
entry.Value.IsOverlayEnabled = Properties.Settings.Default.show_overlay;
entry.Value.SetOpacity(Properties.Settings.Default.opacity);
}
}
public void SetupThumbnailFrames()
{
if (Properties.Settings.Default.show_thumb_frames)
{
_ignoringSizeSync.Stop();
_ignoringSizeSync.Reset();
_ignoringSizeSync.Start();
}
foreach (var thumbnail in _previews)
{
thumbnail.Value.SetWindowFrames(Properties.Settings.Default.show_thumb_frames);
}
}
public void UpdatePreviewPosition(string title, Point position)
{ {
if (Properties.Settings.Default.unique_layout) if (Properties.Settings.Default.unique_layout)
@@ -215,17 +268,17 @@ namespace EveOPreview
Dictionary<string, Point> layout; Dictionary<string, Point> layout;
if (_uniqueLayouts.TryGetValue(_activeClientTitle, out layout)) if (_uniqueLayouts.TryGetValue(_activeClientTitle, out layout))
{ {
layout[preview_title] = position; layout[title] = position;
} }
else if (_activeClientTitle == "") else if (_activeClientTitle == "")
{ {
_uniqueLayouts[_activeClientTitle] = new Dictionary<string, Point>(); _uniqueLayouts[_activeClientTitle] = new Dictionary<string, Point>();
_uniqueLayouts[_activeClientTitle][preview_title] = position; _uniqueLayouts[_activeClientTitle][title] = position;
} }
} }
else else
{ {
_flatLayout[preview_title] = position; _flatLayout[title] = position;
} }
} }
@@ -450,58 +503,5 @@ namespace EveOPreview
} }
return active_window_is_right_type; return active_window_is_right_type;
} }
public void refresh_thumbnails()
{
IntPtr active_window = DwmApiNativeMethods.GetForegroundWindow();
// hide, show, resize and move
foreach (KeyValuePair<IntPtr, IThumbnail> entry in _previews)
{
if (!window_is_preview_or_client(active_window) && Properties.Settings.Default.hide_all)
{
entry.Value.HideThumbnail();
}
else if (entry.Key == _activeClientHandle && Properties.Settings.Default.hide_active)
{
entry.Value.HideThumbnail();
}
else
{
entry.Value.ShowThumbnail();
if (Properties.Settings.Default.unique_layout)
{
handle_unique_layout(entry.Value, _activeClientTitle);
}
else
{
handle_flat_layout(entry.Value);
}
}
entry.Value.IsZoomEnabled = Properties.Settings.Default.zoom_on_hover;
entry.Value.IsOverlayEnabled = Properties.Settings.Default.show_overlay;
entry.Value.SetOpacity(Properties.Settings.Default.opacity);
}
DwmApiNativeMethods.DwmIsCompositionEnabled();
}
public void set_frames()
{
if (Properties.Settings.Default.show_thumb_frames)
{
_ignoringSizeSync.Stop();
_ignoringSizeSync.Reset();
_ignoringSizeSync.Start();
}
foreach (var thumbnail in _previews)
{
thumbnail.Value.SetWindowFrames(Properties.Settings.Default.show_thumb_frames);
}
}
} }
} }

View File

@@ -1,4 +1,4 @@
namespace EveOPreview namespace EveOPreview.Thumbnails
{ {
partial class ThumbnailOverlay partial class ThumbnailOverlay
{ {

View File

@@ -1,7 +1,7 @@
using System; using System;
using System.Windows.Forms; using System.Windows.Forms;
namespace EveOPreview namespace EveOPreview.Thumbnails
{ {
public partial class ThumbnailOverlay : Form public partial class ThumbnailOverlay : Form
{ {

View File

@@ -1,4 +1,4 @@
namespace EveOPreview namespace EveOPreview.Thumbnails
{ {
partial class ThumbnailWindow partial class ThumbnailWindow
{ {

View File

@@ -1,15 +1,17 @@
using System; using System;
using System.Drawing; using System.Drawing;
using System.Windows.Forms; using System.Windows.Forms;
using EveOPreview.Configuration;
using EveOPreview.UI;
namespace EveOPreview namespace EveOPreview.Thumbnails
{ {
public partial class ThumbnailWindow : Form, IThumbnail public partial class ThumbnailWindow : Form, IThumbnail
{ {
#region Private fields #region Private fields
private readonly bool _isInitializing; private readonly bool _isInitializing;
private readonly IntPtr _sourceWindow; private readonly IntPtr _sourceWindow;
private readonly ThumbnailManager _manager; private readonly IThumbnailManager _manager;
private readonly ThumbnailOverlay _overlay; private readonly ThumbnailOverlay _overlay;
private Hotkey _hotkey; // This field stores the hotkey reference private Hotkey _hotkey; // This field stores the hotkey reference
@@ -26,7 +28,7 @@ namespace EveOPreview
#endregion #endregion
// This constructor should never be used directly // This constructor should never be used directly
public ThumbnailWindow(ThumbnailManager manager, IntPtr sourceWindow, string title, Size size) public ThumbnailWindow(IThumbnailManager manager, IntPtr sourceWindow, string title, Size size)
{ {
this._isInitializing = true; this._isInitializing = true;
@@ -52,6 +54,14 @@ namespace EveOPreview
this.SetSize(size); this.SetSize(size);
} }
public IntPtr Id
{
get
{
return this._sourceWindow;
}
}
public bool IsZoomEnabled { get; set; } public bool IsZoomEnabled { get; set; }
public bool IsPreviewEnabled { get; set; } public bool IsPreviewEnabled { get; set; }
@@ -348,9 +358,6 @@ namespace EveOPreview
this._Thumbnail.opacity = 255; this._Thumbnail.opacity = 255;
this._Thumbnail.fVisible = true; this._Thumbnail.fVisible = true;
this._Thumbnail.fSourceClientAreaOnly = true; this._Thumbnail.fSourceClientAreaOnly = true;
this._Thumbnail.rcDestination = new RECT(0, 0, this.ClientRectangle.Right, this.ClientRectangle.Bottom);
DwmApiNativeMethods.DwmUpdateThumbnailProperties(this._ThumbnailHandle, this._Thumbnail);
this._isThumbnailSetUp = true; this._isThumbnailSetUp = true;
} }

View File

@@ -1,10 +1,12 @@
using System; using System;
using System.Drawing; using System.Drawing;
namespace EveOPreview namespace EveOPreview.Thumbnails
{ {
public interface IThumbnail public interface IThumbnail
{ {
IntPtr Id { get; }
bool IsZoomEnabled { get; set; } bool IsZoomEnabled { get; set; }
bool IsPreviewEnabled { get; set; } bool IsPreviewEnabled { get; set; }
bool IsOverlayEnabled { get; set; } bool IsOverlayEnabled { get; set; }
@@ -17,6 +19,7 @@ namespace EveOPreview
void RegisterShortcut(string shortcut); void RegisterShortcut(string shortcut);
// TODO Turn this into a property
void SetLabel(string label); void SetLabel(string label);
string GetLabel(); string GetLabel();

View File

@@ -0,0 +1,10 @@
using System;
using System.Drawing;
namespace EveOPreview.Thumbnails
{
public interface IThumbnailFactory
{
IThumbnail Create(IThumbnailManager manager, IntPtr sourceWindow, string title, Size size);
}
}

View File

@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Drawing;
namespace EveOPreview.Thumbnails
{
public interface IThumbnailManager
{
void Activate();
void NotifyPreviewSwitch();
void SetThumbnailState(IntPtr thumbnailId, bool hideAlways);
void SyncPreviewSize(Size size);
void UpdatePreviewPosition(string title, Point position);
void RefreshThumbnails();
void SetupThumbnailFrames();
event Action<IList<IThumbnail>> ThumbnailsAdded;
event Action<IList<IThumbnail>> ThumbnailsUpdated;
event Action<IList<IThumbnail>> ThumbnailsRemoved;
event Action<Size> ThumbnailSizeChanged;
}
}

View File

@@ -1,13 +0,0 @@
using System;
using System.Drawing;
namespace EveOPreview
{
public class ThumbnailFactory
{
public IThumbnail Create(ThumbnailManager manager, IntPtr sourceWindow, string title, Size size)
{
return new ThumbnailWindow(manager, sourceWindow, title, size);
}
}
}

View File

@@ -0,0 +1,664 @@
using System.Windows.Forms;
namespace EveOPreview.UI
{
partial class MainForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>s
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.Label OpacityLabel;
System.Windows.Forms.ToolStripMenuItem RestoreWindowMenuItem;
System.Windows.Forms.ToolStripMenuItem ExitMenuItem;
System.Windows.Forms.FlowLayoutPanel ContentFlowLayoutPanel;
System.Windows.Forms.Panel OpacityPanel;
System.Windows.Forms.Label ZoomFactorLabel;
System.Windows.Forms.Label ZoomAnchorLabel;
System.Windows.Forms.Label PreviewsListLabel;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.MinimizeToTrayCheckBox = new System.Windows.Forms.CheckBox();
this.ThumbnailsOpacityScrollBar = new System.Windows.Forms.HScrollBar();
this.TrackClientLocationsCheckBox = new System.Windows.Forms.CheckBox();
this.HideActiveClientThumbnailCheckBox = new System.Windows.Forms.CheckBox();
this.ShowThumbnailsAlwaysOnTopCheckBox = new System.Windows.Forms.CheckBox();
this.HideAllThumbnailsIfClientIsNotActiveCheckBox = new System.Windows.Forms.CheckBox();
this.EnableUniqueThumbnailsLayoutsCheckBox = new System.Windows.Forms.CheckBox();
this.panel1 = new System.Windows.Forms.Panel();
this.SyncThumbnailsSizeCheckBox = new System.Windows.Forms.CheckBox();
this.ThumbnailsWidthNumericEdit = new System.Windows.Forms.NumericUpDown();
this.ThumbnailsHeightNumericEdit = new System.Windows.Forms.NumericUpDown();
this.panel2 = new System.Windows.Forms.Panel();
this.ZoomAnchorPanel = new System.Windows.Forms.Panel();
this.ZoomAanchorNWRadioButton = new System.Windows.Forms.RadioButton();
this.ZoomAanchorNRadioButton = new System.Windows.Forms.RadioButton();
this.ZoomAanchorNERadioButton = new System.Windows.Forms.RadioButton();
this.ZoomAanchorWRadioButton = new System.Windows.Forms.RadioButton();
this.ZoomAanchorSERadioButton = new System.Windows.Forms.RadioButton();
this.ZoomAanchorCRadioButton = new System.Windows.Forms.RadioButton();
this.ZoomAanchorSRadioButton = new System.Windows.Forms.RadioButton();
this.ZoomAanchorERadioButton = new System.Windows.Forms.RadioButton();
this.ZoomAanchorSWRadioButton = new System.Windows.Forms.RadioButton();
this.EnableZoomOnHoverCheckBox = new System.Windows.Forms.CheckBox();
this.ZoomFactorNumericEdit = new System.Windows.Forms.NumericUpDown();
this.ShowThumbnailOverlaysCheckBox = new System.Windows.Forms.CheckBox();
this.ShowThumbnailFramesCheckBox = new System.Windows.Forms.CheckBox();
this.panel5 = new System.Windows.Forms.Panel();
this.ThumbnailsList = new System.Windows.Forms.CheckedListBox();
this.ForumLinkLabel = new System.Windows.Forms.LinkLabel();
this.NotifyIcon = new System.Windows.Forms.NotifyIcon(this.components);
this.TrayMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
OpacityLabel = new System.Windows.Forms.Label();
RestoreWindowMenuItem = new System.Windows.Forms.ToolStripMenuItem();
ExitMenuItem = new System.Windows.Forms.ToolStripMenuItem();
ContentFlowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
OpacityPanel = new System.Windows.Forms.Panel();
ZoomFactorLabel = new System.Windows.Forms.Label();
ZoomAnchorLabel = new System.Windows.Forms.Label();
PreviewsListLabel = new System.Windows.Forms.Label();
ContentFlowLayoutPanel.SuspendLayout();
OpacityPanel.SuspendLayout();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.ThumbnailsWidthNumericEdit)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.ThumbnailsHeightNumericEdit)).BeginInit();
this.panel2.SuspendLayout();
this.ZoomAnchorPanel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.ZoomFactorNumericEdit)).BeginInit();
this.panel5.SuspendLayout();
this.TrayMenu.SuspendLayout();
this.SuspendLayout();
//
// OpacityLabel
//
OpacityLabel.AutoSize = true;
OpacityLabel.Location = new System.Drawing.Point(2, 5);
OpacityLabel.Name = "OpacityLabel";
OpacityLabel.Size = new System.Drawing.Size(43, 13);
OpacityLabel.TabIndex = 0;
OpacityLabel.Text = "Opacity";
//
// RestoreWindowMenuItem
//
RestoreWindowMenuItem.Name = "RestoreWindowMenuItem";
RestoreWindowMenuItem.Size = new System.Drawing.Size(113, 22);
RestoreWindowMenuItem.Text = "Restore";
RestoreWindowMenuItem.Click += new System.EventHandler(this.RestoreMainForm_Handler);
//
// ExitMenuItem
//
ExitMenuItem.Name = "ExitMenuItem";
ExitMenuItem.Size = new System.Drawing.Size(113, 22);
ExitMenuItem.Text = "Exit";
ExitMenuItem.Click += new System.EventHandler(this.ExitMenuItemClick_Handler);
//
// ContentFlowLayoutPanel
//
ContentFlowLayoutPanel.BackColor = System.Drawing.SystemColors.Control;
ContentFlowLayoutPanel.Controls.Add(this.MinimizeToTrayCheckBox);
ContentFlowLayoutPanel.Controls.Add(OpacityPanel);
ContentFlowLayoutPanel.Controls.Add(this.TrackClientLocationsCheckBox);
ContentFlowLayoutPanel.Controls.Add(this.HideActiveClientThumbnailCheckBox);
ContentFlowLayoutPanel.Controls.Add(this.ShowThumbnailsAlwaysOnTopCheckBox);
ContentFlowLayoutPanel.Controls.Add(this.HideAllThumbnailsIfClientIsNotActiveCheckBox);
ContentFlowLayoutPanel.Controls.Add(this.EnableUniqueThumbnailsLayoutsCheckBox);
ContentFlowLayoutPanel.Controls.Add(this.panel1);
ContentFlowLayoutPanel.Controls.Add(this.panel2);
ContentFlowLayoutPanel.Controls.Add(this.ShowThumbnailOverlaysCheckBox);
ContentFlowLayoutPanel.Controls.Add(this.ShowThumbnailFramesCheckBox);
ContentFlowLayoutPanel.Controls.Add(this.panel5);
ContentFlowLayoutPanel.Controls.Add(this.ForumLinkLabel);
ContentFlowLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
ContentFlowLayoutPanel.Location = new System.Drawing.Point(0, 0);
ContentFlowLayoutPanel.Name = "ContentFlowLayoutPanel";
ContentFlowLayoutPanel.Size = new System.Drawing.Size(252, 467);
ContentFlowLayoutPanel.TabIndex = 25;
//
// MinimizeToTrayCheckBox
//
this.MinimizeToTrayCheckBox.AutoSize = true;
this.MinimizeToTrayCheckBox.Location = new System.Drawing.Point(3, 3);
this.MinimizeToTrayCheckBox.Name = "MinimizeToTrayCheckBox";
this.MinimizeToTrayCheckBox.Size = new System.Drawing.Size(139, 17);
this.MinimizeToTrayCheckBox.TabIndex = 34;
this.MinimizeToTrayCheckBox.Text = "Minimize to System Tray";
this.MinimizeToTrayCheckBox.UseVisualStyleBackColor = true;
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);
//
// TrackClientLocationsCheckBox
//
this.TrackClientLocationsCheckBox.AutoSize = true;
this.TrackClientLocationsCheckBox.Location = new System.Drawing.Point(3, 58);
this.TrackClientLocationsCheckBox.Name = "TrackClientLocationsCheckBox";
this.TrackClientLocationsCheckBox.Size = new System.Drawing.Size(127, 17);
this.TrackClientLocationsCheckBox.TabIndex = 32;
this.TrackClientLocationsCheckBox.Text = "Track client locations";
this.TrackClientLocationsCheckBox.UseVisualStyleBackColor = true;
this.TrackClientLocationsCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
//
// HideActiveClientThumbnailCheckBox
//
this.HideActiveClientThumbnailCheckBox.AutoSize = true;
this.HideActiveClientThumbnailCheckBox.Checked = true;
this.HideActiveClientThumbnailCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.HideActiveClientThumbnailCheckBox.Location = new System.Drawing.Point(3, 81);
this.HideActiveClientThumbnailCheckBox.Name = "HideActiveClientThumbnailCheckBox";
this.HideActiveClientThumbnailCheckBox.Size = new System.Drawing.Size(184, 17);
this.HideActiveClientThumbnailCheckBox.TabIndex = 1;
this.HideActiveClientThumbnailCheckBox.Text = "Hide preview of active EVE client";
this.HideActiveClientThumbnailCheckBox.UseVisualStyleBackColor = true;
this.HideActiveClientThumbnailCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
//
// ShowThumbnailsAlwaysOnTopCheckBox
//
this.ShowThumbnailsAlwaysOnTopCheckBox.AutoSize = true;
this.ShowThumbnailsAlwaysOnTopCheckBox.Checked = true;
this.ShowThumbnailsAlwaysOnTopCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.ShowThumbnailsAlwaysOnTopCheckBox.Location = new System.Drawing.Point(3, 104);
this.ShowThumbnailsAlwaysOnTopCheckBox.Name = "ShowThumbnailsAlwaysOnTopCheckBox";
this.ShowThumbnailsAlwaysOnTopCheckBox.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.ShowThumbnailsAlwaysOnTopCheckBox.Size = new System.Drawing.Size(137, 17);
this.ShowThumbnailsAlwaysOnTopCheckBox.TabIndex = 8;
this.ShowThumbnailsAlwaysOnTopCheckBox.Text = "Previews always on top";
this.ShowThumbnailsAlwaysOnTopCheckBox.UseVisualStyleBackColor = true;
this.ShowThumbnailsAlwaysOnTopCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
//
// HideAllThumbnailsIfClientIsNotActiveCheckBox
//
this.HideAllThumbnailsIfClientIsNotActiveCheckBox.AutoSize = true;
this.HideAllThumbnailsIfClientIsNotActiveCheckBox.Checked = true;
this.HideAllThumbnailsIfClientIsNotActiveCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.HideAllThumbnailsIfClientIsNotActiveCheckBox.Location = new System.Drawing.Point(3, 127);
this.HideAllThumbnailsIfClientIsNotActiveCheckBox.Name = "HideAllThumbnailsIfClientIsNotActiveCheckBox";
this.HideAllThumbnailsIfClientIsNotActiveCheckBox.Size = new System.Drawing.Size(242, 17);
this.HideAllThumbnailsIfClientIsNotActiveCheckBox.TabIndex = 2;
this.HideAllThumbnailsIfClientIsNotActiveCheckBox.Text = "Hide previews if active window not EVE client";
this.HideAllThumbnailsIfClientIsNotActiveCheckBox.UseVisualStyleBackColor = true;
this.HideAllThumbnailsIfClientIsNotActiveCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
//
// EnableUniqueThumbnailsLayoutsCheckBox
//
this.EnableUniqueThumbnailsLayoutsCheckBox.AutoSize = true;
this.EnableUniqueThumbnailsLayoutsCheckBox.Checked = true;
this.EnableUniqueThumbnailsLayoutsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.EnableUniqueThumbnailsLayoutsCheckBox.Location = new System.Drawing.Point(3, 150);
this.EnableUniqueThumbnailsLayoutsCheckBox.Name = "EnableUniqueThumbnailsLayoutsCheckBox";
this.EnableUniqueThumbnailsLayoutsCheckBox.Size = new System.Drawing.Size(185, 17);
this.EnableUniqueThumbnailsLayoutsCheckBox.TabIndex = 3;
this.EnableUniqueThumbnailsLayoutsCheckBox.Text = "Unique layout for each EVE client";
this.EnableUniqueThumbnailsLayoutsCheckBox.UseVisualStyleBackColor = true;
this.EnableUniqueThumbnailsLayoutsCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
//
// panel1
//
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel1.Controls.Add(this.SyncThumbnailsSizeCheckBox);
this.panel1.Controls.Add(this.ThumbnailsWidthNumericEdit);
this.panel1.Controls.Add(this.ThumbnailsHeightNumericEdit);
this.panel1.Location = new System.Drawing.Point(3, 173);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(246, 30);
this.panel1.TabIndex = 26;
//
// SyncThumbnailsSizeCheckBox
//
this.SyncThumbnailsSizeCheckBox.AutoSize = true;
this.SyncThumbnailsSizeCheckBox.Checked = true;
this.SyncThumbnailsSizeCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.SyncThumbnailsSizeCheckBox.Location = new System.Drawing.Point(1, 3);
this.SyncThumbnailsSizeCheckBox.Name = "SyncThumbnailsSizeCheckBox";
this.SyncThumbnailsSizeCheckBox.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.SyncThumbnailsSizeCheckBox.Size = new System.Drawing.Size(108, 17);
this.SyncThumbnailsSizeCheckBox.TabIndex = 4;
this.SyncThumbnailsSizeCheckBox.Text = "Syncronize resize";
this.SyncThumbnailsSizeCheckBox.UseVisualStyleBackColor = true;
this.SyncThumbnailsSizeCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
//
// ThumbnailsWidthNumericEdit
//
this.ThumbnailsWidthNumericEdit.BackColor = System.Drawing.SystemColors.Window;
this.ThumbnailsWidthNumericEdit.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ThumbnailsWidthNumericEdit.Increment = new decimal(new int[] {
10,
0,
0,
0});
this.ThumbnailsWidthNumericEdit.Location = new System.Drawing.Point(137, 3);
this.ThumbnailsWidthNumericEdit.Maximum = new decimal(new int[] {
640,
0,
0,
0});
this.ThumbnailsWidthNumericEdit.Minimum = new decimal(new int[] {
80,
0,
0,
0});
this.ThumbnailsWidthNumericEdit.Name = "ThumbnailsWidthNumericEdit";
this.ThumbnailsWidthNumericEdit.Size = new System.Drawing.Size(48, 20);
this.ThumbnailsWidthNumericEdit.TabIndex = 11;
this.ThumbnailsWidthNumericEdit.Value = new decimal(new int[] {
100,
0,
0,
0});
this.ThumbnailsWidthNumericEdit.TextChanged += new System.EventHandler(this.ThumbnailSizeChanged_Handler);
this.ThumbnailsWidthNumericEdit.ValueChanged += new System.EventHandler(this.ThumbnailSizeChanged_Handler);
//
// ThumbnailsHeightNumericEdit
//
this.ThumbnailsHeightNumericEdit.BackColor = System.Drawing.SystemColors.Window;
this.ThumbnailsHeightNumericEdit.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ThumbnailsHeightNumericEdit.Increment = new decimal(new int[] {
10,
0,
0,
0});
this.ThumbnailsHeightNumericEdit.Location = new System.Drawing.Point(196, 3);
this.ThumbnailsHeightNumericEdit.Maximum = new decimal(new int[] {
480,
0,
0,
0});
this.ThumbnailsHeightNumericEdit.Minimum = new decimal(new int[] {
60,
0,
0,
0});
this.ThumbnailsHeightNumericEdit.Name = "ThumbnailsHeightNumericEdit";
this.ThumbnailsHeightNumericEdit.Size = new System.Drawing.Size(42, 20);
this.ThumbnailsHeightNumericEdit.TabIndex = 12;
this.ThumbnailsHeightNumericEdit.Value = new decimal(new int[] {
70,
0,
0,
0});
this.ThumbnailsHeightNumericEdit.TextChanged += new System.EventHandler(this.ThumbnailSizeChanged_Handler);
this.ThumbnailsHeightNumericEdit.ValueChanged += new System.EventHandler(this.ThumbnailSizeChanged_Handler);
//
// panel2
//
this.panel2.BackColor = System.Drawing.SystemColors.Control;
this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel2.Controls.Add(ZoomFactorLabel);
this.panel2.Controls.Add(this.ZoomAnchorPanel);
this.panel2.Controls.Add(ZoomAnchorLabel);
this.panel2.Controls.Add(this.EnableZoomOnHoverCheckBox);
this.panel2.Controls.Add(this.ZoomFactorNumericEdit);
this.panel2.Location = new System.Drawing.Point(3, 209);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(246, 62);
this.panel2.TabIndex = 27;
//
// ZoomFactorLabel
//
ZoomFactorLabel.AutoSize = true;
ZoomFactorLabel.Location = new System.Drawing.Point(49, 31);
ZoomFactorLabel.Name = "ZoomFactorLabel";
ZoomFactorLabel.Size = new System.Drawing.Size(37, 13);
ZoomFactorLabel.TabIndex = 29;
ZoomFactorLabel.Text = "Factor";
//
// ZoomAnchorPanel
//
this.ZoomAnchorPanel.Controls.Add(this.ZoomAanchorNWRadioButton);
this.ZoomAnchorPanel.Controls.Add(this.ZoomAanchorNRadioButton);
this.ZoomAnchorPanel.Controls.Add(this.ZoomAanchorNERadioButton);
this.ZoomAnchorPanel.Controls.Add(this.ZoomAanchorWRadioButton);
this.ZoomAnchorPanel.Controls.Add(this.ZoomAanchorSERadioButton);
this.ZoomAnchorPanel.Controls.Add(this.ZoomAanchorCRadioButton);
this.ZoomAnchorPanel.Controls.Add(this.ZoomAanchorSRadioButton);
this.ZoomAnchorPanel.Controls.Add(this.ZoomAanchorERadioButton);
this.ZoomAnchorPanel.Controls.Add(this.ZoomAanchorSWRadioButton);
this.ZoomAnchorPanel.Location = new System.Drawing.Point(182, 3);
this.ZoomAnchorPanel.Name = "ZoomAnchorPanel";
this.ZoomAnchorPanel.Size = new System.Drawing.Size(60, 57);
this.ZoomAnchorPanel.TabIndex = 28;
//
// ZoomAanchorNWRadioButton
//
this.ZoomAanchorNWRadioButton.AutoSize = true;
this.ZoomAanchorNWRadioButton.Location = new System.Drawing.Point(3, 3);
this.ZoomAanchorNWRadioButton.Name = "ZoomAanchorNWRadioButton";
this.ZoomAanchorNWRadioButton.Size = new System.Drawing.Size(14, 13);
this.ZoomAanchorNWRadioButton.TabIndex = 15;
this.ZoomAanchorNWRadioButton.TabStop = true;
this.ZoomAanchorNWRadioButton.UseVisualStyleBackColor = true;
this.ZoomAanchorNWRadioButton.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
//
// ZoomAanchorNRadioButton
//
this.ZoomAanchorNRadioButton.AutoSize = true;
this.ZoomAanchorNRadioButton.Location = new System.Drawing.Point(23, 3);
this.ZoomAanchorNRadioButton.Name = "ZoomAanchorNRadioButton";
this.ZoomAanchorNRadioButton.Size = new System.Drawing.Size(14, 13);
this.ZoomAanchorNRadioButton.TabIndex = 16;
this.ZoomAanchorNRadioButton.TabStop = true;
this.ZoomAanchorNRadioButton.UseVisualStyleBackColor = true;
this.ZoomAanchorNRadioButton.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
//
// ZoomAanchorNERadioButton
//
this.ZoomAanchorNERadioButton.AutoSize = true;
this.ZoomAanchorNERadioButton.Location = new System.Drawing.Point(43, 3);
this.ZoomAanchorNERadioButton.Name = "ZoomAanchorNERadioButton";
this.ZoomAanchorNERadioButton.Size = new System.Drawing.Size(14, 13);
this.ZoomAanchorNERadioButton.TabIndex = 17;
this.ZoomAanchorNERadioButton.TabStop = true;
this.ZoomAanchorNERadioButton.UseVisualStyleBackColor = true;
this.ZoomAanchorNERadioButton.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
//
// ZoomAanchorWRadioButton
//
this.ZoomAanchorWRadioButton.AutoSize = true;
this.ZoomAanchorWRadioButton.Location = new System.Drawing.Point(3, 22);
this.ZoomAanchorWRadioButton.Name = "ZoomAanchorWRadioButton";
this.ZoomAanchorWRadioButton.Size = new System.Drawing.Size(14, 13);
this.ZoomAanchorWRadioButton.TabIndex = 18;
this.ZoomAanchorWRadioButton.TabStop = true;
this.ZoomAanchorWRadioButton.UseVisualStyleBackColor = true;
this.ZoomAanchorWRadioButton.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
//
// ZoomAanchorSERadioButton
//
this.ZoomAanchorSERadioButton.AutoSize = true;
this.ZoomAanchorSERadioButton.Location = new System.Drawing.Point(43, 41);
this.ZoomAanchorSERadioButton.Name = "ZoomAanchorSERadioButton";
this.ZoomAanchorSERadioButton.Size = new System.Drawing.Size(14, 13);
this.ZoomAanchorSERadioButton.TabIndex = 23;
this.ZoomAanchorSERadioButton.TabStop = true;
this.ZoomAanchorSERadioButton.UseVisualStyleBackColor = true;
this.ZoomAanchorSERadioButton.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
//
// ZoomAanchorCRadioButton
//
this.ZoomAanchorCRadioButton.AutoSize = true;
this.ZoomAanchorCRadioButton.Location = new System.Drawing.Point(23, 22);
this.ZoomAanchorCRadioButton.Name = "ZoomAanchorCRadioButton";
this.ZoomAanchorCRadioButton.Size = new System.Drawing.Size(14, 13);
this.ZoomAanchorCRadioButton.TabIndex = 19;
this.ZoomAanchorCRadioButton.TabStop = true;
this.ZoomAanchorCRadioButton.UseVisualStyleBackColor = true;
this.ZoomAanchorCRadioButton.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
//
// ZoomAanchorSRadioButton
//
this.ZoomAanchorSRadioButton.AutoSize = true;
this.ZoomAanchorSRadioButton.Location = new System.Drawing.Point(23, 41);
this.ZoomAanchorSRadioButton.Name = "ZoomAanchorSRadioButton";
this.ZoomAanchorSRadioButton.Size = new System.Drawing.Size(14, 13);
this.ZoomAanchorSRadioButton.TabIndex = 22;
this.ZoomAanchorSRadioButton.TabStop = true;
this.ZoomAanchorSRadioButton.UseVisualStyleBackColor = true;
this.ZoomAanchorSRadioButton.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
//
// ZoomAanchorERadioButton
//
this.ZoomAanchorERadioButton.AutoSize = true;
this.ZoomAanchorERadioButton.Location = new System.Drawing.Point(43, 22);
this.ZoomAanchorERadioButton.Name = "ZoomAanchorERadioButton";
this.ZoomAanchorERadioButton.Size = new System.Drawing.Size(14, 13);
this.ZoomAanchorERadioButton.TabIndex = 20;
this.ZoomAanchorERadioButton.TabStop = true;
this.ZoomAanchorERadioButton.UseVisualStyleBackColor = true;
this.ZoomAanchorERadioButton.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
//
// ZoomAanchorSWRadioButton
//
this.ZoomAanchorSWRadioButton.AutoSize = true;
this.ZoomAanchorSWRadioButton.Location = new System.Drawing.Point(3, 41);
this.ZoomAanchorSWRadioButton.Name = "ZoomAanchorSWRadioButton";
this.ZoomAanchorSWRadioButton.Size = new System.Drawing.Size(14, 13);
this.ZoomAanchorSWRadioButton.TabIndex = 21;
this.ZoomAanchorSWRadioButton.TabStop = true;
this.ZoomAanchorSWRadioButton.UseVisualStyleBackColor = true;
this.ZoomAanchorSWRadioButton.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
//
// ZoomAnchorLabel
//
ZoomAnchorLabel.AutoSize = true;
ZoomAnchorLabel.Location = new System.Drawing.Point(138, 31);
ZoomAnchorLabel.Name = "ZoomAnchorLabel";
ZoomAnchorLabel.Size = new System.Drawing.Size(41, 13);
ZoomAnchorLabel.TabIndex = 30;
ZoomAnchorLabel.Text = "Anchor";
//
// EnableZoomOnHoverCheckBox
//
this.EnableZoomOnHoverCheckBox.AutoSize = true;
this.EnableZoomOnHoverCheckBox.Checked = true;
this.EnableZoomOnHoverCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.EnableZoomOnHoverCheckBox.Location = new System.Drawing.Point(1, 5);
this.EnableZoomOnHoverCheckBox.Name = "EnableZoomOnHoverCheckBox";
this.EnableZoomOnHoverCheckBox.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.EnableZoomOnHoverCheckBox.Size = new System.Drawing.Size(98, 17);
this.EnableZoomOnHoverCheckBox.TabIndex = 13;
this.EnableZoomOnHoverCheckBox.Text = "Zoom on hover";
this.EnableZoomOnHoverCheckBox.UseVisualStyleBackColor = true;
this.EnableZoomOnHoverCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
//
// ZoomFactorNumericEdit
//
this.ZoomFactorNumericEdit.BackColor = System.Drawing.SystemColors.Window;
this.ZoomFactorNumericEdit.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ZoomFactorNumericEdit.Location = new System.Drawing.Point(9, 28);
this.ZoomFactorNumericEdit.Maximum = new decimal(new int[] {
10,
0,
0,
0});
this.ZoomFactorNumericEdit.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.ZoomFactorNumericEdit.Name = "ZoomFactorNumericEdit";
this.ZoomFactorNumericEdit.Size = new System.Drawing.Size(34, 20);
this.ZoomFactorNumericEdit.TabIndex = 24;
this.ZoomFactorNumericEdit.Value = new decimal(new int[] {
1,
0,
0,
0});
this.ZoomFactorNumericEdit.ValueChanged += 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, 277);
this.ShowThumbnailOverlaysCheckBox.Name = "ShowThumbnailOverlaysCheckBox";
this.ShowThumbnailOverlaysCheckBox.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.ShowThumbnailOverlaysCheckBox.Size = new System.Drawing.Size(90, 17);
this.ShowThumbnailOverlaysCheckBox.TabIndex = 14;
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(99, 277);
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);
//
// panel5
//
this.panel5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel5.Controls.Add(this.ThumbnailsList);
this.panel5.Controls.Add(PreviewsListLabel);
this.panel5.Location = new System.Drawing.Point(3, 300);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(246, 125);
this.panel5.TabIndex = 31;
//
// ThumbnailsList
//
this.ThumbnailsList.BackColor = System.Drawing.SystemColors.Window;
this.ThumbnailsList.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.ThumbnailsList.FormattingEnabled = true;
this.ThumbnailsList.IntegralHeight = false;
this.ThumbnailsList.Location = new System.Drawing.Point(3, 18);
this.ThumbnailsList.Name = "ThumbnailsList";
this.ThumbnailsList.Size = new System.Drawing.Size(240, 100);
this.ThumbnailsList.TabIndex = 28;
this.ThumbnailsList.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.ThumbnailsList_ItemCheck_Handler);
//
// PreviewsListLabel
//
PreviewsListLabel.AutoSize = true;
PreviewsListLabel.Location = new System.Drawing.Point(3, 0);
PreviewsListLabel.Name = "PreviewsListLabel";
PreviewsListLabel.Size = new System.Drawing.Size(151, 13);
PreviewsListLabel.TabIndex = 29;
PreviewsListLabel.Text = "Previews (check to force hide)";
//
// ForumLinkLabel
//
this.ForumLinkLabel.AutoSize = true;
this.ForumLinkLabel.Location = new System.Drawing.Point(3, 428);
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);
//
// NotifyIcon
//
this.NotifyIcon.ContextMenuStrip = this.TrayMenu;
this.NotifyIcon.Icon = ((System.Drawing.Icon)(resources.GetObject("NotifyIcon.Icon")));
this.NotifyIcon.Text = "EVE-O Preview";
this.NotifyIcon.Visible = true;
this.NotifyIcon.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.RestoreMainForm_Handler);
//
// TrayMenu
//
this.TrayMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
RestoreWindowMenuItem,
ExitMenuItem});
this.TrayMenu.Name = "contextMenuStrip1";
this.TrayMenu.Size = new System.Drawing.Size(114, 48);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.ControlDarkDark;
this.ClientSize = new System.Drawing.Size(252, 467);
this.Controls.Add(ContentFlowLayoutPanel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(0);
this.MaximizeBox = false;
this.Name = "MainForm";
this.Text = "EVE Online previewer";
this.TopMost = true;
this.WindowState = System.Windows.Forms.FormWindowState.Minimized;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainFormClosing_Handler);
this.Resize += new System.EventHandler(this.MainFormResize_Handler);
ContentFlowLayoutPanel.ResumeLayout(false);
ContentFlowLayoutPanel.PerformLayout();
OpacityPanel.ResumeLayout(false);
OpacityPanel.PerformLayout();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.ThumbnailsWidthNumericEdit)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.ThumbnailsHeightNumericEdit)).EndInit();
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.ZoomAnchorPanel.ResumeLayout(false);
this.ZoomAnchorPanel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.ZoomFactorNumericEdit)).EndInit();
this.panel5.ResumeLayout(false);
this.panel5.PerformLayout();
this.TrayMenu.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private CheckBox HideActiveClientThumbnailCheckBox;
private CheckBox HideAllThumbnailsIfClientIsNotActiveCheckBox;
private CheckBox EnableUniqueThumbnailsLayoutsCheckBox;
private CheckBox SyncThumbnailsSizeCheckBox;
private CheckBox ShowThumbnailsAlwaysOnTopCheckBox;
private CheckBox ShowThumbnailFramesCheckBox;
private LinkLabel ForumLinkLabel;
private NumericUpDown ThumbnailsWidthNumericEdit;
private NumericUpDown ThumbnailsHeightNumericEdit;
private CheckBox EnableZoomOnHoverCheckBox;
private CheckBox ShowThumbnailOverlaysCheckBox;
private RadioButton ZoomAanchorNWRadioButton;
private RadioButton ZoomAanchorNRadioButton;
private RadioButton ZoomAanchorNERadioButton;
private RadioButton ZoomAanchorWRadioButton;
private RadioButton ZoomAanchorCRadioButton;
private RadioButton ZoomAanchorERadioButton;
private RadioButton ZoomAanchorSWRadioButton;
private RadioButton ZoomAanchorSRadioButton;
private RadioButton ZoomAanchorSERadioButton;
private NumericUpDown ZoomFactorNumericEdit;
private Panel panel1;
private Panel panel2;
private Panel ZoomAnchorPanel;
private CheckedListBox ThumbnailsList;
private Panel panel5;
private CheckBox TrackClientLocationsCheckBox;
private HScrollBar ThumbnailsOpacityScrollBar;
private CheckBox MinimizeToTrayCheckBox;
private NotifyIcon NotifyIcon;
private ContextMenuStrip TrayMenu;
}
}

View File

@@ -0,0 +1,401 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using System.Globalization;
using EveOPreview.Configuration;
using EveOPreview.Thumbnails;
namespace EveOPreview.UI
{
public partial class MainForm : Form, IMainView
{
private readonly ApplicationContext _context;
private readonly Dictionary<ZoomAnchor, RadioButton> _zoomAnchorMap;
private ZoomAnchor _cachedZoomAnchor;
private bool _suppressEvents;
public MainForm(ApplicationContext context)
{
this._context = context;
this._zoomAnchorMap = new Dictionary<ZoomAnchor, RadioButton>();
this._cachedZoomAnchor = ZoomAnchor.NW;
this._suppressEvents = false;
InitializeComponent();
this.ThumbnailsList.DisplayMember = "Title";
this.InitZoomAnchorMap();
}
public bool MinimizeToTray
{
get
{
return this.MinimizeToTrayCheckBox.Checked;
}
set
{
this.MinimizeToTrayCheckBox.Checked = value;
}
}
public double ThumbnailsOpacity
{
get
{
return Math.Min(this.ThumbnailsOpacityScrollBar.Value / 100.00, 1.00);
}
set
{
this.ThumbnailsOpacityScrollBar.Value = Math.Min(100, (int)(100.0 * value));
}
}
public bool TrackClientLocations
{
get
{
return this.TrackClientLocationsCheckBox.Checked;
}
set
{
this.TrackClientLocationsCheckBox.Checked = value;
}
}
public bool HideActiveClientThumbnail
{
get
{
return this.HideActiveClientThumbnailCheckBox.Checked;
}
set
{
this.HideActiveClientThumbnailCheckBox.Checked = value;
}
}
public bool ShowThumbnailsAlwaysOnTop
{
get
{
return this.ShowThumbnailsAlwaysOnTopCheckBox.Checked;
}
set
{
this.ShowThumbnailsAlwaysOnTopCheckBox.Checked = value;
}
}
public bool HideAllThumbnailsIfClientIsNotActive
{
get
{
return this.HideAllThumbnailsIfClientIsNotActiveCheckBox.Checked;
}
set
{
this.HideAllThumbnailsIfClientIsNotActiveCheckBox.Checked = value;
}
}
public bool EnableUniqueThumbnailsLayouts
{
get
{
return this.EnableUniqueThumbnailsLayoutsCheckBox.Checked;
}
set
{
this.EnableUniqueThumbnailsLayoutsCheckBox.Checked = value;
}
}
public bool SyncThumbnailsSize
{
get
{
return this.SyncThumbnailsSizeCheckBox.Checked;
}
set
{
this.SyncThumbnailsSizeCheckBox.Checked = value;
}
}
public int ThumbnailsWidth
{
get
{
return (int)this.ThumbnailsWidthNumericEdit.Value;
}
set
{
this.ThumbnailsWidthNumericEdit.Value = value;
}
}
public int ThumbnailsHeight
{
get
{
return (int)this.ThumbnailsHeightNumericEdit.Value;
}
set
{
this.ThumbnailsHeightNumericEdit.Value = value;
}
}
public bool EnableZoomOnHover
{
get
{
return this.EnableZoomOnHoverCheckBox.Checked;
}
set
{
this.EnableZoomOnHoverCheckBox.Checked = value;
this.UpdateZoomSettingsView();
}
}
public int ZoomFactor
{
get
{
return (int)this.ZoomFactorNumericEdit.Value;
}
set
{
this.ZoomFactorNumericEdit.Value = value;
}
}
public ZoomAnchor ZoomAnchor
{
get
{
if (this._zoomAnchorMap[this._cachedZoomAnchor].Checked)
{
return this._cachedZoomAnchor;
}
foreach (KeyValuePair<ZoomAnchor, RadioButton> valuePair in this._zoomAnchorMap)
{
if (!valuePair.Value.Checked)
{
continue;
}
this._cachedZoomAnchor = valuePair.Key;
return this._cachedZoomAnchor;
}
// Default value
return ZoomAnchor.NW;
}
set
{
this._cachedZoomAnchor = value;
this._zoomAnchorMap[this._cachedZoomAnchor].Checked = true;
}
}
public bool ShowThumbnailOverlays
{
get
{
return this.ShowThumbnailOverlaysCheckBox.Checked;
}
set
{
this.ShowThumbnailOverlaysCheckBox.Checked = value;
}
}
public bool ShowThumbnailFrames
{
get
{
return this.ShowThumbnailFramesCheckBox.Checked;
}
set
{
this.ShowThumbnailFramesCheckBox.Checked = value;
}
}
public new void Show()
{
// Registers the current instance as the application's Main Form
this._context.MainForm = this;
this._suppressEvents = true;
this.FormActivated?.Invoke();
this._suppressEvents = false;
Application.Run(this._context);
}
public void Minimize()
{
this.WindowState = FormWindowState.Minimized;
}
public void SetForumUrl(string url)
{
this.ForumLinkLabel.Text = url;
}
public void AddThumbnails(IList<IThumbnailDescriptionView> thumbnails)
{
if (thumbnails.Count == 0)
{
return;
}
this.ThumbnailsList.BeginUpdate();
foreach (IThumbnailDescriptionView view in thumbnails)
{
this.ThumbnailsList.Items.Add(view);
}
this.ThumbnailsList.EndUpdate();
}
public void UpdateThumbnails(IList<IThumbnailDescriptionView> thumbnails)
{
// Just trigger redraw
if (thumbnails.Count > 0)
{
this.ThumbnailsList.Invalidate();
}
}
public void RemoveThumbnails(IList<IThumbnailDescriptionView> thumbnails)
{
if (thumbnails.Count == 0)
{
return;
}
this.ThumbnailsList.BeginUpdate();
foreach (IThumbnailDescriptionView view in thumbnails)
{
this.ThumbnailsList.Items.Remove(view);
}
this.ThumbnailsList.EndUpdate();
}
public void UpdateThumbnailsSizeView(Size size)
{
this.ThumbnailsWidth = size.Width;
this.ThumbnailsHeight = size.Height;
}
public void UpdateZoomSettingsView()
{
bool enableControls = this.EnableZoomOnHover;
this.ZoomFactorNumericEdit.Enabled = enableControls;
this.ZoomAnchorPanel.Enabled = enableControls;
}
public event Action ApplicationExitRequested;
public event Action FormActivated;
public event Action FormMinimized;
public event Action<ViewCloseRequest> FormCloseRequested;
public event Action ApplicationSettingsChanged;
public event Action ThumbnailsSizeChanged;
public event Action<IntPtr, Boolean> ThumbnailStateChanged;
public event Action ForumUrlLinkActivated;
#region UI events
private void OptionChanged_Handler(object sender, EventArgs e)
{
if (this._suppressEvents)
{
return;
}
this.ApplicationSettingsChanged?.Invoke();
}
private void ThumbnailSizeChanged_Handler(object sender, EventArgs e)
{
if (this._suppressEvents)
{
return;
}
this.ThumbnailsSizeChanged?.Invoke();
}
private void ThumbnailsList_ItemCheck_Handler(object sender, ItemCheckEventArgs e)
{
IThumbnailDescriptionView selectedItem = this.ThumbnailsList.Items[e.Index] as IThumbnailDescriptionView;
if (selectedItem == null)
{
return;
}
this.ThumbnailStateChanged?.Invoke(selectedItem.Id, e.NewValue == CheckState.Checked);
}
private void ForumLinkLabelClicked_Handler(object sender, LinkLabelLinkClickedEventArgs e)
{
this.ForumUrlLinkActivated?.Invoke();
}
private void MainFormResize_Handler(object sender, EventArgs e)
{
if (this.WindowState != FormWindowState.Minimized)
{
return;
}
this.FormMinimized?.Invoke();
}
private void MainFormClosing_Handler(object sender, FormClosingEventArgs e)
{
ViewCloseRequest request = new ViewCloseRequest();
this.FormCloseRequested?.Invoke(request);
e.Cancel = !request.Allow;
}
private void RestoreMainForm_Handler(object sender, EventArgs e)
{
// This is form's GUI lifecycle event that is invariant to the Form data
base.Show();
this.WindowState = FormWindowState.Normal;
this.BringToFront();
}
private void ExitMenuItemClick_Handler(object sender, EventArgs e)
{
this.ApplicationExitRequested?.Invoke();
}
#endregion
private void InitZoomAnchorMap()
{
this._zoomAnchorMap[ZoomAnchor.NW] = this.ZoomAanchorNWRadioButton;
this._zoomAnchorMap[ZoomAnchor.N] = this.ZoomAanchorNRadioButton;
this._zoomAnchorMap[ZoomAnchor.NE] = this.ZoomAanchorNERadioButton;
this._zoomAnchorMap[ZoomAnchor.W] = this.ZoomAanchorWRadioButton;
this._zoomAnchorMap[ZoomAnchor.C] = this.ZoomAanchorCRadioButton;
this._zoomAnchorMap[ZoomAnchor.E] = this.ZoomAanchorERadioButton;
this._zoomAnchorMap[ZoomAnchor.SW] = this.ZoomAanchorSWRadioButton;
this._zoomAnchorMap[ZoomAnchor.S] = this.ZoomAanchorSRadioButton;
this._zoomAnchorMap[ZoomAnchor.SE] = this.ZoomAanchorSERadioButton;
}
}
}

View File

@@ -117,17 +117,203 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="previewToyMainBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="OpacityLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="OpacityLabel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="RestoreWindowMenuItem.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="ExitMenuItem.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="ContentFlowLayoutPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="ContentFlowLayoutPanel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="MinimizeToTrayCheckBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</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="TrackClientLocationsCheckBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="HideActiveClientThumbnailCheckBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ShowThumbnailsAlwaysOnTopCheckBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="HideAllThumbnailsIfClientIsNotActiveCheckBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="EnableUniqueThumbnailsLayoutsCheckBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="panel1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="SyncThumbnailsSizeCheckBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ThumbnailsWidthNumericEdit.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ThumbnailsHeightNumericEdit.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="panel2.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ZoomFactorLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="ZoomFactorLabel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ZoomAnchorPanel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ZoomAnchorLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="ZoomAnchorLabel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="EnableZoomOnHoverCheckBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ZoomFactorNumericEdit.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="panel5.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ThumbnailsList.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PreviewsListLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="PreviewsListLabel.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="ThumbnailsOpacityScrollBar.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="SyncThumbnailsSizeCheckBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ThumbnailsWidthNumericEdit.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ThumbnailsHeightNumericEdit.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ZoomFactorLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="ZoomFactorLabel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ZoomAnchorPanel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ZoomAanchorNWRadioButton.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ZoomAanchorNRadioButton.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ZoomAanchorNERadioButton.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ZoomAanchorWRadioButton.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ZoomAanchorSERadioButton.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ZoomAanchorCRadioButton.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ZoomAanchorSRadioButton.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ZoomAanchorERadioButton.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ZoomAanchorSWRadioButton.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ZoomAanchorNWRadioButton.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ZoomAanchorNRadioButton.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ZoomAanchorNERadioButton.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ZoomAanchorWRadioButton.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ZoomAanchorSERadioButton.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ZoomAanchorCRadioButton.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ZoomAanchorSRadioButton.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ZoomAanchorERadioButton.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ZoomAanchorSWRadioButton.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ZoomAnchorLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="ZoomAnchorLabel.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="EnableZoomOnHoverCheckBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ZoomFactorNumericEdit.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">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
<metadata name="notifyIcon1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="TrayMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>237, 17</value> <value>123, 17</value>
</metadata>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>350, 17</value>
</metadata> </metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="notifyIcon1.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="NotifyIcon.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
AAABAAUAEBAAAAAAIABoBAAAVgAAABgYAAAAACAAiAkAAL4EAAAgIAAAAAAgAKgQAABGDgAAMDAAAAAA AAABAAUAEBAAAAAAIABoBAAAVgAAABgYAAAAACAAiAkAAL4EAAAgIAAAAAAgAKgQAABGDgAAMDAAAAAA
IACoJQAA7h4AAEBAAAAAACAAKEIAAJZEAAAoAAAAEAAAACAAAAABACAAAAAAAAAIAAAAAAAAAAAAAAAA IACoJQAA7h4AAEBAAAAAACAAKEIAAJZEAAAoAAAAEAAAACAAAAABACAAAAAAAAAIAAAAAAAAAAAAAAAA
@@ -706,6 +892,9 @@
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////////// AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////
</value> </value>
</data> </data>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</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>86</value>
</metadata> </metadata>

View File

@@ -0,0 +1,23 @@
using System;
namespace EveOPreview.UI
{
public class ThumbnailDescriptionView : IThumbnailDescriptionView
{
public IntPtr Id { get; set; }
public string Title { get; set; }
public void Show()
{
}
public void Hide()
{
}
public void Close()
{
}
}
}

View File

@@ -0,0 +1,24 @@
using System;
namespace EveOPreview.UI
{
public class ThumbnailDescriptionViewFactory : IThumbnailDescriptionViewFactory
{
private readonly IApplicationController _controller;
public ThumbnailDescriptionViewFactory(IApplicationController controller)
{
this._controller = controller;
}
public IThumbnailDescriptionView Create(IntPtr id, string title)
{
IThumbnailDescriptionView view = this._controller.Create<IThumbnailDescriptionView>();
view.Id = id;
view.Title = title;
return view;
}
}
}

View File

@@ -0,0 +1,52 @@
using System;
using System.Collections.Generic;
using System.Drawing;
namespace EveOPreview.UI
{
/// <summary>
/// Main view interface
/// Presenter uses it to access GUI properties
/// </summary>
public interface IMainView : IView
{
bool MinimizeToTray { get; set; }
double ThumbnailsOpacity { get; set; }
bool TrackClientLocations { get; set; }
bool HideActiveClientThumbnail { get; set; }
bool ShowThumbnailsAlwaysOnTop { get; set; }
bool HideAllThumbnailsIfClientIsNotActive { get; set; }
bool EnableUniqueThumbnailsLayouts { get; set; }
bool SyncThumbnailsSize { get; set; }
int ThumbnailsWidth { get; set; }
int ThumbnailsHeight { get; set; }
bool EnableZoomOnHover { get; set; }
int ZoomFactor { get; set; }
ZoomAnchor ZoomAnchor { get; set; }
bool ShowThumbnailOverlays { get; set; }
bool ShowThumbnailFrames { get; set; }
void SetForumUrl(string url);
void Minimize();
void AddThumbnails(IList<IThumbnailDescriptionView> thumbnails);
void UpdateThumbnails(IList<IThumbnailDescriptionView> thumbnails);
void RemoveThumbnails(IList<IThumbnailDescriptionView> thumbnails);
void UpdateThumbnailsSizeView(Size size);
void UpdateZoomSettingsView();
event Action ApplicationExitRequested;
event Action FormActivated;
event Action FormMinimized;
event Action<ViewCloseRequest> FormCloseRequested;
event Action ApplicationSettingsChanged;
event Action ThumbnailsSizeChanged;
event Action<IntPtr, Boolean> ThumbnailStateChanged;
event Action ForumUrlLinkActivated;
}
}

View File

@@ -0,0 +1,10 @@
using System;
namespace EveOPreview.UI
{
public interface IThumbnailDescriptionView : IView
{
IntPtr Id { get; set; }
string Title { get; set; }
}
}

View File

@@ -0,0 +1,9 @@
using System;
namespace EveOPreview.UI
{
public interface IThumbnailDescriptionViewFactory
{
IThumbnailDescriptionView Create(IntPtr id, string title);
}
}

View File

@@ -1,4 +1,4 @@
namespace EveOPreview namespace EveOPreview.UI
{ {
public enum ZoomAnchor public enum ZoomAnchor
{ {

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="LightInject" version="4.0.9" targetFramework="net45" />
</packages>