Commit 57f7a0c3 authored by tsuji's avatar tsuji

・モニターごとのDPI認識機能を追加

・メニュー配置、サイズの微修正
parent 189c05ad
...@@ -39,4 +39,7 @@ ...@@ -39,4 +39,7 @@
</setting> </setting>
</CSRender.Properties.Settings> </CSRender.Properties.Settings>
</userSettings> </userSettings>
<runtime>
<AppContextSwitchOverrides value = "Switch.System.Windows.DoNotScaleForDpiChanges=false"/>
</runtime>
</configuration> </configuration>
\ No newline at end of file
...@@ -34,6 +34,9 @@ ...@@ -34,6 +34,9 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.WindowsAPICodePack, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Microsoft.WindowsAPICodePack, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.WindowsAPICodePack-Core.1.1.0.2\lib\Microsoft.WindowsAPICodePack.dll</HintPath> <HintPath>..\packages\Microsoft.WindowsAPICodePack-Core.1.1.0.2\lib\Microsoft.WindowsAPICodePack.dll</HintPath>
...@@ -103,6 +106,7 @@ ...@@ -103,6 +106,7 @@
<Generator>ResXFileCodeGenerator</Generator> <Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput> <LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource> </EmbeddedResource>
<None Include="app.manifest" />
<None Include="packages.config" /> <None Include="packages.config" />
<None Include="Properties\Settings.settings"> <None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
......
...@@ -8,12 +8,12 @@ ...@@ -8,12 +8,12 @@
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" mc:Ignorable="d"
Title="CSRender" Height="475" Width="600" Background="#FFF3F4F4" MinWidth="600" MinHeight="330"> Title="CSRender" Height="475" Width="600" Background="#FFF3F4F4" MinWidth="600" MinHeight="330">
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="135"/> <ColumnDefinition Width="135"/>
<ColumnDefinition Width="185*"/> <ColumnDefinition Width="195*"/>
<ColumnDefinition Width="175*"/> <ColumnDefinition Width="165*"/>
<ColumnDefinition Width="98*"/> <ColumnDefinition Width="98*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid.RowDefinitions> <Grid.RowDefinitions>
...@@ -62,10 +62,10 @@ ...@@ -62,10 +62,10 @@
</ComboBox.Background> </ComboBox.Background>
</ComboBox> </ComboBox>
</StackPanel> </StackPanel>
<Label Content="出力形式:" Margin="12,0.333,78.333,0" VerticalAlignment="Top" RenderTransformOrigin="0.544,1.949" FontSize="14" Grid.Row="5" Height="29" Grid.RowSpan="2" Grid.Column="2"/> <Label Content="出力形式:" Margin="10,0.667,71.333,0" VerticalAlignment="Top" RenderTransformOrigin="0.544,1.949" FontSize="14" Grid.Row="5" Height="29" Grid.RowSpan="2" Grid.Column="2"/>
<Label x:Name="pageLabel" Content="指定ページ:" Margin="12,1.333,76.333,0" VerticalAlignment="Top" RenderTransformOrigin="0.544,1.949" FontSize="14" Grid.Row="6" Height="29" Grid.Column="2" IsEnabled="{Binding PageRange_SelectionChanged}" Grid.RowSpan="2"/> <Label x:Name="pageLabel" Content="指定ページ:" Margin="10,0.667,72.333,0" VerticalAlignment="Top" RenderTransformOrigin="0.544,1.949" FontSize="14" Grid.Row="6" Height="29" Grid.Column="2" IsEnabled="{Binding PageRange_SelectionChanged}" Grid.RowSpan="2"/>
<StackPanel Grid.Column="2" HorizontalAlignment="Left" Margin="91,5.333,0,18.667" Grid.Row="5" Width="75" Grid.RowSpan="2" > <StackPanel Grid.Column="2" HorizontalAlignment="Left" Margin="95,5.667,0,18.333" Grid.Row="5" Width="71" Grid.RowSpan="2" Grid.ColumnSpan="2" >
<ComboBox x:Name="FileSelect" SelectedValuePath="Id" DisplayMemberPath="Item" Height="21" SelectedValue="1" Margin="4,0,-4.333,0" BorderBrush="#FF3A3A3A" > <ComboBox x:Name="FileSelect" SelectedValuePath="Id" DisplayMemberPath="Item" Height="21" SelectedValue="1" Margin="0,0,9.667,0" BorderBrush="#FF3A3A3A" >
<ComboBox.Background> <ComboBox.Background>
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="#FFF0F0F0" Offset="0"/> <GradientStop Color="#FFF0F0F0" Offset="0"/>
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
</ComboBox.Background> </ComboBox.Background>
</ComboBox> </ComboBox>
</StackPanel> </StackPanel>
<TextBox x:Name="pageBox" Grid.Column="2" Height="23" Margin="95,3.333,45.333,0" Grid.Row="6" <TextBox x:Name="pageBox" Grid.Column="2" Height="23" Margin="95,3.667,44.333,0" Grid.Row="6"
TextWrapping="Wrap" Text="1,2,4-6" VerticalAlignment="Top" FontSize="14" IsEnabled="{Binding PageRange_SelectionChanged}" Grid.ColumnSpan="2" TextWrapping="Wrap" Text="1,2,4-6" VerticalAlignment="Top" FontSize="14" IsEnabled="{Binding PageRange_SelectionChanged}" Grid.ColumnSpan="2"
InputMethod.IsInputMethodSuspended="True" PreviewKeyDown="PageBox_PreviewKeyDown" PreviewTextInput="PageBox_PreviewTextInput" LostFocus="PageBox_LostFocus" CommandManager.PreviewExecuted="PageBox_PreviewExecuted" BorderBrush="#FF595959"/> InputMethod.IsInputMethodSuspended="True" PreviewKeyDown="PageBox_PreviewKeyDown" PreviewTextInput="PageBox_PreviewTextInput" LostFocus="PageBox_LostFocus" CommandManager.PreviewExecuted="PageBox_PreviewExecuted" BorderBrush="#FF595959"/>
<TextBox x:Name="ResultConsole" Margin="44,9.333,44.333,9.667" Grid.Row="9" Grid.ColumnSpan="4" VerticalScrollBarVisibility="Auto" FontSize="14" IsReadOnly="True" HorizontalScrollBarVisibility="Auto" BorderBrush="#FF595959"/> <TextBox x:Name="ResultConsole" Margin="44,9.333,44.333,9.667" Grid.Row="9" Grid.ColumnSpan="4" VerticalScrollBarVisibility="Auto" FontSize="14" IsReadOnly="True" HorizontalScrollBarVisibility="Auto" BorderBrush="#FF595959"/>
...@@ -82,36 +82,36 @@ ...@@ -82,36 +82,36 @@
<Button x:Name="CompareButton" Content="比較" HorizontalAlignment="Left" Height="22" Margin="13.333,1.333,0,0" Grid.Row="10" VerticalAlignment="Top" Width="82" Grid.Column="1" Grid.RowSpan="2" Click="CompareButtonClick"/> <Button x:Name="CompareButton" Content="比較" HorizontalAlignment="Left" Height="22" Margin="13.333,1.333,0,0" Grid.Row="10" VerticalAlignment="Top" Width="82" Grid.Column="1" Grid.RowSpan="2" Click="CompareButtonClick"/>
<Button x:Name="closeButton" Content="Close" Height="22" Margin="0,1.333,45.333,0" Grid.Row="10" VerticalAlignment="Top" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2" HorizontalAlignment="Right" Width="77" Click="CloseButton_Click"/> <Button x:Name="closeButton" Content="Close" Height="22" Margin="0,1.333,45.333,0" Grid.Row="10" VerticalAlignment="Top" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2" HorizontalAlignment="Right" Width="77" Click="CloseButton_Click"/>
<Label Content="位置ズレ許容量(0 - 2):" Margin="0.333,0.333,30,0" VerticalAlignment="Top" RenderTransformOrigin="0.544,1.949" FontSize="14" Grid.Row="7" Height="29" Grid.RowSpan="2" Grid.Column="1"/> <Label Content="位置ズレ許容量(0 - 2):" Margin="0.333,0.333,30,0" VerticalAlignment="Top" RenderTransformOrigin="0.544,1.949" FontSize="14" Grid.Row="7" Height="29" Grid.RowSpan="2" Grid.Column="1"/>
<StackPanel Grid.Column="1" Grid.Row="7" Orientation="Horizontal" HorizontalAlignment="Left" Margin="154.333,3.333,0,3.667" Width="27" Background="WhiteSmoke" Grid.ColumnSpan="2"> <StackPanel Grid.Column="1" Grid.Row="7" Orientation="Horizontal" HorizontalAlignment="Left" Margin="154.333,4.667,0,2.333" Width="32" Background="WhiteSmoke">
<WindowsFormsHost Margin="0,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Width="27" Background="Orange"> <WindowsFormsHost Margin="0,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Width="32" Background="Orange">
<wfc:NumericUpDown x:Name="PositionBox" x:FieldModifier="public" Maximum="2" Minimum="0" Value="2" ReadOnly="False" Width="27" Margin="10,10,0,0" BorderStyle="FixedSingle"/> <wfc:NumericUpDown x:Name="PositionBox" x:FieldModifier="public" Maximum="2" Minimum="0" Value="2" ReadOnly="False" Width="32" Margin="10,10,0,0" BorderStyle="FixedSingle"/>
</WindowsFormsHost> </WindowsFormsHost>
</StackPanel> </StackPanel>
<Label Content="諧調差許容量(0 - 255):" Margin="13,0.333,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.544,1.949" FontSize="14" Grid.Row="7" Height="29" Grid.RowSpan="2" Grid.Column="2" HorizontalAlignment="Left" Width="163" Grid.ColumnSpan="2"/> <Label Content="諧調差許容量(0 - 255):" Margin="11,0.667,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.544,1.949" FontSize="14" Grid.Row="7" Height="29" Grid.RowSpan="2" Grid.Column="2" HorizontalAlignment="Left" Width="163" Grid.ColumnSpan="2"/>
<StackPanel Grid.Column="2" Grid.Row="7" Orientation="Horizontal" HorizontalAlignment="Left" Margin="175,4.333,0,2.667" Width="40" Background="WhiteSmoke" Grid.ColumnSpan="2"> <StackPanel Grid.Column="2" Grid.Row="7" Orientation="Horizontal" HorizontalAlignment="Left" Margin="172,4.333,0,2.667" Width="43" Background="WhiteSmoke" Grid.ColumnSpan="2">
<WindowsFormsHost Margin="0,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Width="40" Background="Orange"> <WindowsFormsHost Margin="0,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Width="43" Background="Orange">
<wfc:NumericUpDown x:Name="GradationBox" x:FieldModifier="public" Maximum="255" Minimum="0" Value="60" ReadOnly="False" Width="40" Margin="10,10,0,0" BorderStyle="FixedSingle"/> <wfc:NumericUpDown x:Name="GradationBox" x:FieldModifier="public" Maximum="255" Minimum="0" Value="60" ReadOnly="False" Width="43" Margin="10,10,0,0" BorderStyle="FixedSingle"/>
</WindowsFormsHost> </WindowsFormsHost>
</StackPanel> </StackPanel>
<Label Content="微小差異許容量(0 - 8):" Margin="0.333,0.333,17,0" VerticalAlignment="Top" RenderTransformOrigin="0.544,1.949" FontSize="14" Grid.Row="8" Height="29" Grid.RowSpan="2" Grid.Column="1"/> <Label Content="微小差異許容量(0 - 8):" Margin="0.333,0.333,17,0" VerticalAlignment="Top" RenderTransformOrigin="0.544,1.949" FontSize="14" Grid.Row="8" Height="29" Grid.RowSpan="2" Grid.Column="1"/>
<StackPanel Grid.Column="1" Grid.Row="8" Orientation="Horizontal" HorizontalAlignment="Left" Margin="154.333,3.333,0,3.667" Width="27" Background="WhiteSmoke" Grid.ColumnSpan="2"> <StackPanel Grid.Column="1" Grid.Row="8" Orientation="Horizontal" HorizontalAlignment="Left" Margin="154.333,4.667,0,2.333" Width="32" Background="WhiteSmoke">
<WindowsFormsHost Margin="0,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Width="27" Background="Orange"> <WindowsFormsHost Margin="0,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Width="32" Background="Orange">
<wfc:NumericUpDown x:Name="SmallDiffBox" x:FieldModifier="public" Maximum="8" Minimum="0" Value="8" ReadOnly="False" Width="27" Margin="10,10,0,0" BorderStyle="FixedSingle"/> <wfc:NumericUpDown x:Name="SmallDiffBox" x:FieldModifier="public" Maximum="8" Minimum="0" Value="8" ReadOnly="False" Width="32" Margin="10,10,0,0" BorderStyle="FixedSingle"/>
</WindowsFormsHost> </WindowsFormsHost>
</StackPanel> </StackPanel>
<Label Content="視覚的あいまい量(0 - 7):" Margin="13,0.333,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.544,1.949" FontSize="14" Grid.Row="8" Height="29" Grid.RowSpan="2" Grid.Column="2" HorizontalAlignment="Left" Width="163" Grid.ColumnSpan="2"/> <Label Content="視覚的あいまい量(0 - 7):" Margin="11,0.667,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.544,1.949" FontSize="14" Grid.Row="8" Height="29" Grid.RowSpan="2" Grid.Column="2" HorizontalAlignment="Left" Width="163" Grid.ColumnSpan="2"/>
<StackPanel Grid.Column="2" Grid.Row="8" Orientation="Horizontal" Margin="175,5.333,0,1.667" Background="WhiteSmoke" HorizontalAlignment="Left" Width="40" Grid.ColumnSpan="2"> <StackPanel Grid.Column="2" Grid.Row="8" Orientation="Horizontal" Margin="172,5.333,0,1.667" Background="WhiteSmoke" HorizontalAlignment="Left" Width="43" Grid.ColumnSpan="2">
<WindowsFormsHost Margin="0,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Width="40" Background="Orange"> <WindowsFormsHost Margin="0,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Width="43" Background="Orange">
<wfc:NumericUpDown x:Name="VisualBox" x:FieldModifier="public" Maximum="7" Minimum="0" Value="5" ReadOnly="False" Width="40" Margin="10,10,0,0" BorderStyle="FixedSingle"/> <wfc:NumericUpDown x:Name="VisualBox" x:FieldModifier="public" Maximum="7" Minimum="0" Value="5" ReadOnly="False" Width="43" Margin="10,10,0,0" BorderStyle="FixedSingle"/>
</WindowsFormsHost> </WindowsFormsHost>
</StackPanel> </StackPanel>
......
<?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 マニフェスト オプション
Windows のユーザー アカウント制御のレベルを変更するには、
requestedExecutionLevel ノードを以下のいずれかで置換します。
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
requestedExecutionLevel 要素を指定すると、ファイルおよびレジストリの仮想化が無効にされます。
アプリケーションが下位互換性を保つためにこの仮想化を要求する場合、この要素を
削除します。
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- このアプリケーションがテストされ、動作するよう設計された Windows バージョンの
一覧。適切な要素をコメント解除すると、最も互換性のある環境を Windows が
自動的に選択します。-->
<!-- 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>
<!-- アプリケーションが DPI 対応であり、それ以上の DPI で Windows によって自動的にスケーリングされないことを
示します。Windows Presentation Foundation (WPF) アプリケーションは自動的に DPI に対応し、オプトインする必要は
ありません。さらに、この設定にオプトインする .NET Framework 4.6 を対象とする Windows Forms アプリケーションは、
app.config ファイルで 'EnableWindowsFormsHighDpiAutoResizing' 設定を 'true' に設定する必要があります。-->
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</windowsSettings>
</application>
<!-- Windows のコモン コントロールとダイアログのテーマを有効にします (Windows XP 以降) -->
<!--
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
-->
</assembly>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment