Skip to content

Commit c12911e

Browse files
Remove #pragma statements from VB Code.
1 parent eb5affa commit c12911e

File tree

3 files changed

+1
-15
lines changed

3 files changed

+1
-15
lines changed

src/Microsoft.VisualBasic.Forms/src/Microsoft/VisualBasic/ApplicationServices/WindowsFormsApplicationBase.vb

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,10 @@ Namespace Microsoft.VisualBasic.ApplicationServices
6565

6666
Private _appSynchronizationContext As SynchronizationContext
6767

68-
#Disable Warning WFO5001 ' Type is for evaluation purposes only and is subject to change or removal in future updates.
69-
7068
' The ColorMode (Classic/Light, System, Dark) the user assigned to the ApplyApplicationsDefault event.
7169
' Note: We aim to expose this to the App Designer in later runtime/VS versions.
7270
Private _colorMode As SystemColorMode = SystemColorMode.Classic
7371

74-
#Enable Warning WFO5001
75-
7672
' We only need to show the splash screen once.
7773
' Protect the user from himself if they are overriding our app model.
7874
Private _didSplashScreen As Boolean
@@ -747,15 +743,13 @@ Namespace Microsoft.VisualBasic.ApplicationServices
747743
' Once all this is done, we give the User another chance to change the value by code through
748744
' the ApplyDefaults event.
749745
' Note: Overriding MinimumSplashScreenDisplayTime needs still to keep working!
750-
#Disable Warning WFO5001 ' Type is for evaluation purposes only and is subject to change or removal in future updates.
751746
Dim applicationDefaultsEventArgs As New ApplyApplicationDefaultsEventArgs(
752747
MinimumSplashScreenDisplayTime,
753748
HighDpiMode,
754749
ColorMode) With
755750
{
756751
.MinimumSplashScreenDisplayTime = MinimumSplashScreenDisplayTime
757752
}
758-
#Enable Warning WFO5001
759753

760754
RaiseEvent ApplyApplicationDefaults(Me, applicationDefaultsEventArgs)
761755

@@ -770,9 +764,6 @@ Namespace Microsoft.VisualBasic.ApplicationServices
770764
AsyncOperationManager.SynchronizationContext = New WindowsFormsSynchronizationContext()
771765

772766
_highDpiMode = applicationDefaultsEventArgs.HighDpiMode
773-
774-
#Disable Warning WFO5001 ' Type is for evaluation purposes only and is subject to change or removal in future updates.
775-
776767
_colorMode = applicationDefaultsEventArgs.ColorMode
777768

778769
' Then, it's applying what we got back as HighDpiMode.
@@ -781,6 +772,7 @@ Namespace Microsoft.VisualBasic.ApplicationServices
781772
If dpiSetResult Then
782773
_highDpiMode = Application.HighDpiMode
783774
End If
775+
784776
Debug.Assert(dpiSetResult, "We could not set the HighDpiMode.")
785777

786778
' Now, let's set VisualStyles and ColorMode:
@@ -790,8 +782,6 @@ Namespace Microsoft.VisualBasic.ApplicationServices
790782

791783
Application.SetColorMode(_colorMode)
792784

793-
#Enable Warning WFO5001
794-
795785
' We'll handle "/nosplash" for you.
796786
If Not (commandLineArgs.Contains("/nosplash") OrElse Me.CommandLineArgs.Contains("-nosplash")) Then
797787
ShowSplashScreen()

src/Microsoft.VisualBasic.Forms/tests/UnitTests/System/Windows/Forms/WindowsFormsApplicationBaseTests.vb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@ Namespace Microsoft.VisualBasic.Forms.Tests
1717
Public Sub Properties()
1818
UseCompatibleTextRendering.Should.BeFalse()
1919

20-
#Disable Warning WFO5001 ' Type is for evaluation purposes only and is subject to change or removal in future updates.
2120
ColorMode.Should.Be(SystemColorMode.Classic)
2221
ColorMode = SystemColorMode.Dark
2322
ColorMode.Should.Be(SystemColorMode.Dark)
24-
#Enable Warning WFO5001
2523

2624
EnableVisualStyles.Should.Be(False)
2725
EnableVisualStyles = True

src/System.Windows.Forms/System/Windows/Forms/Controls/Buttons/ButtonInternal/ButtonBaseAdapter.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,6 @@ internal void PaintField(
545545
/// <summary>
546546
/// Draws the button's image.
547547
/// </summary>
548-
#pragma warning disable WFO5001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
549548
internal void PaintImage(PaintEventArgs e, LayoutData layout)
550549
{
551550
if (Application.IsDarkModeEnabled && Control.DarkModeRequestState is true && Control.BackgroundImage is not null)
@@ -569,7 +568,6 @@ internal void PaintImage(PaintEventArgs e, LayoutData layout)
569568
DrawImageCore(e.GraphicsInternal, Control.Image, layout.ImageBounds, layout.ImageStart, layout);
570569
}
571570
}
572-
#pragma warning restore WFO5001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
573571

574572
internal static LayoutOptions CommonLayout(
575573
Rectangle clientRectangle,

0 commit comments

Comments
 (0)