Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
Enable DPI
Browse files Browse the repository at this point in the history
  • Loading branch information
tylearymf committed Mar 24, 2018
1 parent 84c3c26 commit 98f7e54
Show file tree
Hide file tree
Showing 5 changed files with 150 additions and 47 deletions.
6 changes: 3 additions & 3 deletions AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// Assembly SETUNA, Version 2.3
// Assembly SETUNA, Version 2.4

[assembly: System.Reflection.AssemblyTitle("SETUNA")]
[assembly: System.Reflection.AssemblyDescription("")]
[assembly: System.Reflection.AssemblyDescription("https://github.com/tylearymf/SETUNA2")]
[assembly: System.Reflection.AssemblyProduct("SETUNA")]
[assembly: System.Reflection.AssemblyCopyright("Copyright (C) 2008 CLEARUP")]
[assembly: System.Reflection.AssemblyTrademark("")]
[assembly: System.Reflection.AssemblyCompany("")]
[assembly: System.Runtime.InteropServices.ComVisible(false)]
[assembly: System.Runtime.InteropServices.Guid("4483e561-8b3e-427d-98a4-e0e821b7bf2f")]
[assembly: System.Reflection.AssemblyConfiguration("")]
[assembly: System.Reflection.AssemblyFileVersion("2.3")]
[assembly: System.Reflection.AssemblyFileVersion("2.4")]
[assembly: System.Runtime.CompilerServices.CompilationRelaxations(8)]
[assembly: System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows=true)]

Binary file removed SETUNA.Main.SplashForm.resources
Binary file not shown.
9 changes: 9 additions & 0 deletions SETUNA.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@
<PropertyGroup>
<ApplicationIcon>SETUNA\Resources\SETUNA2.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<Reference Include="System.Windows.Forms" />
Expand Down Expand Up @@ -330,4 +336,7 @@
<Content Include="SETUNA2.ico" />
<Content Include="SETUNA\Resources\SETUNA2.ico" />
</ItemGroup>
<ItemGroup>
<None Include="app.manifest" />
</ItemGroup>
</Project>
107 changes: 63 additions & 44 deletions SETUNA/Main/SplashForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,61 +31,80 @@ protected override void Dispose(bool disposing)

private void InitializeComponent()
{
this.components = new Container();
this.SplashTimer = new Timer(this.components);
this.pictureBox1 = new PictureBox();
this.label1 = new Label();
this.lblVer = new Label();
((ISupportInitialize) this.pictureBox1).BeginInit();
base.SuspendLayout();
this.SplashTimer.Interval = 0xbb8;
this.SplashTimer.Tick += new EventHandler(this.SplashTimer_Tick);
this.pictureBox1.Image = Resources.Logo;
this.components = new System.ComponentModel.Container();
this.SplashTimer = new System.Windows.Forms.Timer(this.components);
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.label1 = new System.Windows.Forms.Label();
this.lblVer = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// SplashTimer
//
this.SplashTimer.Interval = 3000;
this.SplashTimer.Tick += new System.EventHandler(this.SplashTimer_Tick);
//
// pictureBox1
//
this.pictureBox1.InitialImage = null;
this.pictureBox1.Location = new Point(-1, -1);
this.pictureBox1.Margin = new Padding(0);
this.pictureBox1.Location = new System.Drawing.Point(-2, -2);
this.pictureBox1.Margin = new System.Windows.Forms.Padding(0);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new Size(400, 0x7e);
this.pictureBox1.SizeMode = PictureBoxSizeMode.AutoSize;
this.pictureBox1.Size = new System.Drawing.Size(989, 298);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
this.pictureBox1.Click += new EventHandler(this.pictureBox1_Click);
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
this.pictureBox1.Image = Resources.Logo;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Cursor = Cursors.Hand;
this.label1.ForeColor = Color.Gray;
this.label1.Location = new Point(0x51, 150);
this.label1.Cursor = System.Windows.Forms.Cursors.Hand;
this.label1.ForeColor = System.Drawing.Color.Black;
this.label1.Location = new System.Drawing.Point(202, 375);
this.label1.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0);
this.label1.Name = "label1";
this.label1.Size = new Size(0xe3, 12);
this.label1.Size = new System.Drawing.Size(553, 30);
this.label1.TabIndex = 1;
this.label1.Text = "http://www.clearunit.com/clearup/setuna2/";
this.lblVer.ForeColor = Color.Gray;
this.lblVer.Location = new Point(12, 0x81);
this.label1.Text = "https://github.com/tylearymf/SETUNA2";
//
// lblVer
//
this.lblVer.ForeColor = System.Drawing.Color.Gray;
this.lblVer.Location = new System.Drawing.Point(30, 322);
this.lblVer.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0);
this.lblVer.Name = "lblVer";
this.lblVer.Size = new Size(0x16e, 0x12);
this.lblVer.Size = new System.Drawing.Size(915, 45);
this.lblVer.TabIndex = 4;
this.lblVer.Text = "SETUNA 2.0α";
this.lblVer.TextAlign = ContentAlignment.MiddleCenter;
base.AutoScaleDimensions = new SizeF(6f, 12f);
base.AutoScaleMode = AutoScaleMode.Font;
this.BackColor = Color.White;
base.ClientSize = new Size(0x18d, 0xa2);
base.ControlBox = false;
base.Controls.Add(this.lblVer);
base.Controls.Add(this.label1);
base.Controls.Add(this.pictureBox1);
this.lblVer.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// SplashForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(15F, 30F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(982, 425);
this.ControlBox = false;
this.Controls.Add(this.lblVer);
this.Controls.Add(this.label1);
this.Controls.Add(this.pictureBox1);
this.DoubleBuffered = true;
base.FormBorderStyle = FormBorderStyle.FixedSingle;
base.MaximizeBox = false;
base.MinimizeBox = false;
base.Name = "SplashForm";
base.ShowIcon = false;
base.ShowInTaskbar = false;
base.StartPosition = FormStartPosition.CenterScreen;
base.TopMost = true;
base.Load += new EventHandler(this.SplashForm_Load);
((ISupportInitialize) this.pictureBox1).EndInit();
base.ResumeLayout(false);
base.PerformLayout();
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Margin = new System.Windows.Forms.Padding(8, 8, 8, 8);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "SplashForm";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.TopMost = true;
this.Load += new System.EventHandler(this.SplashForm_Load);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();

}

private void pictureBox1_Click(object sender, EventArgs e)
Expand Down
75 changes: 75 additions & 0 deletions app.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?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 节点。n
<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 且 Windows 在 DPI 较高时将不会对其进行
自动缩放。Windows Presentation Foundation (WPF)应用程序自动感知 DPI,无需
选择加入。选择加入此设置的 Windows 窗体应用程序(目标设定为 .NET Framework 4.6 )还应
在其 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>

0 comments on commit 98f7e54

Please sign in to comment.