123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
-
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace efunbox_xyyf_windows.baseMvp
- {
- public class BasePresenter<V>
- {
- protected V mView;
- /**
- * 绑定view,一般在初始化中调用该方法
- *
- * @param view view
- */
- public void attachView(V view)
- {
- this.mView = view;
- }
- /**
- * 解除绑定view,一般在onDestroy中调用
- */
- public void detachView()
- {
- this.mView = default;
- }
- /**
- * View是否绑定
- *
- * @return
- */
- public bool isViewAttached()
- {
- return mView != null;
- }
- }
- }
|