public TabControlIteration(IFormPrincipal iformPrincipal, IMethod method) { InitializeComponent(); this.question = iformPrincipal.getQuestion(); if (question != null) { this.RTX_variable.Text = iformPrincipal.getQuestion().enunciado; } loadPanel(method, this.TLP_iteration); this.ActiveControl = this.TC_iterations; this.TC_iterations.Focus(); }
public FirstElicitationPanel(ElicitationMethod elicitationMethod, IFormPrincipal ifPrincipal) { InitializeComponent(); this.ifPrincipal = ifPrincipal; this.elicitationMethod = elicitationMethod; firstPanelList.Add(this.PN_startElicitationFirmDirecBisec); initFirstPanel(elicitationMethod); question = ifPrincipal.getQuestion(); this.displayChartSeries(question); List <double> lines = new List <double>(); this.ifPrincipal.markChoosableAreaChartSeries(lines); }
public List <double> getGrid() { int entreCount = 0; Question question = ifPrincipal.getQuestion(); int nAltern = question.alternatives.Count; List <double> grid = new List <double>(); List <List <double> > gridBuild = new List <List <double> >(); string distribuicao = question.distribuicao; if (question.distribuicao.IndexOf("\t") > 0) { distribuicao = question.distribuicao.Replace("\t", " "); } String[] dist = distribuicao.Split(new char[] { ';' }); if (question.ehVariavelNominal == 0) //Eh Numerico { if (doubleX != null) //TODO: Prof Paulo write: pra que esse "&& !dist.Equals(DefaultConfig.ST_DIST_GEOMETRIC)"??? { grid = ElicitationHelper.unDoubleXVector(doubleX).ToList(); } else { for (int i = 0; i < nAltern; i++) { gridBuild.Add(getPatternsAndValue(((Alternative)question.alternatives[i]).evento)); } grid.Add(gridBuild[0][1]); grid.Add(gridBuild[0][2]); for (int i = 1; i < nAltern - 1; i++) { if ((int)SimbolosMatematicos.entre == gridBuild[i][0] && entreCount == 0) { entreCount += 1; //grid.Add(gridBuild[i][1]); grid.Add(gridBuild[i][2]); } else if (entreCount >= 1 && (dist.Equals(DefaultConfig.ST_DIST_BINOMIAL) || dist.Equals(DefaultConfig.ST_DIST_GEOMETRIC))) { grid.Add(gridBuild[i][1] + 1); //grid.Add(gridBuild[i][2]); } else { grid.Add(gridBuild[i][1]); //grid.Add(gridBuild[i][2]); } } grid.Add(gridBuild[nAltern - 1][2]); } } else { if (dist[0].Trim() == DefaultConfig.ST_DIST_DIRAC) { nAltern += 1; //Adicionando mais um elemento para que funcione com o mesmo código que o Geométrico. } for (int i = 0; i < nAltern; i++) { grid.Add(i); } //grid = this.getX().ToList(); } return(grid); }