Example #1
0
 private void ReadOptions()
 {
     view.SetReleaseList(model.Releases.Values);
     view.SetModelList(model.Models.Select(x => x.Title));
     view.ClearReport();
     view.CommandMenuAvailable = true;
 }
 public PredictorPresenter(IPredictorModel model, IPredictorView view)
 {
     this.model = model;
     this.view = view;
     model.OnTitleUpdated += x => view.Title = x;
     model.OnClearReport += () => view.ClearReport();
     model.OnAddReport += x => view.AddReport(x);
     model.OnClearRocList += () => view.ClearROCs();
     model.OnRocAdded += view.AddRoc;
     model.OnReadyStateChanged += x => view.Ready = x;
     model.OnProgressStateChanged += x => view.Status = x;
     model.OnError += x => view.ShowError(x);
     view.OnOpenConfigFile += OpenConfigFile;
     view.OnPredict += Predict;
     view.OnShowROC += model.ShowROC;
     view.ShowFiles = model.ShowFiles;
     view.Evaluate = model.Evaluate;
     view.EvaluateUsingROC = model.EvaluateUsingROC;
     view.EvaluateRanking = model.EvaluateRanking;
     view.ShowEstimationStats = model.ShowEstimationStats;
     view.ShowTotalResult = model.ShowTotalResult;
     if (model.ReleaseSetGetting == ReleaseSetGettingAlgo.All)
     {
         view.ReleaseSetGettingAll = true;
     }
     else if (model.ReleaseSetGetting == ReleaseSetGettingAlgo.IncrementalGrowth)
     {
         view.ReleaseSetGettingIncrementalGrowth = true;
     }
     else
     {
         view.ReleaseSetGettingFixed = true;
     }
     view.ReleaseSetSize = model.ReleaseSetSize;
 }
Example #3
0
 public PredictorPresenter(IPredictorModel model, IPredictorView view)
 {
     this.model                    = model;
     this.view                     = view;
     model.OnTitleUpdated         += x => view.Title = x;
     model.OnClearReport          += () => view.ClearReport();
     model.OnAddReport            += x => view.AddReport(x);
     model.OnClearRocList         += () => view.ClearROCs();
     model.OnRocAdded             += view.AddRoc;
     model.OnReadyStateChanged    += x => view.Ready = x;
     model.OnProgressStateChanged += x => view.Status = x;
     model.OnError                += x => view.ShowError(x);
     view.OnOpenConfigFile        += OpenConfigFile;
     view.OnPredict               += Predict;
     view.OnShowROC               += model.ShowROC;
     view.ShowFiles                = model.ShowFiles;
     view.Evaluate                 = model.Evaluate;
     view.EvaluateUsingROC         = model.EvaluateUsingROC;
     view.EvaluateRanking          = model.EvaluateRanking;
     view.ShowEstimationStats      = model.ShowEstimationStats;
     view.ShowTotalResult          = model.ShowTotalResult;
     if (model.ReleaseSetGetting == ReleaseSetGettingAlgo.All)
     {
         view.ReleaseSetGettingAll = true;
     }
     else if (model.ReleaseSetGetting == ReleaseSetGettingAlgo.IncrementalGrowth)
     {
         view.ReleaseSetGettingIncrementalGrowth = true;
     }
     else
     {
         view.ReleaseSetGettingFixed = true;
     }
     view.ReleaseSetSize = model.ReleaseSetSize;
 }