Ejemplo n.º 1
0
        public void Format_Text(string pattern, string input)
        {
            var runs = Awesome.FormatText(input, pattern).OfType <Run>().ToList();

            runs.Should().HaveCount(4);
            AssertIcon(runs[0].Text, IconChar.Bitcoin);
            runs[1].Text.Should().Be(" is a cryptocurrency. ");
            AssertIcon(runs[2].Text, IconChar.EuroSign);
            runs[3].Text.Should().Be(" is a fiat money.");
        }
        /**
         * @brief Event that occurs on clicking the play button
         * @remarks Sends a message to the engine to start or pause the simulation
         * @param[in] sender (object) The sender of this event
         * @param[in] e (RoutedEventArgs) The event arguments
         */
        private void PlayButtonClick(object sender, RoutedEventArgs e)
        {
            ToggleButton button = ((ToggleButton)sender);

            if (button.IsChecked == true)
            {
                Awesome.SetContent(button, FontAwesomeIcon.Stop);

                native.Networking.SNetSendData(
                    (uint)native.NetworkMessages.kStartedPlaying, null, 0);
            }
            else
            {
                Awesome.SetContent(button, FontAwesomeIcon.Play);

                native.Networking.SNetSendData(
                    (uint)native.NetworkMessages.kStoppedPlaying, null, 0);
            }
        }
Ejemplo n.º 3
0
 public void Add(Awesome entity)
 {
     _awesomeEfContext.Entry(entity).State = EntityState.Added;
     _awesomeEfContext.Awesome.Add(entity);
 }