Skip to content

Commit

Permalink
Replace CSC enum with CommandStateChangeConstants enum from CsWin…
Browse files Browse the repository at this point in the history
…32 (#9913)

Replace CSC enum with CommandStateChangeConstants enum from CsWin32
  • Loading branch information
elachlan authored Sep 15, 2023
1 parent e628e1f commit 549eb61
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 20 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

internal partial class Interop
{
internal partial class SHDocVw
internal static partial class SHDocVw
{
[ComImport]
[Guid("34A715A0-6587-11D0-924A-0020AFC7AC4D")]
Expand All @@ -24,7 +24,7 @@ void ProgressChange(

[DispId(105)]
void CommandStateChange(
SHDocVw.CSC command,
CommandStateChangeConstants command,
bool enable);

[DispId(106)]
Expand Down
1 change: 1 addition & 0 deletions src/System.Windows.Forms.Primitives/src/NativeMethods.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ CoGetClassObject
COLOR_*
CombineRgn
COMDLG_FILTERSPEC
CommandStateChangeConstants
CommDlgExtendedError
COPYDATASTRUCT
CopyImage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ public WebBrowserEvent(WebBrowser parent)

public bool AllowNavigation { get; set; }

public void CommandStateChange(SHDocVw.CSC command, bool enable)
public void CommandStateChange(CommandStateChangeConstants command, bool enable)
{
if (command == SHDocVw.CSC.NAVIGATEBACK)
if (command == CommandStateChangeConstants.CSC_NAVIGATEBACK)
{
_parent.CanGoBackInternal = enable;
}
else if (command == SHDocVw.CSC.NAVIGATEFORWARD)
else if (command == CommandStateChangeConstants.CSC_NAVIGATEFORWARD)
{
_parent.CanGoForwardInternal = enable;
}
Expand Down

0 comments on commit 549eb61

Please sign in to comment.