Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize C# FolderBrowserDialog example #9650

Merged
merged 3 commits into from
Mar 15, 2024
Merged

Conversation

Varriount
Copy link
Contributor

Update the C# example for the FolderBrowserDialog class to use MenuStrip, MenuStripItem, etc. classes instead of the deprecated MainMenu and MenuItem classes. Also make a few changes with regards to trailing spaces and formatting.

I left the names of all the variables, etc. the same so that it would differ too much from the other examples (and also because adding ToolStrip to the variable names wouldn't really justify the length increase).

Update the C# example for the FolderBrowserDialog class to use MenuStrip, MenuStripItem, etc. classes instead of the deprecated MainMenu and MenuItem classes.
@Varriount Varriount requested a review from a team as a code owner February 27, 2024 23:37
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-WinForms Issues or PRs that relate to WinForms. label Feb 27, 2024
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Feb 27, 2024
@Varriount
Copy link
Contributor Author

@dotnet-policy-service agree

This comment was marked as outdated.

Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Varriount

Can you address the suggestion I made? Once that's done, the build should complete successfully, and I'll merge this PR.

Also, in order for the CI build to pass, you need to add a .csproj file so the project builds. Since this is a desktop example, it will need a Visual Studio project, and a snippets.5000.json config file to specify Visual Studio as the build engine. There are several in this repo that you can copy to the project.

@dotnet-policy-service dotnet-policy-service bot added the needs-author-action An issue or pull request that requires more info or actions from the author. label Feb 28, 2024
@dotnet-policy-service dotnet-policy-service bot removed the needs-author-action An issue or pull request that requires more info or actions from the author. label Feb 28, 2024
@Varriount Varriount requested a review from BillWagner February 28, 2024 20:14
Copy link

Learn Build status updates of commit 4a2e71b:

✅ Validation status: passed

File Status Preview URL Details
snippets/csharp/System.Windows.Forms/FolderBrowserDialog/Overview/form1.cs ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

@gewarren
Copy link
Contributor

gewarren commented Mar 6, 2024

@Varriount Can you add the project file as well? Something like this one:

(You don't need the snippets5000.json file that Bill mentioned.)

Copy link

Learn Build status updates of commit 079f31e:

✅ Validation status: passed

File Status Preview URL Details
snippets/csharp/System.Windows.Forms/FolderBrowserDialog/Overview/form1.cs ✅Succeeded View
snippets/csharp/System.Windows.Forms/FolderBrowserDialog/Overview/Project.csproj ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

@BillWagner BillWagner merged commit e106740 into dotnet:main Mar 15, 2024
3 checks passed
@Varriount Varriount deleted the patch-1 branch March 15, 2024 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-WinForms Issues or PRs that relate to WinForms. community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants