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 />
<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="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=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="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" />
@@ -162,7 +160,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 +169,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')" />
<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">
<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.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>
<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.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

View File

@@ -41,7 +41,7 @@ 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;
@@ -53,7 +53,8 @@ namespace EveOPreview.UI
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();
@@ -216,12 +217,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

@@ -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; }

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; }
}
}

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.5.0" targetFramework="net45" developmentDependency="true" />
<package id="Fody" version="2.0.10" targetFramework="net45" developmentDependency="true" />
<package id="LightInject" version="5.0.3" targetFramework="net45" />
<package id="Newtonsoft.Json" version="10.0.2" targetFramework="net45" />
</packages>