Ejemplo n.º 1
0
        public ExperimentoView(ExperimentoRealizado experimentoRealizado)
        {
            InitializeComponent();

            this.experimentoRealizado = experimentoRealizado;
            experimento = experimentoRealizado.Experimento;

            experimentoRealizado.DateTimeInicio = DateTime.Now;
            experimentoRealizado.RegistrarEvento(new Evento($"Iniciando o experimento de nome '{experimento.Nome}'", "Inicialização"));

            double heightRatio = height / 1080.0;
            double widthRatio  = width / 1920.0;

            ViewUtils.CorrigeTamanhoEPosicao(panel1, heightRatio, widthRatio);
            ViewUtils.CorrigeTamanhoEPosicao(panel2, heightRatio, widthRatio);
            ViewUtils.CorrigeTamanhoEPosicao(panel3, heightRatio, widthRatio);
            ViewUtils.CorrigeTamanhoEPosicao(Borda1, heightRatio, widthRatio);
            ViewUtils.CorrigeTamanhoEPosicao(Borda2, heightRatio, widthRatio);
            ViewUtils.CorrigeTamanhoEPosicao(Borda3, heightRatio, widthRatio);
            ViewUtils.CorrigeTamanhoEPosicao(Quadrado1, heightRatio, widthRatio);
            ViewUtils.CorrigeTamanhoEPosicao(Quadrado2, heightRatio, widthRatio);
            ViewUtils.CorrigeTamanhoEPosicao(Quadrado3, heightRatio, widthRatio);
            ViewUtils.CorrigeTamanhoEPosicao(label1, heightRatio, widthRatio);
            ViewUtils.CorrigeTamanhoEPosicao(label2, heightRatio, widthRatio);
            ViewUtils.CorrigeTamanhoEPosicao(label3, heightRatio, widthRatio);
            ViewUtils.CorrigeTamanhoEPosicao(labelPontosGanhos, heightRatio, widthRatio);
            ViewUtils.CorrigeTamanhoEPosicao(labelPontosPerdidos, heightRatio, widthRatio);
            ViewUtils.CorrigeTamanhoEPosicao(labelPontosTotais, heightRatio, widthRatio);

            ViewUtils.CorrigeFonte(label1, heightRatio);
            ViewUtils.CorrigeFonte(label2, heightRatio);
            ViewUtils.CorrigeFonte(label3, heightRatio);
            ViewUtils.CorrigeFonte(labelPontosGanhos, heightRatio);
            ViewUtils.CorrigeFonte(labelPontosPerdidos, heightRatio);
            ViewUtils.CorrigeFonte(labelPontosTotais, heightRatio);

            Opacity = 0;
            ApresentarLinhaDeBase(experimento.LinhaDeBase);
        }
Ejemplo n.º 2
0
 private void EventoFimTempoLinhaDeBase(Object myObject, EventArgs myEventArgs)
 {
     timerAtual.Stop();
     experimentoRealizado.RegistrarEvento(new Evento($"Tempo de apresentação da Linha de Base '{faseAtual.Nome}' ({faseAtual.TempoApresentacao} segundos) finalizado", "LinhaDeBase"));
     FadeOut();
     ApresentarCondicoes(experimento.Condicoes);
 }