Updated dependencies on DWM changes

pull/10/head
David Hall 2017-12-20 13:09:23 -07:00
parent b180778f2d
commit 4c0d2feeaa
5 changed files with 7 additions and 6 deletions

View File

@ -50,6 +50,7 @@ CREDUI_INFO
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Core\Vanara.Core.csproj" />
<ProjectReference Include="..\Kernel32\Vanara.PInvoke.Kernel32.csproj" />
<ProjectReference Include="..\Shared\Vanara.PInvoke.Shared.csproj" />
</ItemGroup>
</Project>

View File

@ -187,7 +187,7 @@ namespace Vanara.Windows.Forms
ref tff, out tRect, out iRect);
// Draw background
if (SupportGlass && !this.IsDesignMode() && DesktopWindowManager.IsCompositionEnabled())
if (SupportGlass && !this.IsDesignMode() && DesktopWindowManager.CompositionEnabled)
e.Graphics.Clear(Color.Black);
else
{
@ -220,7 +220,7 @@ namespace Vanara.Windows.Forms
}
else
{
var br = DesktopWindowManager.IsCompositionEnabled() ? SystemBrushes.ActiveCaptionText : SystemBrushes.ControlText;
var br = DesktopWindowManager.CompositionEnabled ? SystemBrushes.ActiveCaptionText : SystemBrushes.ControlText;
var sf = new StringFormat(StringFormat.GenericDefault);
if (rtl == RightToLeft.Yes) sf.FormatFlags |= StringFormatFlags.DirectionRightToLeft;
e.Graphics.DrawString(Text, Font, br, ClientRectangle, sf);

View File

@ -82,7 +82,7 @@ namespace Vanara.Windows.Forms
protected override void OnPaint(PaintEventArgs e)
{
if (!this.IsDesignMode() && SupportGlass && DesktopWindowManager.IsCompositionEnabled())
if (!this.IsDesignMode() && SupportGlass && DesktopWindowManager.CompositionEnabled)
try { e.Graphics.Clear(Color.Black); } catch { }
else
{

View File

@ -78,7 +78,7 @@ namespace Vanara.Windows.Forms
/// <param name="e">A <see cref="T:System.Windows.Forms.PaintEventArgs" /> that contains the event data.</param>
protected override void OnPaint(PaintEventArgs e)
{
if (!this.IsDesignMode() && SupportGlass && DesktopWindowManager.IsCompositionEnabled())
if (!this.IsDesignMode() && SupportGlass && DesktopWindowManager.CompositionEnabled)
try { e.Graphics.Clear(Color.Black); } catch { }
else
{

View File

@ -220,7 +220,7 @@ namespace Vanara.Windows.Forms
private void form_Resize(object sender, EventArgs e)
{
var form = sender as Form;
if ((DesktopWindowManager.IsCompositionEnabled() && GetGlassEnabled(form)) || form.IsDesignMode())
if ((DesktopWindowManager.CompositionEnabled && GetGlassEnabled(form)) || form.IsDesignMode())
InvalidateNonGlassClientArea(form);
}
@ -247,7 +247,7 @@ namespace Vanara.Windows.Forms
private void GlassifyForm(Form form, Graphics g = null)
{
if (!(DesktopWindowManager.IsCompositionEnabled() && GetGlassEnabled(form)) && !form.IsDesignMode())
if (!(DesktopWindowManager.CompositionEnabled && GetGlassEnabled(form)) && !form.IsDesignMode())
return;
if (g == null) g = form.CreateGraphics();