예제 #1
0
        public void Get_can_get_an_actor_from_a_persona_instance()
        {
            // Arrange
            var cast    = GetSut();
            var persona = new Sarah();

            // Act
            var sarah = cast.Get(persona);

            // Assert
            Assert.That(sarah, Is.Not.Null);
        }
예제 #2
0
        public void Get_returns_the_same_actor_if_used_twice_with_the_same_persona_instance()
        {
            // Arrange
            var cast    = GetSut();
            var persona = new Sarah();

            // Act
            var sarah      = cast.Get(persona);
            var sarahAgain = cast.Get(persona);

            // Assert
            Assert.That(sarahAgain, Is.SameAs(sarah));
        }
예제 #3
0
        public void Get_does_not_re_apply_actor_customisation_if_using_the_same_persona_instance_twice()
        {
            // Arrange
            var cast    = GetSut();
            var persona = new Sarah();

            // Act
            var sarah      = cast.Get(persona);
            var sarahAgain = cast.Get(persona);

            // Assert
            Assert.That(persona.GrantCount, Is.EqualTo(1));
        }
예제 #4
0
        private async void sarahButton_Clicked(object sender, EventArgs e)
        {
            if (counter2 % 2 == 0)
            {
                await Sarah.TranslateTo(0, -100, 2000, Easing.Linear);

                counter2++;
            }
            else
            {
                await Sarah.TranslateTo(0, 300, 2000, Easing.Linear);

                counter2++;
            }
        }
예제 #5
0
 private void button7_Click(object sender, EventArgs e)
 {
     label3.Text = "0";
     Sarah.Stop();
 }
예제 #6
0
 private void button8_Click(object sender, EventArgs e)
 {
     Sarah.Stop();
 }
예제 #7
0
 // Sarah
 private void button9_Click(object sender, EventArgs e)
 {
     Sarah.Start();
 }
예제 #8
0
        private void RegularCheck_Tick(object sender, EventArgs e)
        {
            // Thomas
            if (label1.Text == "900")
            {
                Console.Beep();
                Console.Beep();
                Console.Beep();
                Console.Beep();
                Console.Beep();
                Thomas.Stop();
                label1.Text = "0";
            }

            // Hannah
            if (label2.Text == "900")
            {
                Console.Beep();
                Console.Beep();
                Console.Beep();
                Console.Beep();
                Console.Beep();
                Hannah.Stop();
                label2.Text = "0";
            }

            // Sarah
            if (label3.Text == "900")
            {
                Console.Beep();
                Console.Beep();
                Console.Beep();
                Console.Beep();
                Console.Beep();
                Sarah.Stop();
                label3.Text = "0";
            }

            // Naomi
            if (label4.Text == "900")
            {
                Console.Beep();
                Console.Beep();
                Console.Beep();
                Console.Beep();
                Console.Beep();
                Naomi.Stop();
                label4.Text = "0";
            }

            // Leah
            if (label5.Text == "900")
            {
                Console.Beep();
                Console.Beep();
                Console.Beep();
                Console.Beep();
                Console.Beep();
                Leah.Stop();
                label5.Text = "0";
            }

            // Britney
            if (label6.Text == "900")
            {
                Console.Beep();
                Console.Beep();
                Console.Beep();
                Console.Beep();
                Console.Beep();
                Britney.Stop();
                label6.Text = "0";
            }
        }