public ProtectTaskPanePresenter(IProtectTaskPaneView view, IProtectTaskPaneModel model) { _model = model; _view = view; _view.PropertyChanged += OnViewPropertyChanged; _view.OnApplyClicked += OnApplyClicked; _model.StatusUpdate += OnStatusUpdate; }
public void Dispose() { if (_view != null) { _view.OnApplyClicked -= OnApplyClicked; _view.PropertyChanged -= OnViewPropertyChanged; } if (_model != null) { _model.StatusUpdate -= OnStatusUpdate; _model.Dispose(); _model = null; } }