public static Counter GetInstance(IMathModel model = null) { if (instance == null) { instance = new Counter(model); } return(instance); }
private Counter(IMathModel model) { if (model != null) { math = model; } else { math = new LogisticModel(); } }
public ResearcherPresenter(IResearcherForm form, IMathModel model, IDataBaseModel dataBase) { this.form = form; this.model = model; this.dataBase = dataBase; this.form.calculate += Calculate; this.form.changeUser += ChangeUserLogics; this.form.materialChanged += FetchMaterialCoefficientsAndProperties; this.model.calculationFinished += ModelCalculationsFinished; this.form.generateReport += GenerateReport; }
public Drawer(IMathModel _model, Canvas _canvas) { model = _model; canvas = _canvas; }
public void ChangeMathModel(IMathModel newModel) { math = newModel; }