Exemplo n.º 1
0
        public static Counter GetInstance(IMathModel model = null)
        {
            if (instance == null)
            {
                instance = new Counter(model);
            }

            return(instance);
        }
Exemplo n.º 2
0
 private Counter(IMathModel model)
 {
     if (model != null)
     {
         math = model;
     }
     else
     {
         math = new LogisticModel();
     }
 }
Exemplo n.º 3
0
 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;
 }
Exemplo n.º 4
0
 public Drawer(IMathModel _model, Canvas _canvas)
 {
     model = _model;
     canvas = _canvas;
 }
Exemplo n.º 5
0
 public void ChangeMathModel(IMathModel newModel)
 {
     math = newModel;
 }