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

Commit 1c20419

Browse files
author
Anton Kasyanov
committed
Merge branch 'beta'
2 parents 9a68208 + 7002a3a commit 1c20419

36 files changed

+900
-264
lines changed

Eve-O-Preview/ApplicationBase/ExceptionHandler.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ namespace EveOPreview
1212
// So this dumb and non elegant approach is used
1313
sealed class ExceptionHandler
1414
{
15-
private const string ExceptionDumpFileName = "EVE-O Preview.log";
16-
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.";
15+
private const string EXCEPTION_DUMP_FILE_NAME = "EVE-O Preview.log";
16+
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.";
1717

1818
public void SetupExceptionHandlers()
1919
{
@@ -39,9 +39,9 @@ private void ExceptionEventHandler(Exception exception)
3939
try
4040
{
4141
String exceptionMessage = exception.ToString();
42-
File.WriteAllText(ExceptionHandler.ExceptionDumpFileName, exceptionMessage);
42+
File.WriteAllText(ExceptionHandler.EXCEPTION_DUMP_FILE_NAME, exceptionMessage);
4343

44-
MessageBox.Show(ExceptionHandler.ExceptionMessage, @"EVE-O Preview", MessageBoxButtons.OK, MessageBoxIcon.Error);
44+
MessageBox.Show(ExceptionHandler.EXCEPTION_MESSAGE, @"EVE-O Preview", MessageBoxButtons.OK, MessageBoxIcon.Error);
4545
}
4646
catch
4747
{

Eve-O-Preview/Configuration/Implementation/ConfigurationStorage.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace EveOPreview.Configuration.Implementation
55
{
66
class ConfigurationStorage : IConfigurationStorage
77
{
8-
private const string ConfigurationFileName = "EVE-O Preview.json";
8+
private const string CONFIGURATION_FILE_NAME = "EVE-O Preview.json";
99

1010
private readonly IAppConfig _appConfig;
1111
private readonly IThumbnailConfiguration _thumbnailConfiguration;
@@ -50,7 +50,7 @@ public void Save()
5050

5151
private string GetConfigFileName()
5252
{
53-
return string.IsNullOrEmpty(this._appConfig.ConfigFileName) ? ConfigurationStorage.ConfigurationFileName : this._appConfig.ConfigFileName;
53+
return string.IsNullOrEmpty(this._appConfig.ConfigFileName) ? ConfigurationStorage.CONFIGURATION_FILE_NAME : this._appConfig.ConfigFileName;
5454
}
5555
}
5656
}

Eve-O-Preview/Configuration/Implementation/ThumbnailConfiguration.cs

+5
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ public ThumbnailConfiguration()
2424
this.MinimizeToTray = false;
2525
this.ThumbnailRefreshPeriod = 500;
2626

27+
this.EnableCompatibilityMode = false;
28+
2729
this.ThumbnailOpacity = 0.5;
2830

2931
this.EnableClientLayoutTracking = false;
@@ -54,6 +56,9 @@ public ThumbnailConfiguration()
5456
public bool MinimizeToTray { get; set; }
5557
public int ThumbnailRefreshPeriod { get; set; }
5658

59+
[JsonProperty("CompatibilityMode")]
60+
public bool EnableCompatibilityMode { get; set; }
61+
5762
[JsonProperty("ThumbnailsOpacity")]
5863
public double ThumbnailOpacity { get; set; }
5964

Eve-O-Preview/Configuration/Interface/ClientLayout.cs

+6-1
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,23 @@ public ClientLayout()
66
{
77
}
88

9-
public ClientLayout(int x, int y, int width, int height)
9+
public ClientLayout(int x, int y, int width, int height, bool maximized)
1010
{
1111
this.X = x;
1212
this.Y = y;
1313
this.Width = width;
1414
this.Height = height;
15+
this.IsMaximized = maximized;
1516
}
1617

1718
public int X { get; set; }
19+
1820
public int Y { get; set; }
1921

2022
public int Width { get; set; }
23+
2124
public int Height { get; set; }
25+
26+
public bool IsMaximized { get; set; }
2227
}
2328
}

Eve-O-Preview/Configuration/Interface/IThumbnailConfiguration.cs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ public interface IThumbnailConfiguration
88
bool MinimizeToTray { get; set; }
99
int ThumbnailRefreshPeriod { get; set; }
1010

11+
bool EnableCompatibilityMode { get; set; }
12+
1113
double ThumbnailOpacity { get; set; }
1214

1315
bool EnableClientLayoutTracking { get; set; }

Eve-O-Preview/Eve-O-Preview.csproj

+31-17
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
3+
<Import Project="..\packages\Costura.Fody.3.3.2\build\Costura.Fody.props" Condition="Exists('..\packages\Costura.Fody.3.3.2\build\Costura.Fody.props')" />
34
<PropertyGroup>
45
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
56
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -9,7 +10,7 @@
910
<OutputType>WinExe</OutputType>
1011
<AppDesignerFolder>Properties</AppDesignerFolder>
1112
<RootNamespace>EveOPreview</RootNamespace>
12-
<AssemblyName>Eve-O Preview</AssemblyName>
13+
<AssemblyName>EVE-O Preview</AssemblyName>
1314
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
1415
<NuGetPackageImportStamp>
1516
</NuGetPackageImportStamp>
@@ -75,24 +76,29 @@
7576
<ApplicationManifest>app.manifest</ApplicationManifest>
7677
</PropertyGroup>
7778
<ItemGroup>
78-
<Reference Include="Costura, Version=1.6.2.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
79-
<HintPath>..\packages\Costura.Fody.1.6.2\lib\dotnet\Costura.dll</HintPath>
80-
<Private>False</Private>
79+
<Reference Include="Costura, Version=3.3.2.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
80+
<HintPath>..\packages\Costura.Fody.3.3.2\lib\net40\Costura.dll</HintPath>
8181
</Reference>
82-
<Reference Include="LightInject">
83-
<HintPath>..\packages\LightInject.5.1.2\lib\net452\LightInject.dll</HintPath>
84-
<Private>True</Private>
82+
<Reference Include="LightInject, Version=5.4.0.0, Culture=neutral, processorArchitecture=MSIL">
83+
<HintPath>..\packages\LightInject.5.4.0\lib\net46\LightInject.dll</HintPath>
8584
</Reference>
86-
<Reference Include="MediatR, Version=4.0.1.0, Culture=neutral, processorArchitecture=MSIL">
87-
<HintPath>..\packages\MediatR.4.0.1\lib\net45\MediatR.dll</HintPath>
85+
<Reference Include="MediatR, Version=6.0.0.0, Culture=neutral, PublicKeyToken=bb9a41a5e8aaa7e2, processorArchitecture=MSIL">
86+
<HintPath>..\packages\MediatR.6.0.0\lib\net461\MediatR.dll</HintPath>
8887
</Reference>
8988
<Reference Include="Microsoft.CSharp" />
90-
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
91-
<HintPath>..\packages\Newtonsoft.Json.11.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
89+
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
90+
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
9291
</Reference>
9392
<Reference Include="System" />
9493
<Reference Include="System.Deployment" />
9594
<Reference Include="System.Drawing" />
95+
<Reference Include="System.IO" />
96+
<Reference Include="System.Linq.Expressions" />
97+
<Reference Include="System.Runtime" />
98+
<Reference Include="System.Threading.Tasks" />
99+
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
100+
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
101+
</Reference>
96102
<Reference Include="System.Windows.Forms" />
97103
<Reference Include="System.XML" />
98104
<Reference Include="System.Xml.Linq" />
@@ -141,6 +147,7 @@
141147
<Compile Include="Services\Interop\DWM_THUMBNAIL_PROPERTIES.cs" />
142148
<Compile Include="Services\Interop\DWM_TNP_CONSTANTS.cs" />
143149
<Compile Include="Services\Interface\IWindowManager.cs" />
150+
<Compile Include="Services\Interop\Gdi32NativeMethods.cs" />
144151
<Compile Include="Services\Interop\MARGINS.cs" />
145152
<Compile Include="Services\Interop\RECT.cs" />
146153
<Compile Include="Configuration\Interface\ClientLayout.cs" />
@@ -151,6 +158,15 @@
151158
<Compile Include="Presenters\Interface\ViewCloseRequest.cs" />
152159
<Compile Include="Presenters\Implementation\ViewZoomAnchorConverter.cs" />
153160
<Compile Include="Services\Interop\WINDOWPLACEMENT.cs" />
161+
<Compile Include="View\Implementation\LiveThumbnailView.cs">
162+
<SubType>Form</SubType>
163+
</Compile>
164+
<Compile Include="View\Implementation\StaticThumbnailImage.cs">
165+
<SubType>Component</SubType>
166+
</Compile>
167+
<Compile Include="View\Implementation\StaticThumbnailView.cs">
168+
<SubType>Form</SubType>
169+
</Compile>
154170
<Compile Include="View\Interface\IThumbnailViewFactory.cs" />
155171
<Compile Include="Services\Interface\IThumbnailManager.cs" />
156172
<Compile Include="View\Implementation\ThumbnailDescription.cs" />
@@ -206,31 +222,29 @@
206222
<Compile Include="View\Implementation\ThumbnailView.Designer.cs">
207223
<DependentUpon>ThumbnailView.cs</DependentUpon>
208224
</Compile>
209-
<Compile Include="Services\Interop\DwmApiNativeMethods.cs" />
225+
<Compile Include="Services\Interop\DwmNativeMethods.cs" />
210226
</ItemGroup>
211227
<ItemGroup>
212228
<None Include="app.config" />
213229
<EmbeddedResource Include="app.manifest" />
214230
<None Include="packages.config">
215231
<SubType>Designer</SubType>
216232
</None>
217-
<None Include="Resources\icon.png" />
218233
</ItemGroup>
219234
<ItemGroup>
220235
<None Include="FodyWeavers.xml" />
221236
<Content Include="icon.ico" />
222237
</ItemGroup>
223238
<ItemGroup />
224239
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
240+
<Import Project="..\packages\Fody.4.0.2\build\Fody.targets" Condition="Exists('..\packages\Fody.4.0.2\build\Fody.targets')" />
225241
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
226242
<PropertyGroup>
227243
<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>
228244
</PropertyGroup>
229-
<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'))" />
230-
<Error Condition="!Exists('..\packages\Fody.2.4.6\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.2.4.6\build\Fody.targets'))" />
245+
<Error Condition="!Exists('..\packages\Fody.4.0.2\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.4.0.2\build\Fody.targets'))" />
246+
<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'))" />
231247
</Target>
232-
<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')" />
233-
<Import Project="..\packages\Fody.2.4.6\build\Fody.targets" Condition="Exists('..\packages\Fody.2.4.6\build\Fody.targets')" />
234248
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
235249
Other similar extension points exist, see Microsoft.Common.targets.
236250
<Target Name="BeforeBuild">

Eve-O-Preview/FodyWeavers.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Weavers>
2+
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
33
<Costura IncludeDebugSymbols="false" />
44
</Weavers>

Eve-O-Preview/FodyWeavers.xsd

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
3+
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
4+
<xs:element name="Weavers">
5+
<xs:complexType>
6+
<xs:all>
7+
<xs:element name="Costura" minOccurs="0" maxOccurs="1">
8+
<xs:complexType>
9+
<xs:all>
10+
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeAssemblies" type="xs:string">
11+
<xs:annotation>
12+
<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>
13+
</xs:annotation>
14+
</xs:element>
15+
<xs:element minOccurs="0" maxOccurs="1" name="IncludeAssemblies" type="xs:string">
16+
<xs:annotation>
17+
<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>
18+
</xs:annotation>
19+
</xs:element>
20+
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged32Assemblies" type="xs:string">
21+
<xs:annotation>
22+
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with line breaks.</xs:documentation>
23+
</xs:annotation>
24+
</xs:element>
25+
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged64Assemblies" type="xs:string">
26+
<xs:annotation>
27+
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with line breaks.</xs:documentation>
28+
</xs:annotation>
29+
</xs:element>
30+
<xs:element minOccurs="0" maxOccurs="1" name="PreloadOrder" type="xs:string">
31+
<xs:annotation>
32+
<xs:documentation>The order of preloaded assemblies, delimited with line breaks.</xs:documentation>
33+
</xs:annotation>
34+
</xs:element>
35+
</xs:all>
36+
<xs:attribute name="CreateTemporaryAssemblies" type="xs:boolean">
37+
<xs:annotation>
38+
<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>
39+
</xs:annotation>
40+
</xs:attribute>
41+
<xs:attribute name="IncludeDebugSymbols" type="xs:boolean">
42+
<xs:annotation>
43+
<xs:documentation>Controls if .pdbs for reference assemblies are also embedded.</xs:documentation>
44+
</xs:annotation>
45+
</xs:attribute>
46+
<xs:attribute name="DisableCompression" type="xs:boolean">
47+
<xs:annotation>
48+
<xs:documentation>Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.</xs:documentation>
49+
</xs:annotation>
50+
</xs:attribute>
51+
<xs:attribute name="DisableCleanup" type="xs:boolean">
52+
<xs:annotation>
53+
<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>
54+
</xs:annotation>
55+
</xs:attribute>
56+
<xs:attribute name="LoadAtModuleInit" type="xs:boolean">
57+
<xs:annotation>
58+
<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>
59+
</xs:annotation>
60+
</xs:attribute>
61+
<xs:attribute name="IgnoreSatelliteAssemblies" type="xs:boolean">
62+
<xs:annotation>
63+
<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>
64+
</xs:annotation>
65+
</xs:attribute>
66+
<xs:attribute name="ExcludeAssemblies" type="xs:string">
67+
<xs:annotation>
68+
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
69+
</xs:annotation>
70+
</xs:attribute>
71+
<xs:attribute name="IncludeAssemblies" type="xs:string">
72+
<xs:annotation>
73+
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
74+
</xs:annotation>
75+
</xs:attribute>
76+
<xs:attribute name="Unmanaged32Assemblies" type="xs:string">
77+
<xs:annotation>
78+
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with |.</xs:documentation>
79+
</xs:annotation>
80+
</xs:attribute>
81+
<xs:attribute name="Unmanaged64Assemblies" type="xs:string">
82+
<xs:annotation>
83+
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with |.</xs:documentation>
84+
</xs:annotation>
85+
</xs:attribute>
86+
<xs:attribute name="PreloadOrder" type="xs:string">
87+
<xs:annotation>
88+
<xs:documentation>The order of preloaded assemblies, delimited with |.</xs:documentation>
89+
</xs:annotation>
90+
</xs:attribute>
91+
</xs:complexType>
92+
</xs:element>
93+
</xs:all>
94+
<xs:attribute name="VerifyAssembly" type="xs:boolean">
95+
<xs:annotation>
96+
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
97+
</xs:annotation>
98+
</xs:attribute>
99+
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
100+
<xs:annotation>
101+
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
102+
</xs:annotation>
103+
</xs:attribute>
104+
<xs:attribute name="GenerateXsd" type="xs:boolean">
105+
<xs:annotation>
106+
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
107+
</xs:annotation>
108+
</xs:attribute>
109+
</xs:complexType>
110+
</xs:element>
111+
</xs:schema>

0 commit comments

Comments
 (0)