Merge branch 'develop'

This commit is contained in:
Anton Kasyanov
2016-06-15 20:13:04 +03:00
100 changed files with 4235 additions and 3426 deletions

7
.gitignore vendored
View File

@@ -1,3 +1,4 @@
bin/*
obj/*
*.suo
bin/
obj/
*.suo
*.user

View File

@@ -1,3 +0,0 @@
syntax: glob
bin/*
obj/*

View File

@@ -1,11 +1,9 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "preview toy", "preview toy.csproj", "{6CA62DF3-8589-484C-8BC8-F763CA66BBB1}"
Microsoft Visual Studio Solution File, Format Version 14.00
# Visual Studio 2015
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Eve-O-Preview", "Eve-O-Preview\Eve-O-Preview.csproj", "{6CA62DF3-8589-484C-8BC8-F763CA66BBB1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExeFile", "ExeFile\ExeFile.csproj", "{BE2C3A13-CC19-4525-895F-381DD71C5833}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Eve-O-Mock", "Eve-O-Mock\Eve-O-Mock.csproj", "{BE2C3A13-CC19-4525-895F-381DD71C5833}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

View File

@@ -1,8 +1,8 @@
<Application x:Class="ExeFile.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>
<Application x:Class="EveOMock.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>

8
Eve-O-Mock/App.xaml.cs Normal file
View File

@@ -0,0 +1,8 @@
using System.Windows;
namespace EveOMock
{
public partial class App : Application
{
}
}

View File

@@ -1,104 +1,105 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{BE2C3A13-CC19-4525-895F-381DD71C5833}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ExeFile</RootNamespace>
<AssemblyName>ExeFile</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{BE2C3A13-CC19-4525-895F-381DD71C5833}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>EveOMock</RootNamespace>
<AssemblyName>ExeFile</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- 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.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
-->
</Project>

View File

@@ -1,10 +1,10 @@
<Window x:Class="ExeFile.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Mock " Height="480" Width="640">
<Grid x:Name="grid">
<Grid.Background>
<SolidColorBrush Color="{Binding Background.Color, ElementName=grid}"/>
</Grid.Background>
</Grid>
</Window>
<Window x:Class="EveOMock.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Mock " Height="480" Width="640">
<Grid x:Name="grid">
<Grid.Background>
<SolidColorBrush Color="{Binding Background.Color, ElementName=grid}"/>
</Grid.Background>
</Grid>
</Window>

View File

@@ -0,0 +1,17 @@
using System;
using System.Windows;
using System.Windows.Media;
namespace EveOMock
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
Random random = new Random();
this.Title += random.Next().ToString("X");
this.grid.Background = new SolidColorBrush(Color.FromArgb(255, (byte)random.Next(0, 255), (byte)random.Next(0, 255), (byte)random.Next(0, 255)));
}
}
}

View File

@@ -0,0 +1,28 @@
using System;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows;
[assembly: AssemblyTitle("EVE Online mock executable for the EVE-O Preview project")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("EVE-O Mock")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: CLSCompliant(true)]

View File

@@ -1,71 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18444
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ExeFile.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ExeFile.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace EveOMock.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("EveOMock.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

View File

@@ -1,30 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18444
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ExeFile.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace EveOMock.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}

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

@@ -0,0 +1,155 @@
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using Newtonsoft.Json;
namespace EveOPreview.Configuration
{
public class ApplicationConfiguration : IApplicationConfiguration
{
public ApplicationConfiguration()
{
// Default values
this.MinimizeToTray = true;
this.ThumbnailRefreshPeriod = 500;
this.ThumbnailsOpacity = 0.5;
this.EnableClientLayoutTracking = false;
this.HideActiveClientThumbnail = false;
this.ShowThumbnailsAlwaysOnTop = true;
this.HideThumbnailsOnLostFocus = false;
this.EnablePerClientThumbnailLayouts = false;
this.SyncThumbnailsSize = true;
this.ThumbnailSize = new Size(250, 150);
this.ThumbnailMinimumSize = new Size(100, 80);
this.ThumbnailMaximumSize = new Size(640, 400);
this.EnableThumbnailZoom = false;
this.ThumbnailZoomFactor = 2;
this.ThumbnailZoomAnchor = ZoomAnchor.NW;
this.ShowThumbnailOverlays = true;
this.ShowThumbnailFrames = true;
this.PerClientLayout = new Dictionary<string, Dictionary<string, Point>>();
this.FlatLayout = new Dictionary<string, Point>();
this.ClientLayout = new Dictionary<string, ClientLayout>();
this.ClientHotkey = new Dictionary<string, string>();
}
public bool MinimizeToTray { get; set; }
public int ThumbnailRefreshPeriod { get; set; }
public double ThumbnailsOpacity { get; set; }
public bool EnableClientLayoutTracking { get; set; }
public bool HideActiveClientThumbnail { get; set; }
public bool ShowThumbnailsAlwaysOnTop { get; set; }
public bool HideThumbnailsOnLostFocus { get; set; }
public bool EnablePerClientThumbnailLayouts { get; set; }
public bool SyncThumbnailsSize { get; set; }
public Size ThumbnailSize { get; set; }
public Size ThumbnailMaximumSize { get; set; }
public Size ThumbnailMinimumSize { get; set; }
public bool EnableThumbnailZoom { get; set; }
public int ThumbnailZoomFactor { get; set; }
public ZoomAnchor ThumbnailZoomAnchor { get; set; }
public bool ShowThumbnailOverlays { get; set; }
public bool ShowThumbnailFrames { get; set; }
[JsonProperty]
private Dictionary<string, Dictionary<string, Point>> PerClientLayout { get; set; }
[JsonProperty]
private Dictionary<string, Point> FlatLayout { get; set; }
[JsonProperty]
private Dictionary<string, ClientLayout> ClientLayout { get; set; }
[JsonProperty]
private Dictionary<string, string> ClientHotkey { get; set; }
public Point GetThumbnailLocation(string currentClient, string activeClient, Point defaultLocation)
{
Dictionary<string, Point> layoutSource = null;
if (this.EnablePerClientThumbnailLayouts)
{
if (!string.IsNullOrEmpty(activeClient))
{
this.PerClientLayout.TryGetValue(activeClient, out layoutSource);
}
}
else
{
layoutSource = this.FlatLayout;
}
if (layoutSource == null)
{
return defaultLocation;
}
Point location;
return layoutSource.TryGetValue(currentClient, out location) ? location : defaultLocation;
}
public void SetThumbnailLocation(string currentClient, string activeClient, Point location)
{
Dictionary<string, Point> layoutSource;
if (this.EnablePerClientThumbnailLayouts)
{
if (string.IsNullOrEmpty(activeClient))
{
return;
}
if (!this.PerClientLayout.TryGetValue(activeClient, out layoutSource))
{
layoutSource = new Dictionary<string, Point>();
this.PerClientLayout[activeClient] = layoutSource;
}
}
else
{
layoutSource = this.FlatLayout;
}
layoutSource[currentClient] = location;
}
public ClientLayout GetClientLayout(string currentClient)
{
ClientLayout layout;
this.ClientLayout.TryGetValue(currentClient, out layout);
return layout;
}
public void SetClientLayout(string currentClient, ClientLayout layout)
{
this.ClientLayout[currentClient] = layout;
}
public Keys GetClientHotkey(string currentClient)
{
string hotkey;
if (this.ClientHotkey.TryGetValue(currentClient, out hotkey))
{
// Protect from incorrect values
object rawValue = (new KeysConverter()).ConvertFromInvariantString(hotkey);
return rawValue != null ? (Keys)rawValue : Keys.None;
}
return Keys.None;
}
public void SetClientHotkey(string currentClient, Keys hotkey)
{
this.ClientHotkey[currentClient] = (new KeysConverter()).ConvertToInvariantString(hotkey);
}
}
}

View File

@@ -0,0 +1,11 @@
namespace EveOPreview.Configuration
{
public class ClientLayout
{
public int X { get; set; }
public int Y { get; set; }
public int Width { get; set; }
public int Height { get; set; }
}
}

View File

@@ -0,0 +1,36 @@
using System.IO;
using Newtonsoft.Json;
namespace EveOPreview.Configuration
{
public class ConfigurationStorage : IConfigurationStorage
{
private const string ConfigurationFileName = "EVE-O Preview.json";
private readonly IApplicationConfiguration _configuration;
public ConfigurationStorage(IApplicationConfiguration configuration)
{
this._configuration = configuration;
}
public void Load()
{
if (!File.Exists(ConfigurationStorage.ConfigurationFileName))
{
return;
}
string rawData = File.ReadAllText(ConfigurationStorage.ConfigurationFileName);
JsonConvert.PopulateObject(rawData, this._configuration);
}
public void Save()
{
string rawData = JsonConvert.SerializeObject(this._configuration, Formatting.Indented);
File.WriteAllText(ConfigurationStorage.ConfigurationFileName, rawData);
}
}
}

View File

@@ -0,0 +1,40 @@
using System.Drawing;
using System.Windows.Forms;
namespace EveOPreview.Configuration
{
public interface IApplicationConfiguration
{
bool MinimizeToTray { get; set; }
int ThumbnailRefreshPeriod { get; set; }
double ThumbnailsOpacity { get; set; }
bool EnableClientLayoutTracking { get; set; }
bool HideActiveClientThumbnail { get; set; }
bool ShowThumbnailsAlwaysOnTop { get; set; }
bool HideThumbnailsOnLostFocus { get; set; }
bool EnablePerClientThumbnailLayouts { get; set; }
bool SyncThumbnailsSize { get; set; }
Size ThumbnailSize { get; set; }
Size ThumbnailMinimumSize { get; set; }
Size ThumbnailMaximumSize { get; set; }
bool EnableThumbnailZoom { get; set; }
int ThumbnailZoomFactor { get; set; }
ZoomAnchor ThumbnailZoomAnchor { get; set; }
bool ShowThumbnailOverlays { get; set; }
bool ShowThumbnailFrames { get; set; }
Point GetThumbnailLocation(string currentClient, string activeClient, Point defaultLocation);
void SetThumbnailLocation(string currentClient, string activeClient, Point location);
ClientLayout GetClientLayout(string currentClient);
void SetClientLayout(string currentClient, ClientLayout layout);
Keys GetClientHotkey(string currentClient);
void SetClientHotkey(string currentClient, Keys hotkey);
}
}

View File

@@ -0,0 +1,8 @@
namespace EveOPreview.Configuration
{
public interface IConfigurationStorage
{
void Load();
void Save();
}
}

View File

@@ -0,0 +1,15 @@
namespace EveOPreview.Configuration
{
public enum ZoomAnchor
{
NW,
N,
NE,
W,
C,
E,
SW,
S,
SE
}
}

View File

@@ -0,0 +1,20 @@
using System;
using System.Runtime.InteropServices;
namespace EveOPreview
{
[StructLayout(LayoutKind.Sequential)]
class DWM_BLURBEHIND
{
public uint dwFlags;
[MarshalAs(UnmanagedType.Bool)]
public bool fEnable;
public IntPtr hRegionBlur;
[MarshalAs(UnmanagedType.Bool)]
public bool fTransitionOnMaximized;
public const uint DWM_BB_ENABLE = 0x00000001;
public const uint DWM_BB_BLURREGION = 0x00000002;
public const uint DWM_BB_TRANSITIONONMAXIMIZED = 0x00000004;
}
}

View File

@@ -0,0 +1,17 @@
using System.Runtime.InteropServices;
namespace EveOPreview
{
[StructLayout(LayoutKind.Sequential)]
class DWM_THUMBNAIL_PROPERTIES
{
public uint dwFlags;
public RECT rcDestination;
public RECT rcSource;
public byte opacity;
[MarshalAs(UnmanagedType.Bool)]
public bool fVisible;
[MarshalAs(UnmanagedType.Bool)]
public bool fSourceClientAreaOnly;
}
}

View File

@@ -0,0 +1,11 @@
namespace EveOPreview
{
static class DWM_TNP_CONSTANTS
{
public const uint DWM_TNP_RECTDESTINATION = 0x00000001;
public const uint DWM_TNP_RECTSOURCE = 0x00000002;
public const uint DWM_TNP_OPACITY = 0x00000004;
public const uint DWM_TNP_VISIBLE = 0x00000008;
public const uint DWM_TNP_SOURCECLIENTAREAONLY = 0x00000010;
}
}

View File

@@ -1,14 +1,12 @@
using System;
using System.Runtime.InteropServices;
using System.Drawing;
using System.Text;
namespace PreviewToy
namespace EveOPreview
{
// Desktop Windows Manager APIs
internal class DwmApi
static class DwmApiNativeMethods
{
[DllImport("user32.dll")]
public static extern IntPtr GetForegroundWindow();
@@ -43,65 +41,8 @@ namespace PreviewToy
[DllImport("dwmapi.dll", PreserveSig = false)]
public static extern void DwmQueryThumbnailSourceSize(IntPtr hThumbnail, out Size size);
[StructLayout(LayoutKind.Sequential)]
public class DWM_THUMBNAIL_PROPERTIES
{
public uint dwFlags;
public RECT rcDestination;
public RECT rcSource;
public byte opacity;
[MarshalAs(UnmanagedType.Bool)]
public bool fVisible;
[MarshalAs(UnmanagedType.Bool)]
public bool fSourceClientAreaOnly;
public const uint DWM_TNP_RECTDESTINATION = 0x00000001;
public const uint DWM_TNP_RECTSOURCE = 0x00000002;
public const uint DWM_TNP_OPACITY = 0x00000004;
public const uint DWM_TNP_VISIBLE = 0x00000008;
public const uint DWM_TNP_SOURCECLIENTAREAONLY = 0x00000010;
}
[StructLayout(LayoutKind.Sequential)]
public class MARGINS
{
public int cxLeftWidth, cxRightWidth, cyTopHeight, cyBottomHeight;
public MARGINS(int left, int top, int right, int bottom)
{
cxLeftWidth = left; cyTopHeight = top;
cxRightWidth = right; cyBottomHeight = bottom;
}
}
[StructLayout(LayoutKind.Sequential)]
public class DWM_BLURBEHIND
{
public uint dwFlags;
[MarshalAs(UnmanagedType.Bool)]
public bool fEnable;
public IntPtr hRegionBlur;
[MarshalAs(UnmanagedType.Bool)]
public bool fTransitionOnMaximized;
public const uint DWM_BB_ENABLE = 0x00000001;
public const uint DWM_BB_BLURREGION = 0x00000002;
public const uint DWM_BB_TRANSITIONONMAXIMIZED = 0x00000004;
}
[StructLayout(LayoutKind.Sequential)]
public struct RECT
{
public int left, top, right, bottom;
public RECT(int left, int top, int right, int bottom)
{
this.left = left; this.top = top; this.right = right; this.bottom = bottom;
}
}
public const int SW_SHOWNORMAL = 1;
public const int SW_SHOWNORMAL = 1;
public const int SW_SHOWMINIMIZED = 2;
public const int SW_SHOWMAXIMIZED = 3;
@@ -110,8 +51,10 @@ namespace PreviewToy
public const int WM_NCLBUTTONDOWN = 0xA1;
public const int HTCAPTION = 0x2;
[DllImport("User32.dll")]
public static extern bool ReleaseCapture();
[DllImport("User32.dll")]
public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);
@@ -175,5 +118,17 @@ namespace PreviewToy
public const UInt32 WS_EX_COMPOSITED = 0x02000000;
public const UInt32 WS_EX_NOACTIVATE = 0x08000000;
}
public const int WM_SIZE = 5;
public const int SIZE_RESTORED = 0;
public const int SIZE_MINIMIZED = 1;
public const int SIZE_MAXIMIZED = 2;
public const int SIZE_MAXSHOW = 3;
public const int SIZE_MAXHIDE = 4;
[DllImport("user32.dll")]
public static extern int GetWindowRect(IntPtr hwnd, out RECT rect);
[DllImport("user32.dll")]
public static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);
}
}

View File

@@ -0,0 +1,21 @@
using System.Runtime.InteropServices;
namespace EveOPreview
{
[StructLayout(LayoutKind.Sequential)]
class MARGINS
{
public int cxLeftWidth;
public int cxRightWidth;
public int cyTopHeight;
public int cyBottomHeight;
public MARGINS(int left, int top, int right, int bottom)
{
cxLeftWidth = left;
cyTopHeight = top;
cxRightWidth = right;
cyBottomHeight = bottom;
}
}
}

View File

@@ -0,0 +1,21 @@
using System.Runtime.InteropServices;
namespace EveOPreview
{
[StructLayout(LayoutKind.Sequential)]
struct RECT
{
public int Left;
public int Top;
public int Right;
public int Bottom;
public RECT(int left, int top, int right, int bottom)
{
this.Left = left;
this.Top = top;
this.Right = right;
this.Bottom = bottom;
}
}
}

View File

@@ -0,0 +1,198 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{6CA62DF3-8589-484C-8BC8-F763CA66BBB1}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>EveOPreview</RootNamespace>
<AssemblyName>Eve-O Preview</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<UseVSHostingProcess>false</UseVSHostingProcess>
<RunCodeAnalysis>false</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>icon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<StartupObject>EveOPreview.Program</StartupObject>
</PropertyGroup>
<PropertyGroup>
<ManifestCertificateThumbprint>4B29FD125BFAD24FF900FC81CCE0B0AD37464FDB</ManifestCertificateThumbprint>
</PropertyGroup>
<PropertyGroup>
<ManifestKeyFile>preview toy_TemporaryKey.pfx</ManifestKeyFile>
</PropertyGroup>
<PropertyGroup>
<GenerateManifests>false</GenerateManifests>
</PropertyGroup>
<PropertyGroup>
<SignManifests>false</SignManifests>
</PropertyGroup>
<PropertyGroup />
<PropertyGroup>
<TargetZone>LocalIntranet</TargetZone>
</PropertyGroup>
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<PropertyGroup>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>
</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup />
<ItemGroup>
<Reference Include="LightInject, Version=4.0.9.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\LightInject.4.0.9\lib\net45\LightInject.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.XML" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Xml.Serialization" />
<Reference Include="WindowsBase" />
</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="Configuration\ConfigurationStorage.cs" />
<Compile Include="Configuration\IApplicationConfiguration.cs" />
<Compile Include="Configuration\ZoomAnchor.cs" />
<Compile Include="DwmAPI\DWM_BLURBEHIND.cs" />
<Compile Include="DwmAPI\DWM_THUMBNAIL_PROPERTIES.cs" />
<Compile Include="DwmAPI\DWM_TNP_CONSTANTS.cs" />
<Compile Include="DwmAPI\MARGINS.cs" />
<Compile Include="DwmAPI\RECT.cs" />
<Compile Include="Configuration\ClientLayout.cs" />
<Compile Include="ApplicationBase\IPresenter.cs" />
<Compile Include="Presentation\MainPresenter.cs" />
<Compile Include="Presentation\ViewCloseRequest.cs" />
<Compile Include="Presentation\ViewZoomAnchorConverter.cs" />
<Compile Include="UI\Interface\IThumbnailViewFactory.cs" />
<Compile Include="Presentation\IThumbnailManager.cs" />
<Compile Include="UI\Implementation\ThumbnailDescriptionView.cs" />
<Compile Include="UI\Factory\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\ViewZoomAnchor.cs" />
<Compile Include="Configuration\ApplicationConfiguration.cs" />
<Compile Include="Hotkeys\HotkeyHandler.cs" />
<Compile Include="Hotkeys\HotkeyHandlerNativeMethods.cs" />
<Compile Include="UI\Implementation\MainForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UI\Implementation\MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="Configuration\IConfigurationStorage.cs" />
<Compile Include="UI\Interface\IThumbnailView.cs" />
<Compile Include="UI\Factory\ThumbnailViewFactory.cs" />
<Compile Include="Presentation\ThumbnailManager.cs" />
<Compile Include="UI\Implementation\ThumbnailOverlay.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UI\Implementation\ThumbnailOverlay.Designer.cs">
<DependentUpon>ThumbnailOverlay.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="UI\Implementation\MainForm.resx">
<SubType>Designer</SubType>
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UI\Implementation\ThumbnailOverlay.resx">
<DependentUpon>ThumbnailOverlay.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="UI\Implementation\ThumbnailView.resx">
<SubType>Designer</SubType>
<DependentUpon>ThumbnailView.cs</DependentUpon>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config">
<SubType>Designer</SubType>
</None>
<None Include="packages.config" />
<Compile Include="UI\Implementation\ThumbnailView.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UI\Implementation\ThumbnailView.Designer.cs">
<DependentUpon>ThumbnailView.cs</DependentUpon>
</Compile>
<Compile Include="DwmAPI\DwmApiNativeMethods.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\icon.png" />
</ItemGroup>
<ItemGroup>
<Content Include="FodyWeavers.xml" />
<Content Include="icon.ico" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Fody.1.29.4\build\dotnet\Fody.targets" Condition="Exists('..\packages\Fody.1.29.4\build\dotnet\Fody.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Fody.1.29.4\build\dotnet\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.1.29.4\build\dotnet\Fody.targets'))" />
</Target>
<!-- 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.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -0,0 +1,15 @@
<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/=configuration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=configuration_005Cimplementation/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=configuration_005Cinterface/@EntryIndexedValue">True</s:Boolean>
<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

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Weavers>
<Costura IncludeDebugSymbols="false" />
</Weavers>

View File

@@ -0,0 +1,159 @@
using System;
using System.Windows.Forms;
using System.ComponentModel;
namespace EveOPreview.UI
{
class HotkeyHandler : IMessageFilter, IDisposable
{
private static int _currentId;
private const int MaxId = 0xBFFF;
#region Private fields
private readonly int _hotkeyId;
private readonly IntPtr _hotkeyTarget;
#endregion
public HotkeyHandler(IntPtr target, Keys hotkey)
{
this._hotkeyId = HotkeyHandler._currentId;
HotkeyHandler._currentId = (HotkeyHandler._currentId + 1) & HotkeyHandler.MaxId;
this._hotkeyTarget = target;
// Assign properties
this.IsRegistered = false;
this.KeyCode = hotkey;
}
public void Dispose()
{
if (this.IsRegistered)
{
this.Unregister();
}
GC.SuppressFinalize(this);
}
~HotkeyHandler()
{
// Unregister the hotkey if necessary
if (this.IsRegistered)
{
try
{
this.Unregister();
}
catch (Exception)
{
// Please no exceptions in the finalizer thread
}
}
}
public bool IsRegistered { get; private set; }
public Keys KeyCode { get; private set; }
public event HandledEventHandler Pressed;
public bool CanRegister()
{
// Any exception means "no, you can't register"
try
{
// Attempt to register
if (this.Register())
{
// Unregister and say we managed it
this.Unregister();
return true;
}
}
catch (Win32Exception)
{
}
catch (NotSupportedException)
{
}
return false;
}
public bool Register()
{
// Check that we have not registered
if (this.IsRegistered)
{
throw new NotSupportedException("This hotkey is already registered");
}
if (this.KeyCode == Keys.None)
{
throw new NotSupportedException("Cannot register an empty hotkey");
}
// Remove all modifiers from the 'main' hotkey
uint key = (uint)this.KeyCode & (~(uint)Keys.Alt) & (~(uint)Keys.Control) & (~(uint)Keys.Shift);
// Get unmanaged version of the modifiers code
uint modifiers = (this.KeyCode.HasFlag(Keys.Alt) ? HotkeyHandlerNativeMethods.MOD_ALT : 0)
| (this.KeyCode.HasFlag(Keys.Control) ? HotkeyHandlerNativeMethods.MOD_CONTROL : 0)
| (this.KeyCode.HasFlag(Keys.Shift) ? HotkeyHandlerNativeMethods.MOD_SHIFT : 0);
// Register the hotkey
if (!HotkeyHandlerNativeMethods.RegisterHotKey(this._hotkeyTarget, this._hotkeyId, modifiers, key))
{
return false;
}
Application.AddMessageFilter(this);
this.IsRegistered = true;
// We successfully registered
return true;
}
public void Unregister()
{
// Check that we have registered
if (!this.IsRegistered)
{
throw new NotSupportedException("This hotkey was not registered");
}
Application.RemoveMessageFilter(this);
// Clean up after ourselves
if (!HotkeyHandlerNativeMethods.UnregisterHotKey(this._hotkeyTarget, this._hotkeyId))
{
throw new Win32Exception();
}
this.IsRegistered = false;
}
#region IMessageFilter
public bool PreFilterMessage(ref Message message)
{
return this.IsRegistered
&& (message.Msg == HotkeyHandlerNativeMethods.WM_HOTKEY)
&& (message.WParam.ToInt32() == this._hotkeyId)
&& this.OnPressed();
}
#endregion
private bool OnPressed()
{
// Fire the event if we can
HandledEventArgs handledEventArgs = new HandledEventArgs(false);
this.Pressed?.Invoke(this, handledEventArgs);
// Return whether we handled the event or not
return handledEventArgs.Handled;
}
}
}

View File

@@ -0,0 +1,23 @@
using System;
using System.Runtime.InteropServices;
namespace EveOPreview.UI
{
static class HotkeyHandlerNativeMethods
{
[DllImport("user32.dll")]
public static extern bool RegisterHotKey(IntPtr hWnd, int id, uint fsModifiers, uint vk);
[DllImport("user32.dll")]
public static extern bool UnregisterHotKey(IntPtr hWnd, int id);
public const uint WM_HOTKEY = 0x0312;
public const uint MOD_ALT = 0x1;
public const uint MOD_CONTROL = 0x2;
public const uint MOD_SHIFT = 0x4;
public const uint MOD_WIN = 0x8;
public const uint ERROR_HOTKEY_ALREADY_REGISTERED = 1409;
}
}

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Drawing;
namespace EveOPreview.UI
{
public interface IThumbnailManager
{
void Activate();
void Deactivate();
void SetThumbnailState(IntPtr thumbnailId, bool hideAlways);
void SetThumbnailsSize(Size size);
void RefreshThumbnails();
void SetupThumbnailFrames();
Action<IList<IThumbnailView>> ThumbnailsAdded { get; set; }
Action<IList<IThumbnailView>> ThumbnailsUpdated { get; set; }
Action<IList<IThumbnailView>> ThumbnailsRemoved { get; set; }
Action<Size> ThumbnailSizeChanged { get; set; }
}
}

View File

@@ -0,0 +1,231 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using EveOPreview.Configuration;
namespace EveOPreview.UI
{
public class MainPresenter : Presenter<IMainView>
{
#region Private constants
private const string ForumUrl = @"https://forums.eveonline.com/default.aspx?g=posts&t=389086";
#endregion
#region Private fields
private readonly IApplicationConfiguration _configuration;
private readonly IConfigurationStorage _configurationStorage;
private readonly IThumbnailDescriptionViewFactory _thumbnailDescriptionViewFactory;
private readonly IDictionary<IntPtr, IThumbnailDescriptionView> _thumbnailDescriptionViews;
private readonly IThumbnailManager _thumbnailManager;
private bool _exitApplication;
#endregion
public MainPresenter(IApplicationController controller, IMainView view, IApplicationConfiguration configuration, IConfigurationStorage configurationStorage,
IThumbnailManager thumbnailManager, IThumbnailDescriptionViewFactory thumbnailDescriptionViewFactory)
: base(controller, view)
{
this._configuration = configuration;
this._configurationStorage = configurationStorage;
this._thumbnailDescriptionViewFactory = thumbnailDescriptionViewFactory;
this._thumbnailManager = thumbnailManager;
this._thumbnailDescriptionViews = new Dictionary<IntPtr, IThumbnailDescriptionView>();
this._exitApplication = false;
this.View.FormActivated = this.Activate;
this.View.FormMinimized = this.Minimize;
this.View.FormCloseRequested = this.Close;
this.View.ApplicationSettingsChanged = this.SaveApplicationSettings;
this.View.ThumbnailsSizeChanged = this.UpdateThumbnailsSize;
this.View.ThumbnailStateChanged = this.UpdateThumbnailState;
this.View.ForumUrlLinkActivated = this.OpenForumUrlLink;
this.View.ApplicationExitRequested = this.ExitApplication;
this._thumbnailManager.ThumbnailsAdded = this.ThumbnailsAdded;
this._thumbnailManager.ThumbnailsUpdated = this.ThumbnailsUpdated;
this._thumbnailManager.ThumbnailsRemoved = this.ThumbnailsRemoved;
this._thumbnailManager.ThumbnailSizeChanged = this.ThumbnailSizeChanged;
}
private void Activate()
{
this.LoadApplicationSettings();
this.View.SetForumUrl(MainPresenter.ForumUrl);
if (this._configuration.MinimizeToTray)
{
this.View.Minimize();
}
this._thumbnailManager.Activate();
}
private void Minimize()
{
if (!this._configuration.MinimizeToTray)
{
return;
}
this.View.Hide();
}
private void Close(ViewCloseRequest request)
{
if (this._exitApplication || !this.View.MinimizeToTray)
{
this._thumbnailManager.Deactivate();
this._configurationStorage.Save();
request.Allow = true;
return;
}
request.Allow = false;
this.View.Minimize();
}
private void UpdateThumbnailsSize()
{
this._thumbnailManager.SetThumbnailsSize(this.View.ThumbnailSize);
this.SaveApplicationSettings();
}
private void LoadApplicationSettings()
{
this._configurationStorage.Load();
this.View.MinimizeToTray = this._configuration.MinimizeToTray;
this.View.ThumbnailsOpacity = this._configuration.ThumbnailsOpacity;
this.View.EnableClientLayoutTracking = this._configuration.EnableClientLayoutTracking;
this.View.HideActiveClientThumbnail = this._configuration.HideActiveClientThumbnail;
this.View.ShowThumbnailsAlwaysOnTop = this._configuration.ShowThumbnailsAlwaysOnTop;
this.View.HideThumbnailsOnLostFocus = this._configuration.HideThumbnailsOnLostFocus;
this.View.EnablePerClientThumbnailsLayouts = this._configuration.EnablePerClientThumbnailLayouts;
this.View.SyncThumbnailsSize = this._configuration.SyncThumbnailsSize;
this.View.ThumbnailSize = this._configuration.ThumbnailSize;
this.View.EnableThumbnailZoom = this._configuration.EnableThumbnailZoom;
this.View.ThumbnailZoomFactor = this._configuration.ThumbnailZoomFactor;
this.View.ThumbnailZoomAnchor = ViewZoomAnchorConverter.Convert(this._configuration.ThumbnailZoomAnchor);
this.View.ShowThumbnailOverlays = this._configuration.ShowThumbnailOverlays;
this.View.ShowThumbnailFrames = this._configuration.ShowThumbnailFrames;
this.View.SetThumbnailSizeLimitations(this._configuration.ThumbnailMinimumSize, this._configuration.ThumbnailMaximumSize);
}
private void SaveApplicationSettings()
{
this._configuration.MinimizeToTray = this.View.MinimizeToTray;
this._configuration.ThumbnailsOpacity = (float)this.View.ThumbnailsOpacity;
this._configuration.EnableClientLayoutTracking = this.View.EnableClientLayoutTracking;
this._configuration.HideActiveClientThumbnail = this.View.HideActiveClientThumbnail;
this._configuration.ShowThumbnailsAlwaysOnTop = this.View.ShowThumbnailsAlwaysOnTop;
this._configuration.HideThumbnailsOnLostFocus = this.View.HideThumbnailsOnLostFocus;
this._configuration.EnablePerClientThumbnailLayouts = this.View.EnablePerClientThumbnailsLayouts;
this._configuration.SyncThumbnailsSize = this.View.SyncThumbnailsSize;
this._configuration.ThumbnailSize = this.View.ThumbnailSize;
this._configuration.EnableThumbnailZoom = this.View.EnableThumbnailZoom;
this._configuration.ThumbnailZoomFactor = this.View.ThumbnailZoomFactor;
this._configuration.ThumbnailZoomAnchor = ViewZoomAnchorConverter.Convert(this.View.ThumbnailZoomAnchor);
this._configuration.ShowThumbnailOverlays = this.View.ShowThumbnailOverlays;
this._configuration.ShowThumbnailFrames = this.View.ShowThumbnailFrames;
this._configurationStorage.Save();
this.View.RefreshZoomSettings();
this._thumbnailManager.SetupThumbnailFrames();
this._thumbnailManager.RefreshThumbnails();
}
private void ThumbnailsAdded(IList<IThumbnailView> thumbnails)
{
this.View.AddThumbnails(this.GetThumbnailViews(thumbnails, false));
}
private void ThumbnailsUpdated(IList<IThumbnailView> thumbnails)
{
this.View.UpdateThumbnails(this.GetThumbnailViews(thumbnails, false));
}
private void ThumbnailsRemoved(IList<IThumbnailView> thumbnails)
{
this.View.RemoveThumbnails(this.GetThumbnailViews(thumbnails, true));
}
private IList<IThumbnailDescriptionView> GetThumbnailViews(IList<IThumbnailView> thumbnails, bool removeFromCache)
{
IList<IThumbnailDescriptionView> thumbnailViews = new List<IThumbnailDescriptionView>(thumbnails.Count);
// Time for some thread safety
lock (this._thumbnailDescriptionViews)
{
foreach (IThumbnailView thumbnail in thumbnails)
{
IThumbnailDescriptionView thumbnailView;
bool foundInCache = this._thumbnailDescriptionViews.TryGetValue(thumbnail.Id, out thumbnailView);
if (!foundInCache)
{
if (removeFromCache)
{
// This item was not even cached
continue;
}
thumbnailView = this._thumbnailDescriptionViewFactory.Create(thumbnail.Id, thumbnail.Title, !thumbnail.IsEnabled);
this._thumbnailDescriptionViews.Add(thumbnail.Id, thumbnailView);
}
else
{
if (removeFromCache)
{
this._thumbnailDescriptionViews.Remove(thumbnail.Id);
}
else
{
thumbnailView.Title = thumbnail.Title;
}
}
thumbnailViews.Add(thumbnailView);
}
}
return thumbnailViews;
}
private void ThumbnailSizeChanged(Size size)
{
this.View.ThumbnailSize = size;
}
private void UpdateThumbnailState(IntPtr thumbnailId)
{
this._thumbnailManager.SetThumbnailState(thumbnailId, this._thumbnailDescriptionViews[thumbnailId].IsDisabled);
}
private void OpenForumUrlLink()
{
ProcessStartInfo processStartInfo = new ProcessStartInfo(new Uri(MainPresenter.ForumUrl).AbsoluteUri);
Process.Start(processStartInfo);
}
private void ExitApplication()
{
this._exitApplication = true;
this.View.Close();
}
}
}

View File

@@ -0,0 +1,451 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Windows.Threading;
using EveOPreview.Configuration;
namespace EveOPreview.UI
{
public class ThumbnailManager : IThumbnailManager
{
#region Private constants
private const string ClientProcessName = "ExeFile";
#endregion
#region Private fields
private readonly IApplicationConfiguration _configuration;
private readonly IConfigurationStorage _configurationStorage;
private readonly DispatcherTimer _thumbnailUpdateTimer;
private readonly IThumbnailViewFactory _thumbnailViewFactory;
private readonly Dictionary<IntPtr, IThumbnailView> _thumbnailViews;
private IntPtr _activeClientHandle;
private string _activeClientTitle;
private bool _ignoreViewEvents;
private bool _isHoverEffectActive;
#endregion
public ThumbnailManager(IApplicationConfiguration configuration, IConfigurationStorage configurationStorage, IThumbnailViewFactory factory)
{
this._configuration = configuration;
this._configurationStorage = configurationStorage;
this._thumbnailViewFactory = factory;
this._activeClientHandle = (IntPtr)0;
this._activeClientTitle = "EVE";
this.EnableViewEvents();
this._isHoverEffectActive = false;
this._thumbnailViews = new Dictionary<IntPtr, IThumbnailView>();
// DispatcherTimer setup
this._thumbnailUpdateTimer = new DispatcherTimer();
this._thumbnailUpdateTimer.Tick += ThumbnailUpdateTimerTick;
this._thumbnailUpdateTimer.Interval = new TimeSpan(0, 0, 0, 0, configuration.ThumbnailRefreshPeriod);
}
public Action<IList<IThumbnailView>> ThumbnailsAdded { get; set; }
public Action<IList<IThumbnailView>> ThumbnailsUpdated { get; set; }
public Action<IList<IThumbnailView>> ThumbnailsRemoved { get; set; }
public Action<Size> ThumbnailSizeChanged { get; set; }
public void Activate()
{
this._thumbnailUpdateTimer.Start();
this.RefreshThumbnails();
}
public void Deactivate()
{
this._thumbnailUpdateTimer.Stop();
}
public void SetThumbnailState(IntPtr thumbnailId, bool hideAlways)
{
IThumbnailView thumbnail;
if (!this._thumbnailViews.TryGetValue(thumbnailId, out thumbnail))
{
return;
}
thumbnail.IsEnabled = !hideAlways;
}
public void SetThumbnailsSize(Size size)
{
this.DisableViewEvents();
foreach (KeyValuePair<IntPtr, IThumbnailView> entry in this._thumbnailViews)
{
entry.Value.Size = size;
entry.Value.Refresh(false);
}
this.ThumbnailSizeChanged?.Invoke(size);
this.EnableViewEvents();
}
public void RefreshThumbnails()
{
IntPtr foregroundWindowHandle = DwmApiNativeMethods.GetForegroundWindow();
Boolean hideAllThumbnails = (this._configuration.HideThumbnailsOnLostFocus && this.IsNonClientWindowActive(foregroundWindowHandle)) || !DwmApiNativeMethods.DwmIsCompositionEnabled();
this.DisableViewEvents();
// Hide, show, resize and move
foreach (KeyValuePair<IntPtr, IThumbnailView> entry in this._thumbnailViews)
{
IThumbnailView view = entry.Value;
if (hideAllThumbnails || !view.IsEnabled)
{
if (view.IsActive)
{
view.Hide();
}
continue;
}
if (this._configuration.HideActiveClientThumbnail && (view.Id == this._activeClientHandle))
{
if (view.IsActive)
{
view.Hide();
}
continue;
}
if (!this._isHoverEffectActive)
{
// No need to move Thumbnails while one of them is highlighted
view.Location = this._configuration.GetThumbnailLocation(view.Title, this._activeClientTitle, view.Location);
view.SetOpacity(this._configuration.ThumbnailsOpacity);
view.SetTopMost(this._configuration.ShowThumbnailsAlwaysOnTop);
}
view.IsOverlayEnabled = this._configuration.ShowThumbnailOverlays;
if (!view.IsActive)
{
view.Show();
}
else
{
view.Refresh(false);
}
}
this.EnableViewEvents();
}
public void SetupThumbnailFrames()
{
this.DisableViewEvents();
foreach (KeyValuePair<IntPtr, IThumbnailView> entry in this._thumbnailViews)
{
entry.Value.SetWindowFrames(this._configuration.ShowThumbnailFrames);
}
this.EnableViewEvents();
}
private void ThumbnailUpdateTimerTick(object sender, EventArgs e)
{
this.UpdateThumbnailsList();
this.RefreshThumbnails();
}
private void EnableViewEvents()
{
this._ignoreViewEvents = false;
}
private void DisableViewEvents()
{
this._ignoreViewEvents = true;
}
private static Process[] GetClientProcesses()
{
return Process.GetProcessesByName(ThumbnailManager.ClientProcessName);
}
private void UpdateThumbnailsList()
{
Process[] clientProcesses = ThumbnailManager.GetClientProcesses();
List<IntPtr> processHandles = new List<IntPtr>(clientProcesses.Length);
IntPtr foregroundWindowHandle = DwmApiNativeMethods.GetForegroundWindow();
List<IThumbnailView> viewsAdded = new List<IThumbnailView>();
List<IThumbnailView> viewsUpdated = new List<IThumbnailView>();
List<IThumbnailView> viewsRemoved = new List<IThumbnailView>();
foreach (Process process in clientProcesses)
{
IntPtr processHandle = process.MainWindowHandle;
string processTitle = process.MainWindowTitle;
processHandles.Add(processHandle);
IThumbnailView view;
this._thumbnailViews.TryGetValue(processHandle, out view);
if ((view == null) && (processTitle != ""))
{
view = this._thumbnailViewFactory.Create(processHandle, processTitle, this._configuration.ThumbnailSize);
view.IsEnabled = true;
view.IsOverlayEnabled = this._configuration.ShowThumbnailOverlays;
view.SetSizeLimitations(this._configuration.ThumbnailMinimumSize, this._configuration.ThumbnailMaximumSize);
view.SetTopMost(this._configuration.ShowThumbnailsAlwaysOnTop);
view.SetWindowFrames(this._configuration.ShowThumbnailFrames);
view.Location = this._configuration.GetThumbnailLocation(processTitle, this._activeClientTitle, view.Location);
view.ThumbnailResized = this.ThumbnailViewResized;
view.ThumbnailMoved = this.ThumbnailViewMoved;
view.ThumbnailFocused = this.ThumbnailViewFocused;
view.ThumbnailLostFocus = this.ThumbnailViewLostFocus;
view.ThumbnailActivated = this.ThumbnailActivated;
view.RegisterHotkey(this._configuration.GetClientHotkey(processTitle));
this._thumbnailViews.Add(processHandle, view);
this.ApplyClientLayout(processHandle, processTitle);
viewsAdded.Add(view);
}
else if ((view != null) && (processTitle != view.Title)) // update thumbnail title
{
view.Title = processTitle;
view.RegisterHotkey(this._configuration.GetClientHotkey(processTitle));
this.ApplyClientLayout(processHandle, processTitle);
viewsUpdated.Add(view);
}
if (process.MainWindowHandle == foregroundWindowHandle)
{
this._activeClientHandle = process.MainWindowHandle;
this._activeClientTitle = process.MainWindowTitle;
}
}
// Cleanup
IList<IntPtr> obsoleteThumbnails = new List<IntPtr>();
foreach (IntPtr processHandle in this._thumbnailViews.Keys)
{
if (!processHandles.Contains(processHandle))
{
obsoleteThumbnails.Add(processHandle);
}
}
foreach (IntPtr processHandle in obsoleteThumbnails)
{
IThumbnailView view = this._thumbnailViews[processHandle];
this._thumbnailViews.Remove(processHandle);
view.UnregisterHotkey();
view.ThumbnailResized = null;
view.ThumbnailMoved = null;
view.ThumbnailFocused = null;
view.ThumbnailLostFocus = null;
view.ThumbnailActivated = null;
view.Close();
viewsRemoved.Add(view);
}
this.ThumbnailsAdded?.Invoke(viewsAdded);
this.ThumbnailsUpdated?.Invoke(viewsUpdated);
this.ThumbnailsRemoved?.Invoke(viewsRemoved);
}
private void ThumbnailViewFocused(IntPtr id)
{
if (this._isHoverEffectActive)
{
return;
}
this._isHoverEffectActive = true;
IThumbnailView view = this._thumbnailViews[id];
view.SetTopMost(true);
view.SetOpacity(1.0);
if (this._configuration.EnableThumbnailZoom)
{
this.ThumbnailZoomIn(view);
}
}
private void ThumbnailViewLostFocus(IntPtr id)
{
if (!this._isHoverEffectActive)
{
return;
}
IThumbnailView view = this._thumbnailViews[id];
if (this._configuration.EnableThumbnailZoom)
{
this.ThumbnailZoomOut(view);
}
view.SetOpacity(this._configuration.ThumbnailsOpacity);
this._isHoverEffectActive = false;
}
private void ThumbnailActivated(IntPtr id)
{
DwmApiNativeMethods.SetForegroundWindow(id);
int style = DwmApiNativeMethods.GetWindowLong(id, DwmApiNativeMethods.GWL_STYLE);
// If the window was minimized then its thumbnail should be reset
if ((style & DwmApiNativeMethods.WS_MINIMIZE) == DwmApiNativeMethods.WS_MINIMIZE)
{
DwmApiNativeMethods.ShowWindowAsync(id, DwmApiNativeMethods.SW_SHOWNORMAL);
IThumbnailView view;
if (this._thumbnailViews.TryGetValue(id, out view))
{
view.Refresh(true);
}
}
if (this._configuration.EnableClientLayoutTracking)
{
this.UpdateClientLayouts();
}
this.RefreshThumbnails();
this._configurationStorage.Save();
}
private void ThumbnailViewResized(IntPtr id)
{
if (this._ignoreViewEvents)
{
return;
}
IThumbnailView view = this._thumbnailViews[id];
this.SetThumbnailsSize(view.Size);
view.Refresh(false);
}
private void ThumbnailViewMoved(IntPtr id)
{
if (this._ignoreViewEvents)
{
return;
}
IThumbnailView view = this._thumbnailViews[id];
this._configuration.SetThumbnailLocation(view.Title, this._activeClientTitle, view.Location);
view.Refresh(false);
}
private bool IsNonClientWindowActive(IntPtr windowHandle)
{
// We just don't know ATM
if (windowHandle == IntPtr.Zero)
{
return false;
}
foreach (KeyValuePair<IntPtr, IThumbnailView> entry in this._thumbnailViews)
{
IThumbnailView view = entry.Value;
if (view.IsKnownHandle(windowHandle))
{
return false;
}
}
return true;
}
private void ThumbnailZoomIn(IThumbnailView view)
{
this.DisableViewEvents();
view.ZoomIn(ViewZoomAnchorConverter.Convert(this._configuration.ThumbnailZoomAnchor), this._configuration.ThumbnailZoomFactor);
view.Refresh(false);
this.EnableViewEvents();
}
private void ThumbnailZoomOut(IThumbnailView view)
{
this.DisableViewEvents();
view.ZoomOut();
view.Refresh(false);
this.EnableViewEvents();
}
private void ApplyClientLayout(IntPtr clientHandle, string clientTitle)
{
ClientLayout clientLayout = this._configuration.GetClientLayout(clientTitle);
if (clientLayout == null)
{
return;
}
DwmApiNativeMethods.MoveWindow(clientHandle, clientLayout.X, clientLayout.Y, clientLayout.Width, clientLayout.Height, true);
}
private void UpdateClientLayouts()
{
Process[] clientProcesses = ThumbnailManager.GetClientProcesses();
foreach (Process process in clientProcesses)
{
RECT rect;
DwmApiNativeMethods.GetWindowRect(process.MainWindowHandle, out rect);
int left = Math.Abs(rect.Left);
int right = Math.Abs(rect.Right);
int clientWidth = Math.Abs(left - right);
int top = Math.Abs(rect.Top);
int bottom = Math.Abs(rect.Bottom);
int clientHeight = Math.Abs(top - bottom);
ClientLayout clientLayout = new ClientLayout();
clientLayout.X = rect.Left;
clientLayout.Y = rect.Top;
clientLayout.Width = clientWidth;
clientLayout.Height = clientHeight;
this._configuration.SetClientLayout(process.MainWindowTitle, clientLayout);
}
}
}
}

View File

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

View File

@@ -0,0 +1,19 @@
using EveOPreview.Configuration;
namespace EveOPreview.UI
{
static class ViewZoomAnchorConverter
{
public static ZoomAnchor Convert(ViewZoomAnchor value)
{
// Cheat based on fact that the order and byte values of both enums are the same
return (ZoomAnchor)((int)value);
}
public static ViewZoomAnchor Convert(ZoomAnchor value)
{
// Cheat based on fact that the order and byte values of both enums are the same
return (ViewZoomAnchor)((int)value);
}
}
}

37
Eve-O-Preview/Program.cs Normal file
View File

@@ -0,0 +1,37 @@
using System;
using System.Windows.Forms;
using EveOPreview.Configuration;
using EveOPreview.UI;
namespace EveOPreview
{
static class Program
{
/// <summary>The main entry point for the application.</summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
// TODO Switch to another container that provides signed assemblies
IIocContainer container = new LightInjectContainer();
// UI classes
IApplicationController controller = new ApplicationController(container)
.RegisterView<IMainView, MainForm>()
.RegisterView<IThumbnailView, ThumbnailView>()
.RegisterView<IThumbnailDescriptionView, ThumbnailDescriptionView>()
.RegisterInstance(new ApplicationContext());
// Application services
controller.RegisterService<IThumbnailManager, ThumbnailManager>()
.RegisterService<IThumbnailViewFactory, ThumbnailViewFactory>()
.RegisterService<IThumbnailDescriptionViewFactory, ThumbnailDescriptionViewFactory>()
.RegisterService<IConfigurationStorage, ConfigurationStorage>()
.RegisterInstance<IApplicationConfiguration>(new ApplicationConfiguration());
controller.Run<MainPresenter>();
}
}
}

View File

@@ -0,0 +1,22 @@
using System;
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("EVE-O Preview")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("EVE-O Preview")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("04f08f8d-9e98-423b-acdb-4effb31c0d35")]
[assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyFileVersion("2.0.0.0")]
// Provide your own key name to build the app locally
// TODO Reenable signing
//[assembly: AssemblyKeyName("Phrynohyas")]
[assembly: CLSCompliant(true)]

View File

@@ -1,14 +1,14 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34014
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace PreviewToy.Properties {
namespace EveOPreview.Properties {
using System;
@@ -39,7 +39,7 @@ namespace PreviewToy.Properties {
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PreviewToy.Properties.Resources", typeof(Resources).Assembly);
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("EveOPreview.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;

View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -0,0 +1,25 @@
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, bool isDisabled)
{
IThumbnailDescriptionView view = this._controller.Create<IThumbnailDescriptionView>();
view.Id = id;
view.Title = title;
view.IsDisabled = isDisabled;
return view;
}
}
}

View File

@@ -0,0 +1,26 @@
using System;
using System.Drawing;
namespace EveOPreview.UI
{
public class ThumbnailViewFactory : IThumbnailViewFactory
{
private readonly IApplicationController _controller;
public ThumbnailViewFactory(IApplicationController controller)
{
this._controller = controller;
}
public IThumbnailView Create(IntPtr id, string title, Size size)
{
IThumbnailView view = this._controller.Create<IThumbnailView>();
view.Id = id;
view.Title = title;
view.Size = size;
return view;
}
}
}

View File

@@ -0,0 +1,682 @@
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.Panel ResizeOptionsPanel;
System.Windows.Forms.Panel ZoomOptionsPanel;
System.Windows.Forms.Label ZoomFactorLabel;
System.Windows.Forms.Label ZoomAnchorLabel;
System.Windows.Forms.Panel ThumbnailsListPanel;
System.Windows.Forms.Label ThumbnailsListLabel;
System.Windows.Forms.ToolStripMenuItem TitleMenuItem;
System.Windows.Forms.ToolStripSeparator SeparatorMenuItem;
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.EnableClientLayoutTrackingCheckBox = new System.Windows.Forms.CheckBox();
this.HideActiveClientThumbnailCheckBox = new System.Windows.Forms.CheckBox();
this.ShowThumbnailsAlwaysOnTopCheckBox = new System.Windows.Forms.CheckBox();
this.HideThumbnailsOnLostFocusCheckBox = new System.Windows.Forms.CheckBox();
this.EnablePerClientThumbnailsLayoutsCheckBox = new System.Windows.Forms.CheckBox();
this.SyncThumbnailsSizeCheckBox = new System.Windows.Forms.CheckBox();
this.ThumbnailsWidthNumericEdit = new System.Windows.Forms.NumericUpDown();
this.ThumbnailsHeightNumericEdit = new System.Windows.Forms.NumericUpDown();
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.EnableThumbnailZoomCheckBox = new System.Windows.Forms.CheckBox();
this.ThumbnailZoomFactorNumericEdit = new System.Windows.Forms.NumericUpDown();
this.ShowThumbnailOverlaysCheckBox = new System.Windows.Forms.CheckBox();
this.ShowThumbnailFramesCheckBox = new System.Windows.Forms.CheckBox();
this.ThumbnailsList = new System.Windows.Forms.CheckedListBox();
this.ForumLinkLabel = new System.Windows.Forms.LinkLabel();
this.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();
ResizeOptionsPanel = new System.Windows.Forms.Panel();
ZoomOptionsPanel = new System.Windows.Forms.Panel();
ZoomFactorLabel = new System.Windows.Forms.Label();
ZoomAnchorLabel = new System.Windows.Forms.Label();
ThumbnailsListPanel = new System.Windows.Forms.Panel();
ThumbnailsListLabel = new System.Windows.Forms.Label();
TitleMenuItem = new System.Windows.Forms.ToolStripMenuItem();
SeparatorMenuItem = new System.Windows.Forms.ToolStripSeparator();
ContentFlowLayoutPanel.SuspendLayout();
OpacityPanel.SuspendLayout();
ResizeOptionsPanel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.ThumbnailsWidthNumericEdit)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.ThumbnailsHeightNumericEdit)).BeginInit();
ZoomOptionsPanel.SuspendLayout();
this.ZoomAnchorPanel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.ThumbnailZoomFactorNumericEdit)).BeginInit();
ThumbnailsListPanel.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(151, 22);
RestoreWindowMenuItem.Text = "Restore";
RestoreWindowMenuItem.Click += new System.EventHandler(this.RestoreMainForm_Handler);
//
// ExitMenuItem
//
ExitMenuItem.Name = "ExitMenuItem";
ExitMenuItem.Size = new System.Drawing.Size(151, 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.EnableClientLayoutTrackingCheckBox);
ContentFlowLayoutPanel.Controls.Add(this.HideActiveClientThumbnailCheckBox);
ContentFlowLayoutPanel.Controls.Add(this.ShowThumbnailsAlwaysOnTopCheckBox);
ContentFlowLayoutPanel.Controls.Add(this.HideThumbnailsOnLostFocusCheckBox);
ContentFlowLayoutPanel.Controls.Add(this.EnablePerClientThumbnailsLayoutsCheckBox);
ContentFlowLayoutPanel.Controls.Add(ResizeOptionsPanel);
ContentFlowLayoutPanel.Controls.Add(ZoomOptionsPanel);
ContentFlowLayoutPanel.Controls.Add(this.ShowThumbnailOverlaysCheckBox);
ContentFlowLayoutPanel.Controls.Add(this.ShowThumbnailFramesCheckBox);
ContentFlowLayoutPanel.Controls.Add(ThumbnailsListPanel);
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, 487);
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);
//
// EnableClientLayoutTrackingCheckBox
//
this.EnableClientLayoutTrackingCheckBox.AutoSize = true;
this.EnableClientLayoutTrackingCheckBox.Location = new System.Drawing.Point(3, 58);
this.EnableClientLayoutTrackingCheckBox.Name = "EnableClientLayoutTrackingCheckBox";
this.EnableClientLayoutTrackingCheckBox.Size = new System.Drawing.Size(127, 17);
this.EnableClientLayoutTrackingCheckBox.TabIndex = 32;
this.EnableClientLayoutTrackingCheckBox.Text = "Track client locations";
this.EnableClientLayoutTrackingCheckBox.UseVisualStyleBackColor = true;
this.EnableClientLayoutTrackingCheckBox.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);
//
// HideThumbnailsOnLostFocusCheckBox
//
this.HideThumbnailsOnLostFocusCheckBox.AutoSize = true;
this.HideThumbnailsOnLostFocusCheckBox.Checked = true;
this.HideThumbnailsOnLostFocusCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.HideThumbnailsOnLostFocusCheckBox.Location = new System.Drawing.Point(3, 127);
this.HideThumbnailsOnLostFocusCheckBox.Name = "HideThumbnailsOnLostFocusCheckBox";
this.HideThumbnailsOnLostFocusCheckBox.Size = new System.Drawing.Size(234, 17);
this.HideThumbnailsOnLostFocusCheckBox.TabIndex = 2;
this.HideThumbnailsOnLostFocusCheckBox.Text = "Hide previews when EVE client is not active";
this.HideThumbnailsOnLostFocusCheckBox.UseVisualStyleBackColor = true;
this.HideThumbnailsOnLostFocusCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
//
// EnablePerClientThumbnailsLayoutsCheckBox
//
this.EnablePerClientThumbnailsLayoutsCheckBox.AutoSize = true;
this.EnablePerClientThumbnailsLayoutsCheckBox.Checked = true;
this.EnablePerClientThumbnailsLayoutsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.EnablePerClientThumbnailsLayoutsCheckBox.Location = new System.Drawing.Point(3, 150);
this.EnablePerClientThumbnailsLayoutsCheckBox.Name = "EnablePerClientThumbnailsLayoutsCheckBox";
this.EnablePerClientThumbnailsLayoutsCheckBox.Size = new System.Drawing.Size(185, 17);
this.EnablePerClientThumbnailsLayoutsCheckBox.TabIndex = 3;
this.EnablePerClientThumbnailsLayoutsCheckBox.Text = "Unique layout for each EVE client";
this.EnablePerClientThumbnailsLayoutsCheckBox.UseVisualStyleBackColor = true;
this.EnablePerClientThumbnailsLayoutsCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
//
// ResizeOptionsPanel
//
ResizeOptionsPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
ResizeOptionsPanel.Controls.Add(this.SyncThumbnailsSizeCheckBox);
ResizeOptionsPanel.Controls.Add(this.ThumbnailsWidthNumericEdit);
ResizeOptionsPanel.Controls.Add(this.ThumbnailsHeightNumericEdit);
ResizeOptionsPanel.Location = new System.Drawing.Point(3, 173);
ResizeOptionsPanel.Name = "ResizeOptionsPanel";
ResizeOptionsPanel.Size = new System.Drawing.Size(246, 30);
ResizeOptionsPanel.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);
//
// ZoomOptionsPanel
//
ZoomOptionsPanel.BackColor = System.Drawing.SystemColors.Control;
ZoomOptionsPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
ZoomOptionsPanel.Controls.Add(ZoomFactorLabel);
ZoomOptionsPanel.Controls.Add(this.ZoomAnchorPanel);
ZoomOptionsPanel.Controls.Add(ZoomAnchorLabel);
ZoomOptionsPanel.Controls.Add(this.EnableThumbnailZoomCheckBox);
ZoomOptionsPanel.Controls.Add(this.ThumbnailZoomFactorNumericEdit);
ZoomOptionsPanel.Location = new System.Drawing.Point(3, 209);
ZoomOptionsPanel.Name = "ZoomOptionsPanel";
ZoomOptionsPanel.Size = new System.Drawing.Size(246, 82);
ZoomOptionsPanel.TabIndex = 27;
//
// ZoomFactorLabel
//
ZoomFactorLabel.AutoSize = true;
ZoomFactorLabel.Location = new System.Drawing.Point(49, 43);
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, 21);
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, 43);
ZoomAnchorLabel.Name = "ZoomAnchorLabel";
ZoomAnchorLabel.Size = new System.Drawing.Size(41, 13);
ZoomAnchorLabel.TabIndex = 30;
ZoomAnchorLabel.Text = "Anchor";
//
// EnableThumbnailZoomCheckBox
//
this.EnableThumbnailZoomCheckBox.AutoSize = true;
this.EnableThumbnailZoomCheckBox.Checked = true;
this.EnableThumbnailZoomCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.EnableThumbnailZoomCheckBox.Location = new System.Drawing.Point(1, 5);
this.EnableThumbnailZoomCheckBox.Name = "EnableThumbnailZoomCheckBox";
this.EnableThumbnailZoomCheckBox.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.EnableThumbnailZoomCheckBox.Size = new System.Drawing.Size(98, 17);
this.EnableThumbnailZoomCheckBox.TabIndex = 13;
this.EnableThumbnailZoomCheckBox.Text = "Zoom on hover";
this.EnableThumbnailZoomCheckBox.UseVisualStyleBackColor = true;
this.EnableThumbnailZoomCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
//
// ThumbnailZoomFactorNumericEdit
//
this.ThumbnailZoomFactorNumericEdit.BackColor = System.Drawing.SystemColors.Window;
this.ThumbnailZoomFactorNumericEdit.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.ThumbnailZoomFactorNumericEdit.Location = new System.Drawing.Point(9, 40);
this.ThumbnailZoomFactorNumericEdit.Maximum = new decimal(new int[] {
10,
0,
0,
0});
this.ThumbnailZoomFactorNumericEdit.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.ThumbnailZoomFactorNumericEdit.Name = "ThumbnailZoomFactorNumericEdit";
this.ThumbnailZoomFactorNumericEdit.Size = new System.Drawing.Size(34, 20);
this.ThumbnailZoomFactorNumericEdit.TabIndex = 24;
this.ThumbnailZoomFactorNumericEdit.Value = new decimal(new int[] {
1,
0,
0,
0});
this.ThumbnailZoomFactorNumericEdit.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, 297);
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, 297);
this.ShowThumbnailFramesCheckBox.Name = "ShowThumbnailFramesCheckBox";
this.ShowThumbnailFramesCheckBox.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.ShowThumbnailFramesCheckBox.Size = new System.Drawing.Size(127, 17);
this.ShowThumbnailFramesCheckBox.TabIndex = 9;
this.ShowThumbnailFramesCheckBox.Text = "Show preview frames";
this.ShowThumbnailFramesCheckBox.UseVisualStyleBackColor = true;
this.ShowThumbnailFramesCheckBox.CheckedChanged += new System.EventHandler(this.OptionChanged_Handler);
//
// ThumbnailsListPanel
//
ThumbnailsListPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
ThumbnailsListPanel.Controls.Add(this.ThumbnailsList);
ThumbnailsListPanel.Controls.Add(ThumbnailsListLabel);
ThumbnailsListPanel.Location = new System.Drawing.Point(3, 320);
ThumbnailsListPanel.Name = "ThumbnailsListPanel";
ThumbnailsListPanel.Size = new System.Drawing.Size(246, 125);
ThumbnailsListPanel.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);
//
// ThumbnailsListLabel
//
ThumbnailsListLabel.AutoSize = true;
ThumbnailsListLabel.Location = new System.Drawing.Point(3, 0);
ThumbnailsListLabel.Name = "ThumbnailsListLabel";
ThumbnailsListLabel.Size = new System.Drawing.Size(162, 13);
ThumbnailsListLabel.TabIndex = 29;
ThumbnailsListLabel.Text = "Thumbnails (check to force hide)";
//
// ForumLinkLabel
//
this.ForumLinkLabel.AutoSize = true;
this.ForumLinkLabel.Location = new System.Drawing.Point(3, 448);
this.ForumLinkLabel.Name = "ForumLinkLabel";
this.ForumLinkLabel.Size = new System.Drawing.Size(241, 26);
this.ForumLinkLabel.TabIndex = 10;
this.ForumLinkLabel.TabStop = true;
this.ForumLinkLabel.Text = "to be set from prresenter to be set from prresenter to be set from prresenter to " +
"be set from prresenter";
this.ForumLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.ForumLinkLabelClicked_Handler);
//
// TitleMenuItem
//
TitleMenuItem.Enabled = false;
TitleMenuItem.Name = "TitleMenuItem";
TitleMenuItem.Size = new System.Drawing.Size(151, 22);
TitleMenuItem.Text = "EVE-O Preview";
//
// SeparatorMenuItem
//
SeparatorMenuItem.Name = "SeparatorMenuItem";
SeparatorMenuItem.Size = new System.Drawing.Size(148, 6);
//
// 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[] {
TitleMenuItem,
RestoreWindowMenuItem,
SeparatorMenuItem,
ExitMenuItem});
this.TrayMenu.Name = "contextMenuStrip1";
this.TrayMenu.Size = new System.Drawing.Size(152, 76);
//
// 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, 487);
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-O Preview";
this.TopMost = true;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainFormClosing_Handler);
this.Load += new System.EventHandler(this.MainFormResize_Handler);
this.Resize += new System.EventHandler(this.MainFormResize_Handler);
ContentFlowLayoutPanel.ResumeLayout(false);
ContentFlowLayoutPanel.PerformLayout();
OpacityPanel.ResumeLayout(false);
OpacityPanel.PerformLayout();
ResizeOptionsPanel.ResumeLayout(false);
ResizeOptionsPanel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.ThumbnailsWidthNumericEdit)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.ThumbnailsHeightNumericEdit)).EndInit();
ZoomOptionsPanel.ResumeLayout(false);
ZoomOptionsPanel.PerformLayout();
this.ZoomAnchorPanel.ResumeLayout(false);
this.ZoomAnchorPanel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.ThumbnailZoomFactorNumericEdit)).EndInit();
ThumbnailsListPanel.ResumeLayout(false);
ThumbnailsListPanel.PerformLayout();
this.TrayMenu.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private CheckBox HideActiveClientThumbnailCheckBox;
private CheckBox HideThumbnailsOnLostFocusCheckBox;
private CheckBox EnablePerClientThumbnailsLayoutsCheckBox;
private CheckBox SyncThumbnailsSizeCheckBox;
private CheckBox ShowThumbnailsAlwaysOnTopCheckBox;
private CheckBox ShowThumbnailFramesCheckBox;
private LinkLabel ForumLinkLabel;
private NumericUpDown ThumbnailsWidthNumericEdit;
private NumericUpDown ThumbnailsHeightNumericEdit;
private CheckBox EnableThumbnailZoomCheckBox;
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 ThumbnailZoomFactorNumericEdit;
private Panel ZoomAnchorPanel;
private CheckedListBox ThumbnailsList;
private CheckBox EnableClientLayoutTrackingCheckBox;
private HScrollBar ThumbnailsOpacityScrollBar;
private CheckBox MinimizeToTrayCheckBox;
private NotifyIcon NotifyIcon;
private ContextMenuStrip TrayMenu;
}
}

View File

@@ -0,0 +1,398 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
namespace EveOPreview.UI
{
public partial class MainForm : Form, IMainView
{
private readonly ApplicationContext _context;
private readonly Dictionary<ViewZoomAnchor, RadioButton> _zoomAnchorMap;
private ViewZoomAnchor _cachedThumbnailZoomAnchor;
private bool _suppressEvents;
public MainForm(ApplicationContext context)
{
this._context = context;
this._zoomAnchorMap = new Dictionary<ViewZoomAnchor, RadioButton>();
this._cachedThumbnailZoomAnchor = ViewZoomAnchor.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 EnableClientLayoutTracking
{
get
{
return this.EnableClientLayoutTrackingCheckBox.Checked;
}
set
{
this.EnableClientLayoutTrackingCheckBox.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 HideThumbnailsOnLostFocus
{
get
{
return this.HideThumbnailsOnLostFocusCheckBox.Checked;
}
set
{
this.HideThumbnailsOnLostFocusCheckBox.Checked = value;
}
}
public bool EnablePerClientThumbnailsLayouts
{
get
{
return this.EnablePerClientThumbnailsLayoutsCheckBox.Checked;
}
set
{
this.EnablePerClientThumbnailsLayoutsCheckBox.Checked = value;
}
}
public bool SyncThumbnailsSize
{
get
{
return this.SyncThumbnailsSizeCheckBox.Checked;
}
set
{
this.SyncThumbnailsSizeCheckBox.Checked = value;
}
}
public Size ThumbnailSize
{
get
{
return new Size((int)this.ThumbnailsWidthNumericEdit.Value, (int)this.ThumbnailsHeightNumericEdit.Value);
}
set
{
this.ThumbnailsWidthNumericEdit.Value = value.Width;
this.ThumbnailsHeightNumericEdit.Value = value.Height;
}
}
public bool EnableThumbnailZoom
{
get
{
return this.EnableThumbnailZoomCheckBox.Checked;
}
set
{
this.EnableThumbnailZoomCheckBox.Checked = value;
this.RefreshZoomSettings();
}
}
public int ThumbnailZoomFactor
{
get
{
return (int)this.ThumbnailZoomFactorNumericEdit.Value;
}
set
{
this.ThumbnailZoomFactorNumericEdit.Value = value;
}
}
public ViewZoomAnchor ThumbnailZoomAnchor
{
get
{
if (this._zoomAnchorMap[this._cachedThumbnailZoomAnchor].Checked)
{
return this._cachedThumbnailZoomAnchor;
}
foreach (KeyValuePair<ViewZoomAnchor, RadioButton> valuePair in this._zoomAnchorMap)
{
if (!valuePair.Value.Checked)
{
continue;
}
this._cachedThumbnailZoomAnchor = valuePair.Key;
return this._cachedThumbnailZoomAnchor;
}
// Default value
return ViewZoomAnchor.NW;
}
set
{
this._cachedThumbnailZoomAnchor = value;
this._zoomAnchorMap[this._cachedThumbnailZoomAnchor].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 SetThumbnailSizeLimitations(Size minimumSize, Size maximumSize)
{
this.ThumbnailsWidthNumericEdit.Minimum = minimumSize.Width;
this.ThumbnailsWidthNumericEdit.Maximum = maximumSize.Width;
this.ThumbnailsHeightNumericEdit.Minimum = minimumSize.Height;
this.ThumbnailsHeightNumericEdit.Maximum = maximumSize.Height;
}
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 RefreshZoomSettings()
{
bool enableControls = this.EnableThumbnailZoom;
this.ThumbnailZoomFactorNumericEdit.Enabled = enableControls;
this.ZoomAnchorPanel.Enabled = enableControls;
}
public Action ApplicationExitRequested { get; set; }
public Action FormActivated { get; set; }
public Action FormMinimized { get; set; }
public Action<ViewCloseRequest> FormCloseRequested { get; set; }
public Action ApplicationSettingsChanged { get; set; }
public Action ThumbnailsSizeChanged { get; set; }
public Action<IntPtr> ThumbnailStateChanged { get; set; }
public Action ForumUrlLinkActivated { get; set; }
#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;
}
selectedItem.IsDisabled = (e.NewValue == CheckState.Checked);
this.ThumbnailStateChanged?.Invoke(selectedItem.Id);
}
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[ViewZoomAnchor.NW] = this.ZoomAanchorNWRadioButton;
this._zoomAnchorMap[ViewZoomAnchor.N] = this.ZoomAanchorNRadioButton;
this._zoomAnchorMap[ViewZoomAnchor.NE] = this.ZoomAanchorNERadioButton;
this._zoomAnchorMap[ViewZoomAnchor.W] = this.ZoomAanchorWRadioButton;
this._zoomAnchorMap[ViewZoomAnchor.C] = this.ZoomAanchorCRadioButton;
this._zoomAnchorMap[ViewZoomAnchor.E] = this.ZoomAanchorERadioButton;
this._zoomAnchorMap[ViewZoomAnchor.SW] = this.ZoomAanchorSWRadioButton;
this._zoomAnchorMap[ViewZoomAnchor.S] = this.ZoomAanchorSRadioButton;
this._zoomAnchorMap[ViewZoomAnchor.SE] = this.ZoomAanchorSERadioButton;
}
}
}

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
@@ -117,17 +117,158 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</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="EnableClientLayoutTrackingCheckBox.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="HideThumbnailsOnLostFocusCheckBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="EnablePerClientThumbnailsLayoutsCheckBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ResizeOptionsPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="ResizeOptionsPanel.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="ZoomOptionsPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="ZoomOptionsPanel.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="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="EnableThumbnailZoomCheckBox.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ThumbnailZoomFactorNumericEdit.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="ThumbnailsListPanel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="ThumbnailsListPanel.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="ThumbnailsListLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="ThumbnailsListLabel.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="TitleMenuItem.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="SeparatorMenuItem.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</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>
</metadata>
<metadata name="notifyIcon1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>237, 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 name="TrayMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>123, 17</value>
</metadata>
<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>
AAABAAUAEBAAAAAAIABoBAAAVgAAABgYAAAAACAAiAkAAL4EAAAgIAAAAAAgAKgQAABGDgAAMDAAAAAA
IACoJQAA7h4AAEBAAAAAACAAKEIAAJZEAAAoAAAAEAAAACAAAAABACAAAAAAAAAIAAAAAAAAAAAAAAAA
@@ -706,6 +847,9 @@
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////
</value>
</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">
<value>86</value>
</metadata>

View File

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

View File

@@ -0,0 +1,90 @@
namespace EveOPreview.UI
{
partial class ThumbnailOverlay
{
/// <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>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.PictureBox OverlayAreaPictureBox;
this.OverlayLabel = new System.Windows.Forms.Label();
OverlayAreaPictureBox = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(OverlayAreaPictureBox)).BeginInit();
this.SuspendLayout();
//
// OverlayAreaPictureBox
//
OverlayAreaPictureBox.BackColor = System.Drawing.Color.Transparent;
OverlayAreaPictureBox.Cursor = System.Windows.Forms.Cursors.Hand;
OverlayAreaPictureBox.Dock = System.Windows.Forms.DockStyle.Fill;
OverlayAreaPictureBox.Location = new System.Drawing.Point(0, 0);
OverlayAreaPictureBox.Name = "OverlayAreaPictureBox";
OverlayAreaPictureBox.Size = new System.Drawing.Size(284, 262);
OverlayAreaPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
OverlayAreaPictureBox.TabIndex = 0;
OverlayAreaPictureBox.TabStop = false;
OverlayAreaPictureBox.MouseUp += new System.Windows.Forms.MouseEventHandler(this.OverlayArea_Click);
//
// OverlayLabel
//
this.OverlayLabel.AutoSize = true;
this.OverlayLabel.Dock = System.Windows.Forms.DockStyle.Top;
this.OverlayLabel.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.OverlayLabel.ForeColor = System.Drawing.Color.DarkGray;
this.OverlayLabel.Location = new System.Drawing.Point(0, 0);
this.OverlayLabel.Name = "OverlayLabel";
this.OverlayLabel.Size = new System.Drawing.Size(25, 13);
this.OverlayLabel.TabIndex = 1;
this.OverlayLabel.Text = "...";
//
// ThumbnailOverlay
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Black;
this.ClientSize = new System.Drawing.Size(284, 262);
this.ControlBox = false;
this.Controls.Add(this.OverlayLabel);
this.Controls.Add(OverlayAreaPictureBox);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ThumbnailOverlay";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.Text = "PreviewOverlay";
this.TransparencyKey = System.Drawing.Color.Black;
((System.ComponentModel.ISupportInitialize)(OverlayAreaPictureBox)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label OverlayLabel;
}
}

View File

@@ -0,0 +1,40 @@
using System;
using System.Windows.Forms;
namespace EveOPreview.UI
{
public partial class ThumbnailOverlay : Form
{
#region Private fields
private readonly Action<object, MouseEventArgs> _areaClickAction;
#endregion
public ThumbnailOverlay(Form owner, Action<object, MouseEventArgs> areaClickAction)
{
this.Owner = owner;
this._areaClickAction = areaClickAction;
InitializeComponent();
}
private void OverlayArea_Click(object sender, MouseEventArgs e)
{
this._areaClickAction(this, e);
}
public void SetOverlayLabel(string label)
{
this.OverlayLabel.Text = label;
}
protected override CreateParams CreateParams
{
get
{
var Params = base.CreateParams;
Params.ExStyle |= (int)DwmApiNativeMethods.WS_EX_TOOLWINDOW;
return Params;
}
}
}
}

View File

@@ -117,4 +117,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="OverlayAreaPictureBox.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
</root>

View File

@@ -0,0 +1,70 @@
namespace EveOPreview.UI
{
partial class ThumbnailView
{
/// <summary>
/// Required designer variable.
/// </summary>
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.RenderAreaPictureBox = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.RenderAreaPictureBox)).BeginInit();
this.SuspendLayout();
//
// RenderAreaPictureBox
//
this.RenderAreaPictureBox.BackColor = System.Drawing.Color.Transparent;
this.RenderAreaPictureBox.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.RenderAreaPictureBox.Cursor = System.Windows.Forms.Cursors.Hand;
this.RenderAreaPictureBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.RenderAreaPictureBox.Location = new System.Drawing.Point(0, 0);
this.RenderAreaPictureBox.Margin = new System.Windows.Forms.Padding(0);
this.RenderAreaPictureBox.Name = "RenderAreaPictureBox";
this.RenderAreaPictureBox.Size = new System.Drawing.Size(153, 89);
this.RenderAreaPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.RenderAreaPictureBox.TabIndex = 0;
this.RenderAreaPictureBox.TabStop = false;
this.RenderAreaPictureBox.MouseLeave += new System.EventHandler(this.LostFocus_Handler);
this.RenderAreaPictureBox.MouseHover += new System.EventHandler(this.Focused_Handler);
this.RenderAreaPictureBox.MouseUp += new System.Windows.Forms.MouseEventHandler(this.ThumbnailActivated_Handler);
//
// ThumbnailView
//
this.AccessibleRole = System.Windows.Forms.AccessibleRole.None;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(153, 89);
this.ControlBox = false;
this.Controls.Add(this.RenderAreaPictureBox);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.MinimumSize = new System.Drawing.Size(64, 64);
this.Name = "ThumbnailView";
this.Opacity = 0.1D;
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.Text = "Preview";
this.TopMost = true;
this.Move += new System.EventHandler(this.Move_Handler);
this.Resize += new System.EventHandler(this.Resize_Handler);
((System.ComponentModel.ISupportInitialize)(this.RenderAreaPictureBox)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.PictureBox RenderAreaPictureBox;
}
}

View File

@@ -0,0 +1,451 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace EveOPreview.UI
{
public partial class ThumbnailView : Form, IThumbnailView
{
#region Private fields
//private readonly IThumbnailManager _manager;
private readonly ThumbnailOverlay _overlay;
//private Size _baseSize;
//private Point _basePosition;
// This is pure brainless View
// Just somewhat more complex than usual
private bool _isThumbnailSetUp;
private bool _isOverlayVisible;
private bool _isPositionChanged;
private bool _isSizeChanged;
private DWM_THUMBNAIL_PROPERTIES _thumbnail;
private IntPtr _thumbnailHandle;
private Size _baseSize;
private Point _baseLocation;
private HotkeyHandler _hotkeyHandler;
#endregion
public ThumbnailView()
{
this.IsEnabled = true;
this.IsActive = false;
this.IsOverlayEnabled = false;
this._isThumbnailSetUp = false;
this._isOverlayVisible = false;
this._isPositionChanged = true;
this._isSizeChanged = true;
InitializeComponent();
this._overlay = new ThumbnailOverlay(this, this.ThumbnailActivated_Handler);
}
public IntPtr Id { get; set; }
public string Title
{
get
{
return this.Text;
}
set
{
this.Text = value;
this._overlay.SetOverlayLabel(value);
}
}
public bool IsEnabled { get; set; }
public bool IsActive { get; set; }
public bool IsOverlayEnabled { get; set; }
public new Point Location
{
get
{
return base.Location;
}
set
{
if ((value.X > 0) || (value.Y > 0))
{
this.StartPosition = FormStartPosition.Manual;
}
base.Location = value;
}
}
public Action<IntPtr> ThumbnailResized { get; set; }
public Action<IntPtr> ThumbnailMoved { get; set; }
public Action<IntPtr> ThumbnailFocused { get; set; }
public Action<IntPtr> ThumbnailLostFocus { get; set; }
public Action<IntPtr> ThumbnailActivated { get; set; }
public new void Show()
{
base.Show();
// Thumbnail will be registered during the Refresh cycle
this.Refresh();
this.IsActive = true;
}
public new void Hide()
{
this.IsActive = false;
this._overlay.Hide();
base.Hide();
}
public new void Close()
{
this.IsActive = false;
this.UnregisterThumbnail(this._thumbnailHandle);
this._overlay.Close();
base.Close();
}
// This method is used to determine if the provided Handle is related to client or its thumbnail
public bool IsKnownHandle(IntPtr handle)
{
return (this.Id == handle) || (this.Handle == handle) || (this._overlay.Handle == handle);
}
public void SetSizeLimitations(Size minimumSize, Size maximumSize)
{
this.MinimumSize = minimumSize;
this.MaximumSize = maximumSize;
}
public void SetOpacity(double opacity)
{
this.Opacity = opacity;
}
public void SetWindowFrames(bool enable)
{
this.FormBorderStyle = enable ? FormBorderStyle.SizableToolWindow : FormBorderStyle.None;
// Notify about windo contents position change
this._isSizeChanged = true;
}
public void SetTopMost(bool enableTopmost)
{
this.TopMost = enableTopmost;
this._overlay.TopMost = enableTopmost;
}
public void ZoomIn(ViewZoomAnchor anchor, int zoomFactor)
{
this._baseSize = this.Size;
this._baseLocation = this.Location;
int oldWidth = this._baseSize.Width;
int oldHeight = this._baseSize.Height;
int locationX = this.Location.X;
int locationY = this.Location.Y;
int newWidth = (zoomFactor * this.ClientSize.Width) + (this.Size.Width - this.ClientSize.Width);
int newHeight = (zoomFactor * this.ClientSize.Height) + (this.Size.Height - this.ClientSize.Height);
// First change size, THEN move the window
// Otherwise there is a chance to fail in a loop
// Zoom requied -> Moved the windows 1st -> Focus is lost -> Window is moved back -> Focus is back on -> Zoom required -> ...
this.Size = new Size(newWidth, newHeight);
switch (anchor)
{
case ViewZoomAnchor.NW:
break;
case ViewZoomAnchor.N:
this.Location = new Point(locationX - newWidth / 2 + oldWidth / 2, locationY);
break;
case ViewZoomAnchor.NE:
this.Location = new Point(locationX - newWidth + oldWidth, locationY);
break;
case ViewZoomAnchor.W:
this.Location = new Point(locationX, locationY - newHeight / 2 + oldHeight / 2);
break;
case ViewZoomAnchor.C:
this.Location = new Point(locationX - newWidth / 2 + oldWidth / 2, locationY - newHeight / 2 + oldHeight / 2);
break;
case ViewZoomAnchor.E:
this.Location = new Point(locationX - newWidth + oldWidth, locationY - newHeight / 2 + oldHeight / 2);
break;
case ViewZoomAnchor.SW:
this.Location = new Point(locationX, locationY - newHeight + this._baseSize.Height);
break;
case ViewZoomAnchor.S:
this.Location = new Point(locationX - newWidth / 2 + oldWidth / 2, locationY - newHeight + oldHeight);
break;
case ViewZoomAnchor.SE:
this.Location = new Point(locationX - newWidth + oldWidth, locationY - newHeight + oldHeight);
break;
}
}
public void ZoomOut()
{
this.Size = this._baseSize;
this.Location = this._baseLocation;
}
public void RegisterHotkey(Keys hotkey)
{
if (this._hotkeyHandler != null)
{
this.UnregisterHotkey();
}
if (hotkey == Keys.None)
{
return;
}
this._hotkeyHandler = new HotkeyHandler(this.Handle, hotkey);
this._hotkeyHandler.Pressed += HotkeyPressed_Handler;
try
{
this._hotkeyHandler.Register();
System.Diagnostics.Debug.WriteLine("Registered shortcut for " + this.Title);
}
catch (Exception)
{
System.Diagnostics.Debug.WriteLine("Failed to register shortcut for " + this.Title);
// There can be a lot of possible exception reasons here
// In case of any of them the hotkey setting is silently ignored
}
}
public void UnregisterHotkey()
{
if (this._hotkeyHandler == null)
{
return;
}
this._hotkeyHandler.Unregister();
this._hotkeyHandler.Pressed -= HotkeyPressed_Handler;
this._hotkeyHandler.Dispose();
this._hotkeyHandler = null;
}
public void Refresh(bool forceRefresh)
{
// To prevent flickering the old broken thumbnail is removed AFTER the new shiny one is created
IntPtr obsoleteThumbnailHanlde = forceRefresh ? this._thumbnailHandle : IntPtr.Zero;
if ((this._isThumbnailSetUp == false) || forceRefresh)
{
this.RegisterThumbnail();
}
bool sizeChanged = this._isSizeChanged || forceRefresh;
bool locationChanged = this._isPositionChanged || forceRefresh;
if (sizeChanged)
{
this._thumbnail.rcDestination = new RECT(0, 0, this.ClientRectangle.Right, this.ClientRectangle.Bottom);
try
{
DwmApiNativeMethods.DwmUpdateThumbnailProperties(this._thumbnailHandle, this._thumbnail);
}
catch (ArgumentException)
{
//This exception will be thrown if the EVE client disappears while this method is running
}
this._isSizeChanged = false;
}
if (obsoleteThumbnailHanlde != IntPtr.Zero)
{
this.UnregisterThumbnail(obsoleteThumbnailHanlde);
}
if (!this.IsOverlayEnabled)
{
if (this._isOverlayVisible)
{
this._overlay.Hide();
this._isOverlayVisible = false;
}
return;
}
if (!this._isOverlayVisible)
{
this._overlay.Show();
this._isOverlayVisible = true;
}
else if (!(sizeChanged || locationChanged))
{
// No need to adjust in the overlay location if it is already visible and properly set
return;
}
Size overlaySize = this.RenderAreaPictureBox.Size;
overlaySize.Width -= 2 * 5;
overlaySize.Height -= 2 * 5;
Point overlayLocation = this.Location;
overlayLocation.X += 5 + (this.Size.Width - this.RenderAreaPictureBox.Size.Width) / 2;
overlayLocation.Y += 5 + (this.Size.Height - this.RenderAreaPictureBox.Size.Height) - (this.Size.Width - this.RenderAreaPictureBox.Size.Width) / 2;
this._isPositionChanged = false;
this._overlay.Size = overlaySize;
this._overlay.Location = overlayLocation;
}
#region GUI events
protected override CreateParams CreateParams
{
get
{
var Params = base.CreateParams;
Params.ExStyle |= (int)DwmApiNativeMethods.WS_EX_TOOLWINDOW;
return Params;
}
}
private void Move_Handler(object sender, EventArgs e)
{
this._isPositionChanged = true;
this.ThumbnailMoved?.Invoke(this.Id);
}
private void Resize_Handler(object sender, EventArgs e)
{
this._isSizeChanged = true;
this.ThumbnailResized?.Invoke(this.Id);
}
private void Focused_Handler(object sender, EventArgs e)
{
this.ThumbnailFocused?.Invoke(this.Id);
}
private void LostFocus_Handler(object sender, EventArgs e)
{
this.ThumbnailLostFocus?.Invoke(this.Id);
}
private void ThumbnailActivated_Handler(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
this.ThumbnailActivated?.Invoke(this.Id);
}
//if (e.Button == MouseButtons.Right)
//{
// // do smth cool?
//}
if (e.Button == MouseButtons.Middle)
{
//// Trigger full thumbnail refresh
//this.UnregisterThumbnail();
//this.Refresh();
}
}
private void HotkeyPressed_Handler(object sender, HandledEventArgs e)
{
this.ThumbnailActivated?.Invoke(this.Id);
e.Handled = true;
}
#endregion
private void RegisterThumbnail()
{
this._thumbnailHandle = DwmApiNativeMethods.DwmRegisterThumbnail(this.Handle, this.Id);
this._thumbnail = new DWM_THUMBNAIL_PROPERTIES();
this._thumbnail.dwFlags = DWM_TNP_CONSTANTS.DWM_TNP_VISIBLE
+ DWM_TNP_CONSTANTS.DWM_TNP_OPACITY
+ DWM_TNP_CONSTANTS.DWM_TNP_RECTDESTINATION
+ DWM_TNP_CONSTANTS.DWM_TNP_SOURCECLIENTAREAONLY;
this._thumbnail.opacity = 255;
this._thumbnail.fVisible = true;
this._thumbnail.fSourceClientAreaOnly = true;
this._isThumbnailSetUp = true;
}
private void UnregisterThumbnail(IntPtr thumbnailHandle)
{
try
{
DwmApiNativeMethods.DwmUnregisterThumbnail(thumbnailHandle);
}
catch (ArgumentException)
{
}
}
//private Hotkey _hotkey; // This field stores the hotkey reference
//public void RegisterShortcut(string shortcut)
//{
//if (String.IsNullOrEmpty(shortcut))
//{
// return;
//}
//KeysConverter converter = new KeysConverter();
//object keysObject = converter.ConvertFrom(shortcut);
//if (keysObject == null)
//{
// return;
//}
//Keys key = (Keys)keysObject;
//Hotkey hotkey = new Hotkey();
//if ((key & Keys.Shift) == Keys.Shift)
//{
// hotkey.Shift = true;
//}
//if ((key & Keys.Alt) == Keys.Alt)
//{
// hotkey.Alt = true;
//}
//if ((key & Keys.Control) == Keys.Control)
//{
// hotkey.Control = true;
//}
//key = key & ~Keys.Shift & ~Keys.Alt & ~Keys.Control;
//hotkey.KeyCode = key;
//hotkey.Pressed += Hotkey_Pressed;
//hotkey.Register(this);
//this._hotkey = hotkey;
//}
}
}

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 EnableClientLayoutTracking { get; set; }
bool HideActiveClientThumbnail { get; set; }
bool ShowThumbnailsAlwaysOnTop { get; set; }
bool HideThumbnailsOnLostFocus { get; set; }
bool EnablePerClientThumbnailsLayouts { get; set; }
bool SyncThumbnailsSize { get; set; }
Size ThumbnailSize { get; set; }
bool EnableThumbnailZoom { get; set; }
int ThumbnailZoomFactor { get; set; }
ViewZoomAnchor ThumbnailZoomAnchor { get; set; }
bool ShowThumbnailOverlays { get; set; }
bool ShowThumbnailFrames { get; set; }
void SetForumUrl(string url);
void SetThumbnailSizeLimitations(Size minimumSize, Size maximumSize);
void Minimize();
void AddThumbnails(IList<IThumbnailDescriptionView> thumbnails);
void UpdateThumbnails(IList<IThumbnailDescriptionView> thumbnails);
void RemoveThumbnails(IList<IThumbnailDescriptionView> thumbnails);
void RefreshZoomSettings();
Action ApplicationExitRequested { get; set; }
Action FormActivated { get; set; }
Action FormMinimized { get; set; }
Action<ViewCloseRequest> FormCloseRequested { get; set; }
Action ApplicationSettingsChanged { get; set; }
Action ThumbnailsSizeChanged { get; set; }
Action<IntPtr> ThumbnailStateChanged { get; set; }
Action ForumUrlLinkActivated { get; set; }
}
}

View File

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

View File

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

View File

@@ -0,0 +1,39 @@
using System;
using System.Drawing;
using System.Windows.Forms;
namespace EveOPreview.UI
{
public interface IThumbnailView : IView
{
IntPtr Id { get; set; }
string Title { get; set; }
bool IsEnabled { get; set; }
bool IsActive { get; set; }
Point Location { get; set; }
Size Size { get; set; }
bool IsOverlayEnabled { get; set; }
bool IsKnownHandle(IntPtr handle);
void SetSizeLimitations(Size minimumSize, Size maximumSize);
void SetOpacity(double opacity);
void SetWindowFrames(bool enable);
void SetTopMost(bool enableTopmost);
void ZoomIn(ViewZoomAnchor anchor, int zoomFactor);
void ZoomOut();
void RegisterHotkey(Keys hotkey);
void UnregisterHotkey();
void Refresh(bool forceRefresh);
Action<IntPtr> ThumbnailResized { get; set; }
Action<IntPtr> ThumbnailMoved { get; set; }
Action<IntPtr> ThumbnailFocused { get; set; }
Action<IntPtr> ThumbnailLostFocus { get; set; }
Action<IntPtr> ThumbnailActivated { get; set; }
}
}

View File

@@ -0,0 +1,10 @@
using System;
using System.Drawing;
namespace EveOPreview.UI
{
public interface IThumbnailViewFactory
{
IThumbnailView Create(IntPtr id, string title, Size size);
}
}

View File

@@ -0,0 +1,15 @@
namespace EveOPreview.UI
{
public enum ViewZoomAnchor
{
NW,
N,
NE,
W,
C,
E,
SW,
S,
SE
}
}

View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Costura.Fody" version="1.3.3.0" targetFramework="net45" developmentDependency="true" />
<package id="Fody" version="1.29.4" targetFramework="net45" developmentDependency="true" />
<package id="LightInject" version="4.0.9" targetFramework="net45" />
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net45" />
</packages>

3
ExeFile/.gitignore vendored
View File

@@ -1,3 +0,0 @@
bin/*
obj/*
*.suo

View File

@@ -1,3 +0,0 @@
syntax: glob
bin/*
obj/*

View File

@@ -1,17 +0,0 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace ExeFile
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}

View File

@@ -1,37 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ExeFile
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
Random random = new Random();
this.Title += random.Next().ToString("X");
this.grid.Background = new SolidColorBrush(
Color.FromArgb((byte)255,
(byte)random.Next(0, 255),
(byte)random.Next(0, 255),
(byte)random.Next(0, 255)
)
);
}
}
}

View File

@@ -1,55 +0,0 @@
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ExeFile")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ExeFile")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
//In order to begin building localizable applications, set
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
//inside a <PropertyGroup>. For example, if you are using US english
//in your source files, set the <UICulture> to en-US. Then uncomment
//the NeutralResourceLanguage attribute below. Update the "en-US" in
//the line below to match the UICulture setting in the project file.
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

302
Hotkey.cs
View File

@@ -1,302 +0,0 @@
using System;
using System.Windows.Forms;
using System.ComponentModel;
using System.Xml.Serialization;
using System.Runtime.InteropServices;
namespace MovablePython
{
public class Hotkey : IMessageFilter
{
#region Interop
[DllImport("user32.dll", SetLastError = true)]
private static extern int RegisterHotKey(IntPtr hWnd, int id, uint fsModifiers, Keys vk);
[DllImport("user32.dll", SetLastError=true)]
private static extern int UnregisterHotKey(IntPtr hWnd, int id);
private const uint WM_HOTKEY = 0x312;
private const uint MOD_ALT = 0x1;
private const uint MOD_CONTROL = 0x2;
private const uint MOD_SHIFT = 0x4;
private const uint MOD_WIN = 0x8;
private const uint ERROR_HOTKEY_ALREADY_REGISTERED = 1409;
#endregion
private static int currentID;
private const int maximumID = 0xBFFF;
private Keys keyCode;
private bool shift;
private bool control;
private bool alt;
private bool windows;
[XmlIgnore]
private int id;
[XmlIgnore]
private bool registered;
[XmlIgnore]
private Control windowControl;
public event HandledEventHandler Pressed;
public Hotkey() : this(Keys.None, false, false, false, false)
{
// No work done here!
}
public Hotkey(Keys keyCode, bool shift, bool control, bool alt, bool windows)
{
// Assign properties
this.KeyCode = keyCode;
this.Shift = shift;
this.Control = control;
this.Alt = alt;
this.Windows = windows;
// Register us as a message filter
Application.AddMessageFilter(this);
}
~Hotkey()
{
// Unregister the hotkey if necessary
if (this.Registered)
{ this.Unregister(); }
}
public Hotkey Clone()
{
// Clone the whole object
return new Hotkey(this.keyCode, this.shift, this.control, this.alt, this.windows);
}
public bool GetCanRegister(Control windowControl)
{
// Handle any exceptions: they mean "no, you can't register" :)
try
{
// Attempt to register
if (!this.Register(windowControl))
{ return false; }
// Unregister and say we managed it
this.Unregister();
return true;
}
catch (Win32Exception)
{ return false; }
catch (NotSupportedException)
{ return false; }
}
public bool Register(Control windowControl)
{
// Check that we have not registered
if (this.registered)
{ throw new NotSupportedException("You cannot register a hotkey that is already registered"); }
// We can't register an empty hotkey
if (this.Empty)
{ throw new NotSupportedException("You cannot register an empty hotkey"); }
// Get an ID for the hotkey and increase current ID
this.id = Hotkey.currentID;
Hotkey.currentID = Hotkey.currentID + 1 % Hotkey.maximumID;
// Translate modifier keys into unmanaged version
uint modifiers = (this.Alt ? Hotkey.MOD_ALT : 0) | (this.Control ? Hotkey.MOD_CONTROL : 0) |
(this.Shift ? Hotkey.MOD_SHIFT : 0) | (this.Windows ? Hotkey.MOD_WIN : 0);
// Register the hotkey
if (Hotkey.RegisterHotKey(windowControl.Handle, this.id, modifiers, keyCode) == 0)
{
// Is the error that the hotkey is registered?
if (Marshal.GetLastWin32Error() == ERROR_HOTKEY_ALREADY_REGISTERED)
{ return false; }
else
{ throw new Win32Exception(); }
}
// Save the control reference and register state
this.registered = true;
this.windowControl = windowControl;
// We successfully registered
return true;
}
public void Unregister()
{
// Check that we have registered
if (!this.registered)
{ throw new NotSupportedException("You cannot unregister a hotkey that is not registered"); }
// It's possible that the control itself has died: in that case, no need to unregister!
if (!this.windowControl.IsDisposed)
{
// Clean up after ourselves
if (Hotkey.UnregisterHotKey(this.windowControl.Handle, this.id) == 0)
{ throw new Win32Exception(); }
}
// Clear the control reference and register state
this.registered = false;
this.windowControl = null;
}
private void Reregister()
{
// Only do something if the key is already registered
if (!this.registered)
{ return; }
// Save control reference
Control windowControl = this.windowControl;
// Unregister and then reregister again
this.Unregister();
this.Register(windowControl);
}
public bool PreFilterMessage(ref Message message)
{
// Only process WM_HOTKEY messages
if (message.Msg != Hotkey.WM_HOTKEY)
{ return false; }
// Check that the ID is our key and we are registerd
if (this.registered && (message.WParam.ToInt32() == this.id))
{
// Fire the event and pass on the event if our handlers didn't handle it
return this.OnPressed();
}
else
{ return false; }
}
private bool OnPressed()
{
// Fire the event if we can
HandledEventArgs handledEventArgs = new HandledEventArgs(false);
if (this.Pressed != null)
{ this.Pressed(this, handledEventArgs); }
// Return whether we handled the event or not
return handledEventArgs.Handled;
}
public override string ToString()
{
// We can be empty
if (this.Empty)
{ return "(none)"; }
// Build key name
string keyName = Enum.GetName(typeof(Keys), this.keyCode);;
switch (this.keyCode)
{
case Keys.D0:
case Keys.D1:
case Keys.D2:
case Keys.D3:
case Keys.D4:
case Keys.D5:
case Keys.D6:
case Keys.D7:
case Keys.D8:
case Keys.D9:
// Strip the first character
keyName = keyName.Substring(1);
break;
default:
// Leave everything alone
break;
}
// Build modifiers
string modifiers = "";
if (this.shift)
{ modifiers += "Shift+"; }
if (this.control)
{ modifiers += "Control+"; }
if (this.alt)
{ modifiers += "Alt+"; }
if (this.windows)
{ modifiers += "Windows+"; }
// Return result
return modifiers + keyName;
}
public bool Empty
{
get { return this.keyCode == Keys.None; }
}
public bool Registered
{
get { return this.registered; }
}
public Keys KeyCode
{
get { return this.keyCode; }
set
{
// Save and reregister
this.keyCode = value;
this.Reregister();
}
}
public bool Shift
{
get { return this.shift; }
set
{
// Save and reregister
this.shift = value;
this.Reregister();
}
}
public bool Control
{
get { return this.control; }
set
{
// Save and reregister
this.control = value;
this.Reregister();
}
}
public bool Alt
{
get { return this.alt; }
set
{
// Save and reregister
this.alt = value;
this.Reregister();
}
}
public bool Windows
{
get { return this.windows; }
set
{
// Save and reregister
this.windows = value;
this.Reregister();
}
}
}
}

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2010-2016 StinkRay, Makari Aeron, CCP FoxFour, Anton V/ Kasyanov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

67
Preview.Designer.cs generated
View File

@@ -1,67 +0,0 @@
namespace PreviewToy
{
partial class Preview
{
/// <summary>
/// Required designer variable.
/// </summary>
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.render_area = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.render_area)).BeginInit();
this.SuspendLayout();
//
// render_area
//
this.render_area.BackColor = System.Drawing.Color.Transparent;
this.render_area.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.render_area.Cursor = System.Windows.Forms.Cursors.Hand;
this.render_area.Dock = System.Windows.Forms.DockStyle.Fill;
this.render_area.Location = new System.Drawing.Point(0, 0);
this.render_area.Margin = new System.Windows.Forms.Padding(0);
this.render_area.Name = "render_area";
this.render_area.Size = new System.Drawing.Size(153, 89);
this.render_area.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.render_area.TabIndex = 0;
this.render_area.TabStop = false;
this.render_area.MouseUp += new System.Windows.Forms.MouseEventHandler(this.render_area_Click);
//
// Preview
//
this.AccessibleRole = System.Windows.Forms.AccessibleRole.None;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(153, 89);
this.ControlBox = false;
this.Controls.Add(this.render_area);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.MinimumSize = new System.Drawing.Size(64, 64);
this.Name = "Preview";
this.Opacity = 0.1D;
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.Text = "Preview";
this.TopMost = true;
this.Load += new System.EventHandler(this.Preview_Load);
((System.ComponentModel.ISupportInitialize)(this.render_area)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.PictureBox render_area;
}
}

View File

@@ -1,355 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Diagnostics;
using MovablePython;
namespace PreviewToy
{
public partial class Preview : Form
{
public bool show_overlay = true;
public bool hover_zoom = true;
public bool is_zoomed = false;
public bool is_hovered_over = false;
private bool mouse_over_lock = false;
private Size old_size;
private Point old_position;
private IntPtr m_hThumbnail;
public IntPtr sourceWindow;
private DwmApi.DWM_THUMBNAIL_PROPERTIES m_ThumbnailProperties;
private bool has_been_set_up = false;
private bool thumbnail_has_been_set_up = false;
private PreviewToyHandler spawner;
private Hotkey hotkey;
private bool hide = false;
public PreviewOverlay overlay;
public void MakeHidden(bool wha)
{
hide = wha;
}
public override string ToString()
{
return this.Text;
}
public void MakeTopMost(bool topmost)
{
this.TopMost = topmost && !(this.hide);
}
public Preview(IntPtr sourceWindow, String title, PreviewToyHandler spawner, Size size)
{
has_been_set_up = false;
this.sourceWindow = sourceWindow;
this.spawner = spawner;
InitializeComponent();
this.Text = title;
this.overlay = new PreviewOverlay(this);
this.render_area.MouseHover += new System.EventHandler(this.preview_MouseHover);
this.render_area.MouseLeave += new System.EventHandler(this.preview_MouseLeave);
this.old_size = this.Size;
this.old_position = this.Location;
has_been_set_up = true;
}
public void preview_MouseHover(object sender, System.EventArgs e)
{
if (!mouse_over_lock)
{
mouse_over_lock = true;
if (hover_zoom)
doZoom();
TopMost = true;
overlay.TopMost = true;
}
this.Opacity = 1.0f;
this.is_hovered_over = true;
RefreshPreview();
}
protected override CreateParams CreateParams
{
get
{
var Params = base.CreateParams;
Params.ExStyle |= 0x80;
return Params;
}
}
public void registerShortcut(string shortcut)
{
if (shortcut == "")
return;
var cvt = new KeysConverter();
var key = (Keys)cvt.ConvertFrom(shortcut);
Hotkey hotkey = new Hotkey();
if ((key & Keys.Shift) == Keys.Shift)
{
hotkey.Shift = true;
}
if ((key & Keys.Alt) == Keys.Alt)
{
hotkey.Alt = true;
}
if ((key & Keys.Control) == Keys.Control)
{
hotkey.Control = true;
}
key = key & ~Keys.Shift & ~Keys.Alt & ~Keys.Control;
hotkey.KeyCode = key;
hotkey.Register(this);
hotkey.Pressed += delegate { bring_client_to_foreground(); spawner.preview_did_switch(); };
this.hotkey = hotkey;
}
public void doZoom()
{
if (is_zoomed)
return;
is_zoomed = true;
float hover_zoom_factor = Properties.Settings.Default.zoom_amount;
old_size = Size;
old_position = Location;
Size = new Size((int)(hover_zoom_factor * (float)Size.Width), (int)(hover_zoom_factor * (float)Size.Height));
switch ((PreviewToyHandler.zoom_anchor_t)Properties.Settings.Default.zoom_anchor)
{
case (PreviewToyHandler.zoom_anchor_t.NW):
break;
case (PreviewToyHandler.zoom_anchor_t.N):
Location = new Point(Location.X - Size.Width / 2 + old_size.Width / 2, Location.Y);
break;
case (PreviewToyHandler.zoom_anchor_t.NE):
Location = new Point(Location.X - Size.Width + old_size.Width, Location.Y);
break;
case (PreviewToyHandler.zoom_anchor_t.W):
Location = new Point(Location.X, Location.Y - Size.Height / 2 + old_size.Height / 2);
break;
case (PreviewToyHandler.zoom_anchor_t.C):
Location = new Point(Location.X - Size.Width / 2 + old_size.Width / 2, Location.Y - Size.Height / 2 + old_size.Height / 2);
break;
case (PreviewToyHandler.zoom_anchor_t.E):
Location = new Point(Location.X - Size.Width + old_size.Width, Location.Y - Size.Height / 2 + old_size.Height / 2);
break;
case (PreviewToyHandler.zoom_anchor_t.SW):
Location = new Point(Location.X, Location.Y - Size.Height + old_size.Height);
break;
case (PreviewToyHandler.zoom_anchor_t.S):
Location = new Point(Location.X - Size.Width / 2 + old_size.Width / 2, Location.Y - Size.Height + old_size.Height);
break;
case (PreviewToyHandler.zoom_anchor_t.SE):
Location = new Point(Location.X - Size.Width + old_size.Width, Location.Y - Size.Height + old_size.Height);
break;
}
}
public void restoreZoom()
{
if (!is_zoomed)
return;
Size = old_size;
Location = old_position;
is_zoomed = false;
}
public void preview_MouseLeave(object sender, System.EventArgs e)
{
if (mouse_over_lock)
{
if (hover_zoom)
{
restoreZoom();
}
mouse_over_lock = false;
}
this.is_hovered_over = false;
this.Opacity = Properties.Settings.Default.opacity;
RefreshPreview();
}
protected override void OnResize(EventArgs e)
{
RefreshPreview();
base.OnResize(e);
if (has_been_set_up && !mouse_over_lock)
this.spawner.syncronize_preview_size(this.Size);
}
protected override void OnMove(EventArgs e)
{
base.OnMove(e);
if (has_been_set_up && !mouse_over_lock)
this.spawner.register_preview_position(this.Text, this.Location);
RefreshPreview();
}
public void doMove(Point position)
{
if (has_been_set_up && !mouse_over_lock)
Location = position;
RefreshPreview();
}
public void SetLabel(String label)
{
this.Text = label;
this.overlay.client_label.Text = label;
}
public void RefreshPreview()
{
if (has_been_set_up)
{
if (DwmApi.DwmIsCompositionEnabled())
{
if (thumbnail_has_been_set_up == false)
{
this.SetUpThumbnail();
}
m_ThumbnailProperties.rcDestination = new DwmApi.RECT(0, 0, ClientRectangle.Right, ClientRectangle.Bottom);
DwmApi.DwmUpdateThumbnailProperties(m_hThumbnail, m_ThumbnailProperties);
}
else
{
thumbnail_has_been_set_up = false;
}
Size overlay_size = this.render_area.Size;
overlay_size.Width -= 2 * 5;
overlay_size.Height -= 2 * 5;
Point overlay_location = this.Location;
overlay_location.X += 5 + (this.Size.Width - this.render_area.Size.Width) / 2;
overlay_location.Y += 5 + (this.Size.Height - this.render_area.Size.Height) - (this.Size.Width - this.render_area.Size.Width) / 2;
this.overlay.Size = overlay_size;
this.overlay.Location = overlay_location;
}
}
new public void Show()
{
if (!hide)
{
base.Show();
if (show_overlay)
this.overlay.Show();
else
this.overlay.Hide();
}
else
{
this.Hide();
this.overlay.Hide();
}
}
new public void Hide()
{
base.Hide();
this.overlay.Hide();
}
private void SetUpThumbnail()
{
if (DwmApi.DwmIsCompositionEnabled() && !thumbnail_has_been_set_up)
{
m_hThumbnail = DwmApi.DwmRegisterThumbnail(this.Handle, sourceWindow);
m_ThumbnailProperties = new DwmApi.DWM_THUMBNAIL_PROPERTIES();
m_ThumbnailProperties.dwFlags = DwmApi.DWM_THUMBNAIL_PROPERTIES.DWM_TNP_VISIBLE
+ DwmApi.DWM_THUMBNAIL_PROPERTIES.DWM_TNP_OPACITY
+ DwmApi.DWM_THUMBNAIL_PROPERTIES.DWM_TNP_RECTDESTINATION
+ DwmApi.DWM_THUMBNAIL_PROPERTIES.DWM_TNP_SOURCECLIENTAREAONLY;
m_ThumbnailProperties.opacity = 255;
m_ThumbnailProperties.fVisible = true;
m_ThumbnailProperties.fSourceClientAreaOnly = true;
m_ThumbnailProperties.rcDestination = new DwmApi.RECT(0, 0, ClientRectangle.Right, ClientRectangle.Bottom);
DwmApi.DwmUpdateThumbnailProperties(m_hThumbnail, m_ThumbnailProperties);
thumbnail_has_been_set_up = true;
}
}
private void Preview_Load(object sender, EventArgs e)
{
}
public void bring_client_to_foreground()
{
DwmApi.SetForegroundWindow(sourceWindow);
int style = DwmApi.GetWindowLong(sourceWindow, DwmApi.GWL_STYLE);
if ((style & DwmApi.WS_MAXIMIZE) == DwmApi.WS_MAXIMIZE)
{
//It's maximized
}
else if ((style & DwmApi.WS_MINIMIZE) == DwmApi.WS_MINIMIZE)
{
DwmApi.ShowWindowAsync(sourceWindow, DwmApi.SW_SHOWNORMAL);
}
}
public void render_area_Click(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
bring_client_to_foreground();
spawner.preview_did_switch();
}
if (e.Button == MouseButtons.Right)
{
// do smth cool?
}
if (e.Button == MouseButtons.Middle)
{
// do smth cool?
}
}
public void set_render_area_size(Size size)
{
this.Size = size;
}
}
}

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 PreviewToy
{
partial class PreviewToyHandler
{
/// <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(PreviewToyHandler));
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 = "PreviewToyHandler";
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,948 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Diagnostics;
using System.Drawing.Text;
using System.Windows.Threading;
using System.Xml.Linq;
using System.Linq;
using System.IO;
namespace PreviewToy
{
public partial class PreviewToyHandler : Form
{
private const int WM_SIZE = 5;
private const int SIZE_RESTORED = 0;
private const int SIZE_MINIMIZED = 1;
private const int SIZE_MAXIMIZED = 2;
private const int SIZE_MAXSHOW = 3;
private const int SIZE_MAXHIDE = 4;
public event EventHandler Minimized;
public event EventHandler Maximized;
public event EventHandler Restored;
private Dictionary<IntPtr, Preview> previews;
private DispatcherTimer dispatcherTimer;
private IntPtr active_client_handle = (IntPtr)0;
private String active_client_title = "";
private Dictionary<String, Dictionary<String, Point>> unique_layouts;
private Dictionary<String, Point> flat_layout;
private Dictionary<String, String> flat_layout_shortcuts;
private Dictionary<String, ClientLocation> client_layout;
private bool is_initialized;
private Stopwatch ignoring_size_sync;
Dictionary<string, string> xml_bad_to_ok_chars;
[DllImport("user32.dll")]
private static extern int GetWindowRect(IntPtr hwnd, out Rect rect);
[DllImport("user32.dll")]
public static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);
private struct Rect
{
public int Left;
public int Top;
public int Right;
public int Bottom;
}
private struct ClientLocation
{
public int X;
public int Y;
public int Width;
public int Height;
}
public enum zoom_anchor_t
{
NW = 0,
N,
NE,
W,
C,
E,
SW,
S,
SE
};
private Dictionary<zoom_anchor_t, RadioButton> zoom_anchor_button_map;
public PreviewToyHandler()
{
is_initialized = false;
previews = new Dictionary<IntPtr, Preview>();
xml_bad_to_ok_chars = new Dictionary<string, string>();
xml_bad_to_ok_chars["<"] = "---lt---";
xml_bad_to_ok_chars["&"] = "---amp---";
xml_bad_to_ok_chars[">"] = "---gt---";
xml_bad_to_ok_chars["\""] = "---quot---";
xml_bad_to_ok_chars["\'"] = "---apos---";
xml_bad_to_ok_chars[","] = "---comma---";
xml_bad_to_ok_chars["."] = "---dot---";
unique_layouts = new Dictionary<String, Dictionary<String, Point>>();
flat_layout = new Dictionary<String, Point>();
flat_layout_shortcuts = new Dictionary<String, String>();
client_layout = new Dictionary<String, ClientLocation>();
ignoring_size_sync = new Stopwatch();
ignoring_size_sync.Start();
InitializeComponent();
init_options();
// DispatcherTimer setup
dispatcherTimer = new DispatcherTimer();
dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick);
dispatcherTimer.Interval = new TimeSpan(0, 0, 1);
dispatcherTimer.Start();
is_initialized = true;
previews_check_listbox.DisplayMember = "Text";
}
private void GlassForm_Load(object sender, EventArgs e)
{
refresh_thumbnails();
}
private void init_options()
{
this.Minimized += new EventHandler(MainForm_Minimized);
option_zoom_on_hover.Checked = Properties.Settings.Default.zoom_on_hover;
zoom_anchor_button_map = new Dictionary<zoom_anchor_t, RadioButton>();
zoom_anchor_button_map[zoom_anchor_t.NW] = option_zoom_anchor_NW;
zoom_anchor_button_map[zoom_anchor_t.N] = option_zoom_anchor_N;
zoom_anchor_button_map[zoom_anchor_t.NE] = option_zoom_anchor_NE;
zoom_anchor_button_map[zoom_anchor_t.W] = option_zoom_anchor_W;
zoom_anchor_button_map[zoom_anchor_t.C] = option_zoom_anchor_C;
zoom_anchor_button_map[zoom_anchor_t.E] = option_zoom_anchor_E;
zoom_anchor_button_map[zoom_anchor_t.SW] = option_zoom_anchor_SW;
zoom_anchor_button_map[zoom_anchor_t.S] = option_zoom_anchor_S;
zoom_anchor_button_map[zoom_anchor_t.SE] = option_zoom_anchor_SE;
zoom_anchor_button_map[(zoom_anchor_t)Properties.Settings.Default.zoom_anchor].Checked = true;
option_zoom_factor.Text = Properties.Settings.Default.zoom_amount.ToString();
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 zoom_anchor_button_map)
{
kv.Value.Enabled = Properties.Settings.Default.zoom_on_hover;
}
opacity_bar.Value = Math.Min(100, (int)(100.0 * Properties.Settings.Default.opacity));
load_layout();
}
private void spawn_and_kill_previews()
{
if (!is_initialized) { return; }
Process[] processes = Process.GetProcessesByName("ExeFile");
List<IntPtr> processHandles = new List<IntPtr>();
// pop new previews
foreach (Process process in processes)
{
processHandles.Add(process.MainWindowHandle);
Size sync_size = new Size();
sync_size.Width = (int)Properties.Settings.Default.sync_resize_x;
sync_size.Height = (int)Properties.Settings.Default.sync_resize_y;
if (!previews.ContainsKey(process.MainWindowHandle) && process.MainWindowTitle != "")
{
previews[process.MainWindowHandle] = new Preview(process.MainWindowHandle, "...", this, sync_size);
previews[process.MainWindowHandle].set_render_area_size(sync_size);
// apply more thumbnail specific options
previews[process.MainWindowHandle].MakeTopMost(Properties.Settings.Default.always_on_top);
set_thumbnail_frame_style(previews[process.MainWindowHandle], Properties.Settings.Default.show_thumb_frames);
// add a preview also
previews_check_listbox.BeginUpdate();
previews_check_listbox.Items.Add(previews[process.MainWindowHandle]);
previews_check_listbox.EndUpdate();
refresh_client_window_locations(process);
}
else if (previews.ContainsKey(process.MainWindowHandle) && process.MainWindowTitle != previews[process.MainWindowHandle].Text) //or update the preview titles
{
previews[process.MainWindowHandle].SetLabel(process.MainWindowTitle);
string key = previews[process.MainWindowHandle].Text;
string value;
if (flat_layout_shortcuts.TryGetValue(key, out value))
{
previews[process.MainWindowHandle].registerShortcut(value);
}
refresh_client_window_locations(process);
}
if (process.MainWindowHandle == DwmApi.GetForegroundWindow())
{
active_client_handle = process.MainWindowHandle;
active_client_title = process.MainWindowTitle;
}
}
// clean up old previews
List<IntPtr> to_be_pruned = new List<IntPtr>();
foreach (IntPtr processHandle in previews.Keys)
{
if (!(processHandles.Contains(processHandle)))
{
to_be_pruned.Add(processHandle);
}
}
foreach (IntPtr processHandle in to_be_pruned)
{
previews_check_listbox.BeginUpdate();
previews_check_listbox.Items.Remove(previews[processHandle]);
previews_check_listbox.EndUpdate();
previews[processHandle].overlay.Close();
previews[processHandle].Close();
previews.Remove(processHandle);
}
previews_check_listbox.Update();
}
private void refresh_client_window_locations(Process process)
{
if (Properties.Settings.Default.track_client_windows && client_layout.ContainsKey(process.MainWindowTitle))
{
MoveWindow(
process.MainWindowHandle,
client_layout[process.MainWindowTitle].X,
client_layout[process.MainWindowTitle].Y,
client_layout[process.MainWindowTitle].Width,
client_layout[process.MainWindowTitle].Height,
true);
}
}
private string remove_nonconform_xml_characters(string entry)
{
foreach (var kv in xml_bad_to_ok_chars)
{
entry = entry.Replace(kv.Key, kv.Value);
}
return entry;
}
private string restore_nonconform_xml_characters(string entry)
{
foreach (var kv in xml_bad_to_ok_chars)
{
entry = entry.Replace(kv.Value, kv.Key);
}
return entry;
}
private XElement MakeXElement(string input)
{
string clean = remove_nonconform_xml_characters(input).Replace(" ", "_");
return new XElement(clean);
}
private string ParseXElement(XElement input)
{
return restore_nonconform_xml_characters(input.Name.ToString()).Replace("_", " ");
}
private void load_layout()
{
if (File.Exists("layout.xml"))
{
XElement rootElement = XElement.Load("layout.xml");
foreach (var el in rootElement.Elements())
{
Dictionary<String, Point> inner = new Dictionary<String, Point>();
foreach (var inner_el in el.Elements())
{
inner[ParseXElement(inner_el)] = new Point(Convert.ToInt32(inner_el.Element("x").Value), Convert.ToInt32(inner_el.Element("y").Value));
}
unique_layouts[ParseXElement(el)] = inner;
}
}
if (File.Exists("flat_layout.xml"))
{
XElement rootElement = XElement.Load("flat_layout.xml");
foreach (var el in rootElement.Elements())
{
flat_layout[ParseXElement(el)] = new Point(Convert.ToInt32(el.Element("x").Value), Convert.ToInt32(el.Element("y").Value));
flat_layout_shortcuts[ParseXElement(el)] = "";
if (el.Element("shortcut") != null)
{
flat_layout_shortcuts[ParseXElement(el)] = el.Element("shortcut").Value;
}
}
}
if (File.Exists("client_layout.xml"))
{
XElement rootElement = XElement.Load("client_layout.xml");
foreach (var el in rootElement.Elements())
{
ClientLocation clientLocation = new ClientLocation();
clientLocation.X = Convert.ToInt32(el.Element("x").Value);
clientLocation.Y = Convert.ToInt32(el.Element("y").Value);
clientLocation.Width = Convert.ToInt32(el.Element("width").Value);
clientLocation.Height = Convert.ToInt32(el.Element("height").Value);
client_layout[ParseXElement(el)] = clientLocation;
}
}
}
private void store_layout()
{
XElement el = new XElement("layouts");
foreach (var client in unique_layouts.Keys)
{
if (client == "")
{
continue;
}
XElement layout = MakeXElement(client);
foreach (var thumbnail_ in unique_layouts[client])
{
String thumbnail = thumbnail_.Key;
if (thumbnail == "" || thumbnail == "...")
{
continue;
}
XElement position = MakeXElement(thumbnail);
position.Add(new XElement("x", thumbnail_.Value.X));
position.Add(new XElement("y", thumbnail_.Value.Y));
layout.Add(position);
}
el.Add(layout);
}
el.Save("layout.xml");
XElement el2 = new XElement("flat_layout");
foreach (var clientKV in flat_layout)
{
if (clientKV.Key == "" || clientKV.Key == "...")
{
continue;
}
XElement layout = MakeXElement(clientKV.Key);
layout.Add(new XElement("x", clientKV.Value.X));
layout.Add(new XElement("y", clientKV.Value.Y));
string shortcut;
if (flat_layout_shortcuts.TryGetValue(clientKV.Key, out shortcut))
{
layout.Add(new XElement("shortcut", shortcut));
}
el2.Add(layout);
}
el2.Save("flat_layout.xml");
XElement el3 = new XElement("client_layout");
foreach (var clientKV in client_layout)
{
if (clientKV.Key == "" || clientKV.Key == "...")
{
continue;
}
XElement layout = MakeXElement(clientKV.Key);
layout.Add(new XElement("x", clientKV.Value.X));
layout.Add(new XElement("y", clientKV.Value.Y));
layout.Add(new XElement("width", clientKV.Value.Width));
layout.Add(new XElement("height", clientKV.Value.Height));
el3.Add(layout);
}
el3.Save("client_layout.xml");
}
private void handle_unique_layout(Preview preview, String last_known_active_window)
{
Dictionary<String, Point> layout;
if (unique_layouts.TryGetValue(last_known_active_window, out layout))
{
Point new_loc;
if (Properties.Settings.Default.unique_layout && layout.TryGetValue(preview.Text, out new_loc))
{
preview.doMove(new_loc);
}
else
{
// create inner dict
layout[preview.Text] = preview.Location;
}
}
else if (last_known_active_window != "")
{
// create outer dict
unique_layouts[last_known_active_window] = new Dictionary<String, Point>();
unique_layouts[last_known_active_window][preview.Text] = preview.Location;
}
}
private void update_client_locations()
{
Process[] processes = Process.GetProcessesByName("ExeFile");
List<IntPtr> processHandles = new List<IntPtr>();
foreach (Process process in processes)
{
Rect rect = new Rect();
GetWindowRect(process.MainWindowHandle, out rect);
int left = Math.Abs(rect.Left);
int right = Math.Abs(rect.Right);
int client_width = Math.Abs(left - right);
int top = Math.Abs(rect.Top);
int bottom = Math.Abs(rect.Bottom);
int client_height = Math.Abs(top - bottom);
ClientLocation clientLocation = new ClientLocation();
clientLocation.X = rect.Left;
clientLocation.Y = rect.Top;
clientLocation.Width = client_width;
clientLocation.Height = client_height;
client_layout[process.MainWindowTitle] = clientLocation;
}
}
public void preview_did_switch()
{
update_client_locations();
store_layout(); //todo: check if it actually changed ...
foreach (KeyValuePair<IntPtr, Preview> entry in previews)
{
entry.Value.MakeTopMost(Properties.Settings.Default.always_on_top);
//makes the PreviewOverlay topmost
entry.Value.overlay.makeTopMost();
}
}
private void handle_flat_layout(Preview preview)
{
Point layout;
if (flat_layout.TryGetValue(preview.Text, out layout))
{
preview.doMove(layout);
}
else if (preview.Text != "")
{
flat_layout[preview.Text] = preview.Location;
}
}
private bool window_is_preview_or_client(IntPtr window)
{
bool active_window_is_right_type = false;
foreach (KeyValuePair<IntPtr, Preview> entry in previews)
{
if (entry.Key == window || entry.Value.Handle == window || this.Handle == window || entry.Value.overlay.Handle == window)
{
active_window_is_right_type = true;
}
}
return active_window_is_right_type;
}
private void refresh_thumbnails()
{
IntPtr active_window = DwmApi.GetForegroundWindow();
// hide, show, resize and move
foreach (KeyValuePair<IntPtr, Preview> entry in previews)
{
if (!window_is_preview_or_client(active_window) && Properties.Settings.Default.hide_all)
{
entry.Value.Hide();
}
else if (entry.Key == active_client_handle && Properties.Settings.Default.hide_active)
{
entry.Value.Hide();
}
else
{
entry.Value.Show();
if (Properties.Settings.Default.unique_layout)
{
handle_unique_layout(entry.Value, active_client_title);
}
else
{
handle_flat_layout(entry.Value);
}
}
entry.Value.hover_zoom = Properties.Settings.Default.zoom_on_hover;
entry.Value.show_overlay = Properties.Settings.Default.show_overlay;
//makes the PreviewOverlay TopMost
entry.Value.overlay.makeTopMost();
if (!entry.Value.is_hovered_over)
{
entry.Value.Opacity = Properties.Settings.Default.opacity;
}
}
DwmApi.DwmIsCompositionEnabled();
}
public void syncronize_preview_size(Size sync_size)
{
if (!is_initialized) { return; }
if (Properties.Settings.Default.sync_resize &&
Properties.Settings.Default.show_thumb_frames &&
ignoring_size_sync.ElapsedMilliseconds > 500)
{
ignoring_size_sync.Stop();
option_sync_size_x.Text = sync_size.Width.ToString();
option_sync_size_y.Text = sync_size.Height.ToString();
foreach (KeyValuePair<IntPtr, Preview> entry in previews)
{
if (entry.Value.Handle != DwmApi.GetForegroundWindow())
{
entry.Value.set_render_area_size(sync_size);
}
}
}
}
public void register_preview_position(String preview_title, Point position)
{
if (Properties.Settings.Default.unique_layout)
{
Dictionary<String, Point> layout;
if (unique_layouts.TryGetValue(active_client_title, out layout))
{
layout[preview_title] = position;
}
else if (active_client_title == "")
{
unique_layouts[active_client_title] = new Dictionary<String, Point>();
unique_layouts[active_client_title][preview_title] = position;
}
}
else
{
flat_layout[preview_title] = position;
}
}
private void dispatcherTimer_Tick(object sender, EventArgs e)
{
spawn_and_kill_previews();
refresh_thumbnails();
if (ignoring_size_sync.ElapsedMilliseconds > 500) { ignoring_size_sync.Stop(); };
if (DwmApi.DwmIsCompositionEnabled())
{
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 option_hide_all_if_noneve_CheckedChanged(object sender, EventArgs e)
{
Properties.Settings.Default.hide_all = option_hide_all_if_not_right_type.Checked;
Properties.Settings.Default.Save();
refresh_thumbnails();
}
private void option_unique_layout_CheckedChanged(object sender, EventArgs e)
{
Properties.Settings.Default.unique_layout = option_unique_layout.Checked;
Properties.Settings.Default.Save();
refresh_thumbnails();
}
private void option_hide_active_CheckedChanged(object sender, EventArgs e)
{
Properties.Settings.Default.hide_active = option_hide_active.Checked;
Properties.Settings.Default.Save();
refresh_thumbnails();
}
private void option_sync_size_CheckedChanged(object sender, EventArgs e)
{
Properties.Settings.Default.sync_resize = option_sync_size.Checked;
Properties.Settings.Default.Save();
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
syncronize_preview_size(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)
{
parse_size_entry();
}
private void option_sync_size_y_TextChanged(object sender, EventArgs e)
{
parse_size_entry();
}
private void option_always_on_top_CheckedChanged(object sender, EventArgs e)
{
Properties.Settings.Default.always_on_top = option_always_on_top.Checked;
Properties.Settings.Default.Save();
refresh_thumbnails();
}
void set_thumbnail_frame_style(Preview preview, bool show_frames)
{
if (show_frames)
{
preview.FormBorderStyle = FormBorderStyle.SizableToolWindow;
}
else
{
preview.FormBorderStyle = FormBorderStyle.None;
}
}
private void option_show_thumbnail_frames_CheckedChanged(object sender, EventArgs e)
{
Properties.Settings.Default.show_thumb_frames = option_show_thumbnail_frames.Checked;
Properties.Settings.Default.Save();
if (Properties.Settings.Default.show_thumb_frames)
{
ignoring_size_sync.Stop();
ignoring_size_sync.Reset();
ignoring_size_sync.Start();
}
foreach (var thumbnail in previews)
{
set_thumbnail_frame_style(thumbnail.Value, Properties.Settings.Default.show_thumb_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)
{
Properties.Settings.Default.zoom_on_hover = option_zoom_on_hover.Checked;
Properties.Settings.Default.Save();
refresh_thumbnails();
option_zoom_factor.Enabled = Properties.Settings.Default.zoom_on_hover;
if (is_initialized)
{
foreach (var kv in zoom_anchor_button_map)
{
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();
refresh_thumbnails();
}
private void handle_zoom_anchor_setting()
{
foreach (var kv in zoom_anchor_button_map)
{
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)
{
refresh_thumbnails();
}
private void checkedListBox1_SelectedIndexChanged2(object sender, EventArgs e)
{
System.Windows.Forms.ItemCheckEventArgs arg = (System.Windows.Forms.ItemCheckEventArgs)e;
((Preview)this.previews_check_listbox.Items[arg.Index]).MakeHidden(arg.NewValue == System.Windows.Forms.CheckState.Checked);
refresh_thumbnails();
}
private void flowLayoutPanel1_Paint(object sender, PaintEventArgs e)
{
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
Properties.Settings.Default.track_client_windows = option_track_client_windows.Checked;
Properties.Settings.Default.Save();
refresh_thumbnails();
}
private void opacity_bar_Scroll(object sender, ScrollEventArgs e)
{
// fire off opacity change
Properties.Settings.Default.opacity = Math.Min((float)e.NewValue / 100.0f, 1.0f);
Properties.Settings.Default.Save();
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)
{
if (Restored != null)
{
Restored(this, e);
}
}
protected override void WndProc(ref Message m)
{
switch (m.Msg)
{
case WM_SIZE:
switch (m.WParam.ToInt32())
{
case SIZE_RESTORED:
OnRestored(EventArgs.Empty);
break;
case SIZE_MINIMIZED:
OnMinimized(EventArgs.Empty);
break;
case SIZE_MAXIMIZED:
OnMaximized(EventArgs.Empty);
break;
}
break;
default:
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

@@ -1,93 +0,0 @@
namespace PreviewToy
{
partial class PreviewOverlay
{
/// <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>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.overlay_area = new System.Windows.Forms.PictureBox();
this.client_label = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.overlay_area)).BeginInit();
this.SuspendLayout();
//
// overlay_area
//
this.overlay_area.BackColor = System.Drawing.Color.Transparent;
this.overlay_area.Cursor = System.Windows.Forms.Cursors.Hand;
this.overlay_area.Dock = System.Windows.Forms.DockStyle.Fill;
this.overlay_area.Location = new System.Drawing.Point(0, 0);
this.overlay_area.Name = "overlay_area";
this.overlay_area.Size = new System.Drawing.Size(284, 262);
this.overlay_area.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.overlay_area.TabIndex = 0;
this.overlay_area.TabStop = false;
this.overlay_area.MouseUp += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_Click);
//
// client_label
//
this.client_label.AutoSize = true;
this.client_label.Dock = System.Windows.Forms.DockStyle.Top;
this.client_label.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.client_label.ForeColor = System.Drawing.Color.DarkGray;
this.client_label.Location = new System.Drawing.Point(0, 0);
this.client_label.Name = "client_label";
this.client_label.Size = new System.Drawing.Size(25, 13);
this.client_label.TabIndex = 1;
this.client_label.Text = "...";
this.client_label.Click += new System.EventHandler(this.client_label_Click);
//
// PreviewOverlay
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Black;
this.ClientSize = new System.Drawing.Size(284, 262);
this.ControlBox = false;
this.Controls.Add(this.client_label);
this.Controls.Add(this.overlay_area);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "PreviewOverlay";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.Text = "PreviewOverlay";
this.TransparencyKey = System.Drawing.Color.Black;
this.Load += new System.EventHandler(this.PreviewOverlay_Load);
((System.ComponentModel.ISupportInitialize)(this.overlay_area)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
public System.Windows.Forms.PictureBox overlay_area;
public System.Windows.Forms.Label client_label;
}
}

View File

@@ -1,55 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace PreviewToy
{
public partial class PreviewOverlay : Form
{
private Preview parent;
private Color original_color;
public PreviewOverlay(Preview parent)
{
this.parent = parent;
InitializeComponent();
original_color = overlay_area.BackColor;
}
private void PreviewOverlay_Load(object sender, EventArgs e)
{
}
private void pictureBox1_Click(object sender, MouseEventArgs e)
{
this.parent.render_area_Click(sender, e);
}
public void makeTopMost()
{
this.TopMost = true;
}
private void client_label_Click(object sender, EventArgs e)
{
}
protected override CreateParams CreateParams
{
get
{
var Params = base.CreateParams;
Params.ExStyle |= 0x80;
return Params;
}
}
}
}

View File

@@ -1,18 +0,0 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace PreviewToy
{
static class Program
{
/// <summary>The main entry point for the application.</summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(true);
Application.Run(new PreviewToyHandler());
}
}
}

View File

@@ -1,16 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("PreviewToy")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("?")]
[assembly: AssemblyProduct("PreviewToy")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("04f08f8d-9e98-423b-acdb-4effb31c0d35")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is automatically generated by Visual Studio .Net. It is
used to store generic object data source configuration information.
Renaming the file extension or editing the content of this file may
cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="PreviewToyMain" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>PreviewToy.PreviewToyMain, eve-o preview test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
</GenericObjectDataSource>

View File

@@ -1,230 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34014
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace PreviewToy.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool hide_active {
get {
return ((bool)(this["hide_active"]));
}
set {
this["hide_active"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool hide_all {
get {
return ((bool)(this["hide_all"]));
}
set {
this["hide_all"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool always_on_top {
get {
return ((bool)(this["always_on_top"]));
}
set {
this["always_on_top"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool unique_layout {
get {
return ((bool)(this["unique_layout"]));
}
set {
this["unique_layout"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool sync_resize {
get {
return ((bool)(this["sync_resize"]));
}
set {
this["sync_resize"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool show_thumb_frames {
get {
return ((bool)(this["show_thumb_frames"]));
}
set {
this["show_thumb_frames"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool show_client_frames {
get {
return ((bool)(this["show_client_frames"]));
}
set {
this["show_client_frames"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("128")]
public uint sync_resize_x {
get {
return ((uint)(this["sync_resize_x"]));
}
set {
this["sync_resize_x"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("128")]
public uint sync_resize_y {
get {
return ((uint)(this["sync_resize_y"]));
}
set {
this["sync_resize_y"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool show_overlay {
get {
return ((bool)(this["show_overlay"]));
}
set {
this["show_overlay"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool zoom_on_hover {
get {
return ((bool)(this["zoom_on_hover"]));
}
set {
this["zoom_on_hover"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("3")]
public float zoom_amount {
get {
return ((float)(this["zoom_amount"]));
}
set {
this["zoom_amount"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool previews_dock {
get {
return ((bool)(this["previews_dock"]));
}
set {
this["previews_dock"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public byte zoom_anchor {
get {
return ((byte)(this["zoom_anchor"]));
}
set {
this["zoom_anchor"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool track_client_windows {
get {
return ((bool)(this["track_client_windows"]));
}
set {
this["track_client_windows"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0.9")]
public float opacity {
get {
return ((float)(this["opacity"]));
}
set {
this["opacity"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool minimizeToTray {
get {
return ((bool)(this["minimizeToTray"]));
}
set {
this["minimizeToTray"] = value;
}
}
}
}

View File

@@ -1,57 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="PreviewToy.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="hide_active" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="hide_all" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="always_on_top" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="unique_layout" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="sync_resize" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="show_thumb_frames" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="show_client_frames" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="sync_resize_x" Type="System.UInt32" Scope="User">
<Value Profile="(Default)">128</Value>
</Setting>
<Setting Name="sync_resize_y" Type="System.UInt32" Scope="User">
<Value Profile="(Default)">128</Value>
</Setting>
<Setting Name="show_overlay" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="zoom_on_hover" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="zoom_amount" Type="System.Single" Scope="User">
<Value Profile="(Default)">3</Value>
</Setting>
<Setting Name="previews_dock" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="zoom_anchor" Type="System.Byte" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="track_client_windows" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="opacity" Type="System.Single" Scope="User">
<Value Profile="(Default)">0.9</Value>
</Setting>
<Setting Name="minimizeToTray" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@@ -1,29 +1,67 @@
Created to aid playing with multiple clients in CCP game EVE-Online.
It's essentially a nice task switcher, it does not relay any keyboard/mouse events and suchlike.
It's essentially a task switcher, it does not relay any keyboard/mouse events and suchlike. The program works with EVE, EVE through Steam, or any combination thereof.
The code is a bit of a mess, my (ulph / StinkRay) apologies, but do make a pull request etc if you want to contribute!
The program does NOT (and will NOT ever) do the following things:
* modify EVE Online interface
* display modified EVE Online interface
* broadcast any keyboard or mouse events
* anyhow interact with EVE Online except of bringing its main window to foreground or resizing it
**System Requirements**
* Windows Vista, Windows 7, Windows 8/8.1, Windows 10
* Windows Aero Enabled
* Microsoft .NET Framework 4.5+
**How To Install & Use**
1. Download and extract the contents of the .zip archive to a location of your choice (ie: Desktop, CCP folder, etc)
..* **Note**: Please do not install the program into the *Program Files* or *Program files (x86)* folders. These folders in general do not allow applications to write anything there while EVE-O Preview now stores its vonfiguration file next to its executable, thus requiring the write access to the folder it is installed into.
2. Start up both EVE-O Preview and your EVE Clients (the order does not matter)
3. Adjust settings as you see fit. Program options are described [here](https://github.com/Phrynohyas/eve-o-preview/wiki/EVE-O-Preview-Program-Options)
***
This program is legal under the EULA/ToS:
CCP FoxFour wrote:
> Please keep the discussion on topic. The legitimacy of this software has already been discussed
> and doesn't need to be again. Assuming the functionality of the software doesn't change, it is
> allowed in its current state.
[CCP Grimmi wrote](https://forums.eveonline.com/default.aspx?g=posts&m=6362936#post6362936):
> Overlays which contain a full, unchanged, EVE Client instance in a view only mode, no matter
> how large or small they are scaled, like it is done by EVE-O Preview as of today, are fine
> with us. These overlays do not allow any direct interaction with the EVE Client and you have
> to bring the respective EVE Client to the front/put the window focus on it, in order to
> interact with it.
***
**Created by**
StinkRay
* StinkRay
**Maintained by**
* StinkRay
* Makari Aeron
* Phrynohyas Tig-Rah
**With contributions from**
* CCP FoxFour
**Current thread**
**Original threads**
https://forums.eveonline.com/default.aspx?g=posts&t=389086
**Original thread**
https://forums.eveonline.com/default.aspx?g=posts&t=246157
**Original repository**

Binary file not shown.

View File

@@ -1,192 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{6CA62DF3-8589-484C-8BC8-F763CA66BBB1}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PreviewToy</RootNamespace>
<AssemblyName>eve-o preview</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>2.0</OldToolsVersion>
<UpgradeBackupLocation />
<IsWebBootstrapper>false</IsWebBootstrapper>
<TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.18.2.0</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>icon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<StartupObject>PreviewToy.Program</StartupObject>
</PropertyGroup>
<PropertyGroup>
<ManifestCertificateThumbprint>4B29FD125BFAD24FF900FC81CCE0B0AD37464FDB</ManifestCertificateThumbprint>
</PropertyGroup>
<PropertyGroup>
<ManifestKeyFile>preview toy_TemporaryKey.pfx</ManifestKeyFile>
</PropertyGroup>
<PropertyGroup>
<GenerateManifests>true</GenerateManifests>
</PropertyGroup>
<PropertyGroup>
<SignManifests>false</SignManifests>
</PropertyGroup>
<PropertyGroup />
<PropertyGroup>
<TargetZone>LocalIntranet</TargetZone>
</PropertyGroup>
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<PropertyGroup>
<NoWin32Manifest>true</NoWin32Manifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.XML" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Xml.Serialization" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="Hotkey.cs" />
<Compile Include="PreviewHandler.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="PreviewHandler.Designer.cs">
<DependentUpon>PreviewHandler.cs</DependentUpon>
</Compile>
<Compile Include="PreviewOverlay.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="PreviewOverlay.Designer.cs">
<DependentUpon>PreviewOverlay.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="PreviewHandler.resx">
<SubType>Designer</SubType>
<DependentUpon>PreviewHandler.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="PreviewOverlay.resx">
<DependentUpon>PreviewOverlay.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Preview.resx">
<SubType>Designer</SubType>
<DependentUpon>Preview.cs</DependentUpon>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config">
<SubType>Designer</SubType>
</None>
<None Include="preview toy_TemporaryKey.pfx" />
<None Include="Properties\DataSources\PreviewToyMain.datasource" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="Preview.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Preview.Designer.cs">
<DependentUpon>Preview.cs</DependentUpon>
</Compile>
<Compile Include="Win32api.cs" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.0">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<None Include="Resources\icon.png" />
</ItemGroup>
<ItemGroup>
<Content Include="icon.ico" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- 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.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishUrlHistory>publish\</PublishUrlHistory>
<InstallUrlHistory />
<SupportUrlHistory />
<UpdateUrlHistory />
<BootstrapperUrlHistory />
<ErrorReportUrlHistory />
<FallbackCulture>en-US</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
</PropertyGroup>
<PropertyGroup>
<EnableSecurityDebugging>false</EnableSecurityDebugging>
</PropertyGroup>
</Project>

Binary file not shown.

Binary file not shown.

Binary file not shown.