简体   繁体   English

WinForm的设计模式是什么

[英]what is the design pattern of WinForm

I'm studying design patterns.我正在研究设计模式。 I wondered what the design pattern of the project was basically created when I created the WinFoam project in the Visual Studio.我想知道我在Visual Studio中创建WinFoam项目时,项目的设计模式基本上是什么。 what is the design pattern of winform when I create new winform project in visual studio?当我在 visual studio 中创建新的 winform 项目时,winform 的设计模式是什么?

I suppose that no pattern is used for Form1.Designer.cs and Form1.cs .我想没有模式用于Form1.Designer.csForm1.cs It is just boilerplate code.它只是样板代码。 As wiki says :正如维基所说

In computer programming, boilerplate code, or simply boilerplate, are sections of code that are repeated in multiple places with little to no variation.在计算机编程中,样板代码(boilerplate code),或简称样板,是在多个地方重复的代码部分,几乎没有变化。

However, when you are creating handler for button click , then Observer pattern is used to connect button and its handler.但是,当您为按钮单击创建处理程序时, 观察者模式用于连接按钮及其处理程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM