Update version to 1.0.1

Try compatible high DPI screens
Fix Host setting not saved
This commit is contained in:
2022-05-13 20:16:20 +08:00
parent ba25cd6e7c
commit 38e88d6ea5
9 changed files with 5500 additions and 4952 deletions

View File

@ -1,36 +1,39 @@
<?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="GrasscutterTools.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.8" />
</startup>
<userSettings>
<GrasscutterTools.Properties.Settings>
<setting name="AutoCopy" serializeAs="String">
<value>False</value>
</setting>
<setting name="Uid" serializeAs="String">
<value>10001</value>
</setting>
<setting name="DefaultLanguage" serializeAs="String">
<value>zh-CN</value>
</setting>
<setting name="ResourcesDirPath" serializeAs="String">
<value />
</setting>
<setting name="TextMapFileName" serializeAs="String">
<value>TextMapCHS</value>
</setting>
<setting name="RemoteUid" serializeAs="String">
<value>10001</value>
</setting>
<setting name="Host" serializeAs="String">
<value>https://127.0.0.1</value>
</setting>
</GrasscutterTools.Properties.Settings>
</userSettings>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="GrasscutterTools.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.8" />
</startup>
<System.Windows.Forms.ApplicationConfigurationSection>
<add key="DpiAwareness" value="PerMonitorV2" />
</System.Windows.Forms.ApplicationConfigurationSection>
<userSettings>
<GrasscutterTools.Properties.Settings>
<setting name="AutoCopy" serializeAs="String">
<value>False</value>
</setting>
<setting name="Uid" serializeAs="String">
<value>10001</value>
</setting>
<setting name="DefaultLanguage" serializeAs="String">
<value>zh-CN</value>
</setting>
<setting name="ResourcesDirPath" serializeAs="String">
<value />
</setting>
<setting name="TextMapFileName" serializeAs="String">
<value>TextMapCHS</value>
</setting>
<setting name="RemoteUid" serializeAs="String">
<value>10001</value>
</setting>
<setting name="Host" serializeAs="String">
<value>https://127.0.0.1</value>
</setting>
</GrasscutterTools.Properties.Settings>
</userSettings>
</configuration>

File diff suppressed because it is too large Load Diff

View File

@ -60,15 +60,17 @@ namespace GrasscutterTools
{
try
{
ChkAutoCopy.Checked = Settings.Default.AutoCopy;
NUDUid.Value = Settings.Default.Uid;
ChkAutoCopy.Checked = Settings.Default.AutoCopy;
NUDUid.Value = Settings.Default.Uid;
CmbLanguage.Items.AddRange(LanguageNames);
CmbLanguage.SelectedIndex = Array.IndexOf(Languages, Settings.Default.DefaultLanguage);
NUDRemotePlayerId.Value = Settings.Default.RemoteUid;
TxtHost.Text = Settings.Default.Host;
InitGiveItemRecord();
InitSpawnRecord();
InitOpenCommand();
}
catch (Exception ex)
{
@ -80,13 +82,14 @@ namespace GrasscutterTools
{
try
{
Settings.Default.AutoCopy = ChkAutoCopy.Checked;
Settings.Default.Uid = NUDUid.Value;
Settings.Default.Save();
Settings.Default.AutoCopy = ChkAutoCopy.Checked;
Settings.Default.Uid = NUDUid.Value;
Settings.Default.RemoteUid = NUDRemotePlayerId.Value;
Settings.Default.Host = TxtHost.Text;
SaveCustomCommands();
SaveGiveItemRecord();
SaveSpawnRecord();
SaveOpenCommand();
Settings.Default.Save();
}
catch (Exception ex)
{
@ -926,18 +929,6 @@ namespace GrasscutterTools
#region - -
private void InitOpenCommand()
{
NUDRemotePlayerId.Value = Settings.Default.RemoteUid;
TxtHost.Text = Settings.Default.Host;
}
private void SaveOpenCommand()
{
Settings.Default.RemoteUid = NUDRemotePlayerId.Value;
Settings.Default.Host = TxtHost.Text;
}
private OpenCommandAPI OC;
private async void BtnQueryServerStatus_Click(object sender, EventArgs e)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -40,6 +40,9 @@
<PropertyGroup>
<ApplicationIcon>Resources\IconGrasscutter.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="Costura, Version=5.7.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Costura.Fody.5.7.0\lib\netstandard1.0\Costura.dll</HintPath>
@ -232,9 +235,11 @@
</EmbeddedResource>
<EmbeddedResource Include="FormMain.en-us.resx">
<DependentUpon>FormMain.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="FormMain.resx">
<DependentUpon>FormMain.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="FormTextMapBrowser.en-US.resx">
<DependentUpon>FormTextMapBrowser.cs</DependentUpon>
@ -263,6 +268,7 @@
<DesignTime>True</DesignTime>
</Compile>
<None Include="packages.config" />
<None Include="Properties\app.manifest" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
@ -316,7 +322,18 @@
<Content Include="Resources\zh-cn\Scene.txt" />
<Content Include="Resources\zh-cn\Weapon.txt" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.8">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.8 %28x86 和 x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>

View File

@ -15,6 +15,9 @@ namespace GrasscutterTools
[STAThread]
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
//设置应用程序处理异常方式ThreadException处理
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
//处理线程异常
@ -22,8 +25,6 @@ namespace GrasscutterTools
//处理非UI线程异常
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new FormMain());
}

View File

@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0")]
[assembly: AssemblyVersion("1.0.1")]
[assembly: AssemblyFileVersion("1.0.0")]

View File

@ -0,0 +1,73 @@
<?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>
<applicationRequestMinimum>
<defaultAssemblyRequest permissionSetReference="Custom" />
<PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="site" />
</applicationRequestMinimum>
</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"。
将应用程序设为感知长路径。请参阅 https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation -->
<!--
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</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>