File tree Expand file tree Collapse file tree 3 files changed +45
-7
lines changed
pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-CSharp Expand file tree Collapse file tree 3 files changed +45
-7
lines changed Original file line number Diff line number Diff line change 5353 "type" : " computed" ,
5454 "value" : " (Framework == \" netcoreapp3.1\" )"
5555 },
56+ "UseApplicationBoilerplate" : {
57+ "type" : " computed" ,
58+ "value" : " (Framework == \" net5.0\" )"
59+ },
5660 "langVersion" : {
5761 "type" : " parameter" ,
5862 "datatype" : " text" ,
9498 {
9599 "condition" : " (UseWindowsDesktopSdk)" ,
96100 "exclude" : [
97- " Company.WinFormsApplication1.csproj"
101+ " Company.WinFormsApplication1.csproj" ,
102+ " Program.cs"
103+ ],
104+ "rename" : {
105+ "Company.WinFormsApplication3x1.csproj" : " Company.WinFormsApplication1.csproj" ,
106+ "Program.boilerplate.cs" : " Program.cs"
107+ }
108+ },
109+ {
110+ "condition" : " (!UseWindowsDesktopSdk && UseApplicationBoilerplate)" ,
111+ "exclude" : [
112+ " Company.WinFormsApplication3x1.csproj" ,
113+ " Program.cs"
98114 ],
99115 "rename" : {
100- "Company.WinFormsApplication3x1.csproj " : " Company.WinFormsApplication1.csproj "
116+ "Program.boilerplate.cs " : " Program.cs "
101117 }
102118 },
103119 {
104- "condition" : " (!UseWindowsDesktopSdk)" ,
120+ "condition" : " (!UseWindowsDesktopSdk && !UseApplicationBoilerplate )" ,
105121 "exclude" : [
106- " Company.WinFormsApplication3x1.csproj"
122+ " Company.WinFormsApplication3x1.csproj" ,
123+ " Program.boilerplate.cs"
107124 ]
108125 }
109126 ]
Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . Collections . Generic ;
3+ using System . Linq ;
4+ using System . Threading . Tasks ;
5+ using System . Windows . Forms ;
6+
7+ namespace Company . WinFormsApplication1
8+ {
9+ static class Program
10+ {
11+ /// <summary>
12+ /// The main entry point for the application.
13+ /// </summary>
14+ [ STAThread ]
15+ static void Main ( )
16+ {
17+ Application . SetHighDpiMode ( HighDpiMode . SystemAware ) ;
18+ Application . EnableVisualStyles ( ) ;
19+ Application . SetCompatibleTextRenderingDefault ( false ) ;
20+ Application . Run ( new Form1 ( ) ) ;
21+ }
22+ }
23+ }
Original file line number Diff line number Diff line change @@ -14,9 +14,7 @@ static class Program
1414 [ STAThread ]
1515 static void Main ( )
1616 {
17- Application . SetHighDpiMode ( HighDpiMode . SystemAware ) ;
18- Application . EnableVisualStyles ( ) ;
19- Application . SetCompatibleTextRenderingDefault ( false ) ;
17+ ApplicationConfiguration . Initialize ( ) ;
2018 Application . Run ( new Form1 ( ) ) ;
2119 }
2220 }
You can’t perform that action at this time.
0 commit comments