Merge branch 'develop-feature-gui-update' into develop

This commit is contained in:
Anton Kasyanov
2017-06-12 21:28:15 +03:00
14 changed files with 1690 additions and 1693 deletions

View File

@@ -71,13 +71,11 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup /> <PropertyGroup />
<ItemGroup> <ItemGroup>
<Reference Include="LightInject, Version=4.0.9.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="LightInject, Version=5.0.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\LightInject.4.0.9\lib\net45\LightInject.dll</HintPath> <HintPath>..\packages\LightInject.5.0.3\lib\net45\LightInject.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath> <HintPath>..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Deployment" /> <Reference Include="System.Deployment" />
@@ -162,7 +160,6 @@
<DependentUpon>Resources.resx</DependentUpon> <DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
</Compile> </Compile>
<None Include="packages.config" />
<Compile Include="UI\Implementation\ThumbnailView.cs"> <Compile Include="UI\Implementation\ThumbnailView.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@@ -172,21 +169,24 @@
<Compile Include="DwmAPI\WindowManagerNativeMethods.cs" /> <Compile Include="DwmAPI\WindowManagerNativeMethods.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="packages.config" />
<None Include="Resources\icon.png" /> <None Include="Resources\icon.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="FodyWeavers.xml" /> <None Include="FodyWeavers.xml" />
<Content Include="icon.ico" /> <Content Include="icon.ico" />
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup />
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <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')" /> <Import Project="..\packages\Fody.2.0.10\build\dotnet\Fody.targets" Condition="Exists('..\packages\Fody.2.0.10\build\dotnet\Fody.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <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> <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> </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.0.10\build\dotnet\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.2.0.10\build\dotnet\Fody.targets'))" />
<Error Condition="!Exists('..\packages\Costura.Fody.1.5.0\build\dotnet\Costura.Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.1.5.0\build\dotnet\Costura.Fody.targets'))" />
</Target> </Target>
<Import Project="..\packages\Costura.Fody.1.5.0\build\dotnet\Costura.Fody.targets" Condition="Exists('..\packages\Costura.Fody.1.5.0\build\dotnet\Costura.Fody.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild"> <Target Name="BeforeBuild">

View File

@@ -41,7 +41,7 @@ namespace EveOPreview.UI
this.View.ApplicationSettingsChanged = this.SaveApplicationSettings; this.View.ApplicationSettingsChanged = this.SaveApplicationSettings;
this.View.ThumbnailsSizeChanged = this.UpdateThumbnailsSize; this.View.ThumbnailsSizeChanged = this.UpdateThumbnailsSize;
this.View.ThumbnailStateChanged = this.UpdateThumbnailState; this.View.ThumbnailStateChanged = this.UpdateThumbnailState;
this.View.ForumUrlLinkActivated = this.OpenForumUrlLink; this.View.DocumentationLinkActivated = this.OpenDocumentationLink;
this.View.ApplicationExitRequested = this.ExitApplication; this.View.ApplicationExitRequested = this.ExitApplication;
this._thumbnailManager.ThumbnailsAdded = this.ThumbnailsAdded; this._thumbnailManager.ThumbnailsAdded = this.ThumbnailsAdded;
@@ -53,7 +53,8 @@ namespace EveOPreview.UI
private void Activate() private void Activate()
{ {
this.LoadApplicationSettings(); this.LoadApplicationSettings();
this.View.SetForumUrl(MainPresenter.ForumUrl); this.View.SetDocumentationUrl(MainPresenter.ForumUrl);
this.View.SetVersionInfo(this.GetApplicationVersion());
if (this._configuration.MinimizeToTray) if (this._configuration.MinimizeToTray)
{ {
this.View.Minimize(); this.View.Minimize();
@@ -216,12 +217,18 @@ namespace EveOPreview.UI
this._thumbnailManager.SetThumbnailState(thumbnailId, this._thumbnailDescriptionViews[thumbnailId].IsDisabled); this._thumbnailManager.SetThumbnailState(thumbnailId, this._thumbnailDescriptionViews[thumbnailId].IsDisabled);
} }
private void OpenForumUrlLink() private void OpenDocumentationLink()
{ {
ProcessStartInfo processStartInfo = new ProcessStartInfo(new Uri(MainPresenter.ForumUrl).AbsoluteUri); ProcessStartInfo processStartInfo = new ProcessStartInfo(new Uri(MainPresenter.ForumUrl).AbsoluteUri);
Process.Start(processStartInfo); 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() private void ExitApplication()
{ {
this._exitApplication = true; this._exitApplication = true;

View File

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

View File

@@ -59,15 +59,5 @@ namespace EveOPreview.Properties {
resourceCulture = value; 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"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<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> </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 public bool MinimizeToTray
{ {
get get => this.MinimizeToTrayCheckBox.Checked;
{ set => this.MinimizeToTrayCheckBox.Checked = value;
return this.MinimizeToTrayCheckBox.Checked;
}
set
{
this.MinimizeToTrayCheckBox.Checked = value;
}
} }
public double ThumbnailOpacity public double ThumbnailOpacity
{ {
get get => Math.Min(this.ThumbnailOpacityTrackBar.Value / 100.00, 1.00);
{
return Math.Min(this.ThumbnailOpacityTrackBar.Value / 100.00, 1.00);
}
set set
{ {
int barValue = (int)(100.0 * value); int barValue = (int)(100.0 * value);
@@ -68,70 +59,37 @@ namespace EveOPreview.UI
public bool EnableClientLayoutTracking public bool EnableClientLayoutTracking
{ {
get get => this.EnableClientLayoutTrackingCheckBox.Checked;
{ set => this.EnableClientLayoutTrackingCheckBox.Checked = value;
return this.EnableClientLayoutTrackingCheckBox.Checked;
}
set
{
this.EnableClientLayoutTrackingCheckBox.Checked = value;
}
} }
public bool HideActiveClientThumbnail public bool HideActiveClientThumbnail
{ {
get get => this.HideActiveClientThumbnailCheckBox.Checked;
{ set => this.HideActiveClientThumbnailCheckBox.Checked = value;
return this.HideActiveClientThumbnailCheckBox.Checked;
}
set
{
this.HideActiveClientThumbnailCheckBox.Checked = value;
}
} }
public bool ShowThumbnailsAlwaysOnTop public bool ShowThumbnailsAlwaysOnTop
{ {
get get => this.ShowThumbnailsAlwaysOnTopCheckBox.Checked;
{ set => this.ShowThumbnailsAlwaysOnTopCheckBox.Checked = value;
return this.ShowThumbnailsAlwaysOnTopCheckBox.Checked;
}
set
{
this.ShowThumbnailsAlwaysOnTopCheckBox.Checked = value;
}
} }
public bool HideThumbnailsOnLostFocus public bool HideThumbnailsOnLostFocus
{ {
get get => this.HideThumbnailsOnLostFocusCheckBox.Checked;
{ set => this.HideThumbnailsOnLostFocusCheckBox.Checked = value;
return this.HideThumbnailsOnLostFocusCheckBox.Checked;
}
set
{
this.HideThumbnailsOnLostFocusCheckBox.Checked = value;
}
} }
public bool EnablePerClientThumbnailLayouts public bool EnablePerClientThumbnailLayouts
{ {
get get => this.EnablePerClientThumbnailsLayoutsCheckBox.Checked;
{ set => this.EnablePerClientThumbnailsLayoutsCheckBox.Checked = value;
return this.EnablePerClientThumbnailsLayoutsCheckBox.Checked;
}
set
{
this.EnablePerClientThumbnailsLayoutsCheckBox.Checked = value;
}
} }
public Size ThumbnailSize public Size ThumbnailSize
{ {
get get => new Size((int)this.ThumbnailsWidthNumericEdit.Value, (int)this.ThumbnailsHeightNumericEdit.Value);
{
return new Size((int)this.ThumbnailsWidthNumericEdit.Value, (int)this.ThumbnailsHeightNumericEdit.Value);
}
set set
{ {
this.ThumbnailsWidthNumericEdit.Value = value.Width; this.ThumbnailsWidthNumericEdit.Value = value.Width;
@@ -141,10 +99,7 @@ namespace EveOPreview.UI
public bool EnableThumbnailZoom public bool EnableThumbnailZoom
{ {
get get => this.EnableThumbnailZoomCheckBox.Checked;
{
return this.EnableThumbnailZoomCheckBox.Checked;
}
set set
{ {
this.EnableThumbnailZoomCheckBox.Checked = value; this.EnableThumbnailZoomCheckBox.Checked = value;
@@ -154,14 +109,8 @@ namespace EveOPreview.UI
public int ThumbnailZoomFactor public int ThumbnailZoomFactor
{ {
get get => (int)this.ThumbnailZoomFactorNumericEdit.Value;
{ set => this.ThumbnailZoomFactorNumericEdit.Value = value;
return (int)this.ThumbnailZoomFactorNumericEdit.Value;
}
set
{
this.ThumbnailZoomFactorNumericEdit.Value = value;
}
} }
public ViewZoomAnchor ThumbnailZoomAnchor public ViewZoomAnchor ThumbnailZoomAnchor
@@ -196,46 +145,25 @@ namespace EveOPreview.UI
public bool ShowThumbnailOverlays public bool ShowThumbnailOverlays
{ {
get get => this.ShowThumbnailOverlaysCheckBox.Checked;
{ set => this.ShowThumbnailOverlaysCheckBox.Checked = value;
return this.ShowThumbnailOverlaysCheckBox.Checked;
}
set
{
this.ShowThumbnailOverlaysCheckBox.Checked = value;
}
} }
public bool ShowThumbnailFrames public bool ShowThumbnailFrames
{ {
get get => this.ShowThumbnailFramesCheckBox.Checked;
{ set => this.ShowThumbnailFramesCheckBox.Checked = value;
return this.ShowThumbnailFramesCheckBox.Checked;
}
set
{
this.ShowThumbnailFramesCheckBox.Checked = value;
}
} }
public bool EnableActiveClientHighlight public bool EnableActiveClientHighlight
{ {
get get => this.EnableActiveClientHighlightCheckBox.Checked;
{ set => this.EnableActiveClientHighlightCheckBox.Checked = value;
return this.EnableActiveClientHighlightCheckBox.Checked;
}
set
{
this.EnableActiveClientHighlightCheckBox.Checked = value;
}
} }
public Color ActiveClientHighlightColor public Color ActiveClientHighlightColor
{ {
get get => this._activeClientHighlightColor;
{
return this._activeClientHighlightColor;
}
set set
{ {
this._activeClientHighlightColor = value; this._activeClientHighlightColor = value;
@@ -267,9 +195,14 @@ namespace EveOPreview.UI
this.WindowState = FormWindowState.Minimized; 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) public void AddThumbnails(IList<IThumbnailDescriptionView> thumbnails)
@@ -336,9 +269,34 @@ namespace EveOPreview.UI
public Action<IntPtr> ThumbnailStateChanged { get; set; } public Action<IntPtr> ThumbnailStateChanged { get; set; }
public Action ForumUrlLinkActivated { get; set; } public Action DocumentationLinkActivated { get; set; }
#region UI events #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) private void OptionChanged_Handler(object sender, EventArgs e)
{ {
if (this._suppressEvents) if (this._suppressEvents)
@@ -396,9 +354,9 @@ namespace EveOPreview.UI
this.ThumbnailStateChanged?.Invoke(selectedItem.Id); 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) 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 public string Title
{ {
get get => this.Text;
{
return this.Text;
}
set set
{ {
this.Text = value; this.Text = value;
@@ -77,10 +74,7 @@ namespace EveOPreview.UI
public Point ThumbnailLocation public Point ThumbnailLocation
{ {
get get => this.Location;
{
return this.Location;
}
set set
{ {
if ((value.X > 0) || (value.Y > 0)) if ((value.X > 0) || (value.Y > 0))
@@ -93,14 +87,8 @@ namespace EveOPreview.UI
public Size ThumbnailSize public Size ThumbnailSize
{ {
get get => this.ClientSize;
{ set => this.ClientSize = value;
return this.ClientSize;
}
set
{
this.ClientSize = value;
}
} }
public Action<IntPtr> ThumbnailResized { get; set; } public Action<IntPtr> ThumbnailResized { get; set; }

View File

@@ -32,7 +32,8 @@ namespace EveOPreview.UI
bool EnableActiveClientHighlight { get; set; } bool EnableActiveClientHighlight { get; set; }
Color ActiveClientHighlightColor { 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 SetThumbnailSizeLimitations(Size minimumSize, Size maximumSize);
void Minimize(); void Minimize();
@@ -49,6 +50,6 @@ namespace EveOPreview.UI
Action ApplicationSettingsChanged { get; set; } Action ApplicationSettingsChanged { get; set; }
Action ThumbnailsSizeChanged { get; set; } Action ThumbnailsSizeChanged { get; set; }
Action<IntPtr> ThumbnailStateChanged { get; set; } Action<IntPtr> ThumbnailStateChanged { get; set; }
Action ForumUrlLinkActivated { get; set; } Action DocumentationLinkActivated { 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"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Costura.Fody" version="1.3.3.0" targetFramework="net45" developmentDependency="true" /> <package id="Costura.Fody" version="1.5.0" targetFramework="net45" developmentDependency="true" />
<package id="Fody" version="1.29.4" targetFramework="net45" developmentDependency="true" /> <package id="Fody" version="2.0.10" targetFramework="net45" developmentDependency="true" />
<package id="LightInject" version="4.0.9" targetFramework="net45" /> <package id="LightInject" version="5.0.3" targetFramework="net45" />
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net45" /> <package id="Newtonsoft.Json" version="10.0.2" targetFramework="net45" />
</packages> </packages>