Skip to content

Commit

Permalink
High DPI support
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Gelb committed Jul 18, 2018
1 parent 549fb4c commit 3952df8
Show file tree
Hide file tree
Showing 8 changed files with 150 additions and 50 deletions.
16 changes: 10 additions & 6 deletions App.config
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="ElasticSearchManager.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="ElasticSearchManager.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
</startup>

<appSettings>
Expand All @@ -22,11 +22,15 @@
<userSettings>
<ElasticSearchManager.Properties.Settings>
<setting name="LastConnection" serializeAs="String">
<value />
<value/>
</setting>
<setting name="SplitterDistance" serializeAs="String">
<value>330</value>
</setting>
</ElasticSearchManager.Properties.Settings>
</userSettings>
</configuration>

<System.Windows.Forms.ApplicationConfigurationSection>
<add key="DpiAwareness" value="PerMonitorV2" />
</System.Windows.Forms.ApplicationConfigurationSection>
</configuration>
7 changes: 6 additions & 1 deletion ElasticSearchManager.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
<OutputType>WinExe</OutputType>
<RootNamespace>ElasticSearchManager</RootNamespace>
<AssemblyName>ElasticSearchManager</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -34,6 +35,9 @@
<PropertyGroup>
<ApplicationIcon>Assets\if_TruckYellow_22999.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="Elasticsearch.Net, Version=6.0.0.0, Culture=neutral, PublicKeyToken=96c599bbe3e70f5d, processorArchitecture=MSIL">
<HintPath>packages\Elasticsearch.Net.6.2.0\lib\net46\Elasticsearch.Net.dll</HintPath>
Expand Down Expand Up @@ -89,6 +93,7 @@
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.manifest" />
<None Include="Installer\CleanFiles\ElasticSearchManager.exe.config" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
Expand Down
44 changes: 32 additions & 12 deletions Installer/CleanFiles/ElasticSearchManager.exe.config
Original file line number Diff line number Diff line change
@@ -1,16 +1,36 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="ElasticSearchManager.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
</startup>

<appSettings>

</appSettings>
<appSettings>
</appSettings>

<connectionStrings>
<add name="stage" connectionString="http://10.147.31.49:9200,http://10.147.31.51:9200,http://10.147.31.52:9200,http://10.147.31.53:9200,http://10.147.31.54:9200,http://10.147.31.55:9200"/>
<add name="prod" connectionString="http://10.147.21.109:9200,http://10.147.21.110:9200,http://10.147.21.111:9200,http://10.147.21.112:9200,http://10.147.21.113:9200,http://10.147.21.114:9200"/>
</connectionStrings>
<connectionStrings>

<add name="stage" connectionString="http://10.147.31.49:9200,http://10.147.31.51:9200,http://10.147.31.52:9200,http://10.147.31.53:9200,http://10.147.31.54:9200,http://10.147.31.55:9200"/>
<add name="prod" connectionString="http://10.147.21.109:9200,http://10.147.21.110:9200,http://10.147.21.111:9200,http://10.147.21.112:9200,http://10.147.21.113:9200,http://10.147.21.114:9200"/>

</configuration>
</connectionStrings>

<userSettings>
<ElasticSearchManager.Properties.Settings>
<setting name="LastConnection" serializeAs="String">
<value/>
</setting>
<setting name="SplitterDistance" serializeAs="String">
<value>330</value>
</setting>
</ElasticSearchManager.Properties.Settings>
</userSettings>

<System.Windows.Forms.ApplicationConfigurationSection>
<add key="DpiAwareness" value="PerMonitorV2" />
</System.Windows.Forms.ApplicationConfigurationSection>
</configuration>
2 changes: 1 addition & 1 deletion Installer/Install.iss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ DisableDirPage=yes
DisableProgramGroupPage=yes
DisableReadyPage=yes
UninstallDisplayIcon={app}\ElasticSearchManager.exe
OutputBaseFilename=ElasticSearchManager
OutputBaseFilename=ElasticSearchManagerSetup
AppID=ElasticSearchManager.1

[Files]
Expand Down
Binary file not shown.
8 changes: 4 additions & 4 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
[assembly: AssemblyTitle("ElasticSearchManager")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("HP Inc.")]
[assembly: AssemblyCompany("Robert Gelb")]
[assembly: AssemblyProduct("ElasticSearchManager")]
[assembly: AssemblyCopyright("Copyright © HP Inc. 2018")]
[assembly: AssemblyCopyright("Copyright © Robert Gelb")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.0.1")]
[assembly: AssemblyFileVersion("1.0.0.1")]
76 changes: 76 additions & 0 deletions app.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
Specifying requestedExecutionLevel element will disable file and registry virtualization.
Remove this element if your application requires this virtualization for backwards
compatibility.
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>

<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of the Windows versions that this application has been tested on and is
is designed to work with. Uncomment the appropriate elements and Windows will
automatically selected the most compatible environment. -->

<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->

<!-- Windows 7 -->
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->

<!-- Windows 8 -->
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->

<!-- Windows 8.1 -->
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->

<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />

</application>
</compatibility>

<!-- Indicates that the application is DPI-aware and will not be automatically scaled by Windows at higher
DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need
to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should
also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config. -->
<!--
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</windowsSettings>
</application>
-->

<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
<!--
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
-->

</assembly>
47 changes: 21 additions & 26 deletions frmMain.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3952df8

Please sign in to comment.