Windows Form MVP:
View ---MainForm/UserControl/CustomControl, IMainFormView, IViewWithEventCommand.
IViewWithEventCommand {
public event EventHandler playButtonClicked {add {play.Clicked+=value;} remove}
public string prop1...
public SetCommands([]cmds); }
IMainFormView { public IView1, IView2}
Model/Mgr/Services ---- business Entity,its operations and Services calls to outside data sources.
Presenter --- Ctor MainFormPresenterNoDI(IMainformView) MainFormPresenterDI(IMainFormView, IMod1, IModService1).
CommandBase : ICommand : INPC {Execute(); CanExecute(), CanExecuteChanged}
Boostrapping: Program::Main() { new IView, MainForm, IPresenter, IModel, IService}
PlayView: IView ::SetCommands([]cmds) {INPC--no databinding PropChanged+={ btn.Enabled=cmd.CanExec();}; btn.Click+=cmd.exec
IEventAggregator { Publish(T msg); Subscribe(action); Unsubscribe(action);}
EventAggregator: IEventAggragator singleton, no need for boostraping.
PlayCommand : CommandBase ctor(IPlayer) override Exec() {_player.Play()}
Useful links
http://dockpanelsuite.com/
viperneo.github.io/winforms-newui/
windowsribbon.codeplex.com
explorer style
Infragistics Windows Form control
pinvoke.net
Sunday, March 13, 2016
Windows Form bits
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment