Skip to content
This repository has been archived by the owner on May 19, 2022. It is now read-only.

Commit

Permalink
Merge branch 'beta'
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Kasyanov committed Jul 12, 2019
2 parents 9a68208 + 7002a3a commit 1c20419
Show file tree
Hide file tree
Showing 36 changed files with 900 additions and 264 deletions.
8 changes: 4 additions & 4 deletions Eve-O-Preview/ApplicationBase/ExceptionHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ namespace EveOPreview
// 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.";
private const string EXCEPTION_DUMP_FILE_NAME = "EVE-O Preview.log";
private const string EXCEPTION_MESSAGE = "EVE-O Preview has encountered a problem and needs to close. Additional information has been saved in the crash log file.";

public void SetupExceptionHandlers()
{
Expand All @@ -39,9 +39,9 @@ private void ExceptionEventHandler(Exception exception)
try
{
String exceptionMessage = exception.ToString();
File.WriteAllText(ExceptionHandler.ExceptionDumpFileName, exceptionMessage);
File.WriteAllText(ExceptionHandler.EXCEPTION_DUMP_FILE_NAME, exceptionMessage);

MessageBox.Show(ExceptionHandler.ExceptionMessage, @"EVE-O Preview", MessageBoxButtons.OK, MessageBoxIcon.Error);
MessageBox.Show(ExceptionHandler.EXCEPTION_MESSAGE, @"EVE-O Preview", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
catch
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace EveOPreview.Configuration.Implementation
{
class ConfigurationStorage : IConfigurationStorage
{
private const string ConfigurationFileName = "EVE-O Preview.json";
private const string CONFIGURATION_FILE_NAME = "EVE-O Preview.json";

private readonly IAppConfig _appConfig;
private readonly IThumbnailConfiguration _thumbnailConfiguration;
Expand Down Expand Up @@ -50,7 +50,7 @@ public void Save()

private string GetConfigFileName()
{
return string.IsNullOrEmpty(this._appConfig.ConfigFileName) ? ConfigurationStorage.ConfigurationFileName : this._appConfig.ConfigFileName;
return string.IsNullOrEmpty(this._appConfig.ConfigFileName) ? ConfigurationStorage.CONFIGURATION_FILE_NAME : this._appConfig.ConfigFileName;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ public ThumbnailConfiguration()
this.MinimizeToTray = false;
this.ThumbnailRefreshPeriod = 500;

this.EnableCompatibilityMode = false;

this.ThumbnailOpacity = 0.5;

this.EnableClientLayoutTracking = false;
Expand Down Expand Up @@ -54,6 +56,9 @@ public ThumbnailConfiguration()
public bool MinimizeToTray { get; set; }
public int ThumbnailRefreshPeriod { get; set; }

[JsonProperty("CompatibilityMode")]
public bool EnableCompatibilityMode { get; set; }

[JsonProperty("ThumbnailsOpacity")]
public double ThumbnailOpacity { get; set; }

Expand Down
7 changes: 6 additions & 1 deletion Eve-O-Preview/Configuration/Interface/ClientLayout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,23 @@ public ClientLayout()
{
}

public ClientLayout(int x, int y, int width, int height)
public ClientLayout(int x, int y, int width, int height, bool maximized)
{
this.X = x;
this.Y = y;
this.Width = width;
this.Height = height;
this.IsMaximized = maximized;
}

public int X { get; set; }

public int Y { get; set; }

public int Width { get; set; }

public int Height { get; set; }

public bool IsMaximized { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ public interface IThumbnailConfiguration
bool MinimizeToTray { get; set; }
int ThumbnailRefreshPeriod { get; set; }

bool EnableCompatibilityMode { get; set; }

double ThumbnailOpacity { get; set; }

bool EnableClientLayoutTracking { get; set; }
Expand Down
48 changes: 31 additions & 17 deletions Eve-O-Preview/Eve-O-Preview.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<Import Project="..\packages\Costura.Fody.3.3.2\build\Costura.Fody.props" Condition="Exists('..\packages\Costura.Fody.3.3.2\build\Costura.Fody.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand All @@ -9,7 +10,7 @@
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>EveOPreview</RootNamespace>
<AssemblyName>Eve-O Preview</AssemblyName>
<AssemblyName>EVE-O Preview</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
Expand Down Expand Up @@ -75,24 +76,29 @@
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<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 Include="Costura, Version=3.3.2.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
<HintPath>..\packages\Costura.Fody.3.3.2\lib\net40\Costura.dll</HintPath>
</Reference>
<Reference Include="LightInject">
<HintPath>..\packages\LightInject.5.1.2\lib\net452\LightInject.dll</HintPath>
<Private>True</Private>
<Reference Include="LightInject, Version=5.4.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\LightInject.5.4.0\lib\net46\LightInject.dll</HintPath>
</Reference>
<Reference Include="MediatR, Version=4.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MediatR.4.0.1\lib\net45\MediatR.dll</HintPath>
<Reference Include="MediatR, Version=6.0.0.0, Culture=neutral, PublicKeyToken=bb9a41a5e8aaa7e2, processorArchitecture=MSIL">
<HintPath>..\packages\MediatR.6.0.0\lib\net461\MediatR.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.IO" />
<Reference Include="System.Linq.Expressions" />
<Reference Include="System.Runtime" />
<Reference Include="System.Threading.Tasks" />
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Forms" />
<Reference Include="System.XML" />
<Reference Include="System.Xml.Linq" />
Expand Down Expand Up @@ -141,6 +147,7 @@
<Compile Include="Services\Interop\DWM_THUMBNAIL_PROPERTIES.cs" />
<Compile Include="Services\Interop\DWM_TNP_CONSTANTS.cs" />
<Compile Include="Services\Interface\IWindowManager.cs" />
<Compile Include="Services\Interop\Gdi32NativeMethods.cs" />
<Compile Include="Services\Interop\MARGINS.cs" />
<Compile Include="Services\Interop\RECT.cs" />
<Compile Include="Configuration\Interface\ClientLayout.cs" />
Expand All @@ -151,6 +158,15 @@
<Compile Include="Presenters\Interface\ViewCloseRequest.cs" />
<Compile Include="Presenters\Implementation\ViewZoomAnchorConverter.cs" />
<Compile Include="Services\Interop\WINDOWPLACEMENT.cs" />
<Compile Include="View\Implementation\LiveThumbnailView.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="View\Implementation\StaticThumbnailImage.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="View\Implementation\StaticThumbnailView.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="View\Interface\IThumbnailViewFactory.cs" />
<Compile Include="Services\Interface\IThumbnailManager.cs" />
<Compile Include="View\Implementation\ThumbnailDescription.cs" />
Expand Down Expand Up @@ -206,31 +222,29 @@
<Compile Include="View\Implementation\ThumbnailView.Designer.cs">
<DependentUpon>ThumbnailView.cs</DependentUpon>
</Compile>
<Compile Include="Services\Interop\DwmApiNativeMethods.cs" />
<Compile Include="Services\Interop\DwmNativeMethods.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<EmbeddedResource Include="app.manifest" />
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
<None Include="Resources\icon.png" />
</ItemGroup>
<ItemGroup>
<None Include="FodyWeavers.xml" />
<Content Include="icon.ico" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Fody.4.0.2\build\Fody.targets" Condition="Exists('..\packages\Fody.4.0.2\build\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\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'))" />
<Error Condition="!Exists('..\packages\Fody.2.4.6\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.2.4.6\build\Fody.targets'))" />
<Error Condition="!Exists('..\packages\Fody.4.0.2\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.4.0.2\build\Fody.targets'))" />
<Error Condition="!Exists('..\packages\Costura.Fody.3.3.2\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.3.3.2\build\Costura.Fody.props'))" />
</Target>
<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')" />
<Import Project="..\packages\Fody.2.4.6\build\Fody.targets" Condition="Exists('..\packages\Fody.2.4.6\build\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">
Expand Down
2 changes: 1 addition & 1 deletion Eve-O-Preview/FodyWeavers.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Weavers>
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<Costura IncludeDebugSymbols="false" />
</Weavers>
111 changes: 111 additions & 0 deletions Eve-O-Preview/FodyWeavers.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="Costura" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:all>
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="IncludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="PreloadOrder" type="xs:string">
<xs:annotation>
<xs:documentation>The order of preloaded assemblies, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:all>
<xs:attribute name="CreateTemporaryAssemblies" type="xs:boolean">
<xs:annotation>
<xs:documentation>This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeDebugSymbols" type="xs:boolean">
<xs:annotation>
<xs:documentation>Controls if .pdbs for reference assemblies are also embedded.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DisableCompression" type="xs:boolean">
<xs:annotation>
<xs:documentation>Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DisableCleanup" type="xs:boolean">
<xs:annotation>
<xs:documentation>As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="LoadAtModuleInit" type="xs:boolean">
<xs:annotation>
<xs:documentation>Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IgnoreSatelliteAssemblies" type="xs:boolean">
<xs:annotation>
<xs:documentation>Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ExcludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Unmanaged64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="PreloadOrder" type="xs:string">
<xs:annotation>
<xs:documentation>The order of preloaded assemblies, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
Loading

0 comments on commit 1c20419

Please sign in to comment.