Merge branch 'develop'

This commit is contained in:
Anton Kasyanov
2017-06-17 23:23:05 +03:00
24 changed files with 1941 additions and 1817 deletions

View File

@@ -0,0 +1,50 @@
using System;
using System.IO;
using System.Threading;
using System.Windows.Forms;
namespace EveOPreview
{
// A really very primitive exception handler stuff here
// No IoC, no fancy DI containers - just a plain exception stacktrace dump
// If this code is called then something was gone really bad
// so even the DI infrastructure might be dead already.
// So this dumb and non elegant approach is used
sealed class ExceptionHandler
{
private const string ExceptionDumpFileName = "EVE-O Preview.log";
private const string ExceptionMessage = "EVE-O Preview has encountered a problem and needs to close. Additional information has been saved in the crash log file.";
public void SetupExceptionHandlers()
{
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
Application.ThreadException += delegate (Object sender, ThreadExceptionEventArgs e)
{
this.ExceptionEventHandler(e.Exception);
};
AppDomain.CurrentDomain.UnhandledException += delegate (Object sender, UnhandledExceptionEventArgs e)
{
this.ExceptionEventHandler(e.ExceptionObject as Exception);
};
}
private void ExceptionEventHandler(Exception exception)
{
try
{
String exceptionMessage = exception.ToString();
File.WriteAllText(ExceptionHandler.ExceptionDumpFileName, exceptionMessage);
MessageBox.Show(ExceptionHandler.ExceptionMessage, @"EVE-O Preview", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
catch
{
// We are in unstable state now so even this operation might fail
// Still we actually don't care anymore - anyway the application has been cashed
}
System.Environment.Exit(1);
}
}
}

View File

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

View File

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

View File

@@ -119,6 +119,10 @@ namespace EveOPreview
public const UInt32 WS_EX_NOACTIVATE = 0x08000000;
public const int WM_SIZE = 5;
public const int WM_SYSCOMMAND = 0x0112;
public const int SC_MINIMIZE = 0xf020;
public const int SIZE_RESTORED = 0;
public const int SIZE_MINIMIZED = 1;
public const int SIZE_MAXIMIZED = 2;

View File

@@ -71,13 +71,15 @@
</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 Include="Costura, Version=1.6.2.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
<HintPath>..\packages\Costura.Fody.1.6.2\lib\dotnet\Costura.dll</HintPath>
<Private>False</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 Include="LightInject, Version=5.0.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\LightInject.5.0.3\lib\net45\LightInject.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Deployment" />
@@ -90,6 +92,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="ApplicationBase\ApplicationController.cs" />
<Compile Include="ApplicationBase\ExceptionHandler.cs" />
<Compile Include="ApplicationBase\IApplicationController.cs" />
<Compile Include="ApplicationBase\IIocContainer.cs" />
<Compile Include="ApplicationBase\IPresenterGeneric.cs" />
@@ -162,7 +165,6 @@
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="packages.config" />
<Compile Include="UI\Implementation\ThumbnailView.cs">
<SubType>Form</SubType>
</Compile>
@@ -172,21 +174,24 @@
<Compile Include="DwmAPI\WindowManagerNativeMethods.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="Resources\icon.png" />
</ItemGroup>
<ItemGroup>
<Content Include="FodyWeavers.xml" />
<None 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'))" />
<Error Condition="!Exists('..\packages\Fody.2.1.0\build\netstandard1.0\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.2.1.0\build\netstandard1.0\Fody.targets'))" />
<Error Condition="!Exists('..\packages\Costura.Fody.1.6.2\build\dotnet\Costura.Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.1.6.2\build\dotnet\Costura.Fody.targets'))" />
</Target>
<Import Project="..\packages\Fody.2.1.0\build\netstandard1.0\Fody.targets" Condition="Exists('..\packages\Fody.2.1.0\build\netstandard1.0\Fody.targets')" />
<Import Project="..\packages\Costura.Fody.1.6.2\build\dotnet\Costura.Fody.targets" Condition="Exists('..\packages\Costura.Fody.1.6.2\build\dotnet\Costura.Fody.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">

View File

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

View File

@@ -16,6 +16,8 @@ namespace EveOPreview.UI
Action<IList<IThumbnailView>> ThumbnailsAdded { get; set; }
Action<IList<IThumbnailView>> ThumbnailsUpdated { get; set; }
Action<IList<IThumbnailView>> ThumbnailsRemoved { get; set; }
Action<String, String, Point> ThumbnailPositionChanged { get; set; }
Action<Size> ThumbnailSizeChanged { get; set; }
}
}

