blob: 32fe13664e163c04758ba8f750cb3d807b58d031 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
using System.Collections.Generic;
namespace DesignPatterns.Adapter {
public class Presenter {
private readonly IView _view;
public Presenter( IView view ) {
_view = view;
}
public void Initialize( ) {
IList< IDropDownListItem > items = new List< IDropDownListItem >( );
items.Add( new DropDownListItem( "Yes", "1" ) );
items.Add( new DropDownListItem( "No", "2" ) );
_view.AreYouHappy.BindTo( items );
}
}
}
|