コード例 #1
0
 public ISimpleElementPresenter Create(ISimpleElement element, ISimpleElementView view)
 {
     SimpleElementPresenter pres = null;
     if (element != null && view != null)
     {
         pres = new SimpleElementPresenter(element, view);
         view.SimplePresenter = pres;
     }
     return pres;
 }
コード例 #2
0
ファイル: SimpleElementPresenter.cs プロジェクト: BgRva/Blob1
 internal void SubscribeToView(ISimpleElementView view)
 {
     if (view != null)
     {
      //TODO   view.SelectionChanged += new SelectionEventHandler<IElementView, SelectionEventArgs>(_View_SelectionChanged);
     //    view.ExecuteButtonClicked += new ExecuteButtonClickEventHandler<IElementView, ButtonClickEventArgs>(_View_ExecuteButtonClicked);
     //    view.SettingsButtonClicked += new SettingsButtonClickEventHandler<IElementView, ButtonClickEventArgs>(_View_SettingsButtonClicked);
        //     view.ElementViewReset += new ElementViewResetEventHandler<IElementView, ElementViewResetEventArgs>(_View_ElementViewReset);
         // Not currently used by the element presenter, so don't subscribe
         //_View.PortViewSelectionChanged += new PortViewSelectionEventHandler<IElementView, PortViewSelectionEventArgs>(_View_PortViewSelectionChanged);
     }
 }
コード例 #3
0
ファイル: SimpleElementPresenter.cs プロジェクト: BgRva/Blob1
 internal void UnsubscribeFromView(ISimpleElementView view)
 {
     if (view != null)
     {
      //TODO       view.SelectionChanged -= _View_SelectionChanged;
       ////      view.ExecuteButtonClicked -= _View_ExecuteButtonClicked;
       //      view.SettingsButtonClicked -= _View_SettingsButtonClicked;
       //      view.ElementViewReset -= _View_ElementViewReset;
         // Not currently used by the element presenter, so don't subscribe
         //oldValue.PortViewSelectionChanged -= _View_PortViewSelectionChanged;
         view = null;
     }
 }
コード例 #4
0
ファイル: SimpleElementPresenter.cs プロジェクト: BgRva/Blob1
 /// <summary>
 /// Creates an instance of a presenter with references to <paramref name="element"/>
 /// and <paramref name="view"/>.  Sets the SimplePresenter property on view.
 /// </summary>
 /// <param name="element"></param>
 /// <param name="view"></param>
 public SimpleElementPresenter(ISimpleElement element, ISimpleElementView view)
 {
     SimpleElement = element;
     SimpleView = view;
     view.SimplePresenter = this;
 }