English 中文(简体)
C# Winforms, MVP structure
原标题:C# Winforms, MVP architecture
  • 时间:2010-01-14 10:09:35
  •  标签:
  • c#
  • winforms

He(......)

I m developing an application using C# Winforms and an MVP pattern, it s only a relatively simple app - although it is doing a fair amount of stuff, so I consider the MVP pattern to be a big help in organising the code.

I ve在WinForm启动之前,在方案类别中创建了一个拟使用的模型――一个STATIC案例。 (模型级为NOT静态字体)

I then create the main form (View) which creates a reference to its Presenter. (The View/Presenter classes are all non-static).

我在静态情况下的推理是让整个用户能够查阅同样的模型信息。 那时,当评估结束时,我能够从方案类别获得最新模型数据,并拯救需要坚持的任何东西。 当它把所有装载/节约放在一个地方时,那是冰。

不管怎样,每个示范类别只有一例,都不存在非行的联系和你有什么关系。

从我只能说一句话,在任何时候都需要查阅任何模式。

我确实有从事各种工作的背景工作者,但我并未提及这些地方的任何模式。 我将数据的价值从《模型》转至网上。 然后通过主线向相关模型传播信息。

我只是想把《示范案例》作为成文法,是永远绕过参考资料......(知道,通过背书主要形式,然后通过另一种形式等)的不便方式。

这样,《刑法》就象:

// this = ref to the view

PresenterA p = new PresenterA( this, Program.ModelA ); ...

(这几类人名不过是现任者A,《示范公约》等,这相当令人sil笑))

现在,我很相信有人会向我大声疾呼,告诉我,这是一件可怕的事情。

如果是的话,那些反对者现在可以发言,或者永远保持你们的和平。

TIA

(BTW, I m only a noob, I una t develop c# for a life, it s a hobby what)

:-

问题回答

我将使用一个框架,如





相关问题
Bring window to foreground after Mutex fails

I was wondering if someone can tell me what would be the best way to bring my application to the foreground if a mutex was not able to be created for a new instance. E.g.: Application X is running ...

How to start WinForm app minimized to tray?

I ve successfully created an app that minimizes to the tray using a NotifyIcon. When the form is manually closed it is successfully hidden from the desktop, taskbar, and alt-tab. The problem occurs ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

Handle DataTable.DataRow cell change event

I have a DataTable that has several DataColumns and DataRow. Now i would like to handle an event when cell of this DataRow is changed. How to do this in c#?

Apparent Memory Leak in DataGridView

How do you force a DataGridView to release its reference to a bound DataSet? We have a rather large dataset being displayed in a DataGridView and noticed that resources were not being freed after the ...

ALT Key Shortcuts Hidden

I am using VS2008 and creating forms. By default, the underscore of the character in a textbox when using an ampersand is not shown when I run the application. ex. "&Goto Here" is not ...

WPF-XAML window in Winforms Application

I have a Winforms application coded in VS C# 2008 and want to insert a WPF window into the window pane of Winforms application. Could you explain me how this is done.

热门标签