View File

@@ -41,19 +41,22 @@ namespace EveOPreview.UI
this.View.ApplicationSettingsChanged = this.SaveApplicationSettings;
this.View.ThumbnailsSizeChanged = this.UpdateThumbnailsSize;
this.View.ThumbnailStateChanged = this.UpdateThumbnailState;
this.View.ForumUrlLinkActivated = this.OpenForumUrlLink;
this.View.DocumentationLinkActivated = this.OpenDocumentationLink;
this.View.ApplicationExitRequested = this.ExitApplication;
this._thumbnailManager.ThumbnailsAdded = this.ThumbnailsAdded;
this._thumbnailManager.ThumbnailsUpdated = this.ThumbnailsUpdated;
this._thumbnailManager.ThumbnailsRemoved = this.ThumbnailsRemoved;
this._thumbnailManager.ThumbnailPositionChanged = this.ThumbnailPositionChanged;
this._thumbnailManager.ThumbnailSizeChanged = this.ThumbnailSizeChanged;
}
private void Activate()
{
this.LoadApplicationSettings();
this.View.SetForumUrl(MainPresenter.ForumUrl);
this.View.SetDocumentationUrl(MainPresenter.ForumUrl);
this.View.SetVersionInfo(this.GetApplicationVersion());
if (this._configuration.MinimizeToTray)
{
this.View.Minimize();
@@ -206,6 +209,12 @@ namespace EveOPreview.UI
return thumbnailViews;
}
private void ThumbnailPositionChanged(String thumbnailName, String activeClientName, Point location)
{
this._configuration.SetThumbnailLocation(thumbnailName, activeClientName, location);
this._configurationStorage.Save();
}
private void ThumbnailSizeChanged(Size size)
{
this.View.ThumbnailSize = size;
@@ -216,12 +225,18 @@ namespace EveOPreview.UI
this._thumbnailManager.SetThumbnailState(thumbnailId, this._thumbnailDescriptionViews[thumbnailId].IsDisabled);
}
private void OpenForumUrlLink()
private void OpenDocumentationLink()
{
ProcessStartInfo processStartInfo = new ProcessStartInfo(new Uri(MainPresenter.ForumUrl).AbsoluteUri);
Process.Start(processStartInfo);
}
private string GetApplicationVersion()
{
Version version = System.Reflection.Assembly.GetEntryAssembly().GetName().Version;
return String.Format("{0}.{1}.{2}", version.Major, version.Minor, version.Revision);
}
private void ExitApplication()
{
this._exitApplication = true;

View File

@@ -52,6 +52,8 @@ namespace EveOPreview.UI
public Action<IList<IThumbnailView>> ThumbnailsRemoved { get; set; }
public Action<String, String, Point> ThumbnailPositionChanged { get; set; }
public Action<Size> ThumbnailSizeChanged { get; set; }
public void Activate()
@@ -126,7 +128,7 @@ namespace EveOPreview.UI
if (!this._isHoverEffectActive)
{
// Do not even move thumbnails with default caption
if (view.Title != ThumbnailManager.DefaultClientTitle)
if (this.IsManageableThumbnail(view))
{
view.ThumbnailLocation = this._configuration.GetThumbnailLocation(view.Title, this._activeClientTitle, view.ThumbnailLocation);
}
@@ -216,7 +218,10 @@ namespace EveOPreview.UI
// Otherwise thumbnail window will be unnecessary resized
view.SetSizeLimitations(this._configuration.ThumbnailMinimumSize, this._configuration.ThumbnailMaximumSize);
view.SetTopMost(this._configuration.ShowThumbnailsAlwaysOnTop);
view.ThumbnailLocation = this._configuration.GetThumbnailLocation(processTitle, this._activeClientTitle, view.ThumbnailLocation);
view.ThumbnailLocation = this.IsManageableThumbnail(view)
? this._configuration.GetThumbnailLocation(processTitle, this._activeClientTitle, view.ThumbnailLocation)
: this._configuration.GetDefaultThumbnailLocation();
this._thumbnailViews.Add(processHandle, view);
@@ -225,6 +230,7 @@ namespace EveOPreview.UI
view.ThumbnailFocused = this.ThumbnailViewFocused;
view.ThumbnailLostFocus = this.ThumbnailViewLostFocus;
view.ThumbnailActivated = this.ThumbnailActivated;
view.ThumbnailDeactivated = this.ThumbnailDeactivated;
view.RegisterHotkey(this._configuration.GetClientHotkey(processTitle));
@@ -351,6 +357,29 @@ namespace EveOPreview.UI
view?.Refresh(true);
}
private void ThumbnailDeactivated(IntPtr id)
{
IThumbnailView view;
this._thumbnailViews.TryGetValue(id, out view);
if (view?.Id == this._activeClientHandle)
{
WindowManagerNativeMethods.SendMessage(view.Id, WindowManagerNativeMethods.WM_SYSCOMMAND, WindowManagerNativeMethods.SC_MINIMIZE, 0);
}
else
{
int style = WindowManagerNativeMethods.GetWindowLong(id, WindowManagerNativeMethods.GWL_STYLE);
// If the window is not already minimized then minimize it
if ((style & WindowManagerNativeMethods.WS_MINIMIZE) != WindowManagerNativeMethods.WS_MINIMIZE)
{
WindowManagerNativeMethods.ShowWindowAsync(id, WindowManagerNativeMethods.SW_SHOWMINIMIZED);
}
}
this.RefreshThumbnails();
}
private void ThumbnailViewResized(IntPtr id)
{
if (this._ignoreViewEvents)
@@ -374,7 +403,10 @@ namespace EveOPreview.UI
IThumbnailView view = this._thumbnailViews[id];
this._configuration.SetThumbnailLocation(view.Title, this._activeClientTitle, view.ThumbnailLocation);
if (this.IsManageableThumbnail(view))
{
this.ThumbnailPositionChanged?.Invoke(view.Title, this._activeClientTitle, view.ThumbnailLocation);
}
view.Refresh(false);
}
@@ -458,5 +490,11 @@ namespace EveOPreview.UI
this._configuration.SetClientLayout(process.MainWindowTitle, clientLayout);
}
}
// We should no manage some thumbnails (like thumbnail of the EVE client sitting on the login screen)
private bool IsManageableThumbnail(IThumbnailView view)
{
return view.Title != ThumbnailManager.DefaultClientTitle;
}
}
}

View File

@@ -27,15 +27,15 @@ namespace EveOPreview
return;
}
ExceptionHandler handler = new ExceptionHandler();
handler.SetupExceptionHandlers();
Program.InitializeWinFormsGui();
IApplicationController controller = Program.InitializeApplicationController();
Program.SetupApplicationConttroller(controller, Program.GetCustomConfigFile(args));
controller.Run<MainPresenter>();
token = null;
}
private static string GetCustomConfigFile(string[] args)

View File

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

View File

@@ -59,15 +59,5 @@ namespace EveOPreview.Properties {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap icon {
get {
object obj = ResourceManager.GetObject("icon", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View File

@@ -117,8 +117,4 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -34,22 +34,13 @@ namespace EveOPreview.UI
public bool MinimizeToTray
{
get
{
return this.MinimizeToTrayCheckBox.Checked;
}
set
{
this.MinimizeToTrayCheckBox.Checked = value;
}
get => this.MinimizeToTrayCheckBox.Checked;
set => this.MinimizeToTrayCheckBox.Checked = value;
}
public double ThumbnailOpacity
{
get
{
return Math.Min(this.ThumbnailOpacityTrackBar.Value / 100.00, 1.00);
}
get => Math.Min(this.ThumbnailOpacityTrackBar.Value / 100.00, 1.00);
set
{
int barValue = (int)(100.0 * value);
@@ -68,70 +59,37 @@ namespace EveOPreview.UI
public bool EnableClientLayoutTracking
{
get
{
return this.EnableClientLayoutTrackingCheckBox.Checked;
}
set
{
this.EnableClientLayoutTrackingCheckBox.Checked = value;
}
get => this.EnableClientLayoutTrackingCheckBox.Checked;
set => this.EnableClientLayoutTrackingCheckBox.Checked = value;
}
public bool HideActiveClientThumbnail
{
get
{
return this.HideActiveClientThumbnailCheckBox.Checked;
}
set
{
this.HideActiveClientThumbnailCheckBox.Checked = value;
}
get => this.HideActiveClientThumbnailCheckBox.Checked;
set => this.HideActiveClientThumbnailCheckBox.Checked = value;
}
public bool ShowThumbnailsAlwaysOnTop
{
get
{
return this.ShowThumbnailsAlwaysOnTopCheckBox.Checked;
}
set
{
this.ShowThumbnailsAlwaysOnTopCheckBox.Checked = value;
}
get => this.ShowThumbnailsAlwaysOnTopCheckBox.Checked;
set => this.ShowThumbnailsAlwaysOnTopCheckBox.Checked = value;
}
public bool HideThumbnailsOnLostFocus
{
get
{
return this.HideThumbnailsOnLostFocusCheckBox.Checked;
}
set
{
this.HideThumbnailsOnLostFocusCheckBox.Checked = value;
}
get => this.HideThumbnailsOnLostFocusCheckBox.Checked;
set => this.HideThumbnailsOnLostFocusCheckBox.Checked = value;
}
public bool EnablePerClientThumbnailLayouts
{
get
{
return this.EnablePerClientThumbnailsLayoutsCheckBox.Checked;
}
set
{
this.EnablePerClientThumbnailsLayoutsCheckBox.Checked = value;
}
get => this.EnablePerClientThumbnailsLayoutsCheckBox.Checked;
set => this.EnablePerClientThumbnailsLayoutsCheckBox.Checked = value;
}
public Size ThumbnailSize
{
get
{
return new Size((int)this.ThumbnailsWidthNumericEdit.Value, (int)this.ThumbnailsHeightNumericEdit.Value);
}
get => new Size((int)this.ThumbnailsWidthNumericEdit.Value, (int)this.ThumbnailsHeightNumericEdit.Value);
set
{
this.ThumbnailsWidthNumericEdit.Value = value.Width;
@@ -141,10 +99,7 @@ namespace EveOPreview.UI
public bool EnableThumbnailZoom
{
get
{
return this.EnableThumbnailZoomCheckBox.Checked;
}
get => this.EnableThumbnailZoomCheckBox.Checked;
set
{
this.EnableThumbnailZoomCheckBox.Checked = value;
@@ -154,14 +109,8 @@ namespace EveOPreview.UI
public int ThumbnailZoomFactor
{
get
{
return (int)this.ThumbnailZoomFactorNumericEdit.Value;
}
set
{
this.ThumbnailZoomFactorNumericEdit.Value = value;
}
get => (int)this.ThumbnailZoomFactorNumericEdit.Value;
set => this.ThumbnailZoomFactorNumericEdit.Value = value;
}
public ViewZoomAnchor ThumbnailZoomAnchor
@@ -196,46 +145,25 @@ namespace EveOPreview.UI
public bool ShowThumbnailOverlays
{
get
{
return this.ShowThumbnailOverlaysCheckBox.Checked;
}
set
{
this.ShowThumbnailOverlaysCheckBox.Checked = value;
}
get => this.ShowThumbnailOverlaysCheckBox.Checked;
set => this.ShowThumbnailOverlaysCheckBox.Checked = value;
}
public bool ShowThumbnailFrames
{
get
{
return this.ShowThumbnailFramesCheckBox.Checked;
}
set
{
this.ShowThumbnailFramesCheckBox.Checked = value;
}
get => this.ShowThumbnailFramesCheckBox.Checked;
set => this.ShowThumbnailFramesCheckBox.Checked = value;
}
public bool EnableActiveClientHighlight
{
get
{
return this.EnableActiveClientHighlightCheckBox.Checked;
}
set
{
this.EnableActiveClientHighlightCheckBox.Checked = value;
}
get => this.EnableActiveClientHighlightCheckBox.Checked;
set => this.EnableActiveClientHighlightCheckBox.Checked = value;
}
public Color ActiveClientHighlightColor
{
get
{
return this._activeClientHighlightColor;
}
get => this._activeClientHighlightColor;
set
{
this._activeClientHighlightColor = value;
@@ -267,9 +195,14 @@ namespace EveOPreview.UI
this.WindowState = FormWindowState.Minimized;
}
public void SetForumUrl(string url)
public void SetVersionInfo(string version)
{
this.ForumLinkLabel.Text = url;
this.VersionLabel.Text = version;
}
public void SetDocumentationUrl(string url)
{
this.DocumentationLink.Text = url;
}
public void AddThumbnails(IList<IThumbnailDescriptionView> thumbnails)
@@ -336,9 +269,34 @@ namespace EveOPreview.UI
public Action<IntPtr> ThumbnailStateChanged { get; set; }
public Action ForumUrlLinkActivated { get; set; }
public Action DocumentationLinkActivated { get; set; }
#region UI events
private void ContentTabControl_DrawItem(object sender, DrawItemEventArgs e)
{
TabControl control = (TabControl)sender;
TabPage page = control.TabPages[e.Index];
Rectangle bounds = control.GetTabRect(e.Index);
Graphics graphics = e.Graphics;
Brush textBrush = new SolidBrush(SystemColors.ActiveCaptionText);
Brush backgroundBrush = (e.State == DrawItemState.Selected)
? new SolidBrush(SystemColors.Control)
: new SolidBrush(SystemColors.ControlDark);
graphics.FillRectangle(backgroundBrush, e.Bounds);
// Use our own font
Font font = new Font("Arial", this.Font.Size * 1.2f, FontStyle.Bold, GraphicsUnit.Pixel);
// Draw string and center the text
StringFormat stringFlags = new StringFormat();
stringFlags.Alignment = StringAlignment.Center;
stringFlags.LineAlignment = StringAlignment.Center;
graphics.DrawString(page.Text, font, textBrush, bounds, stringFlags);
}
private void OptionChanged_Handler(object sender, EventArgs e)
{
if (this._suppressEvents)
@@ -396,9 +354,9 @@ namespace EveOPreview.UI
this.ThumbnailStateChanged?.Invoke(selectedItem.Id);
}
private void ForumLinkLabelClicked_Handler(object sender, LinkLabelLinkClickedEventArgs e)
private void DocumentationLinkClicked_Handler(object sender, LinkLabelLinkClickedEventArgs e)
{
this.ForumUrlLinkActivated?.Invoke();
this.DocumentationLinkActivated?.Invoke();
}
private void MainFormResize_Handler(object sender, EventArgs e)

File diff suppressed because it is too large Load Diff

View File

@@ -58,10 +58,7 @@ namespace EveOPreview.UI
public string Title
{
get
{
return this.Text;
}
get => this.Text;
set
{
this.Text = value;
@@ -77,10 +74,7 @@ namespace EveOPreview.UI
public Point ThumbnailLocation
{
get
{
return this.Location;
}
get => this.Location;
set
{
if ((value.X > 0) || (value.Y > 0))
@@ -93,14 +87,8 @@ namespace EveOPreview.UI
public Size ThumbnailSize
{
get
{
return this.ClientSize;
}
set
{
this.ClientSize = value;
}
get => this.ClientSize;
set => this.ClientSize = value;
}
public Action<IntPtr> ThumbnailResized { get; set; }
@@ -113,6 +101,8 @@ namespace EveOPreview.UI
public Action<IntPtr> ThumbnailActivated { get; set; }
public Action<IntPtr> ThumbnailDeactivated { get; set; }
public new void Show()
{
base.Show();
@@ -446,9 +436,16 @@ namespace EveOPreview.UI
private void MouseDown_Handler(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
if (Control.ModifierKeys == Keys.Control)
{
this.ThumbnailDeactivated?.Invoke(this.Id);
}
else
{
this.ThumbnailActivated?.Invoke(this.Id);
}
}
if ((e.Button == MouseButtons.Right) || (e.Button == (MouseButtons.Left | MouseButtons.Right)))
{

View File

@@ -32,7 +32,8 @@ namespace EveOPreview.UI
bool EnableActiveClientHighlight { get; set; }
Color ActiveClientHighlightColor { get; set; }
void SetForumUrl(string url);
void SetDocumentationUrl(string url);
void SetVersionInfo(string version);
void SetThumbnailSizeLimitations(Size minimumSize, Size maximumSize);
void Minimize();
@@ -49,6 +50,6 @@ namespace EveOPreview.UI
Action ApplicationSettingsChanged { get; set; }
Action ThumbnailsSizeChanged { get; set; }
Action<IntPtr> ThumbnailStateChanged { get; set; }
Action ForumUrlLinkActivated { get; set; }
Action DocumentationLinkActivated { get; set; }
}
}

View File

@@ -35,6 +35,8 @@ namespace EveOPreview.UI
Action<IntPtr> ThumbnailMoved { get; set; }
Action<IntPtr> ThumbnailFocused { get; set; }
Action<IntPtr> ThumbnailLostFocus { get; set; }
Action<IntPtr> ThumbnailActivated { get; set; }
Action<IntPtr> ThumbnailDeactivated { get; set; }
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

@@ -1,7 +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" />
<package id="Costura.Fody" version="1.6.2" targetFramework="net45" developmentDependency="true" />
<package id="Fody" version="2.1.0" targetFramework="net45" developmentDependency="true" />
<package id="LightInject" version="5.0.3" targetFramework="net45" />
<package id="Newtonsoft.Json" version="10.0.2" targetFramework="net45" />
</packages>

View File

@@ -10,7 +10,7 @@ The program does NOT (and will NOT ever) do the following things:
* broadcast any keyboard or mouse events
* anyhow interact with EVE Online except of bringing its main window to foreground or resizing it
Under any conditions you should NOT use EVE-O Preview for any actions that break EULA or ToS of EVE Online.
**Under any conditions you should NOT use EVE-O Preview for any actions that break EULA or ToS of EVE Online.**
If you have find out that some of the features or their combination of EVE-O Preview might cause actions that can be considered as breaking EULA or ToS of EVE Online you should consider them as a bug and immediately notify the Developer ( Phrynohyas Tig-Rah ) via in-game mail.
@@ -28,7 +28,7 @@ If you have find out that some of the features or their combination of EVE-O Pre
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 below
#EVE Online EULA/ToS
# EVE Online EULA/ToS
This program is legal under the EULA/ToS:
@@ -54,25 +54,25 @@ CCP FoxFour wrote:
## Application Options Available Via GUI
| Option | Description |
| --- | --- |
| Minimize to System Tray | Determines whether the main window form be minimized to windows tray when it is closed |
| Opacity | Determines the inactive EVE thumbnails opacity (from almost invisible 20% to 100% solid) |
| Track client locations | Determines whether the client's window position should be restored when it is activated or started |
| Hide preview of active EVE client | Determines whether the thumbnail corresponding to the active EVE client is not displayed |
| Previews always on top | Determines whether EVE client thumbnails should stay on top of all other windows |
| Hide previews when EVE client is not active | Determines whether all thumbnails should be visible only when an EVE client is active |
| Unique layout for each EVE client | Determines whether thumbnails positions are different depending on the EVE client being active (f.e. links char have thumbnails of the Falcon and DPS char in the right bottom corner while DPS and Falcon alts have them placed at the top of the main EVE window ) |
| Thumbnail width | Thumbnails width. Can be set to any value from **100** to **640** points |
| Thumbnail height | Thumbnails Height. Can be set to any value from **80** to **400** points |
| Zoom on hover | Determines whether a thumbnail should be zoomed when the mouse pointer is over it |
| Zoom factor | Thumbnail zoom factor. Can be set to any value from **2** to **10** |
| Zoom anchor | Sets the starting point of the thumbnail zoom |
| Show overlay | Determines whether a name of the corresponding EVE cliet should be displayed on the thumbnail |
| Show frames | Determines whether thumbnails should be displayd with window caption and borders |
| Highlight active client | Determines whether the thumbnail of the active EVE client should be highlighted with a bright border |
| Color | Color used to highlight the active client's thumbnail in case the corresponding option is set |
| Thumbnails list | List of currently active EVE client thumbnails. Checking an element in this list will hide the corresponding thumbnail. However these checks are not persisted and on the next EVE client or EVE-O Preview run the thumbnail will be visible again |
| Tab | Option | Description |
| --- | --- | --- |
| **General** | Minimize to System Tray | Determines whether the main window form be minimized to windows tray when it is closed |
| General | Track client locations | Determines whether the client's window position should be restored when it is activated or started |
| General | Hide preview of active EVE client | Determines whether the thumbnail corresponding to the active EVE client is not displayed |
| General | Previews always on top | Determines whether EVE client thumbnails should stay on top of all other windows |
| General | Hide previews when EVE client is not active | Determines whether all thumbnails should be visible only when an EVE client is active |
| General | Unique layout for each EVE client | Determines whether thumbnails positions are different depending on the EVE client being active (f.e. links char have thumbnails of the Falcon and DPS char in the right bottom corner while DPS and Falcon alts have them placed at the top of the main EVE window ) |
| **Thumbnail** | Opacity | Determines the inactive EVE thumbnails opacity (from almost invisible 20% to 100% solid) |
| Thumbnail | Thumbnail Width | Thumbnails width. Can be set to any value from **100** to **640** points |
| Thumbnail | Thumbnail Height | Thumbnails Height. Can be set to any value from **80** to **400** points |
| **Zoom** | Zoom on hover | Determines whether a thumbnail should be zoomed when the mouse pointer is over it |
| Zoom | Zoom factor | Thumbnail zoom factor. Can be set to any value from **2** to **10** |
| Zoom | Zoom anchor | Sets the starting point of the thumbnail zoom |
| **Overlay** | Show overlay | Determines whether a name of the corresponding EVE cliet should be displayed on the thumbnail |
| Overlay | Show frames | Determines whether thumbnails should be displayd with window caption and borders |
| Overlay | Highlight active client | Determines whether the thumbnail of the active EVE client should be highlighted with a bright border |
| Overlay | Color | Color used to highlight the active client's thumbnail in case the corresponding option is set |
| **Active Clients** | Thumbnails list | List of currently active EVE client thumbnails. Checking an element in this list will hide the corresponding thumbnail. However these checks are not persisted and on the next EVE client or EVE-O Preview run the thumbnail will be visible again |
## Mouse Gestures