NuGet update

This commit is contained in:
Jaex 2024-06-03 09:14:54 +03:00
parent f5b8239f5e
commit c442fad787
3 changed files with 25 additions and 16 deletions

View file

@ -138,7 +138,7 @@ public static partial class NativeMethods
[DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
public static extern short GetKeyState(int keyCode);
[DllImport("user32.dll", ExactSpelling = true, CharSet = CharSet.Auto)]
[DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true)]
public static extern IntPtr GetParent(IntPtr hWnd);
[DllImport("user32.dll")]
@ -716,6 +716,9 @@ public static extern int AVISaveOptions(IntPtr window, int flags, int streams, [
[DllImport("dnsapi.dll")]
public static extern uint DnsFlushResolverCache();
[DllImport("uxtheme.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
public static extern int SetWindowTheme(IntPtr hWnd, string pszSubAppName, string pszSubIdList);
#endregion Other dll
}
}

View file

@ -503,26 +503,32 @@ private void AddTheme(ShareXTheme theme)
private void CbUseCustomTheme_CheckedChanged(object sender, EventArgs e)
{
Program.Settings.UseCustomTheme = cbUseCustomTheme.Checked;
UpdateThemeControls();
ApplySelectedTheme();
if (ready)
{
Program.Settings.UseCustomTheme = cbUseCustomTheme.Checked;
UpdateThemeControls();
ApplySelectedTheme();
}
}
private void CbThemes_SelectedIndexChanged(object sender, EventArgs e)
{
Program.Settings.SelectedTheme = cbThemes.SelectedIndex;
if (cbThemes.SelectedItem != null)
if (ready)
{
pgTheme.SelectedObject = cbThemes.SelectedItem;
}
else
{
pgTheme.SelectedObject = null;
}
Program.Settings.SelectedTheme = cbThemes.SelectedIndex;
UpdateThemeControls();
ApplySelectedTheme();
if (cbThemes.SelectedItem != null)
{
pgTheme.SelectedObject = cbThemes.SelectedItem;
}
else
{
pgTheme.SelectedObject = null;
}
UpdateThemeControls();
ApplySelectedTheme();
}
}
private void BtnThemeAdd_Click(object sender, EventArgs e)

View file

@ -22,7 +22,7 @@
<ProjectReference Include="..\ShareX.UploadersLib\ShareX.UploadersLib.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.22621.3233" />
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.26100.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="ZXing.Net" Version="0.16.9" />
</ItemGroup>