Skip to content

Commit

Permalink
Changes DemoConsole and DesignSurfaceExt projects to adopt implicit u…
Browse files Browse the repository at this point in the history
…sings (#12885)

Adds implicit usings to DemoConsole and DesignSurfaceExt projects

Co-authored-by: Ricardo Bossan (BEYONDSOFT CONSULTING INC) (from Dev Box) <[email protected]>
  • Loading branch information
ricardobossan and Ricardo Bossan (BEYONDSOFT CONSULTING INC) (from Dev Box) authored Feb 21, 2025
1 parent 9bd9e40 commit f280449
Show file tree
Hide file tree
Showing 22 changed files with 28 additions and 69 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Windows.Forms;
using System.ComponentModel;

namespace TestConsole;

[Designer(typeof(CustomButtonDesigner), typeof(System.ComponentModel.Design.IDesigner))]
[Designer(typeof(CustomButtonDesigner), typeof(IDesigner))]
public class CustomButton : Button
{
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.ComponentModel.Design;
using System.Windows.Forms.Design;

namespace TestConsole;

public class CustomButtonDesigner : ControlDesigner
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.ComponentModel;
using System.ComponentModel.Design;
using System.Drawing;

namespace TestConsole;

public class CustomButtonDesignerActionList : DesignerActionList
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.ComponentModel.Design;
using System.Diagnostics;

namespace TestConsole;

internal class DesignerActionVerbItem : DesignerActionMethodItem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<!-- The files for this project have been removed from the .NET product due to licensing issues. -->
<ExcludeFromDotNetBuild>true</ExcludeFromDotNetBuild>
<IsTestUtilityProject>true</IsTestUtilityProject>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

global using System.Windows.Forms;
global using System.Drawing;
global using System.Diagnostics;
global using System.ComponentModel;
global using System.ComponentModel.Design;
global using System.Windows.Forms.Design;
global using DesignSurfaceExt;
global using Timer = System.Windows.Forms.Timer;

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Drawing;
using System.Windows.Forms;

namespace TestConsole;

public partial class MainForm
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Drawing;
using System.Windows.Forms;

namespace TestConsole;

public partial class MainForm
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Drawing;
using System.Windows.Forms;
using System.ComponentModel.Design;

using DesignSurfaceExt;
using Timer = System.Windows.Forms.Timer;
using System.ComponentModel;

namespace TestConsole;

public partial class MainForm : Form
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Windows.Forms;

namespace TestConsole;

internal class Program
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.ComponentModel.Design;
using System.Drawing;
using System.ComponentModel;
using System.Windows.Forms;
using System.ComponentModel.Design.Serialization;
using System.Windows.Forms.Design;

namespace DesignSurfaceExt;

public class DesignSurfaceExt : DesignSurface, IDesignSurfaceExt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<!-- The files for this project have been removed from the .NET product due to licensing issues. -->
<ExcludeFromDotNetBuild>true</ExcludeFromDotNetBuild>
<IsTestUtilityProject>true</IsTestUtilityProject>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.ComponentModel.Design;
using System.Windows.Forms.Design;

namespace DesignSurfaceExt;

internal sealed class DesignerOptionServiceExt4SnapLines : DesignerOptionService
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Windows.Forms;
using System.ComponentModel.Design.Serialization;
using System.Collections;

namespace DesignSurfaceExt;

internal sealed class DesignerSerializationServiceImpl : IDesignerSerializationService
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

global using System.Windows.Forms;
global using System.Drawing;
global using System.ComponentModel;
global using System.ComponentModel.Design;
global using System.ComponentModel.Design.Serialization;
global using System.Windows.Forms.Design;
global using System.Reflection;
global using System.Collections;
global using System.Collections.Concurrent;
global using System.Collections.Immutable;
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.ComponentModel.Design;
using System.Windows.Forms;
using System.ComponentModel;
using System.Drawing;

namespace DesignSurfaceExt;

public interface IDesignSurfaceExt
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.ComponentModel.Design.Serialization;
using System.ComponentModel;

// - NameCreationServiceImp - Implementing INameCreationService
// - The INameCreationService interface is used to supply a name to the control just created
// - In the CreateName() we use the same naming algorithm used by Visual Studio: just
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.ComponentModel.Design;
using System.Reflection;
using System.Windows.Forms;

namespace DesignSurfaceExt;

public class PropertyGridExt : PropertyGrid
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.ComponentModel.Design;
using System.Reflection;

namespace DesignSurfaceExt;

public class TabOrderHooker
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Immutable;
using System.Reflection;

namespace System.ComponentModel.Design;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.ComponentModel.Design;

namespace DesignSurfaceExt;

public class UndoEngineExt : UndoEngine
Expand Down

0 comments on commit f280449

Please sign in to comment.