//used when adding new material public MaterialModificationPresenter(IMaterialModificationView view, object norm) { _view = view; _dataConnector = new DataConnector(); view.Presenter = this; _workingMode = WindowMode.Mode.AddNew; if (_view.MaterialType == MaterialType.BaseMaterial) _normUnderConstruction = norm as BaseNorm; else _normUnderConstruction = norm as AdditiveNorm; }
//used when modifying material public MaterialModificationPresenter(IMaterialModificationView view, object norm, object materialToModify) { _workingMode = WindowMode.Mode.ModifyCurrent; _view = view; _dataConnector = new DataConnector(); view.Presenter = this; if (_view.MaterialType == MaterialType.BaseMaterial) _normUnderConstruction = norm as BaseNorm; else _normUnderConstruction = norm as AdditiveNorm; BindToControls(materialToModify); }