public ExperimentoView(ExperimentoRealizado experimentoRealizado) { InitializeComponent(); Location = new Point(0, 0); Size = new Size(width, height); this.experimentoRealizado = experimentoRealizado; this.experimentoUmRealizado = experimentoRealizado.ExperimentoUmRealizado; this.experimentoUm = this.experimentoUmRealizado.ExperimentoUm; this.experimentoDoisRealizado = experimentoRealizado.ExperimentoDoisRealizado; this.experimentoDois = this.experimentoDoisRealizado.ExperimentoDois; Opacity = 0; btnCerteza.Visible = false; btnTalvez.Visible = false; pnInput.Visible = false; pnMensagem.Visible = false; tbInput.Text = ""; ViewUtils.CorrigeEscalaTodosOsFilhos(this); tamanhoFonteOriginal = lblNumero.Font.Size; this.experimentoUmRealizado.DateTimeInicio = DateTime.Now; ExperimentoUmRealizadoService.Salvar(experimentoUmRealizado); IniciarNovaFase(); }
private ExperimentoUm CriaExperimentoUmPelosCampos() { var experimentoUm = new ExperimentoUm { InstrucaoInicial = tbInstrucao1.Text, InstrucaoLinhaDeBase = tbInstrucaoLinhaDeBase.Text, TempoTelaPretaInicial = Convert.ToInt32(nudTelaPretaInicial1.Value), TempoTelaPretaITI = Convert.ToInt32(nudTelaPretaITI.Value), TempoApresentacaoEstimulo = Convert.ToInt32(nudTempoEstimulo.Value), TamanhoBlocoTentativas = Convert.ToInt32(nudTamanhoBloco.Value), TamanhoSequenciaInicial = Convert.ToInt32(nudSequenciaInicial.Value), CriterioAcertoPreTreino = Convert.ToInt32(nudAcertosPreTreino.Value), CriterioTalvezLinhaDeBase = Convert.ToInt32(nudTalvezLinhaDeBase.Value), NumeroBlocosFaseExperimental = Convert.ToInt32(nudBlocosFaseExperimental.Value), CriterioReforcoFaseExperimental = 0, }; ExperimentoUmService.Salvar(experimentoUm); if (experimentoUm.Id != 0) { idExperimentoUm = experimentoUm.Id; } else { experimentoUm.Id = idExperimentoUm; } return(experimentoUm); }
public static void Deletar(ExperimentoUm experimento) { Deletar(experimento, nomeTabela); }
public static void Salvar(ExperimentoUm experimento) { SalvarSeNaoRepetido(experimento, nomeTabela, sqlInsert, sqlUpdate, colunas); }